Local-first X/Twitter research archive, search, bookmark capture, and portable bundle export by Kyle McCleary.
Per
// ==UserScript==
// @name Scrollmark
// @name:zh-CN Scrollmark
// @name:zh-TW Scrollmark
// @name:ja Scrollmark
// @namespace https://github.com/kmccleary3301/scrollmark
// @version 1.2.0
// @author Kyle McCleary
// @description Local-first X/Twitter research archive, search, bookmark capture, and portable bundle export by Kyle McCleary.
// @description:zh-CN 本地优先的 X/Twitter 研究归档、搜索、书签采集与可移植 Bundle 导出工具。
// @description:zh-TW 本地優先的 X/Twitter 研究歸檔、搜尋、書籤擷取與可攜式 Bundle 匯出工具。
// @description:ja ローカルファーストの X/Twitter 研究アーカイブ、検索、ブックマーク取得、ポータブル Bundle 出力ツール。
// @license MIT
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABmklEQVR4Ae3XA4wcARSA4dq2bUQ1g9pRbVtBzai2otpug9pxUttn2753/3m9Ozq/5NsdvvfGM6VKoshE8/ORFbAMbxCGWHzDHjS2sXxPlM0eKYclGoq3w1eIHVGYikaYg6e4ZppgAgQrVBSvDw+IEylIhSAATUyTHIYgFdsUNnAGosAfDMccLMtOchli4g7quFC8FhIhCsRD8Bk1sxMdgVjwxRyUdtDABIgKH9DQNNEkiB1fMB9VbDSwEKLQJ1S1TFQRXhAHYnADy9ETdTEeotAze7tzNJIhCiRBFLpnq/hmzMR65UkVO2WrgaOQPLLW3u6XPDLAVgOl8R5isEhUtHcSdkEoxEBXnN3ZuuMbxCDDnTVQF52xBcEQHX1BaWcNtDLwMpzg6tNtN0RnD5U8XsviGkQnYWih9CWjNBbDHaJBMsZqec8rjV54B1EoFXO0Fh+DrxCFEjBTTdFy6IvNGu4Hf9FXSdGheAUvjZdgLPajqtp3+jl4jVSIAgHYjRZ6fWC0wSpcwScEQZCMUPzEfezEYJQrVRKFOdIAZGq1QBG8EiYAAAAASUVORK5CYII=
// @homepage https://github.com/kmccleary3301/scrollmark
// @homepageURL https://github.com/kmccleary3301/scrollmark
// @supportURL https://github.com/kmccleary3301/scrollmark/issues
// @match *://twitter.com/*
// @match *://x.com/*
// @match *://mobile.x.com/*
// @connect cdn.syndication.twimg.com
// @grant GM_addStyle
// @grant GM_registerMenuCommand
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @inject-into page
// @run-at document-start
// ==/UserScript==
(t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const o=document.createElement("style");o.textContent=t,document.head.append(o)})(` #twe-root *,#twe-root :before,#twe-root :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#twe-root ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#twe-root *,#twe-root :before,#twe-root :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}#twe-root :before,#twe-root :after{--tw-content: ""}#twe-root,#twe-root :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}#twe-root{margin:0;line-height:inherit}#twe-root hr{height:0;color:inherit;border-top-width:1px}#twe-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#twe-root h1,#twe-root h2,#twe-root h3,#twe-root h4,#twe-root h5,#twe-root h6{font-size:inherit;font-weight:inherit}#twe-root a{color:inherit;text-decoration:inherit}#twe-root b,#twe-root strong{font-weight:bolder}#twe-root code,#twe-root kbd,#twe-root samp,#twe-root pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}#twe-root small{font-size:80%}#twe-root sub,#twe-root sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}#twe-root sub{bottom:-.25em}#twe-root sup{top:-.5em}#twe-root table{text-indent:0;border-color:inherit;border-collapse:collapse}#twe-root button,#twe-root input,#twe-root optgroup,#twe-root select,#twe-root textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}#twe-root button,#twe-root select{text-transform:none}#twe-root button,#twe-root input:where([type=button]),#twe-root input:where([type=reset]),#twe-root input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}#twe-root :-moz-focusring{outline:auto}#twe-root :-moz-ui-invalid{box-shadow:none}#twe-root progress{vertical-align:baseline}#twe-root ::-webkit-inner-spin-button,#twe-root ::-webkit-outer-spin-button{height:auto}#twe-root [type=search]{-webkit-appearance:textfield;outline-offset:-2px}#twe-root ::-webkit-search-decoration{-webkit-appearance:none}#twe-root ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}#twe-root summary{display:list-item}#twe-root blockquote,#twe-root dl,#twe-root dd,#twe-root h1,#twe-root h2,#twe-root h3,#twe-root h4,#twe-root h5,#twe-root h6,#twe-root hr,#twe-root figure,#twe-root p,#twe-root pre{margin:0}#twe-root fieldset{margin:0;padding:0}#twe-root legend{padding:0}#twe-root ol,#twe-root ul,#twe-root menu{list-style:none;margin:0;padding:0}#twe-root dialog{padding:0}#twe-root textarea{resize:vertical}#twe-root input::-moz-placeholder,#twe-root textarea::-moz-placeholder{opacity:1;color:#9ca3af}#twe-root input::placeholder,#twe-root textarea::placeholder{opacity:1;color:#9ca3af}#twe-root button,#twe-root [role=button]{cursor:pointer}#twe-root :disabled{cursor:default}#twe-root img,#twe-root svg,#twe-root video,#twe-root canvas,#twe-root audio,#twe-root iframe,#twe-root embed,#twe-root object{display:block;vertical-align:middle}#twe-root img,#twe-root video{max-width:100%;height:auto}#twe-root [hidden]:where(:not([hidden=until-found])){display:none}#twe-root,#twe-root [data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){#twe-root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media(prefers-color-scheme:dark){#twe-root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}#twe-root{-webkit-tap-highlight-color:transparent}#twe-root *{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}#twe-root *:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}#twe-root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 15.2344% .017892 200.026556;--sc: 15.787% .020249 356.29965;--ac: 15.8762% .029206 78.618794;--nc: 84.7148% .013247 313.189598;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--p: 76.172% .089459 200.026556;--s: 78.9351% .101246 356.29965;--a: 79.3811% .146032 78.618794;--n: 23.5742% .066235 313.189598;--b1: 97.7882% .00418 56.375637;--b2: 93.9822% .007638 61.449292;--b3: 91.5861% .006811 53.440502;--bc: 23.5742% .066235 313.189598;--rounded-btn: 30.4px;--tab-border: 2px;--tab-radius: 11.2px}@media(prefers-color-scheme:dark){#twe-root{color-scheme:dark;--b2: 26.8053% .020556 277.508664;--b3: 24.7877% .019009 277.508664;--pc: 15.0922% .036614 346.812432;--sc: 14.8405% .029709 301.883095;--ac: 16.6785% .024826 66.558491;--nc: 87.8891% .006515 275.524078;--inc: 17.6526% .018676 212.846491;--suc: 17.4199% .043903 148.024881;--wac: 19.1068% .026849 112.757109;--erc: 13.6441% .041266 24.430965;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 75.4611% .18307 346.812432;--s: 74.2023% .148546 301.883095;--a: 83.3927% .124132 66.558491;--n: 39.4456% .032576 275.524078;--b1: 28.8229% .022103 277.508664;--bc: 97.7477% .007913 106.545019;--in: 88.263% .09338 212.846491;--su: 87.0995% .219516 148.024881;--wa: 95.5338% .134246 112.757109;--er: 68.2204% .206328 24.430965}}#twe-root [data-theme=cupcake]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 15.2344% .017892 200.026556;--sc: 15.787% .020249 356.29965;--ac: 15.8762% .029206 78.618794;--nc: 84.7148% .013247 313.189598;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--p: 76.172% .089459 200.026556;--s: 78.9351% .101246 356.29965;--a: 79.3811% .146032 78.618794;--n: 23.5742% .066235 313.189598;--b1: 97.7882% .00418 56.375637;--b2: 93.9822% .007638 61.449292;--b3: 91.5861% .006811 53.440502;--bc: 23.5742% .066235 313.189598;--rounded-btn: 30.4px;--tab-border: 2px;--tab-radius: 11.2px}#twe-root [data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}#twe-root [data-theme=emerald]{color-scheme:light;--b2: 93% 0 0;--b3: 86% 0 0;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 76.6626% .135433 153.450024;--pc: 33.3872% .040618 162.240129;--s: 61.3028% .202368 261.294233;--sc: 100% 0 0;--a: 72.7725% .149783 33.200363;--ac: 0% 0 0;--n: 35.5192% .032071 262.988584;--nc: 98.4625% .001706 247.838921;--b1: 100% 0 0;--bc: 35.5192% .032071 262.988584;--animation-btn: 0;--animation-input: 0;--btn-focus-scale: 1}#twe-root [data-theme=cyberpunk]{color-scheme:light;--b2: 87.8943% .16647 104.32;--b3: 81.2786% .15394 104.32;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--bc: 18.902% .0358 104.32;--pc: 14.844% .0418 6.35;--sc: 16.666% .0368 204.72;--ac: 14.372% .04352 310.43;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--p: 74.22% .209 6.35;--s: 83.33% .184 204.72;--a: 71.86% .2176 310.43;--n: 23.04% .065 269.31;--nc: 94.51% .179 104.32;--b1: 94.51% .179 104.32;--rounded-box: 0;--rounded-btn: 0;--rounded-badge: 0;--tab-radius: 0}#twe-root [data-theme=valentine]{color-scheme:light;--b2: 88.0567% .024834 337.06289;--b3: 81.4288% .022964 337.06289;--pc: 13.7239% .030755 15.066527;--sc: 14.3942% .029258 293.189609;--ac: 14.2537% .014961 197.828857;--inc: 90.923% .043042 262.880917;--suc: 12.541% .033982 149.213788;--wac: 13.3168% .031484 58.31834;--erc: 14.614% .0414 27.33;--rounded-box: 16px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--p: 68.6197% .153774 15.066527;--s: 71.971% .14629 293.189609;--a: 71.2685% .074804 197.828857;--n: 54.6053% .143342 358.004839;--nc: 90.2701% .037202 336.955191;--b1: 94.6846% .026703 337.06289;--bc: 37.3085% .081131 4.606426;--in: 54.615% .215208 262.880917;--su: 62.7052% .169912 149.213788;--wa: 66.584% .157422 58.31834;--er: 73.07% .207 27.33;--rounded-btn: 30.4px;--tab-radius: 11.2px}#twe-root [data-theme=lofi]{color-scheme:light;--inc: 15.908% .0206 205.9;--suc: 18.026% .0306 164.14;--wac: 17.674% .027 79.94;--erc: 15.732% .03 28.47;--border-btn: 1px;--tab-border: 1px;--p: 15.9066% 0 0;--pc: 100% 0 0;--s: 21.455% .001566 17.278957;--sc: 100% 0 0;--a: 26.8618% 0 0;--ac: 100% 0 0;--n: 0% 0 0;--nc: 100% 0 0;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.268% .001082 17.17934;--bc: 0% 0 0;--in: 79.54% .103 205.9;--su: 90.13% .153 164.14;--wa: 88.37% .135 79.94;--er: 78.66% .15 28.47;--rounded-box: 4px;--rounded-btn: 2px;--rounded-badge: 2px;--tab-radius: 2px;--animation-btn: 0;--animation-input: 0;--btn-focus-scale: 1}#twe-root [data-theme=dracula]{color-scheme:dark;--b2: 26.8053% .020556 277.508664;--b3: 24.7877% .019009 277.508664;--pc: 15.0922% .036614 346.812432;--sc: 14.8405% .029709 301.883095;--ac: 16.6785% .024826 66.558491;--nc: 87.8891% .006515 275.524078;--inc: 17.6526% .018676 212.846491;--suc: 17.4199% .043903 148.024881;--wac: 19.1068% .026849 112.757109;--erc: 13.6441% .041266 24.430965;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 75.4611% .18307 346.812432;--s: 74.2023% .148546 301.883095;--a: 83.3927% .124132 66.558491;--n: 39.4456% .032576 275.524078;--b1: 28.8229% .022103 277.508664;--bc: 97.7477% .007913 106.545019;--in: 88.263% .09338 212.846491;--su: 87.0995% .219516 148.024881;--wa: 95.5338% .134246 112.757109;--er: 68.2204% .206328 24.430965}#twe-root [data-theme=cmyk]{color-scheme:light;--b2: 93% 0 0;--b3: 86% 0 0;--bc: 20% 0 0;--pc: 14.3544% .02666 239.443325;--sc: 12.8953% .040552 359.339283;--ac: 18.8458% .037948 105.306968;--nc: 84.3557% 0 0;--inc: 13.6952% .0189 217.284104;--suc: 89.3898% .032505 321.406278;--wac: 14.2473% .031969 52.023412;--erc: 12.4027% .041677 28.717543;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 71.7722% .133298 239.443325;--s: 64.4766% .202758 359.339283;--a: 94.2289% .189741 105.306968;--n: 21.7787% 0 0;--b1: 100% 0 0;--in: 68.4759% .094499 217.284104;--su: 46.949% .162524 321.406278;--wa: 71.2364% .159843 52.023412;--er: 62.0133% .208385 28.717543}#twe-root [data-theme=business]{color-scheme:dark;--b2: 22.6487% 0 0;--b3: 20.944% 0 0;--bc: 84.8707% 0 0;--pc: 88.3407% .019811 251.473931;--sc: 12.8185% .005481 229.389418;--ac: 13.4542% .033545 35.791525;--nc: 85.4882% .00265 253.041249;--inc: 12.5233% .028702 240.033697;--suc: 14.0454% .018919 156.59611;--wac: 15.4965% .023141 81.519177;--erc: 90.3221% .029356 29.674507;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 41.7036% .099057 251.473931;--s: 64.0924% .027405 229.389418;--a: 67.271% .167726 35.791525;--n: 27.441% .01325 253.041249;--b1: 24.3535% 0 0;--in: 62.6163% .143511 240.033697;--su: 70.2268% .094594 156.59611;--wa: 77.4824% .115704 81.519177;--er: 51.6105% .14678 29.674507;--rounded-box: 4px;--rounded-btn: 2px;--rounded-badge: 2px}#twe-root [data-theme=winter]{color-scheme:light;--pc: 91.372% .051 257.57;--sc: 88.5103% .03222 282.339433;--ac: 11.988% .038303 335.171434;--nc: 83.9233% .012704 257.651965;--inc: 17.6255% .017178 214.515264;--suc: 16.0988% .015404 197.823719;--wac: 17.8345% .009167 71.47031;--erc: 14.6185% .022037 20.076293;--rounded-box: 16px;--rounded-btn: 8px;--rounded-badge: 30.4px;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: 8px;--p: 56.86% .255 257.57;--s: 42.5516% .161098 282.339433;--a: 59.9398% .191515 335.171434;--n: 19.6166% .063518 257.651965;--b1: 100% 0 0;--b2: 97.4663% .011947 259.822565;--b3: 93.2686% .016223 262.751375;--bc: 41.8869% .053885 255.824911;--in: 88.1275% .085888 214.515264;--su: 80.4941% .077019 197.823719;--wa: 89.1725% .045833 71.47031;--er: 73.0926% .110185 20.076293}#twe-root .alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:16px;text-align:center;border-radius:var(--rounded-box, 16px);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:16px;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media(min-width:640px){#twe-root .alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}#twe-root .avatar{position:relative;display:inline-flex}#twe-root .avatar>div{display:block;aspect-ratio:1 / 1;overflow:hidden}#twe-root .avatar img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}#twe-root .avatar.placeholder>div{display:flex;align-items:center;justify-content:center}#twe-root .badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:20px;font-size:14px;line-height:20px;width:-moz-fit-content;width:fit-content;padding-left:9.008px;padding-right:9.008px;border-radius:var(--rounded-badge, 30.4px);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media(hover:hover){#twe-root .checkbox-accent:hover{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)))}#twe-root .label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root .menu li>*:not(ul,.menu-title,details,.btn):active,#twe-root .menu li>*:not(ul,.menu-title,details,.btn).active,#twe-root .menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .tab:hover{--tw-text-opacity: 1}#twe-root .table tr.hover:hover,#twe-root .table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .\\!table tr.hover:hover,#twe-root .\\!table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1 !important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important}#twe-root .table-zebra tr.hover:hover,#twe-root .table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}#twe-root .btn{display:inline-flex;height:48px;min-height:48px;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, 8px);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:16px;padding-right:16px;text-align:center;font-size:14px;line-height:1em;gap:8px;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}#twe-root .btn-disabled,#twe-root .btn[disabled],#twe-root .btn:disabled{pointer-events:none}#twe-root :where(.btn:is(input[type=checkbox])),#twe-root :where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}#twe-root .btn:is(input[type=checkbox]):after,#twe-root .btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}#twe-root .card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 16px)}#twe-root .card:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .card figure{display:flex;align-items:center;justify-content:center}#twe-root .card.image-full{display:grid}#twe-root .card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}#twe-root .card.image-full:before,#twe-root .card.image-full>*{grid-column-start:1;grid-row-start:1}#twe-root .card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}#twe-root .card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:24px;width:24px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}#twe-root .divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:16px;margin-bottom:16px;height:16px;white-space:nowrap}#twe-root .divider:before,#twe-root .divider:after{height:2px;width:100%;flex-grow:1;--tw-content: "";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .dropdown{position:relative;display:inline-block}#twe-root .dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}#twe-root .dropdown .dropdown-content{position:absolute}#twe-root .dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}#twe-root .dropdown-end .dropdown-content{inset-inline-end:0px}#twe-root .dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}#twe-root .dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}#twe-root .dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}#twe-root .dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}#twe-root .dropdown-end.dropdown-right .dropdown-content,#twe-root .dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}#twe-root .dropdown.dropdown-open .dropdown-content,#twe-root .dropdown:not(.dropdown-hover):focus .dropdown-content,#twe-root .dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media(hover:hover){#twe-root .dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}#twe-root .btm-nav>*.disabled:hover,#twe-root .btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){#twe-root .btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}#twe-root .btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}#twe-root .btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){#twe-root .btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}#twe-root .btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}#twe-root .btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}#twe-root .btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}#twe-root .btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}#twe-root .btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}#twe-root .btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}#twe-root .btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}#twe-root .btn-disabled:hover,#twe-root .btn[disabled]:hover,#twe-root .btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn:is(input[type=checkbox]:checked):hover,#twe-root .btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}#twe-root .dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}#twe-root .tab[disabled],#twe-root .tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}#twe-root .dropdown:is(details) summary::-webkit-details-marker{display:none}#twe-root .file-input{height:48px;flex-shrink:1;padding-inline-end:16px;font-size:16px;line-height:2;line-height:24px;overflow:hidden;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .file-input::file-selector-button{margin-inline-end:16px;display:inline-flex;height:100%;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;padding-left:16px;padding-right:16px;text-align:center;font-size:14px;line-height:20px;line-height:1em;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;border-style:solid;--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));font-weight:600;text-transform:uppercase;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));text-decoration-line:none;border-width:var(--border-btn, 1px);animation:button-pop var(--animation-btn, .25s) ease-out}#twe-root .footer{display:grid;width:100%;grid-auto-flow:row;place-items:start;-moz-column-gap:16px;column-gap:16px;row-gap:40px;font-size:14px;line-height:20px}#twe-root .footer>*{display:grid;place-items:start;gap:8px}@media(min-width:48rem){#twe-root .footer{grid-auto-flow:column}#twe-root .footer-center{grid-auto-flow:row dense}}#twe-root .form-control{display:flex;flex-direction:column}#twe-root .label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:8px 4px}#twe-root .input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:48px;padding-left:16px;padding-right:16px;font-size:16px;line-height:2;line-height:24px;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .input[type=number]::-webkit-inner-spin-button,#twe-root .input-md[type=number]::-webkit-inner-spin-button{margin-top:-16px;margin-bottom:-16px;margin-inline-end:-16px}#twe-root .input-xs[type=number]::-webkit-inner-spin-button{margin-top:-4px;margin-bottom:-4px;margin-inline-end:-0px}#twe-root .input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}#twe-root .join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, 8px)}#twe-root .join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}#twe-root .join .join-item:not(:first-child):not(:last-child),#twe-root .join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}#twe-root .join .join-item:first-child:not(:last-child),#twe-root .join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}#twe-root .join .dropdown .join-item:first-child:not(:last-child),#twe-root .join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}#twe-root .join :where(.join-item:first-child:not(:last-child)),#twe-root .join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}#twe-root .join .join-item:last-child:not(:first-child),#twe-root .join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}#twe-root .join :where(.join-item:last-child:not(:first-child)),#twe-root .join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){#twe-root :where(.join *){border-radius:inherit}}@supports selector(:has(*)){#twe-root :where(.join *:has(.join-item)){border-radius:inherit}}#twe-root .link{cursor:pointer;text-decoration-line:underline}#twe-root .menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:14px;line-height:20px;padding:8px}#twe-root .menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:16px;padding-inline-start:8px}#twe-root .menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),#twe-root .menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:8px;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}#twe-root .menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}#twe-root .menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}#twe-root :where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}#twe-root :where(.menu li) .badge{justify-self:end}#twe-root .modal{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}#twe-root :where(.modal){align-items:center}#twe-root .modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:512px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px);border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:24px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}#twe-root .modal-open,#twe-root .modal:target,#twe-root .modal-toggle:checked+.modal,#twe-root .modal[open]{pointer-events:auto;visibility:visible;opacity:1}#twe-root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}#twe-root .progress{position:relative;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;height:8px;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .radio{flex-shrink:0;--chkbg: var(--bc);height:24px;width:24px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}#twe-root .range{height:24px;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 16px);background-color:transparent}#twe-root .range:focus{outline:none}#twe-root .select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:48px;min-height:48px;padding-inline-start:16px;padding-inline-end:40px;font-size:14px;line-height:20px;line-height:2;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}#twe-root .select[multiple]{height:auto}#twe-root .stack{display:inline-grid;place-items:center;align-items:flex-end}#twe-root .stack>*{grid-column-start:1;grid-row-start:1;transform:translateY(10%) scale(.9);z-index:1;width:100%;opacity:.6}#twe-root .stack>*:nth-child(2){transform:translateY(5%) scale(.95);z-index:2;opacity:.8}#twe-root .stack>*:nth-child(1){transform:translateY(0) scale(1);z-index:3;opacity:1}#twe-root .stats{display:inline-grid;border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root :where(.stats){grid-auto-flow:column;overflow-x:auto}#twe-root .tabs{display:grid;align-items:flex-end}#twe-root .tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),#twe-root .tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}#twe-root .tab{position:relative;grid-row-start:1;display:inline-flex;height:32px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:14px;line-height:20px;line-height:2;--tab-padding: 16px;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 16px);padding-inline-end:var(--tab-padding, 16px)}#twe-root .tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}#twe-root .tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}#twe-root .tab:not(input):empty{cursor:default;grid-column-start:span 9999}#twe-root input.tab:checked+.tab-content,#twe-root :is(.tab-active,[aria-selected=true])+.tab-content{display:block}#twe-root .\\!table{position:relative!important;width:100%!important;border-radius:var(--rounded-box, 16px)!important;text-align:left!important;font-size:14px!important;line-height:20px!important}#twe-root .table{position:relative;width:100%;border-radius:var(--rounded-box, 16px);text-align:left;font-size:14px;line-height:20px}#twe-root .\\!table :where(.table-pin-rows thead tr){position:sticky!important;top:0!important;z-index:1!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!table :where(.table-pin-rows tfoot tr){position:sticky!important;bottom:0!important;z-index:1!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!table :where(.table-pin-cols tr th){position:sticky!important;left:0!important;right:0!important;--tw-bg-opacity: 1 !important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}#twe-root .table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .textarea{min-height:48px;flex-shrink:1;padding:8px 16px;font-size:14px;line-height:20px;line-height:2;border-radius:var(--rounded-btn, 8px);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .\\!timeline{position:relative!important;display:flex!important}#twe-root .timeline{position:relative;display:flex}#twe-root :where(.\\!timeline>li){position:relative!important;display:grid!important;flex-shrink:0!important;align-items:center!important;grid-template-rows:var(--timeline-row-start, minmax(0, 1fr)) auto var( --timeline-row-end, minmax(0, 1fr) )!important;grid-template-columns:var(--timeline-col-start, minmax(0, 1fr)) auto var( --timeline-col-end, minmax(0, 1fr) )!important}#twe-root :where(.timeline>li){position:relative;display:grid;flex-shrink:0;align-items:center;grid-template-rows:var(--timeline-row-start, minmax(0, 1fr)) auto var( --timeline-row-end, minmax(0, 1fr) );grid-template-columns:var(--timeline-col-start, minmax(0, 1fr)) auto var( --timeline-col-end, minmax(0, 1fr) )}#twe-root .\\!timeline>li>hr{width:100%!important;border-width:0px!important}#twe-root .timeline>li>hr{width:100%;border-width:0px}#twe-root :where(.\\!timeline>li>hr):first-child{grid-column-start:1!important;grid-row-start:2!important}#twe-root :where(.timeline>li>hr):first-child{grid-column-start:1;grid-row-start:2}#twe-root :where(.\\!timeline>li>hr):last-child{grid-column-start:3!important;grid-column-end:none!important;grid-row-start:2!important;grid-row-end:auto!important}#twe-root :where(.timeline>li>hr):last-child{grid-column-start:3;grid-column-end:none;grid-row-start:2;grid-row-end:auto}#twe-root .toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 24px;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:24px;width:48px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 30.4px);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}#twe-root .alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}#twe-root .avatar-group :where(.avatar){overflow:hidden;border-radius:9999px;border-width:4px;--tw-border-opacity: 1;border-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-border-opacity)))}#twe-root .badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}#twe-root .badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}#twe-root .badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}#twe-root .btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}#twe-root .btm-nav>*.disabled,#twe-root .btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btm-nav>* .label{font-size:16px;line-height:24px}@media(prefers-reduced-motion:no-preference){#twe-root .btn{animation:button-pop var(--animation-btn, .25s) ease-out}}#twe-root .btn:active:hover,#twe-root .btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){#twe-root .btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}#twe-root .btn-primary{--btn-color: var(--fallback-p)}#twe-root .btn-secondary{--btn-color: var(--fallback-s)}#twe-root .btn-accent{--btn-color: var(--fallback-a)}#twe-root .btn-neutral{--btn-color: var(--fallback-n)}#twe-root .btn-info{--btn-color: var(--fallback-in)}#twe-root .btn-warning{--btn-color: var(--fallback-wa)}#twe-root .btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){#twe-root .btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}#twe-root .btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}#twe-root .btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}#twe-root .btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}#twe-root .btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}#twe-root .btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}#twe-root .btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}#twe-root .btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}#twe-root .btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){#twe-root .btn-primary{--btn-color: var(--p)}#twe-root .btn-secondary{--btn-color: var(--s)}#twe-root .btn-accent{--btn-color: var(--a)}#twe-root .btn-neutral{--btn-color: var(--n)}#twe-root .btn-info{--btn-color: var(--in)}#twe-root .btn-warning{--btn-color: var(--wa)}#twe-root .btn-error{--btn-color: var(--er)}}#twe-root .btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}#twe-root .btn-accent{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)));outline-color:var(--fallback-a,oklch(var(--a)/1))}#twe-root .btn-neutral{--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));outline-color:var(--fallback-n,oklch(var(--n)/1))}#twe-root .btn-info{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));outline-color:var(--fallback-in,oklch(var(--in)/1))}#twe-root .btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}#twe-root .btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}#twe-root .btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}#twe-root .btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}#twe-root .btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}#twe-root .btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}#twe-root .btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}#twe-root .btn.btn-disabled,#twe-root .btn[disabled],#twe-root .btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .btn:is(input[type=checkbox]:checked),#twe-root .btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .btn:is(input[type=checkbox]:checked):focus-visible,#twe-root .btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}#twe-root .card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}#twe-root .card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}#twe-root .card:focus-visible{outline:2px solid currentColor;outline-offset:2px}#twe-root .card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .card.compact .card-body{padding:16px;font-size:14px;line-height:20px}#twe-root .card.image-full :where(figure){overflow:hidden;border-radius:inherit}#twe-root .checkbox:focus{box-shadow:none}#twe-root .checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}#twe-root .checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}#twe-root .checkbox:checked,#twe-root .checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}#twe-root .checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}#twe-root .checkbox-accent{--chkbg: var(--fallback-a,oklch(var(--a)/1));--chkfg: var(--fallback-ac,oklch(var(--ac)/1));--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)))}#twe-root .checkbox-accent:focus-visible{outline-color:var(--fallback-a,oklch(var(--a)/1))}#twe-root .checkbox-accent:checked,#twe-root .checkbox-accent[aria-checked=true]{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}#twe-root .divider:not(:empty){gap:16px}#twe-root .dropdown.dropdown-open .dropdown-content,#twe-root .dropdown:focus .dropdown-content,#twe-root .dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .file-input-bordered{--tw-border-opacity: .2}#twe-root .file-input:focus{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .file-input-disabled,#twe-root .file-input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: .2}#twe-root .file-input-disabled::-moz-placeholder,#twe-root .file-input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .file-input-disabled::placeholder,#twe-root .file-input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .file-input-disabled::file-selector-button,#twe-root .file-input[disabled]::file-selector-button{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .label-text{font-size:14px;line-height:20px;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root .input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}#twe-root .input input:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .input[list]::-webkit-calendar-picker-indicator{line-height:1em}#twe-root .input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .input:focus,#twe-root .input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .input:has(>input[disabled]),#twe-root .input-disabled,#twe-root .input:disabled,#twe-root .input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .input:has(>input[disabled])::-moz-placeholder,#twe-root .input-disabled::-moz-placeholder,#twe-root .input:disabled::-moz-placeholder,#twe-root .input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .input:has(>input[disabled])::placeholder,#twe-root .input-disabled::placeholder,#twe-root .input:disabled::placeholder,#twe-root .input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .input:has(>input[disabled])>input[disabled]{cursor:not-allowed}#twe-root .input::-webkit-date-and-time-value{text-align:inherit}#twe-root .join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}#twe-root .join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}#twe-root .join-item:focus{isolation:isolate}#twe-root .link-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){@media(hover:hover){#twe-root .link-primary:hover{color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 80%,black)}}}#twe-root .link:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .link:focus-visible{outline:2px solid currentColor;outline-offset:2px}#twe-root .loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:24px;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}#twe-root .loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}#twe-root .loading-xs{width:16px}#twe-root .loading-sm{width:20px}#twe-root :where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:8px 16px;height:1px}#twe-root .menu :where(li ul):before{position:absolute;bottom:12px;inset-inline-start:0px;top:12px;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:""}#twe-root .menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),#twe-root .menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, 8px);padding:8px 16px;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,#twe-root :where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}#twe-root .menu li>*:not(ul,.menu-title,details,.btn):active,#twe-root .menu li>*:not(ul,.menu-title,details,.btn).active,#twe-root .menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}#twe-root .menu :where(li>details>summary)::-webkit-details-marker{display:none}#twe-root .menu :where(li>details>summary):after,#twe-root .menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-8px;height:8px;width:8px;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}#twe-root .menu :where(li>details[open]>summary):after,#twe-root .menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}#twe-root .mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}#twe-root .mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:28px;width:384px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:32px;direction:ltr}#twe-root .mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:8px;top:50%;aspect-ratio:1 / 1;height:12px;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}#twe-root .mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:20px;top:50%;height:8px;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}#twe-root .modal:not(dialog:not(.modal-open)),#twe-root .modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}#twe-root .modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}#twe-root .modal-open .modal-box,#twe-root .modal-toggle:checked+.modal .modal-box,#twe-root .modal:target .modal-box,#twe-root .modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes modal-pop{0%{opacity:0}}#twe-root .progress::-moz-progress-bar{border-radius:var(--rounded-box, 16px);background-color:currentColor}#twe-root .progress-primary::-moz-progress-bar{border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}#twe-root .progress-secondary::-moz-progress-bar{border-radius:var(--rounded-box, 16px);--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)))}#twe-root .progress:indeterminate{--progress-color: var(--fallback-bc,oklch(var(--bc)/1));background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}#twe-root .progress-primary:indeterminate{--progress-color: var(--fallback-p,oklch(var(--p)/1))}#twe-root .progress-secondary:indeterminate{--progress-color: var(--fallback-s,oklch(var(--s)/1))}#twe-root .progress::-webkit-progress-bar{border-radius:var(--rounded-box, 16px);background-color:transparent}#twe-root .progress::-webkit-progress-value{border-radius:var(--rounded-box, 16px);background-color:currentColor}#twe-root .progress-primary::-webkit-progress-value{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}#twe-root .progress-secondary::-webkit-progress-value{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)))}#twe-root .progress:indeterminate::-moz-progress-bar{background-color:transparent;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}@keyframes progress-loading{50%{background-position-x:-115%}}#twe-root .radio:focus{box-shadow:none}#twe-root .radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}#twe-root .radio:checked,#twe-root .radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}#twe-root .radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}#twe-root .range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 32px var(--range-shdw) inset}#twe-root .range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 32px var(--range-shdw) inset}#twe-root .range::-webkit-slider-runnable-track{height:8px;width:100%;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .range::-moz-range-track{height:8px;width:100%;border-radius:var(--rounded-box, 16px);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}#twe-root .range::-webkit-slider-thumb{position:relative;height:24px;width:24px;border-radius:var(--rounded-box, 16px);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));-moz-appearance:none;appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 1600px;--filler-offset: 9.6px;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}#twe-root .range::-moz-range-thumb{position:relative;height:24px;width:24px;border-radius:var(--rounded-box, 16px);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 1600px;--filler-offset: 8px;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}#twe-root .select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .select-disabled,#twe-root .select:disabled,#twe-root .select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .select-disabled::-moz-placeholder,#twe-root .select:disabled::-moz-placeholder,#twe-root .select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .select-disabled::placeholder,#twe-root .select:disabled::placeholder,#twe-root .select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .select-multiple,#twe-root .select[multiple],#twe-root .select[size].select:not([size="1"]){background-image:none;padding-right:16px}#twe-root [dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}#twe-root :where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}#twe-root [dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}#twe-root .tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}#twe-root .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),#twe-root .tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}#twe-root .tab:focus{outline:2px solid transparent;outline-offset:2px}#twe-root .tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}#twe-root .tab-disabled,#twe-root .tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}#twe-root .tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}#twe-root .tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, 8px);border-start-end-radius:var(--tab-radius, 8px);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 16px);padding-inline-end:var(--tab-padding, 16px);padding-top:var(--tab-border, 1px)}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),#twe-root .tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 16px) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 16px) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,#twe-root .tabs-lifted>.tab:is(input:checked):before{z-index:1;content:"";display:block;position:absolute;width:calc(100% + var(--tab-radius, 8px) * 2);height:var(--tab-radius, 8px);bottom:0;background-size:var(--tab-radius, 8px);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,#twe-root .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}#twe-root [dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,#twe-root [dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}#twe-root .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,#twe-root .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}#twe-root [dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,#twe-root [dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}#twe-root .tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,#twe-root .tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}#twe-root .tabs-boxed .tab{border-radius:var(--rounded-btn, 8px)}#twe-root .\\!table:where([dir=rtl],[dir=rtl] *){text-align:right!important}#twe-root .table:where([dir=rtl],[dir=rtl] *){text-align:right}#twe-root .\\!table :where(th,td){padding:12px 16px!important;vertical-align:middle!important}#twe-root .table :where(th,td){padding:12px 16px;vertical-align:middle}#twe-root .table tr.active,#twe-root .table tr.active:nth-child(2n),#twe-root .table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}#twe-root .\\!table tr.active,#twe-root .\\!table tr.active:nth-child(2n){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important}#twe-root .table-zebra tr.active,#twe-root .table-zebra tr.active:nth-child(2n),#twe-root .table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}#twe-root .\\!table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px!important;--tw-border-opacity: 1 !important;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important}#twe-root .table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .\\!table :where(thead,tfoot){white-space:nowrap!important;font-size:12px!important;line-height:16px!important;font-weight:700!important;color:var(--fallback-bc,oklch(var(--bc)/.6))!important}#twe-root .table :where(thead,tfoot){white-space:nowrap;font-size:12px;line-height:16px;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}#twe-root .\\!table :where(tfoot){border-top-width:1px!important;--tw-border-opacity: 1 !important;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important}#twe-root .table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}#twe-root .textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .textarea-disabled,#twe-root .textarea:disabled,#twe-root .textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}#twe-root .textarea-disabled::-moz-placeholder,#twe-root .textarea:disabled::-moz-placeholder,#twe-root .textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .textarea-disabled::placeholder,#twe-root .textarea:disabled::placeholder,#twe-root .textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}#twe-root .\\!timeline hr{height:4px!important}#twe-root .timeline hr{height:4px}#twe-root :where(.\\!timeline hr){--tw-bg-opacity: 1 !important;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))!important}#twe-root :where(.timeline hr){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}#twe-root :where(.\\!timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge, 30.4px)!important;border-end-end-radius:var(--rounded-badge, 30.4px)!important;border-start-start-radius:0px!important;border-end-start-radius:0px!important}#twe-root :where(.timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge, 30.4px);border-end-end-radius:var(--rounded-badge, 30.4px);border-start-start-radius:0px;border-end-start-radius:0px}#twe-root :where(.\\!timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge, 30.4px)!important;border-end-start-radius:var(--rounded-badge, 30.4px)!important;border-start-end-radius:0px!important;border-end-end-radius:0px!important}#twe-root :where(.timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge, 30.4px);border-end-start-radius:var(--rounded-badge, 30.4px);border-start-end-radius:0px;border-end-end-radius:0px}#twe-root :where(.\\!timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge, 30.4px)!important;border-end-start-radius:var(--rounded-badge, 30.4px)!important;border-start-end-radius:0px!important;border-end-end-radius:0px!important}#twe-root :where(.timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge, 30.4px);border-end-start-radius:var(--rounded-badge, 30.4px);border-start-end-radius:0px;border-end-end-radius:0px}#twe-root :where(.\\!timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge, 30.4px)!important;border-end-end-radius:var(--rounded-badge, 30.4px)!important;border-start-start-radius:0px!important;border-end-start-radius:0px!important}#twe-root :where(.timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge, 30.4px);border-end-end-radius:var(--rounded-badge, 30.4px);border-start-start-radius:0px;border-end-start-radius:0px}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}#twe-root [dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}#twe-root .toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}#twe-root .toggle:hover{background-color:currentColor}#twe-root .toggle:checked,#twe-root .toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}#twe-root [dir=rtl] .toggle:checked,#twe-root [dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}#twe-root .toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}#twe-root [dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}#twe-root .toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}#twe-root .toggle-primary:checked,#twe-root .toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}#twe-root .toggle-secondary:focus-visible{outline-color:var(--fallback-s,oklch(var(--s)/1))}#twe-root .toggle-secondary:checked,#twe-root .toggle-secondary[aria-checked=true]{border-color:var(--fallback-s,oklch(var(--s)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}#twe-root .toggle-warning:focus-visible{outline-color:var(--fallback-wa,oklch(var(--wa)/1))}#twe-root .toggle-warning:checked,#twe-root .toggle-warning[aria-checked=true]{border-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}#twe-root .toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}#twe-root .badge-xs{height:12px;font-size:12px;line-height:12px;padding-left:5.008px;padding-right:5.008px}#twe-root .badge-sm{height:16px;font-size:12px;line-height:16px;padding-left:7.008px;padding-right:7.008px}#twe-root .btm-nav-xs>*:where(.active){border-top-width:1px}#twe-root .btm-nav-sm>*:where(.active){border-top-width:2px}#twe-root .btm-nav-md>*:where(.active){border-top-width:2px}#twe-root .btm-nav-lg>*:where(.active){border-top-width:4px}#twe-root .btn-xs{height:24px;min-height:24px;padding-left:8px;padding-right:8px;font-size:12px}#twe-root .btn-sm{height:32px;min-height:32px;padding-left:12px;padding-right:12px;font-size:14px}#twe-root .btn-square:where(.btn-xs){height:24px;width:24px;padding:0}#twe-root .btn-square:where(.btn-sm){height:32px;width:32px;padding:0}#twe-root .btn-circle:where(.btn-xs){height:24px;width:24px;border-radius:9999px;padding:0}#twe-root .btn-circle:where(.btn-sm){height:32px;width:32px;border-radius:9999px;padding:0}#twe-root [type=checkbox].checkbox-xs{height:16px;width:16px}#twe-root [type=checkbox].checkbox-sm{height:20px;width:20px}#twe-root .file-input-sm{height:32px;padding-inline-end:12px;font-size:14px;line-height:20px;line-height:2}#twe-root .file-input-sm::file-selector-button{margin-right:12px;font-size:14px}#twe-root .input-xs{height:24px;padding-left:8px;padding-right:8px;font-size:12px;line-height:16px;line-height:1.625}#twe-root .input-sm{height:32px;padding-left:12px;padding-right:12px;font-size:14px;line-height:32px}#twe-root .join.join-vertical{flex-direction:column}#twe-root .join.join-vertical .join-item:first-child:not(:last-child),#twe-root .join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}#twe-root .join.join-vertical .join-item:last-child:not(:first-child),#twe-root .join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}#twe-root .join.join-horizontal{flex-direction:row}#twe-root .join.join-horizontal .join-item:first-child:not(:last-child),#twe-root .join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}#twe-root .join.join-horizontal .join-item:last-child:not(:first-child),#twe-root .join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}#twe-root [type=radio].radio-sm{height:20px;width:20px}#twe-root .select-sm{height:32px;min-height:32px;padding-left:12px;padding-right:32px;font-size:14px;line-height:32px}#twe-root [dir=rtl] .select-sm{padding-left:32px;padding-right:12px}#twe-root .select-xs{height:24px;min-height:24px;padding-left:8px;padding-right:32px;font-size:12px;line-height:16px;line-height:1.625}#twe-root [dir=rtl] .select-xs{padding-left:32px;padding-right:8px}#twe-root .tabs-md :where(.tab){height:32px;font-size:14px;line-height:20px;line-height:2;--tab-padding: 16px}#twe-root .tabs-lg :where(.tab){height:48px;font-size:18px;line-height:28px;line-height:2;--tab-padding: 20px}#twe-root .tabs-sm :where(.tab){height:24px;font-size:14px;line-height:12px;--tab-padding: 12px}#twe-root .tabs-xs :where(.tab){height:20px;font-size:12px;line-height:12px;--tab-padding: 8px}#twe-root [type=checkbox].toggle-xs{--handleoffset: 8px;height:16px;width:24px}#twe-root [type=checkbox].toggle-sm{--handleoffset: 12px;height:20px;width:32px}#twe-root .tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}#twe-root .tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}#twe-root .tooltip:before,#twe-root .tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}#twe-root .tooltip-bottom:before{transform:translate(-50%);top:var(--tooltip-offset);left:50%;right:auto;bottom:auto}#twe-root .avatar.online:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}#twe-root .avatar.offline:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}#twe-root .card-compact .card-body{padding:16px;font-size:14px;line-height:20px}#twe-root .card-compact .card-title{margin-bottom:4px}#twe-root .join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}#twe-root .join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}#twe-root .join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}#twe-root .join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}#twe-root .menu-sm :where(li:not(.menu-title)>*:not(ul,details,.menu-title)),#twe-root .menu-sm :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, 8px);padding:4px 12px;font-size:14px;line-height:20px}#twe-root .menu-sm .menu-title{padding:8px 12px}#twe-root .modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -40px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px);border-top-left-radius:0;border-top-right-radius:0}#twe-root .modal-middle :where(.modal-box){width:91.666667%;max-width:512px;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);border-bottom-right-radius:var(--rounded-box, 16px);border-bottom-left-radius:var(--rounded-box, 16px)}#twe-root .modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 40px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 16px);border-top-right-radius:var(--rounded-box, 16px);border-bottom-right-radius:0;border-bottom-left-radius:0}#twe-root .table-xs :not(thead):not(tfoot) tr{font-size:12px;line-height:16px}#twe-root .table-xs :where(th,td){padding:4px 8px}#twe-root .table-sm :not(thead):not(tfoot) tr{font-size:14px;line-height:20px}#twe-root .table-sm :where(th,td){padding:8px 12px}#twe-root .tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: 3px;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + 1px - var(--tooltip-tail))}#twe-root .tooltip:before,#twe-root .tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}#twe-root .tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}#twe-root .tooltip:before{max-width:320px;white-space:normal;border-radius:4px;padding:4px 8px;font-size:14px;line-height:20px;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}#twe-root .tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}#twe-root .tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}#twe-root .tooltip:hover:before{opacity:1;transition-delay:75ms}#twe-root .tooltip:hover:after{opacity:1;transition-delay:75ms}#twe-root .tooltip:has(:focus-visible):after,#twe-root .tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}#twe-root .tooltip:not([data-tip]):hover:before,#twe-root .tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}#twe-root .tooltip:after,#twe-root .tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}#twe-root .tooltip-bottom:after{transform:translate(-50%);border-color:transparent transparent var(--tooltip-color) transparent;top:var(--tooltip-tail-offset);left:50%;right:auto;bottom:auto}#twe-root .pointer-events-none{pointer-events:none}#twe-root .visible{visibility:visible}#twe-root .static{position:static}#twe-root .fixed{position:fixed}#twe-root .absolute{position:absolute}#twe-root .relative{position:relative}#twe-root .sticky{position:sticky}#twe-root .inset-x-0{left:0;right:0}#twe-root .bottom-0{bottom:0}#twe-root .bottom-0\\.5{bottom:2px}#twe-root .bottom-14{bottom:56px}#twe-root .left-0\\.5{left:2px}#twe-root .left-8{left:32px}#twe-root .left-\\[-20px\\]{left:-20px}#twe-root .right-2{right:8px}#twe-root .right-3{right:12px}#twe-root .top-0{top:0}#twe-root .top-3{top:12px}#twe-root .top-8{top:32px}#twe-root .top-\\[60\\%\\]{top:60%}#twe-root .z-10{z-index:10}#twe-root .z-20{z-index:20}#twe-root .z-\\[2\\]{z-index:2}#twe-root .z-\\[6000\\]{z-index:6000}#twe-root .col-span-1{grid-column:span 1 / span 1}#twe-root .col-span-2{grid-column:span 2 / span 2}#twe-root .col-span-3{grid-column:span 3 / span 3}#twe-root .m-0{margin:0}#twe-root .mx-4{margin-left:16px;margin-right:16px}#twe-root .my-1{margin-top:4px;margin-bottom:4px}#twe-root .my-3{margin-top:12px;margin-bottom:12px}#twe-root .my-\\[2px\\]{margin-top:2px;margin-bottom:2px}#twe-root .-ml-2{margin-left:-8px}#twe-root .mb-0{margin-bottom:0}#twe-root .mb-0\\.5{margin-bottom:2px}#twe-root .mb-1{margin-bottom:4px}#twe-root .mb-1\\.5{margin-bottom:6px}#twe-root .mb-2{margin-bottom:8px}#twe-root .mb-3{margin-bottom:12px}#twe-root .mb-4{margin-bottom:16px}#twe-root .ml-0\\.5{margin-left:2px}#twe-root .ml-1{margin-left:4px}#twe-root .ml-2{margin-left:8px}#twe-root .ml-4{margin-left:16px}#twe-root .mr-1{margin-right:4px}#twe-root .mr-2{margin-right:8px}#twe-root .mr-3{margin-right:12px}#twe-root .mt-0{margin-top:0}#twe-root .mt-0\\.5{margin-top:2px}#twe-root .mt-1{margin-top:4px}#twe-root .mt-1\\.5{margin-top:6px}#twe-root .mt-2{margin-top:8px}#twe-root .mt-3{margin-top:12px}#twe-root .mt-6{margin-top:24px}#twe-root .line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}#twe-root .line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}#twe-root .block{display:block}#twe-root .inline-block{display:inline-block}#twe-root .inline{display:inline}#twe-root .flex{display:flex}#twe-root .inline-flex{display:inline-flex}#twe-root .\\!table{display:table!important}#twe-root .table{display:table}#twe-root .grid{display:grid}#twe-root .contents{display:contents}#twe-root .hidden{display:none}#twe-root .h-11{height:44px}#twe-root .h-12{height:48px}#twe-root .h-20{height:80px}#twe-root .h-28{height:112px}#twe-root .h-36{height:144px}#twe-root .h-4{height:16px}#twe-root .h-5{height:20px}#twe-root .h-6{height:24px}#twe-root .h-8{height:32px}#twe-root .h-9{height:36px}#twe-root .h-\\[320px\\]{height:320px}#twe-root .h-\\[82vh\\]{height:82vh}#twe-root .h-auto{height:auto}#twe-root .h-full{height:100%}#twe-root .h-screen{height:100vh}#twe-root .max-h-44{max-height:176px}#twe-root .max-h-48{max-height:192px}#twe-root .max-h-52{max-height:208px}#twe-root .max-h-56{max-height:224px}#twe-root .max-h-72{max-height:288px}#twe-root .max-h-80{max-height:320px}#twe-root .max-h-\\[400px\\]{max-height:400px}#twe-root .max-h-\\[460px\\]{max-height:460px}#twe-root .max-h-\\[500px\\]{max-height:500px}#twe-root .max-h-\\[calc\\(100vh-2rem\\)\\]{max-height:calc(100vh - 32px)}#twe-root .max-h-\\[calc\\(100vh-4rem\\)\\]{max-height:calc(100vh - 64px)}#twe-root .max-h-full{max-height:100%}#twe-root .max-h-screen{max-height:100vh}#twe-root .min-h-0{min-height:0px}#twe-root .min-h-16{min-height:64px}#twe-root .min-h-6{min-height:24px}#twe-root .min-h-9{min-height:36px}#twe-root .min-h-\\[512px\\]{min-height:512px}#twe-root .min-h-\\[560px\\]{min-height:560px}#twe-root .w-12{width:48px}#twe-root .w-20{width:80px}#twe-root .w-24{width:96px}#twe-root .w-28{width:112px}#twe-root .w-32{width:128px}#twe-root .w-36{width:144px}#twe-root .w-4{width:16px}#twe-root .w-40{width:160px}#twe-root .w-44{width:176px}#twe-root .w-48{width:192px}#twe-root .w-52{width:208px}#twe-root .w-56{width:224px}#twe-root .w-60{width:240px}#twe-root .w-8{width:32px}#twe-root .w-80{width:320px}#twe-root .w-9{width:36px}#twe-root .w-auto{width:auto}#twe-root .w-full{width:100%}#twe-root .w-max{width:-moz-max-content;width:max-content}#twe-root .w-screen{width:100vw}#twe-root .min-w-0{min-width:0px}#twe-root .min-w-44{min-width:176px}#twe-root .min-w-56{min-width:224px}#twe-root .max-w-2xl{max-width:672px}#twe-root .max-w-3xl{max-width:768px}#twe-root .max-w-4xl{max-width:896px}#twe-root .max-w-\\[50\\%\\]{max-width:50%}#twe-root .max-w-\\[calc\\(100\\%-46px\\)\\]{max-width:calc(100% - 46px)}#twe-root .max-w-full{max-width:100%}#twe-root .max-w-lg{max-width:512px}#twe-root .max-w-md{max-width:448px}#twe-root .max-w-none{max-width:none}#twe-root .max-w-sm{max-width:384px}#twe-root .max-w-xl{max-width:576px}#twe-root .max-w-xs{max-width:320px}#twe-root .flex-1{flex:1 1 0%}#twe-root .flex-shrink-0,#twe-root .shrink-0{flex-shrink:0}#twe-root .flex-grow,#twe-root .grow{flex-grow:1}#twe-root .table-fixed{table-layout:fixed}#twe-root .origin-\\[bottom_center\\]{transform-origin:bottom center}#twe-root .translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .translate-x-\\[-500px\\]{--tw-translate-x: -500px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .transform-none{transform:none}@keyframes ping{75%,to{transform:scale(2);opacity:0}}#twe-root .animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}#twe-root .cursor-pointer{cursor:pointer}#twe-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#twe-root .resize{resize:both}#twe-root .list-decimal{list-style-type:decimal}#twe-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}#twe-root .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}#twe-root .grid-cols-\\[auto_minmax\\(auto\\,1fr\\)\\]{grid-template-columns:auto minmax(auto,1fr)}#twe-root .flex-row{flex-direction:row}#twe-root .flex-col{flex-direction:column}#twe-root .flex-wrap{flex-wrap:wrap}#twe-root .items-start{align-items:flex-start}#twe-root .items-end{align-items:flex-end}#twe-root .items-center{align-items:center}#twe-root .items-baseline{align-items:baseline}#twe-root .justify-start{justify-content:flex-start}#twe-root .justify-end{justify-content:flex-end}#twe-root .justify-center{justify-content:center}#twe-root .justify-between{justify-content:space-between}#twe-root .gap-1{gap:4px}#twe-root .gap-2{gap:8px}#twe-root .gap-3{gap:12px}#twe-root .gap-4{gap:16px}#twe-root .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}#twe-root .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(8px * var(--tw-space-x-reverse));margin-left:calc(8px * calc(1 - var(--tw-space-x-reverse)))}#twe-root .space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2px * var(--tw-space-y-reverse))}#twe-root .space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}#twe-root .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}#twe-root .overflow-auto{overflow:auto}#twe-root .overflow-hidden{overflow:hidden}#twe-root .overflow-visible{overflow:visible}#twe-root .overflow-scroll{overflow:scroll}#twe-root .overflow-x-auto{overflow-x:auto}#twe-root .overflow-y-auto{overflow-y:auto}#twe-root .overflow-x-scroll{overflow-x:scroll}#twe-root .overflow-y-scroll{overflow-y:scroll}#twe-root .overscroll-contain{overscroll-behavior:contain}#twe-root .overscroll-none{overscroll-behavior:none}#twe-root .scroll-smooth{scroll-behavior:smooth}#twe-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#twe-root .whitespace-normal{white-space:normal}#twe-root .whitespace-nowrap{white-space:nowrap}#twe-root .whitespace-pre{white-space:pre}#twe-root .whitespace-pre-line{white-space:pre-line}#twe-root .whitespace-pre-wrap{white-space:pre-wrap}#twe-root .break-words{overflow-wrap:break-word}#twe-root .break-all{word-break:break-all}#twe-root .rounded{border-radius:4px}#twe-root .rounded-\\[20px\\]{border-radius:20px}#twe-root .rounded-\\[2px\\]{border-radius:2px}#twe-root .rounded-box{border-radius:var(--rounded-box, 16px)}#twe-root .rounded-full{border-radius:9999px}#twe-root .rounded-md{border-radius:6px}#twe-root .rounded-none{border-radius:0}#twe-root .border{border-width:1px}#twe-root .border-0{border-width:0px}#twe-root .border-b{border-bottom-width:1px}#twe-root .border-l-2{border-left-width:2px}#twe-root .border-t{border-top-width:1px}#twe-root .border-solid{border-style:solid}#twe-root .border-accent\\/40{border-color:var(--fallback-a,oklch(var(--a)/.4))}#twe-root .border-accent\\/50{border-color:var(--fallback-a,oklch(var(--a)/.5))}#twe-root .border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}#twe-root .border-info\\/50{border-color:var(--fallback-in,oklch(var(--in)/.5))}#twe-root .border-neutral-content{--tw-border-opacity: 1;border-color:var(--fallback-nc,oklch(var(--nc)/var(--tw-border-opacity, 1)))}#twe-root .border-success\\/50{border-color:var(--fallback-su,oklch(var(--su)/.5))}#twe-root .border-warning\\/40{border-color:var(--fallback-wa,oklch(var(--wa)/.4))}#twe-root .border-warning\\/60{border-color:var(--fallback-wa,oklch(var(--wa)/.6))}#twe-root .border-opacity-50{--tw-border-opacity: .5}#twe-root .bg-accent{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity, 1)))}#twe-root .bg-accent\\/10{background-color:var(--fallback-a,oklch(var(--a)/.1))}#twe-root .bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}#twe-root .bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}#twe-root .bg-base-200\\/50{background-color:var(--fallback-b2,oklch(var(--b2)/.5))}#twe-root .bg-base-200\\/60{background-color:var(--fallback-b2,oklch(var(--b2)/.6))}#twe-root .bg-base-200\\/70{background-color:var(--fallback-b2,oklch(var(--b2)/.7))}#twe-root .bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}#twe-root .bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}#twe-root .bg-black\\/40{background-color:#0006}#twe-root .bg-info{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity, 1)))}#twe-root .bg-neutral{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity, 1)))}#twe-root .bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}#twe-root .bg-secondary{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity, 1)))}#twe-root .bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}#twe-root .bg-transparent{background-color:transparent}#twe-root .bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}#twe-root .bg-warning\\/10{background-color:var(--fallback-wa,oklch(var(--wa)/.1))}#twe-root .bg-warning\\/30{background-color:var(--fallback-wa,oklch(var(--wa)/.3))}#twe-root .bg-opacity-30{--tw-bg-opacity: .3}#twe-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#twe-root .bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}#twe-root .from-base-100{--tw-gradient-from: var(--fallback-b1,oklch(var(--b1)/1)) var(--tw-gradient-from-position);--tw-gradient-to: var(--fallback-b1,oklch(var(--b1)/0)) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}#twe-root .from-black\\/70{--tw-gradient-from: rgb(0 0 0 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}#twe-root .via-black\\/20{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}#twe-root .to-base-200\\/80{--tw-gradient-to: var(--fallback-b2,oklch(var(--b2)/.8)) var(--tw-gradient-to-position)}#twe-root .to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}#twe-root .object-contain{-o-object-fit:contain;object-fit:contain}#twe-root .object-cover{-o-object-fit:cover;object-fit:cover}#twe-root .\\!p-0{padding:0!important}#twe-root .p-0{padding:0}#twe-root .p-2{padding:8px}#twe-root .p-3{padding:12px}#twe-root .p-6{padding:24px}#twe-root .px-0\\.5{padding-left:2px;padding-right:2px}#twe-root .px-1{padding-left:4px;padding-right:4px}#twe-root .px-1\\.5{padding-left:6px;padding-right:6px}#twe-root .px-2{padding-left:8px;padding-right:8px}#twe-root .px-3{padding-left:12px;padding-right:12px}#twe-root .px-4{padding-left:16px;padding-right:16px}#twe-root .px-\\[1px\\]{padding-left:1px;padding-right:1px}#twe-root .py-0{padding-top:0;padding-bottom:0}#twe-root .py-1{padding-top:4px;padding-bottom:4px}#twe-root .py-1\\.5{padding-top:6px;padding-bottom:6px}#twe-root .py-2{padding-top:8px;padding-bottom:8px}#twe-root .py-2\\.5{padding-top:10px;padding-bottom:10px}#twe-root .py-3{padding-top:12px;padding-bottom:12px}#twe-root .pb-3{padding-bottom:12px}#twe-root .pl-2{padding-left:8px}#twe-root .pl-4{padding-left:16px}#twe-root .pl-5{padding-left:20px}#twe-root .pr-1{padding-right:4px}#twe-root .pr-2{padding-right:8px}#twe-root .pt-1{padding-top:4px}#twe-root .pt-8{padding-top:32px}#twe-root .text-left{text-align:left}#twe-root .text-center{text-align:center}#twe-root .align-top{vertical-align:top}#twe-root .align-middle{vertical-align:middle}#twe-root .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}#twe-root .text-\\[10px\\]{font-size:10px}#twe-root .text-\\[11px\\]{font-size:11px}#twe-root .text-base{font-size:16px;line-height:24px}#twe-root .text-lg{font-size:18px;line-height:28px}#twe-root .text-sm{font-size:14px;line-height:20px}#twe-root .text-xl{font-size:20px;line-height:28px}#twe-root .text-xs{font-size:12px;line-height:16px}#twe-root .font-bold{font-weight:700}#twe-root .font-medium{font-weight:500}#twe-root .font-normal{font-weight:400}#twe-root .font-semibold{font-weight:600}#twe-root .uppercase{text-transform:uppercase}#twe-root .leading-4{line-height:16px}#twe-root .leading-5{line-height:20px}#twe-root .leading-6{line-height:24px}#twe-root .leading-8{line-height:32px}#twe-root .leading-\\[48px\\]{line-height:48px}#twe-root .leading-loose{line-height:2}#twe-root .leading-none{line-height:1}#twe-root .leading-normal{line-height:1.5}#twe-root .leading-tight{line-height:1.25}#twe-root .tracking-\\[0\\.01em\\]{letter-spacing:.01em}#twe-root .tracking-\\[0\\.08em\\]{letter-spacing:.08em}#twe-root .text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}#twe-root .text-base-content\\/50{color:var(--fallback-bc,oklch(var(--bc)/.5))}#twe-root .text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}#twe-root .text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}#twe-root .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}#twe-root .text-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity, 1)))}#twe-root .text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}#twe-root .text-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity, 1)))}#twe-root .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}#twe-root .text-opacity-50{--tw-text-opacity: .5}#twe-root .text-opacity-60{--tw-text-opacity: .6}#twe-root .text-opacity-70{--tw-text-opacity: .7}#twe-root .opacity-50{opacity:.5}#twe-root .opacity-60{opacity:.6}#twe-root .opacity-65{opacity:.65}#twe-root .opacity-70{opacity:.7}#twe-root .opacity-75{opacity:.75}#twe-root .opacity-80{opacity:.8}#twe-root .opacity-90{opacity:.9}#twe-root .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#twe-root .\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}#twe-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#twe-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#twe-root .duration-150{transition-duration:.15s}#twe-root .duration-200{transition-duration:.2s}#twe-root .duration-300{transition-duration:.3s}#twe-root .duration-500{transition-duration:.5s}#twe-root .rounded-box-half{border-radius:calc(var(--rounded-box) / 2)}#twe-root .table-border-bc :where(thead,tbody) :where(tr:not(:last-child)),#twe-root .table-border-bc :where(thead,tbody) :where(tr:first-child:last-child){--tw-border-opacity: 20%;border-bottom-width:1px;border-bottom-color:var(--fallback-bc, oklch(var(--bc) / var(--tw-border-opacity)))}#twe-root .table-padding-sm :where(th,td){padding:8px 12px}#twe-root .no-scrollbar::-webkit-scrollbar{display:none}#twe-root .no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}#twe-root .before\\:max-w-40:before{content:var(--tw-content);max-width:160px}#twe-root .before\\:max-w-max:before{content:var(--tw-content);max-width:-moz-max-content;max-width:max-content}#twe-root .before\\:whitespace-pre-line:before{content:var(--tw-content);white-space:pre-line}#twe-root .hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}#twe-root .group:hover .group-hover\\:translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:rotate-\\[20deg\\]{--tw-rotate: 20deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:scale-\\[1\\.02\\]{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#twe-root .group:hover .group-hover\\:opacity-90{opacity:.9}@media(min-width:640px){#twe-root .sm\\:inline{display:inline}#twe-root .sm\\:grid{display:grid}#twe-root .sm\\:h-9{height:36px}#twe-root .sm\\:max-w-screen-sm{max-width:640px}#twe-root .sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}#twe-root .sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}#twe-root .sm\\:gap-2{gap:8px}#twe-root .sm\\:pl-2{padding-left:8px}}@media(min-width:768px){#twe-root .md\\:inline{display:inline}#twe-root .md\\:max-w-screen-md{max-width:768px}#twe-root .md\\:max-w-screen-sm{max-width:640px}#twe-root .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1024px){#twe-root .lg\\:inline{display:inline}}@media(min-width:1280px){#twe-root .xl\\:inline{display:inline}}#twe-root .\\[\\&\\>path\\]\\:stroke-0>path{stroke-width:0} `);
(function () {
'use strict';
var J_=Object.defineProperty;var ew=(e,t,n)=>t in e?J_(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var Ve=(e,t,n)=>ew(e,typeof t!="symbol"?t+"":t,n);var vl,on,_m,hu,Ko,lf,wm,bm,vm,ad,pu,mu,Ei={},km=[],tw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$i=Array.isArray;function oo(e,t){for(var n in t)e[n]=t[n];return e}function id(e){e&&e.parentNode&&e.parentNode.removeChild(e);}function As(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?vl.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return Ds(e,i,r,o,null)}function Ds(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++_m,__i:-1,__u:0};return o==null&&on.vnode!=null&&on.vnode(a),a}function fr(e){return e.children}function Aa(e,t){this.props=e,this.context=t;}function Oa(e,t){if(t==null)return e.__?Oa(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Oa(e):null}function xm(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return xm(e)}}function cf(e){(!e.__d&&(e.__d=true)&&Ko.push(e)&&!Vs.__r++||lf!==on.debounceRendering)&&((lf=on.debounceRendering)||wm)(Vs);}function Vs(){for(var e,t,n,r,o,a,i,s=1;Ko.length;)Ko.length>s&&Ko.sort(bm),e=Ko.shift(),s=Ko.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=oo({},r)).__v=r.__v+1,on.vnode&&on.vnode(n),sd(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??Oa(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,Mm(a,n,i),n.__e!=o&&xm(n)));Vs.__r=0;}function Sm(e,t,n,r,o,a,i,s,l,c,h){var f,m,g,_,b,C,v=r&&r.__k||km,T=t.length;for(l=nw(n,t,v,l,T),f=0;f<T;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?Ei:v[g.__i]||Ei,g.__i=f,C=sd(e,g,m,o,a,i,s,l,c,h),_=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&ld(m.ref,null,g),h.push(g.ref,g.__c||_,g)),b==null&&_!=null&&(b=_),4&g.__u||m.__k===g.__k?l=Cm(g,l,e):typeof g.type=="function"&&C!==void 0?l=C:_&&(l=_.nextSibling),g.__u&=-7);return n.__e=b,l}function nw(e,t,n,r,o){var a,i,s,l,c,h=n.length,f=h,m=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(l=a+m,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Ds(null,i,null,null,null):$i(i)?Ds(fr,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Ds(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=rw(i,n,l,f))!==-1&&(f--,(s=n[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(o>h?m--:o<h&&m++),typeof i.type!="function"&&(i.__u|=4)):c!=l&&(c==l-1?m--:c==l+1?m++:(c>l?m--:m++,i.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<h;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Oa(s)),Im(s,s));return r}function Cm(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Cm(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Oa(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Tm(e,t){return t=t||[],e==null||typeof e=="boolean"||($i(e)?e.some(function(n){Tm(n,t);}):t.push(e)),t}function rw(e,t,n,r){var o,a,i=e.key,s=e.type,l=t[n];if(l===null&&e.key==null||l&&i==l.key&&s===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&(2&l.__u)==0&&i==l.key&&s===l.type)return o;o--;}if(a<t.length){if((l=t[a])&&(2&l.__u)==0&&i==l.key&&s===l.type)return a;a++;}}return -1}function uf(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tw.test(t)?n:n+"px";}function ls(e,t,n,r,o){var a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else {if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||uf(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||uf(e.style,t,n[t]);}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(vm,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.t=r.t:(n.t=ad,e.addEventListener(t,a?mu:pu,a)):e.removeEventListener(t,a?mu:pu,a);else {if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n));}}function df(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=ad++;else if(t.u<n.t)return;return n(on.event?on.event(t):t)}}}function sd(e,t,n,r,o,a,i,s,l,c){var h,f,m,g,_,b,C,v,T,R,P,L,D,O,B,I,x,F=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),a=[s=t.__e=n.__e]),(h=on.__b)&&h(t);e:if(typeof F=="function")try{if(v=t.props,T="prototype"in F&&F.prototype.render,R=(h=F.contextType)&&r[h.__c],P=h?R?R.props.value:h.__:r,n.__c?C=(f=t.__c=n.__c).__=f.__E:(T?t.__c=f=new F(v,P):(t.__c=f=new Aa(v,P),f.constructor=F,f.render=aw),R&&R.sub(f),f.props=v,f.state||(f.state={}),f.context=P,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),T&&f.__s==null&&(f.__s=f.state),T&&F.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=oo({},f.__s)),oo(f.__s,F.getDerivedStateFromProps(v,f.__s))),g=f.props,_=f.state,f.__v=t,m)T&&F.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),T&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else {if(T&&F.getDerivedStateFromProps==null&&v!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,P),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(v,f.__s,P)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(U){U&&(U.__=t);}),L=0;L<f._sb.length;L++)f.__h.push(f._sb[L]);f._sb=[],f.__h.length&&i.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,P),T&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,_,b);});}if(f.context=P,f.props=v,f.__P=e,f.__e=!1,D=on.__r,O=0,T){for(f.state=f.__s,f.__d=!1,D&&D(t),h=f.render(f.props,f.state,f.context),B=0;B<f._sb.length;B++)f.__h.push(f._sb[B]);f._sb=[];}else do f.__d=!1,D&&D(t),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++O<25);f.state=f.__s,f.getChildContext!=null&&(r=oo(oo({},r),f.getChildContext())),T&&!m&&f.getSnapshotBeforeUpdate!=null&&(b=f.getSnapshotBeforeUpdate(g,_)),I=h,h!=null&&h.type===fr&&h.key==null&&(I=Rm(h.props.children)),s=Sm(e,$i(I)?I:[I],t,n,r,o,a,i,s,l,c),f.base=t.__e,t.__u&=-161,f.__h.length&&i.push(f),C&&(f.__E=f.__=null);}catch(U){if(t.__v=null,l||a!=null)if(U.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s;}else for(x=a.length;x--;)id(a[x]);else t.__e=n.__e,t.__k=n.__k;on.__e(U,t,n);}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=ow(n.__e,t,n,r,o,a,i,l,c);return (h=on.diffed)&&h(t),128&t.__u?void 0:s}function Mm(e,t,n){for(var r=0;r<n.length;r++)ld(n[r],n[++r],n[++r]);on.__c&&on.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o);});}catch(a){on.__e(a,o.__v);}});}function Rm(e){return typeof e!="object"||e==null?e:$i(e)?e.map(Rm):oo({},e)}function ow(e,t,n,r,o,a,i,s,l){var c,h,f,m,g,_,b,C=n.props,v=t.props,T=t.type;if(T=="svg"?o="http://www.w3.org/2000/svg":T=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((g=a[c])&&"setAttribute"in g==!!T&&(T?g.localName==T:g.nodeType==3)){e=g,a[c]=null;break}}if(e==null){if(T==null)return document.createTextNode(v);e=document.createElementNS(o,T,v.is&&v),s&&(on.__m&&on.__m(t,a),s=false),a=null;}if(T===null)C===v||s&&e.data===v||(e.data=v);else {if(a=a&&vl.call(e.childNodes),C=n.props||Ei,!s&&a!=null)for(C={},c=0;c<e.attributes.length;c++)C[(g=e.attributes[c]).name]=g.value;for(c in C)if(g=C[c],c!="children"){if(c=="dangerouslySetInnerHTML")f=g;else if(!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;ls(e,c,null,g,o);}}for(c in v)g=v[c],c=="children"?m=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?_=g:c=="checked"?b=g:s&&typeof g!="function"||C[c]===g||ls(e,c,g,C[c],o);if(h)s||f&&(h.__html===f.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(f&&(e.innerHTML=""),Sm(t.type==="template"?e.content:e,$i(m)?m:[m],t,n,r,T=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&Oa(n,0),s,l),a!=null)for(c=a.length;c--;)id(a[c]);s||(c="value",T=="progress"&&_==null?e.removeAttribute("value"):_!==void 0&&(_!==e[c]||T=="progress"&&!_||T=="option"&&_!==C[c])&&ls(e,c,_,C[c],o),c="checked",b!==void 0&&b!==e[c]&&ls(e,c,b,C[c],o));}return e}function ld(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t));}else e.current=t;}catch(o){on.__e(o,n);}}function Im(e,t,n){var r,o;if(on.unmount&&on.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ld(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount();}catch(a){on.__e(a,t);}r.base=r.__P=null;}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Im(r[o],t,n||typeof e.type!="function");n||id(e.__e),e.__c=e.__=e.__e=void 0;}function aw(e,t,n){return this.constructor(e,n)}function iw(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),on.__&&on.__(e,t),o=(r=false)?null:t.__k,a=[],i=[],sd(t,e=t.__k=As(fr,null,[e]),o||Ei,Ei,t.namespaceURI,o?null:t.firstChild?vl.call(t.childNodes):null,a,o?o.__e:t.firstChild,r,i),Mm(a,e,i);}vl=km.slice,on={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s;}throw e}},_m=0,hu=function(e){return e!=null&&e.constructor==null},Aa.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=oo({},this.state),typeof e=="function"&&(e=e(oo({},n),this.props)),e&&oo(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),cf(this));},Aa.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),cf(this));},Aa.prototype.render=fr,Ko=[],wm=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bm=function(e,t){return e.__v.__b-t.__v.__b},Vs.__r=0,vm=/(PointerCapture)$|Capture$/i,ad=0,pu=df(false),mu=df(true);var sw=0;function d(e,t,n,r,o,a){t||(t={});var i,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?i=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--sw,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)l[s]===void 0&&(l[s]=i[s]);return on.vnode&&on.vnode(c),c}/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var lw={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const en=(e,t,n,r)=>{const o=({color:a="currentColor",size:i=24,stroke:s=2,title:l,children:c,className:h="",class:f="",style:m,...g})=>As("svg",{...lw[e],width:String(i),height:String(i),class:["tabler-icon",`tabler-icon-${t}`,f,h].join(" "),...e==="filled"?{fill:a}:{"stroke-width":s,stroke:a},style:m,...g},[l&&As("title",{},l),...r.map(([_,b])=>As(_,b)),...Tm(c)]);return o.displayName=`${n}`,o};/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var cw=en("outline","arrow-up-right","IconArrowUpRight",[["path",{d:"M17 7l-10 10",key:"svg-0"}],["path",{d:"M8 7l9 0l0 9",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var uw=en("outline","arrows-maximize","IconArrowsMaximize",[["path",{d:"M16 4l4 0l0 4",key:"svg-0"}],["path",{d:"M14 10l6 -6",key:"svg-1"}],["path",{d:"M8 20l-4 0l0 -4",key:"svg-2"}],["path",{d:"M4 20l6 -6",key:"svg-3"}],["path",{d:"M16 20l4 0l0 -4",key:"svg-4"}],["path",{d:"M14 14l6 6",key:"svg-5"}],["path",{d:"M8 4l-4 0l0 4",key:"svg-6"}],["path",{d:"M4 4l6 6",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var dw=en("outline","arrows-minimize","IconArrowsMinimize",[["path",{d:"M5 9l4 0l0 -4",key:"svg-0"}],["path",{d:"M3 3l6 6",key:"svg-1"}],["path",{d:"M5 15l4 0l0 4",key:"svg-2"}],["path",{d:"M3 21l6 -6",key:"svg-3"}],["path",{d:"M19 9l-4 0l0 -4",key:"svg-4"}],["path",{d:"M15 9l6 -6",key:"svg-5"}],["path",{d:"M19 15l-4 0l0 4",key:"svg-6"}],["path",{d:"M15 15l6 6",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var fw=en("outline","bookmark","IconBookmark",[["path",{d:"M18 7v14l-6 -4l-6 4v-14a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var hw=en("outline","circle-check","IconCircleCheck",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var pw=en("outline","circle-dashed","IconCircleDashed",[["path",{d:"M8.56 3.69a9 9 0 0 0 -2.92 1.95",key:"svg-0"}],["path",{d:"M3.69 8.56a9 9 0 0 0 -.69 3.44",key:"svg-1"}],["path",{d:"M3.69 15.44a9 9 0 0 0 1.95 2.92",key:"svg-2"}],["path",{d:"M8.56 20.31a9 9 0 0 0 3.44 .69",key:"svg-3"}],["path",{d:"M15.44 20.31a9 9 0 0 0 2.92 -1.95",key:"svg-4"}],["path",{d:"M20.31 15.44a9 9 0 0 0 .69 -3.44",key:"svg-5"}],["path",{d:"M20.31 8.56a9 9 0 0 0 -1.95 -2.92",key:"svg-6"}],["path",{d:"M15.44 3.69a9 9 0 0 0 -3.44 -.69",key:"svg-7"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var dc=en("outline","database-export","IconDatabaseExport",[["path",{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c1.118 0 2.183 -.086 3.15 -.241",key:"svg-1"}],["path",{d:"M20 12v-6",key:"svg-2"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c.157 0 .312 -.002 .466 -.005",key:"svg-3"}],["path",{d:"M16 19h6",key:"svg-4"}],["path",{d:"M19 16l3 3l-3 3",key:"svg-5"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var mw=en("outline","database-import","IconDatabaseImport",[["path",{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.856 0 1.68 -.05 2.454 -.144m5.546 -2.856v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c.171 0 .341 -.002 .51 -.006",key:"svg-2"}],["path",{d:"M19 22v-6",key:"svg-3"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var gw=en("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var yw=en("outline","external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var _w=en("outline","file-download","IconFileDownload",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 17v-6",key:"svg-2"}],["path",{d:"M9.5 14.5l2.5 2.5l2.5 -2.5",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var ww=en("outline","heart","IconHeart",[["path",{d:"M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Sa=en("outline","help","IconHelp",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 17l0 .01",key:"svg-1"}],["path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Em=en("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var bw=en("outline","layout-columns","IconLayoutColumns",[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 4l0 16",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var vw=en("outline","layout-grid","IconLayoutGrid",[["path",{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Am=en("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var kw=en("outline","photo","IconPhoto",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var xw=en("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Sw=en("outline","repeat","IconRepeat",[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var ff=en("outline","report-analytics","IconReportAnalytics",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M9 17v-5",key:"svg-2"}],["path",{d:"M12 17v-1",key:"svg-3"}],["path",{d:"M15 17v-3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Cw=en("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Tw=en("outline","settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Mw=en("outline","sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Rw=en("outline","sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ps=en("outline","table","IconTable",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Iw=en("outline","trash-x","IconTrashX",[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Ew=en("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var zs=en("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Aw=en("filled","brand-github-filled","IconBrandGithubFilled",[["path",{d:"M5.315 2.1c.791 -.113 1.9 .145 3.333 .966l.272 .161l.16 .1l.397 -.083a13.3 13.3 0 0 1 4.59 -.08l.456 .08l.396 .083l.161 -.1c1.385 -.84 2.487 -1.17 3.322 -1.148l.164 .008l.147 .017l.076 .014l.05 .011l.144 .047a1 1 0 0 1 .53 .514a5.2 5.2 0 0 1 .397 2.91l-.047 .267l-.046 .196l.123 .163c.574 .795 .93 1.728 1.03 2.707l.023 .295l.007 .272c0 3.855 -1.659 5.883 -4.644 6.68l-.245 .061l-.132 .029l.014 .161l.008 .157l.004 .365l-.002 .213l-.003 3.834a1 1 0 0 1 -.883 .993l-.117 .007h-6a1 1 0 0 1 -.993 -.883l-.007 -.117v-.734c-1.818 .26 -3.03 -.424 -4.11 -1.878l-.535 -.766c-.28 -.396 -.455 -.579 -.589 -.644l-.048 -.019a1 1 0 0 1 .564 -1.918c.642 .188 1.074 .568 1.57 1.239l.538 .769c.76 1.079 1.36 1.459 2.609 1.191l.001 -.678l-.018 -.168a5.03 5.03 0 0 1 -.021 -.824l.017 -.185l.019 -.12l-.108 -.024c-2.976 -.71 -4.703 -2.573 -4.875 -6.139l-.01 -.31l-.004 -.292a5.6 5.6 0 0 1 .908 -3.051l.152 -.222l.122 -.163l-.045 -.196a5.2 5.2 0 0 1 .145 -2.642l.1 -.282l.106 -.253a1 1 0 0 1 .529 -.514l.144 -.047l.154 -.03z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Dw=en("filled","brand-twitter-filled","IconBrandTwitterFilled",[["path",{d:"M14.058 3.41c-1.807 .767 -2.995 2.453 -3.056 4.38l-.002 .182l-.243 -.023c-2.392 -.269 -4.498 -1.512 -5.944 -3.531a1 1 0 0 0 -1.685 .092l-.097 .186l-.049 .099c-.719 1.485 -1.19 3.29 -1.017 5.203l.03 .273c.283 2.263 1.5 4.215 3.779 5.679l.173 .107l-.081 .043c-1.315 .663 -2.518 .952 -3.827 .9c-1.056 -.04 -1.446 1.372 -.518 1.878c3.598 1.961 7.461 2.566 10.792 1.6c4.06 -1.18 7.152 -4.223 8.335 -8.433l.127 -.495c.238 -.993 .372 -2.006 .401 -3.024l.003 -.332l.393 -.779l.44 -.862l.214 -.434l.118 -.247c.265 -.565 .456 -1.033 .574 -1.43l.014 -.056l.008 -.018c.22 -.593 -.166 -1.358 -.941 -1.358l-.122 .007a.997 .997 0 0 0 -.231 .057l-.086 .038a7.46 7.46 0 0 1 -.88 .36l-.356 .115l-.271 .08l-.772 .214c-1.336 -1.118 -3.144 -1.254 -5.012 -.554l-.211 .084z",key:"svg-0"}]]);/**
* @license @tabler/icons-preact v3.31.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var Pw=en("filled","player-play-filled","IconPlayerPlayFilled",[["path",{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z",key:"svg-0"}]]),La,xn,fc,hf,Ai=0,Dm=[],Tn=on,pf=Tn.__b,mf=Tn.__r,gf=Tn.diffed,yf=Tn.__c,_f=Tn.unmount,wf=Tn.__;function kl(e,t){Tn.__h&&Tn.__h(xn,e,Ai||t),Ai=0;var n=xn.__H||(xn.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ne(e){return Ai=1,Pm(Fm,e)}function Pm(e,t,n){var r=kl(La++,2);if(r.t=e,!r.__c&&(r.__=[Fm(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}));}],r.__c=xn,!xn.__f)){var o=function(s,l,c){if(!r.__c.__H)return true;var h=r.__c.__H.__.filter(function(m){return !!m.__c});if(h.every(function(m){return !m.__N}))return !a||a.call(this,s,l,c);var f=r.__c.props!==s;return h.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=true);}}),a&&a.call(this,s,l,c)||f};xn.__f=true;var a=xn.shouldComponentUpdate,i=xn.componentWillUpdate;xn.componentWillUpdate=function(s,l,c){if(this.__e){var h=a;a=void 0,o(s,l,c),a=h;}i&&i.call(this,s,l,c);},xn.shouldComponentUpdate=o;}return r.__N||r.__}function it(e,t){var n=kl(La++,3);!Tn.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,xn.__H.__h.push(n));}function Fw(e,t){var n=kl(La++,4);!Tn.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,xn.__h.push(n));}function kt(e){return Ai=5,Tt(function(){return {current:e}},[])}function Tt(e,t){var n=kl(La++,7);return cd(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function nr(e,t){return Ai=8,Tt(function(){return e},t)}function Ow(){for(var e;e=Dm.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fs),e.__H.__h.forEach(gu),e.__H.__h=[];}catch(t){e.__H.__h=[],Tn.__e(t,e.__v);}}Tn.__b=function(e){xn=null,pf&&pf(e);},Tn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),wf&&wf(e,t);},Tn.__r=function(e){mf&&mf(e),La=0;var t=(xn=e.__c).__H;t&&(fc===xn?(t.__h=[],xn.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(t.__h.forEach(Fs),t.__h.forEach(gu),t.__h=[],La=0)),fc=xn;},Tn.diffed=function(e){gf&&gf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Dm.push(t)!==1&&hf===Tn.requestAnimationFrame||((hf=Tn.requestAnimationFrame)||Lw)(Ow)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),fc=xn=null;},Tn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fs),n.__h=n.__h.filter(function(r){return !r.__||gu(r)});}catch(r){t.some(function(o){o.__h&&(o.__h=[]);}),t=[],Tn.__e(r,n.__v);}}),yf&&yf(e,t);},Tn.unmount=function(e){_f&&_f(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fs(r);}catch(o){t=o;}}),n.__H=void 0,t&&Tn.__e(t,n.__v));};var bf=typeof requestAnimationFrame=="function";function Lw(e){var t,n=function(){clearTimeout(r),bf&&cancelAnimationFrame(t),setTimeout(e);},r=setTimeout(n,100);bf&&(t=requestAnimationFrame(n));}function Fs(e){var t=xn,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),xn=t;}function gu(e){var t=xn;e.__c=e.__(),xn=t;}function cd(e,t){return !e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Fm(e,t){return typeof t=="function"?t(e):t}const Ut=e=>typeof e=="string",ei=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n},vf=e=>e==null?"":""+e,Nw=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r]);});},Bw=/###/g,kf=e=>e&&e.indexOf("###")>-1?e.replace(Bw,"."):e,xf=e=>!e||Ut(e),gi=(e,t,n)=>{const r=Ut(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(xf(e))return {};const a=kf(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o;}return xf(e)?{}:{obj:e,k:kf(r[o])}},Sf=(e,t,n)=>{const{obj:r,k:o}=gi(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),s=gi(e,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=gi(e,i,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n;},Uw=(e,t,n,r)=>{const{obj:o,k:a}=gi(e,t,Object);o[a]=o[a]||[],o[a].push(n);},Ks=(e,t)=>{const{obj:n,k:r}=gi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},$w=(e,t,n)=>{const r=Ks(e,n);return r!==void 0?r:Ks(t,n)},Om=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ut(e[r])||e[r]instanceof String||Ut(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Om(e[r],t[r],n):e[r]=t[r]);return e},da=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Hw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const jw=e=>Ut(e)?e.replace(/[&<>"'\/]/g,t=>Hw[t]):e;class qw{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[];}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Vw=[" ",",","?","!",";"],zw=new qw(20),Kw=(e,t,n)=>{t=t||"",n=n||"";const r=Vw.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return true;const o=zw.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=true);}return a},yu=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i;}return o},Gs=e=>e==null?void 0:e.replace("_","-"),Gw={type:"logger",log(e){this.output("log",e);},warn(e){this.output("warn",e);},error(e){this.output("error",e);},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t);}};let Ww=class _u{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n);}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Gw,this.options=n,this.debug=n.debug;}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",true)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",true)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",true)}forward(t,n,r,o){return o&&!this.debug?null:(Ut(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new _u(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new _u(this.logger,t)}};var Kr=new Ww;class xl{constructor(){this.observers={};}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1);}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n);}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[s,l]=i;for(let c=0;c<l;c++)s(...r);}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[s,l]=i;for(let c=0;c<l;c++)s.apply(s,[t,...r]);});}}class Cf extends xl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=true);}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t);}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1);}getResource(t,n,r){var c,h;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Ut(r)&&a?s.push(...r.split(a)):s.push(r)));const l=Ks(this.data,s);return !l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!Ut(r)?l:yu((h=(c=this.data)==null?void 0:c[t])==null?void 0:h[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:false};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),Sf(this.data,s,o),a.silent||this.emit("added",t,n,r,o);}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:false};for(const a in r)(Ut(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:true});o.silent||this.emit("added",t,n,r);}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:false,skipCopy:false},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=Ks(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Om(l,r,a):l={...l,...r},Sf(this.data,s,l),i.silent||this.emit("added",t,n,r);}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n);}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return !!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Lm={processors:{},addPostProcessor(e){this.processors[e.name]=e;},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t;}),t}};const Tf={},Mf=e=>!Ut(e)&&typeof e!="boolean"&&typeof e!="number";class Ws extends xl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Nw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Kr.create("translator");}changeLanguage(t){t&&(this.language=t);}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return false;const r=this.resolve(t,n);return (r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Kw(t,r,o);if(i&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return {key:t,namespaces:Ut(a)?[a]:a};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(o);}return {key:t,namespaces:Ut(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return "";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(h){const F=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${F}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${F}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let m=f==null?void 0:f.res;const g=(f==null?void 0:f.usedKey)||i,_=(f==null?void 0:f.exactUsedKey)||i,b=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,T=n.count!==void 0&&!Ut(n.count),R=Ws.hasDefaultValue(n),P=T?this.pluralResolver.getSuffix(c,n.count,n):"",L=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:false}):"",D=T&&!n.ordinal&&n.count===0,O=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${L}`]||n.defaultValue;let B=m;v&&!m&&R&&(B=O);const I=Mf(B),x=Object.prototype.toString.apply(B);if(v&&B&&I&&b.indexOf(x)<0&&!(Ut(C)&&Array.isArray(B))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,B,{...n,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=F,f.usedParams=this.getUsedParamsDetails(n),f):F}if(a){const F=Array.isArray(B),U=F?[]:{},Ce=F?_:g;for(const X in B)if(Object.prototype.hasOwnProperty.call(B,X)){const re=`${Ce}${a}${X}`;R&&!m?U[X]=this.translate(re,{...n,defaultValue:Mf(O)?O[X]:void 0,joinArrays:false,ns:s}):U[X]=this.translate(re,{...n,joinArrays:false,ns:s}),U[X]===re&&(U[X]=B[X]);}m=U;}}else if(v&&Ut(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,t,n,r));else {let F=false,U=false;!this.isValidLookup(m)&&R&&(F=true,m=O),this.isValidLookup(m)||(U=true,m=i);const X=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&U?void 0:m,re=R&&O!==m&&this.options.updateMissing;if(U||F||re){if(this.logger.log(re?"updateKey":"missingKey",c,l,i,re?O:m),a){const fe=this.resolve(i,{...n,keySeparator:false});fe&&fe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");}let Z=[];const ce=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ce&&ce[0])for(let fe=0;fe<ce.length;fe++)Z.push(ce[fe]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(n.lng||this.language):Z.push(n.lng||this.language);const he=(fe,me,z)=>{var Ae;const ue=R&&z!==m?z:X;this.options.missingKeyHandler?this.options.missingKeyHandler(fe,l,me,ue,re,n):(Ae=this.backendConnector)!=null&&Ae.saveMissing&&this.backendConnector.saveMissing(fe,l,me,ue,re,n),this.emit("missingKey",fe,l,me,m);};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?Z.forEach(fe=>{const me=this.pluralResolver.getSuffixes(fe,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&me.indexOf(`${this.options.pluralSeparator}zero`)<0&&me.push(`${this.options.pluralSeparator}zero`),me.forEach(z=>{he([fe],i+z,n[`defaultValue${z}`]||O);});}):he(Z,i,O));}m=this.extendTranslation(m,t,n,f,r),U&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),(U||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,F?m:void 0));}return o?(f.res=m,f.usedParams=this.getUsedParamsDetails(n),f):m}extendTranslation(t,n,r,o,a){var c,h;var i=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Ut(t)&&(((h=r==null?void 0:r.interpolation)==null?void 0:h.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const _=t.match(this.interpolator.nestingRegexp);m=_&&_.length;}let g=r.replace&&!Ut(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),t=this.interpolator.interpolate(t,g,r.lng||this.language||o.usedLng,r),f){const _=t.match(this.interpolator.nestingRegexp),b=_&&_.length;m<b&&(r.nest=false);}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==false&&(t=this.interpolator.nest(t,function(){for(var _=arguments.length,b=new Array(_),C=0;C<_;C++)b[C]=arguments[C];return (a==null?void 0:a[0])===b[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):i.translate(...b,n)},r)),r.interpolation&&this.interpolator.reset();}const s=r.postProcess||this.options.postProcess,l=Ut(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==false&&(t=Lm.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,s;return Ut(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),h=c.key;o=h;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Ut(n.count),g=m&&!n.ordinal&&n.count===0,_=n.context!==void 0&&(Ut(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(C=>{var v,T;this.isValidLookup(r)||(s=C,!Tf[`${b[0]}-${C}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(s))&&(Tf[`${b[0]}-${C}`]=true,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(R=>{var D;if(this.isValidLookup(r))return;i=R;const P=[h];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(P,h,R,C,n);else {let O;m&&(O=this.pluralResolver.getSuffix(R,n.count,n));const B=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(P.push(h+O),n.ordinal&&O.indexOf(I)===0&&P.push(h+O.replace(I,this.options.pluralSeparator)),g&&P.push(h+B)),_){const x=`${h}${this.options.contextSeparator}${n.context}`;P.push(x),m&&(P.push(x+O),n.ordinal&&O.indexOf(I)===0&&P.push(x+O.replace(I,this.options.pluralSeparator)),g&&P.push(x+B));}}let L;for(;L=P.pop();)this.isValidLookup(r)||(a=L,r=this.getResource(R,C,L,n));}));});}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return (a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ut(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a];}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return true;return false}}class Rf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||false,this.logger=Kr.create("languageUtils");}getScriptPartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ut(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0];}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return (this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o);}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a});}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return [];if(typeof t=="function"&&(t=t(n)),Ut(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));};return Ut(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ut(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i));}),o}}const If={zero:0,one:1,two:2,few:3,many:4,other:5},Ef={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Yw{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Kr.create("pluralResolver"),this.pluralRulesCache={};}addRule(t,n){this.rules[t]=n;}clearCache(){this.pluralRulesCache={};}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Gs(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o});}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ef;if(!t.match(/-|_/))return Ef;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n);}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>If[o]-If[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Af=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:true,a=$w(e,t,n);return !a&&o&&Ut(n)&&(a=yu(e,n,r),a===void 0&&(a=yu(t,n,r))),a},hc=e=>e.replace(/\$/g,"$$$$");class Xw{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t);}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:true});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:h,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:_,nestingSuffixEscaped:b,nestingOptionsSeparator:C,maxReplaces:v,alwaysFormat:T}=t.interpolation;this.escape=n!==void 0?n:jw,this.escapeValue=r!==void 0?r:true,this.useRawValueToEscape=o!==void 0?o:false,this.prefix=a?da(a):i||"{{",this.suffix=s?da(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=h?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?da(m):g||da("$t("),this.nestingSuffix=_?da(_):b||da(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=v||1e3,this.alwaysFormat=T!==void 0?T:false,this.resetRegExp();}reset(){this.options&&this.init(this.options);}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`);}interpolate(t,n,r,o){var g;let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=_=>{if(_.indexOf(this.formatSeparator)<0){const T=Af(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,r,{...o,...n,interpolationkey:_}):T}const b=_.split(this.formatSeparator),C=b.shift().trim(),v=b.join(this.formatSeparator).trim();return this.format(Af(n,l,C,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:C})};this.resetRegExp();const h=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((g=o==null?void 0:o.interpolation)==null?void 0:g.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return [{regex:this.regexpUnescape,safeValue:_=>hc(_)},{regex:this.regexp,safeValue:_=>this.escapeValue?hc(this.escape(_)):hc(_)}].forEach(_=>{for(s=0;a=_.regex.exec(t);){const b=a[1].trim();if(i=c(b),i===void 0)if(typeof h=="function"){const v=h(t,a,o);i=Ut(v)?v:"";}else if(o&&Object.prototype.hasOwnProperty.call(o,b))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),i="";else !Ut(i)&&!this.useRawValueToEscape&&(i=vf(i));const C=_.safeValue(i);if(t=t.replace(a[0],C),f?(_.regex.lastIndex+=i.length,_.regex.lastIndex-=a[0].length):_.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const s=(l,c)=>{const h=this.nestingOptionsSeparator;if(l.indexOf(h)<0)return l;const f=l.split(new RegExp(`${h}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const g=m.match(/'/g),_=m.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!_||_.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),c&&(i={...c,...i});}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,b),`${l}${h}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!Ut(i.replace)?i.replace:i,i.applyPostProcessor=false,delete i.defaultValue;let c=false;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=h.shift(),l=h,c=true;}if(a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===t&&!Ut(a))return a;Ut(a)||(a=vf(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),c&&(a=l.reduce((h,f)=>this.format(h,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0;}return t}}const Qw=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),h=s.trim();n[h]||(n[h]=c),c==="false"&&(n[h]=false),c==="true"&&(n[h]=true),isNaN(c)||(n[h]=parseInt(c,10));}});}return {formatName:t,formatOptions:n}},fa=e=>{const t={};return (n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=t[i];return s||(s=e(Gs(r),o),t[i]=s),s(n)}};class Zw{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kr.create("formatter"),this.options=t,this.formats={number:fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:fa((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:fa((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:fa((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t);}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||",";}add(t,n){this.formats[t.toLowerCase().trim()]=n;}addCached(t,n){this.formats[t.toLowerCase().trim()]=fa(n);}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator);}return a.reduce((s,l)=>{var f;const{formatName:c,formatOptions:h}=Qw(l);if(this.formats[c]){let m=s;try{const g=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},_=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[c](s,_,{...h,...o,...g});}catch(g){this.logger.warn(g);}return m}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const Jw=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--);};class eb extends xl{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Kr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o);}queueLoad(t,n,r,o){const a={},i={},s={},l={};return t.forEach(c=>{let h=true;n.forEach(f=>{const m=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=true):(this.state[m]=1,h=false,i[m]===void 0&&(i[m]=true),a[m]===void 0&&(a[m]=true),l[f]===void 0&&(l[f]=true)));}),h||(s[c]=true);}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:true}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{Uw(l.loaded,[a],i),Jw(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const h=l.loaded[c];h.length&&h.forEach(f=>{s[c][f]===void 0&&(s[c][f]=true);});}),l.done=true,l.errors.length?l.callback(l.errors):l.callback());}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done);}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(c,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback);}if(c&&h&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i);},a);return}i(c,h);},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(h=>s(null,h)).catch(s):s(null,c);}catch(c){s(c);}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ut(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ut(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i);});}load(t,n,r){this.prepareLoading(t,n,{},r);}reload(t,n,r){this.prepareLoading(t,n,{reload:true},r);}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(t,i,s);});}saveMissing(t,n,r,o,a){var l,c,h,f,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((f=(h=this.services)==null?void 0:h.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const g={...i,isUpdate:a},_=this.backend.create.bind(this.backend);if(_.length<6)try{let b;_.length===5?b=_(t,n,r,o,g):b=_(t,n,r,o),b&&typeof b.then=="function"?b.then(C=>s(null,C)).catch(s):s(null,b);}catch(b){s(b);}else _(t,n,r,o,s,g);}!t||!t[0]||this.store.addResource(t[0],n,r,o);}}}const Df=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ut(e[1])&&(t.defaultValue=e[1]),Ut(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r];});}return t},interpolation:{escapeValue:true,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}),Pf=e=>{var t,n;return Ut(e.ns)&&(e.ns=[e.ns]),Ut(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ut(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},cs=()=>{},tb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e));});};class Di extends xl{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Pf(t),this.services={},this.logger=Kr,this.modules={external:[]},tb(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n);},0);}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=true,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(Ut(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Df();this.options={...o,...this.options,...Pf(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Kr.init(a(this.modules.logger),this.options):Kr.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=Zw;const f=new Rf(this.options);this.store=new Cf(this.options.resources,this.options);const m=this.services;m.logger=Kr,m.resourceStore=this.store,m.languageUtils=f,m.pluralResolver=new Yw(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(h),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new Xw(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new eb(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(g){for(var _=arguments.length,b=new Array(_>1?_-1:0),C=1;C<_;C++)b[C-1]=arguments[C];t.emit(g,...b);}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new Ws(this.services,this.options),this.translator.on("*",function(g){for(var _=arguments.length,b=new Array(_>1?_-1:0),C=1;C<_;C++)b[C-1]=arguments[C];t.emit(g,...b);}),this.modules.external.forEach(g=>{g.init&&g.init(this);});}if(this.format=this.options.interpolation.format,r||(r=cs),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0]);}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return t.store[h](...arguments)};}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t};});const l=ei(),c=()=>{const h=(f,m)=>{this.isInitializing=false,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=true,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),r(f,m);};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h);};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cs;const o=Ut(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f);});};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>l(h)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>l(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c);});}else r(null);}reloadResources(t,n,r){const o=ei();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=cs),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a);}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Lm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=ei();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l);},i=(l,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)});},s=l=>{var h,f;!t&&!l&&this.services.languageDetector&&(l=[]);const c=Ut(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(f=(h=this.services.languageDetector)==null?void 0:h.cacheUserLanguage)==null||f.call(h,c)),this.loadResources(c,m=>{i(m,c);});};return !t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const a=function(i,s){let l;if(typeof s!="object"){for(var c=arguments.length,h=new Array(c>2?c-2:0),f=2;f<c;f++)h[f-2]=arguments[f];l=o.options.overloadTranslationOptionHandler([i,s].concat(h));}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(i)?g=i.map(_=>`${l.keyPrefix}${m}${_}`):g=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(g,l)};return Ut(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return (o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return (o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t;}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),false;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),false;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:false,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return true;const i=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return !!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=ei();return this.options.ns?(Ut(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o);}),this.loadResources(o=>{r.resolve(),n&&n(o);}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ei();Ut(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i);}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return "rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new Rf(Df());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Di(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cs;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:true},a=new Di(o);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s];}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},Object.keys(l[c]).reduce((h,f)=>(h[f]={...l[c][f]},h),{})),{});a.store=new Cf(s,o),a.services.resourceStore=a.store;}return a.translator=new Ws(a.services,o),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),h=1;h<l;h++)c[h-1]=arguments[h];a.emit(s,...c);}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return {options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const En=Di.createInstance();En.createInstance=Di.createInstance;En.createInstance;En.dir;En.init;En.loadResources;En.reloadResources;En.use;En.changeLanguage;En.getFixedT;En.t;En.exists;En.setDefaultNamespace;En.hasLoadedNamespace;En.loadNamespaces;En.loadLanguages;const nb={exporter:{ID:"ID",Date:"التاريخ",Content:"المحتوى","Show Full Text":"عرض النص الكامل",Media:"الوسائط","Screen Name":"اسم المستخدم","Profile Name":"اسم الملف الشخصي","Profile Image":"صورة الملف الشخصي","User ID":"معرّف المستخدم","Replying To":"ردًا على","RT Source":"مصدر إعادة التغريد","Quote Source":"مصدر الاقتباس","Media Tags":"وسوم الوسائط",Favorites:"المفضلات",Retweets:"إعادات التغريد",Bookmarks:"العلامات المرجعية",Quotes:"الاقتباسات",Replies:"الردود",Views:"المشاهدات",Favorited:"مضاف إلى المفضلة",Retweeted:"أُعيد تغريده",Bookmarked:"مضاف إلى العلامات المرجعية","Bookmark Folder":"مجلد العلامات المرجعية",URL:"URL",Actions:"الإجراءات",Details:"التفاصيل",Description:"الوصف","Profile Banner":"لافتة الملف الشخصي",Followers:"المتابعون",FollowingCount:"عدد المتابَعين",Statuses:"المنشورات",Favourites:"المفضلات",Listed:"مدرج في القوائم",Location:"الموقع",Website:"الموقع الإلكتروني",Birthdate:"تاريخ الميلاد","Verified Type":"نوع التوثيق","Blue Verified":"موثّق Blue",Following:"يتابع","Follows You":"يتابعك","Can DM":"يمكن مراسلته خاصًا",Protected:"محمي","Created At":"تاريخ الإنشاء",Sender:"المرسل",Recipient:"المستلم","Conversation ID":"معرّف المحادثة","Conversation Type":"نوع المحادثة",Data:"البيانات","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"صدّر البيانات الملتقطة كملف JSON/HTML/CSV. قد يستغرق ذلك وقتًا حسب حجم البيانات. لا يتضمن الملف المصدّر ملفات وسائط مثل الصور والفيديو، بل يتضمن عناوين URL فقط.","Data length:":"طول البيانات:","Export scope:":"نطاق التصدير:","All current results":"كل النتائج الحالية","Selected rows":"الصفوف المحددة","Pinned result set":"مجموعة نتائج مثبتة",Query:"الاستعلام",Sort:"الترتيب","Include all metadata:":"تضمين كل البيانات الوصفية:","Export as:":"تصدير كـ:","No data selected.":"لم يتم تحديد بيانات.",Cancel:"إلغاء","Start Export":"بدء التصدير","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"تنزيل وحفظ ملفات الوسائط من البيانات الملتقطة. قد يستغرق ذلك وقتًا حسب حجم البيانات. تشمل الوسائط التي سيتم تنزيلها صور الملفات الشخصية ولافتاتها (للمستخدمين) والصور والفيديوهات (للتغريدات).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"لأكثر من 100 عنصر وسائط أو للملفات الكبيرة، يُوصى بنسخ عناوين URL وتنزيلها بمدير تنزيل خارجي مثل aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"يستخدم تصدير ZIP في المتصفح الآن تنزيلات متوازية محدودة. للأعمال الكبيرة جدًا وكثيرة الفيديو، يبقى تصدير URL أو aria2 المسار الأكثر أمانًا والأقل استهلاكًا للذاكرة.","Filename template:":"قالب اسم الملف:","Download scheduler":"مجدول التنزيل","Faster defaults are intended for bulk CDN transfer.":"القيم الافتراضية الأسرع مخصصة للنقل الجماعي من CDN.","Start delay (ms)":"تأخير البدء (ms)","Global parallel":"التوازي العام","Per host":"لكل مضيف",Videos:"الفيديوهات",Retries:"إعادة المحاولة","Use aria2 format:":"استخدام تنسيق aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"انقر لمزيد من المعلومات. سيكون كل URL في سطر جديد، واسم ملفه في السطر التالي. هذا التنسيق متوافق مع aria2.","Rate limit (ms):":"حد المعدّل (ms):","Media Filter:":"مرشح الوسائط:","File Name":"اسم الملف","Media Type":"نوع الوسائط","Download URL":"رابط التنزيل","No media selected.":"لم يتم تحديد وسائط.","Preview limited to first 250 media items.":"المعاينة محدودة بأول 250 عنصر وسائط.",Zipping:"جارٍ الضغط","Copied!":"تم النسخ!","Copy URLs":"نسخ الروابط","The tweet ID":"معرّف التغريدة","The username of tweet author":"اسم مستخدم كاتب التغريدة","The profile name of tweet author":"اسم ملف كاتب التغريدة الشخصي","The media index in tweet (start from 0)":"فهرس الوسيط في التغريدة (يبدأ من 0)","The order of media in tweet (1/2/3/4)":"ترتيب الوسيط في التغريدة (1/2/3/4)","The post date in YYYYMMDD format":"تاريخ النشر بتنسيق YYYYMMDD","The post time in HHmmss format":"وقت النشر بتنسيق HHmmss","The media type (photo/video/animated_gif)":"نوع الوسيط (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"امتداد ملف الوسيط (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"فشل تصدير الوسائط. افتح DevTools لمزيد من التفاصيل.","Failed to copy media URLs. Open DevTools for more details.":"فشل نسخ روابط الوسائط. افتح DevTools لمزيد من التفاصيل.","filter.photo":"صورة","filter.video":"فيديو","filter.animated_gif":"GIF","filter.retweet":"تضمين إعادة التغريد","loading remaining rows":"جارٍ تحميل الصفوف المتبقية","Bundle ZIP compression:":"ضغط حزمة ZIP:","Fastest / store":"الأسرع / تخزين","Balanced / fast":"متوازن / سريع","Smaller / slower":"أصغر / أبطأ","Cancel Export":"إلغاء التصدير","Export a canonical portable ZIP bundle for sharing/importing.":"تصدير حزمة ZIP قياسية محمولة للمشاركة/الاستيراد.","Export Bundle ZIP":"تصدير حزمة ZIP","Source-backed media":"وسائط مدعومة من المصدر","rows scanned:":"الصفوف المفحوصة:","media URLs:":"عناوين URL للوسائط:",loading:"جارٍ التحميل","Loading media...":"جارٍ تحميل الوسائط..."},common:{"Open Control Panel":"فتح لوحة التحكم","Browse around to capture more data.":"تصفّح لالتقاط مزيد من البيانات.",Settings:"الإعدادات",General:"عام",Theme:"السمة",Language:"اللغة",Debug:"تصحيح الأخطاء","Date Time Format":"تنسيق التاريخ والوقت","Click for more information. This will take effect on both previewer and exported files.":"انقر لمزيد من المعلومات. سيؤثر هذا في المعاينة والملفات المصدّرة.","Use dedicated DB for accounts":"استخدام قاعدة بيانات مخصصة لكل حساب","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"سينشئ هذا قاعدة بيانات منفصلة لكل حساب Twitter، مما يساعد على تقليل احتمال اختلاط البيانات عند استخدام عدة حسابات.","Local Database":"قاعدة البيانات المحلية","Analyze DB":"تحليل","Export DB":"تصدير","Clear DB":"مسح","Bundle Export":"تصدير حزمة","Bundle Library":"مكتبة الحزم","QC Session":"جلسة فحص الجودة","Diagnostic capture":"التقاط تشخيصي","Diagnostic buffers cleared.":"تم مسح مخازن التشخيص المؤقتة.","Clear Buffers":"مسح المخازن","Preparing...":"جارٍ التحضير...","Preparing diagnostics...":"جارٍ تحضير التشخيصات...","Export QC Diagnostics":"تصدير تشخيصات فحص الجودة","Export Diagnostics Bundle":"تصدير حزمة التشخيص","QC idle.":"فحص الجودة خامل.","Are you sure to clear all data in the database?":"هل أنت متأكد من مسح كل البيانات في قاعدة البيانات؟","Database cleared.":"تم مسح قاعدة البيانات.",Module:"وحدة","Modules (Scroll to see more)":"الوحدات (مرّر لرؤية المزيد)",About:"حول",Version:"الإصدار","Search...":"بحث...","Something went wrong.":"حدث خطأ ما.","Error:":"خطأ:","Captured:":"تم الالتقاط:","Rows per page:":"الصفوف لكل صفحة:","Relation Types":"أنواع العلاقات","Subject Accounts":"الحسابات محلّ العلاقة","Subject User IDs":"معرّفات المستخدمين محلّ العلاقة","Last Observed At":"آخر رصد","A - B of N items":"{{from}} - {{to}} من {{total}} عنصرًا","No data available.":"لا توجد بيانات متاحة.","No media available.":"لا توجد وسائط متاحة.",Clear:"مسح","Bookmark folders":"مجلدات العلامات المرجعية","1 folder selected":"تم اختيار مجلد واحد","{{count}} folders selected":"تم اختيار {{count}} مجلدات","Export Media":"تصدير الوسائط","Export Data":"تصدير البيانات","Export Search History":"تصدير سجل البحث","JSON View":"عرض JSON","Media View":"عرض الوسائط",Bookmarks:"العلامات المرجعية",Tweets:"التغريدات",Users:"المستخدمون","User Tweets":"تغريدات المستخدم","User Media":"وسائط المستخدم","Tweet Details":"تفاصيل التغريدة","Search Timeline":"خطّ البحث الزمني","Home Timeline":"خطّ الصفحة الرئيسية الزمني","List Timeline":"خطّ القائمة الزمني","Community Timeline":"خطّ المجتمع الزمني","Community Members":"أعضاء المجتمع","List Members":"أعضاء القائمة","List Subscribers":"مشتركو القائمة","Direct Messages":"الرسائل الخاصة","Interaction Events":"أحداث التفاعل","Local Search":"بحث محلي","Runtime Logs":"سجلات التشغيل","Bundle Viewer":"عارض الحزم","{{count}} imported bundles":"{{count}} حزم مستوردة","Search indexed tweets with Twitter-style operators":"ابحث في التغريدات المفهرسة باستخدام معاملات شبيهة بـ Twitter","Local Recorder Search":"بحث المسجّل المحلي",Quotes:"الاقتباسات",CommunityMembers:"أعضاء المجتمع",CommunityTimeline:"خطّ المجتمع الزمني",DirectMessages:"الرسائل الخاصة",Followers:"المتابعون",Following:"يتابع",HomeTimeline:"خطّ الصفحة الرئيسية",Likes:"الإعجابات",ListMembers:"أعضاء القائمة",ListSubscribers:"مشتركو القائمة",ListTimeline:"خطّ القائمة",InteractionEvents:"أحداث التفاعل",LocalSearch:"بحث محلي",RawCapture:"التقاط خام",Retweeters:"معيدو التغريد",RetweetersModule:"معيدو التغريد",RuntimeLogs:"سجلات التشغيل",SearchTimeline:"خطّ البحث",TweetIndex:"فهرس التغريدات",TweetDetail:"تفاصيل التغريدة",UserDetail:"تفاصيل المستخدم",UserMedia:"وسائط المستخدم",UserTweets:"تغريدات المستخدم",on:"تشغيل",off:"إيقاف",unknown:"غير معروف",online:"متصل",offline:"غير متصل",leader:"قائد",follower:"تابع",tab:"تبويب",both:"كلاهما",xhr:"xhr",fetch:"fetch",watchdog:"المراقب",all:"الكل",explicit:"صريح",loading:"جارٍ التحميل",complete:"مكتمل",idle:"خامل","api-name":"اسم API","id-only":"ID فقط","theme.system":"النظام","theme.cupcake":"فاتح","theme.dark":"داكن","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"الأعمال","theme.winter":"الشتاء","Safe mode":"الوضع الآمن","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"يعطل الالتقاط المعتمد على hooks عند تفعيله. أوقفه للتصفح العادي والالتقاط التشخيصي.","Hook mode":"وضع hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"يتحكم بما إذا كان userscript يربط XHR أو fetch أو كليهما أو لا شيء.","Repair mode":"وضع الإصلاح","Controls whether hook repair watchdog behavior is active.":"يتحكم فيما إذا كان watchdog إصلاح hooks نشطاً.","{{seconds}}s ago":"قبل {{seconds}} ث","Hooks: {{status}}":"الخطافات:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"الخطافات:xhr {{xhr}}, fetch {{fetch}}, آخر {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"الخطافات:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"الوضع: آمن {{safe}}, hook {{hook}}, إصلاح {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"الوضع: آمن {{safe}}, hook {{hook}}, إصلاح {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"أحداث raw: {{total}} | مُسقطة: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} جارٍ التحميل / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"إسقاطات تجاوز spool: {{drops}} | غير متاح: {{unavailable}} | أقدم معلّق: {{age}}ms","daemon: {{status}}":"الخادم:{{status}}","daemon: {{status}} | last error: {{error}}":"الخادم:{{status}} | آخر خطأ:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"المراقب:{{role}} | قائد:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"نبضات monitor route/viewport: {{route}}/{{viewport}} | المكبوت route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"قاعدة البيانات متصلة: {{name}}","App options loaded":"تم تحميل خيارات التطبيق",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"يتوسع النص غير المنظم إلى مطابقات مصطلحات المحتوى مع تعزيز نوافذ العبارات المتجاورة؛ ويتم خفض أولوية الكلمات الشائعة ما لم تكن بين علامتي اقتباس.","Phrase search with optional slop.":"بحث عن عبارة مع سماحية اختيارية.","Boolean operators with standard precedence and parentheses.":"عوامل منطقية بأولوية قياسية وأقواس.","Match the author handle or author id.":"مطابقة اسم المستخدم أو معرّف المؤلف.","Shorthand for an enforced author constraint, equivalent to from:user.":"اختصار لقيد مؤلف إلزامي، مكافئ لـ from:user.","Match reply targets, entity ids, or conversation ids.":"مطابقة أهداف الرد أو معرّفات الكيانات أو معرّفات المحادثات.","Match bookmark folder id or folder name.":"مطابقة معرّف مجلد الإشارات المرجعية أو اسمه.","Match language, route surface, source text, or card name.":"مطابقة اللغة أو سطح المسار أو نص المصدر أو اسم البطاقة.","Match domains or URLs found in tweets.":"مطابقة النطاقات أو عناوين URL الموجودة في التغريدات.","Boolean state filters.":"مرشحات حالة منطقية.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"مرشحات وجود للوسائط والروابط والإشارات والوسوم ورموز الأسهم والتفاعل والاستطلاعات.","Compatibility aliases retained for Twitter-style queries.":"أسماء توافقية محفوظة لاستعلامات بأسلوب Twitter.","Numeric threshold filters.":"مرشحات عتبات رقمية.","Date, timestamp, and Snowflake-style boundary filters.":"مرشحات حدود للتاريخ والطابع الزمني ونمط Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"مرشح إشارة صريح مع اختصارات وسم ورمز سهم.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"بحث لفظي محدود بالحقل عبر مسارات متداخلة خام، بما في ذلك مسارات الكائنات المنقطة والمصفوفات.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"تم ترحيل خيارات التطبيق من v{{oldVersion}} إلى v{{newVersion}}","Hooked into fetch":"Hook في fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook في XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"تم تفعيل الوضع الآمن للـ hook ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"فشل إصلاح hook ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"فشل تثبيت تتبع سياق الإشارات؛ المتابعة بدون متتبع ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: تم استلام {{count}} عنصر","Exporting to ZIP file: {{filename}}":"تصدير إلى ملف ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"تصدير إلى ملف {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"تصدير تدفقي إلى ملف {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"اكتمل الترحيل: تم تحديث {{users}} مستخدمين و {{tweets}} تغريدات.","TweetTombstone received (Reason: {{reason}})":"تم استلام TweetTombstone (السبب: {{reason}})","Failed to hook into XMLHttpRequest":"فشل hook في XMLHttpRequest","Fetch API not found, skipping fetch hooks":"لم يتم العثور على Fetch API، يتم تخطي hooks الخاصة بـ fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"دالة Fetch API الأساسية غير متاحة أو غير آمنة؛ تفعيل الوضع الآمن","Fetch hook base invocation failed; enabling safe mode":"فشل استدعاء hook fetch الأساسي؛ تفعيل الوضع الآمن","XHR send hook base invocation failed; enabling safe mode":"فشل استدعاء hook XHR send الأساسي؛ تفعيل الوضع الآمن","XHR open hook base invocation failed; enabling safe mode":"فشل استدعاء hook XHR open الأساسي؛ تفعيل الوضع الآمن","Fetch hook already installed":"hook الخاص بـ fetch مثبت بالفعل","Debug mode enabled":"تم تفعيل وضع التصحيح","Database cleared":"تم مسح قاعدة البيانات","Upgrading database schema...":"جارٍ ترقية مخطط قاعدة البيانات...","Database upgraded":"تمت ترقية قاعدة البيانات","Zip stream closed.":"تم إغلاق تدفق ZIP.","Running migration_20250609: Migrating legacy user data format":"تشغيل migration_20250609: ترحيل تنسيق بيانات المستخدم القديم","TweetUnavailable received (Reason: unknown)":"تم استلام TweetUnavailable (السبب: غير معروف)","Empty tweet received":"تم استلام تغريدة فارغة","Unknown tweet type received":"تم استلام نوع تغريدة غير معروف","Failed to extract tweet":"فشل استخراج التغريدة","Failed to export file":"فشل تصدير الملف","Failed to stream export file":"فشل تصدير الملف بالتدفق"}},rb={exporter:{ID:"ID",Date:"তারিখ",Content:"বিষয়বস্তু","Show Full Text":"সম্পূর্ণ লেখা দেখান",Media:"মিডিয়া","Screen Name":"ব্যবহারকারীর নাম","Profile Name":"প্রোফাইল নাম","Profile Image":"প্রোফাইল ছবি","User ID":"ব্যবহারকারী ID","Replying To":"যার উত্তরে","RT Source":"RT উৎস","Quote Source":"কোট উৎস","Media Tags":"মিডিয়া ট্যাগ",Favorites:"প্রিয়",Retweets:"রিটুইট",Bookmarks:"বুকমার্ক",Quotes:"কোট",Replies:"উত্তর",Views:"দেখা",Favorited:"প্রিয় করা হয়েছে",Retweeted:"রিটুইট করা হয়েছে",Bookmarked:"বুকমার্ক করা হয়েছে","Bookmark Folder":"বুকমার্ক ফোল্ডার",URL:"URL",Actions:"ক্রিয়া",Details:"বিস্তারিত",Description:"বিবরণ","Profile Banner":"প্রোফাইল ব্যানার",Followers:"ফলোয়ার",FollowingCount:"ফলো করা সংখ্যা",Statuses:"পোস্ট",Favourites:"প্রিয়",Listed:"লিস্টে আছে",Location:"অবস্থান",Website:"ওয়েবসাইট",Birthdate:"জন্মতারিখ","Verified Type":"যাচাইকরণ ধরন","Blue Verified":"Blue যাচাইকৃত",Following:"ফলো করছে","Follows You":"আপনাকে ফলো করে","Can DM":"DM করা যায়",Protected:"সুরক্ষিত","Created At":"তৈরি হয়েছে",Sender:"প্রেরক",Recipient:"প্রাপক","Conversation ID":"কথোপকথন ID","Conversation Type":"কথোপকথনের ধরন",Data:"ডেটা","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"ক্যাপচার করা ডেটা JSON/HTML/CSV ফাইল হিসেবে এক্সপোর্ট করুন। ডেটার পরিমাণ অনুযায়ী সময় লাগতে পারে। এক্সপোর্ট করা ফাইলে ছবি বা ভিডিওর মতো মিডিয়া ফাইল থাকবে না, শুধু URL থাকবে।","Data length:":"ডেটার দৈর্ঘ্য:","Export scope:":"এক্সপোর্ট পরিসর:","All current results":"বর্তমান সব ফলাফল","Selected rows":"নির্বাচিত সারি","Pinned result set":"পিন করা ফলাফল সেট",Query:"কোয়েরি",Sort:"সাজানো","Include all metadata:":"সব মেটাডেটা অন্তর্ভুক্ত করুন:","Export as:":"যে রূপে এক্সপোর্ট:","No data selected.":"কোনো ডেটা নির্বাচিত নয়।",Cancel:"বাতিল","Start Export":"এক্সপোর্ট শুরু করুন","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"ক্যাপচার করা ডেটা থেকে মিডিয়া ফাইল ডাউনলোড ও সংরক্ষণ করুন। ডেটার পরিমাণ অনুযায়ী সময় লাগতে পারে। ডাউনলোড হবে: প্রোফাইল ছবি, প্রোফাইল ব্যানার (ব্যবহারকারীর জন্য), ছবি ও ভিডিও (টুইটের জন্য)।","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"১০০টির বেশি মিডিয়া বা বড় ফাইলের জন্য URL কপি করে aria2-এর মতো বাহ্যিক ডাউনলোড ম্যানেজার দিয়ে ডাউনলোড করার পরামর্শ দেওয়া হয়।","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ব্রাউজার ZIP এক্সপোর্ট এখন সীমিত সমান্তরাল ডাউনলোড ব্যবহার করে। খুব বড় ভিডিও-ভিত্তিক কাজের জন্য URL বা aria2 এক্সপোর্ট এখনও কম-মেমরির সবচেয়ে নিরাপদ পথ।","Filename template:":"ফাইলনাম টেমপ্লেট:","Download scheduler":"ডাউনলোড শিডিউলার","Faster defaults are intended for bulk CDN transfer.":"দ্রুততর ডিফল্টগুলো বড় CDN ট্রান্সফারের জন্য।","Start delay (ms)":"শুরুর বিলম্ব (ms)","Global parallel":"গ্লোবাল সমান্তরাল","Per host":"প্রতি হোস্ট",Videos:"ভিডিও",Retries:"পুনঃচেষ্টা","Use aria2 format:":"aria2 ফরম্যাট ব্যবহার করুন:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"আরও তথ্যের জন্য ক্লিক করুন। প্রতিটি URL নতুন লাইনে থাকবে, আর পরের লাইনে তার ফাইলনাম থাকবে। এই ফরম্যাট aria2-এর সঙ্গে সামঞ্জস্যপূর্ণ।","Rate limit (ms):":"রেট সীমা (ms):","Media Filter:":"মিডিয়া ফিল্টার:","File Name":"ফাইলনাম","Media Type":"মিডিয়ার ধরন","Download URL":"ডাউনলোড URL","No media selected.":"কোনো মিডিয়া নির্বাচিত নয়।","Preview limited to first 250 media items.":"প্রিভিউ প্রথম ২৫০টি মিডিয়া আইটেমে সীমিত।",Zipping:"ZIP করা হচ্ছে","Copied!":"কপি হয়েছে!","Copy URLs":"URL কপি করুন","The tweet ID":"টুইট ID","The username of tweet author":"টুইট লেখকের ব্যবহারকারীর নাম","The profile name of tweet author":"টুইট লেখকের প্রোফাইল নাম","The media index in tweet (start from 0)":"টুইটে মিডিয়ার ইনডেক্স (০ থেকে শুরু)","The order of media in tweet (1/2/3/4)":"টুইটে মিডিয়ার ক্রম (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD ফরম্যাটে পোস্টের তারিখ","The post time in HHmmss format":"HHmmss ফরম্যাটে পোস্টের সময়","The media type (photo/video/animated_gif)":"মিডিয়ার ধরন (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"মিডিয়া ফাইল এক্সটেনশন (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"মিডিয়া এক্সপোর্ট ব্যর্থ। আরও জানতে DevTools খুলুন।","Failed to copy media URLs. Open DevTools for more details.":"মিডিয়া URL কপি ব্যর্থ। আরও জানতে DevTools খুলুন।","filter.photo":"ছবি","filter.video":"ভিডিও","filter.animated_gif":"GIF","filter.retweet":"রিটুইট অন্তর্ভুক্ত করুন","loading remaining rows":"বাকি সারি লোড হচ্ছে","Bundle ZIP compression:":"Bundle ZIP কমপ্রেশন:","Fastest / store":"সবচেয়ে দ্রুত / store","Balanced / fast":"সামঞ্জস্যপূর্ণ / দ্রুত","Smaller / slower":"ছোট / ধীর","Cancel Export":"রপ্তানি বাতিল","Export a canonical portable ZIP bundle for sharing/importing.":"শেয়ার/ইমপোর্টের জন্য canonical portable ZIP bundle রপ্তানি করুন।","Export Bundle ZIP":"Bundle ZIP রপ্তানি","Source-backed media":"Source-backed মিডিয়া","rows scanned:":"স্ক্যান করা সারি:","media URLs:":"মিডিয়া URL:",loading:"লোড হচ্ছে","Loading media...":"মিডিয়া লোড হচ্ছে..."},common:{"Open Control Panel":"কন্ট্রোল প্যানেল খুলুন","Browse around to capture more data.":"আরও ডেটা ক্যাপচার করতে ব্রাউজ করুন।",Settings:"সেটিংস",General:"সাধারণ",Theme:"থিম",Language:"ভাষা",Debug:"ডিবাগ","Date Time Format":"তারিখ-সময় বিন্যাস","Click for more information. This will take effect on both previewer and exported files.":"আরও তথ্যের জন্য ক্লিক করুন। এটি প্রিভিউয়ার এবং এক্সপোর্ট করা ফাইল—দুটিতেই প্রযোজ্য হবে।","Use dedicated DB for accounts":"প্রতিটি অ্যাকাউন্টের জন্য আলাদা DB ব্যবহার করুন","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"এটি প্রতিটি Twitter অ্যাকাউন্টের জন্য আলাদা ডেটাবেস তৈরি করবে, ফলে একাধিক অ্যাকাউন্ট ব্যবহার করার সময় ডেটা মিশে যাওয়ার ঝুঁকি কমে।","Local Database":"স্থানীয় ডেটাবেস","Analyze DB":"বিশ্লেষণ","Export DB":"এক্সপোর্ট","Clear DB":"মুছুন","Bundle Export":"বান্ডল এক্সপোর্ট","Bundle Library":"বান্ডল লাইব্রেরি","QC Session":"QC সেশন","Diagnostic capture":"ডায়াগনস্টিক ক্যাপচার","Diagnostic buffers cleared.":"ডায়াগনস্টিক বাফার মুছে ফেলা হয়েছে।","Clear Buffers":"বাফার মুছুন","Preparing...":"প্রস্তুত হচ্ছে...","Preparing diagnostics...":"ডায়াগনস্টিক প্রস্তুত হচ্ছে...","Export QC Diagnostics":"QC ডায়াগনস্টিক এক্সপোর্ট","Export Diagnostics Bundle":"ডায়াগনস্টিক বান্ডল এক্সপোর্ট","QC idle.":"QC নিষ্ক্রিয়।","Are you sure to clear all data in the database?":"আপনি কি নিশ্চিত যে ডেটাবেসের সব ডেটা মুছে ফেলতে চান?","Database cleared.":"ডেটাবেস মুছে ফেলা হয়েছে।",Module:"মডিউল","Modules (Scroll to see more)":"মডিউল (আরও দেখতে স্ক্রল করুন)",About:"সম্পর্কে",Version:"সংস্করণ","Search...":"খুঁজুন...","Something went wrong.":"কিছু ভুল হয়েছে।","Error:":"ত্রুটি:","Captured:":"ক্যাপচার করা হয়েছে:","Rows per page:":"প্রতি পৃষ্ঠায় সারি:","Relation Types":"সম্পর্কের ধরন","Subject Accounts":"বিষয় অ্যাকাউন্ট","Subject User IDs":"বিষয় ব্যবহারকারী ID","Last Observed At":"শেষ পর্যবেক্ষণ","A - B of N items":"{{total}}টির মধ্যে {{from}} - {{to}}","No data available.":"কোনো ডেটা নেই।","No media available.":"কোনো মিডিয়া নেই।",Clear:"সাফ করুন","Bookmark folders":"বুকমার্ক ফোল্ডার","1 folder selected":"১টি ফোল্ডার নির্বাচিত","{{count}} folders selected":"{{count}}টি ফোল্ডার নির্বাচিত","Export Media":"মিডিয়া এক্সপোর্ট","Export Data":"ডেটা এক্সপোর্ট","Export Search History":"সার্চ ইতিহাস এক্সপোর্ট","JSON View":"JSON ভিউ","Media View":"মিডিয়া ভিউ",Bookmarks:"বুকমার্ক",Tweets:"টুইট",Users:"ব্যবহারকারী","User Tweets":"ব্যবহারকারীর টুইট","User Media":"ব্যবহারকারীর মিডিয়া","Tweet Details":"টুইটের বিবরণ","Search Timeline":"সার্চ টাইমলাইন","Home Timeline":"হোম টাইমলাইন","List Timeline":"লিস্ট টাইমলাইন","Community Timeline":"কমিউনিটি টাইমলাইন","Community Members":"কমিউনিটি সদস্য","List Members":"লিস্ট সদস্য","List Subscribers":"লিস্ট সাবস্ক্রাইবার","Direct Messages":"ডাইরেক্ট মেসেজ","Interaction Events":"ইন্টারঅ্যাকশন ইভেন্ট","Local Search":"স্থানীয় সার্চ","Runtime Logs":"রানটাইম লগ","Bundle Viewer":"বান্ডল ভিউয়ার","{{count}} imported bundles":"{{count}}টি আমদানি করা বান্ডল","Search indexed tweets with Twitter-style operators":"Twitter-ধাঁচের অপারেটর দিয়ে ইনডেক্স করা টুইট খুঁজুন","Local Recorder Search":"লোকাল রেকর্ডার সার্চ",Quotes:"কোট",CommunityMembers:"কমিউনিটি সদস্য",CommunityTimeline:"কমিউনিটি টাইমলাইন",DirectMessages:"ডাইরেক্ট মেসেজ",Followers:"ফলোয়ার",Following:"ফলো করছে",HomeTimeline:"হোম টাইমলাইন",Likes:"লাইক",ListMembers:"লিস্ট সদস্য",ListSubscribers:"লিস্ট সাবস্ক্রাইবার",ListTimeline:"লিস্ট টাইমলাইন",InteractionEvents:"ইন্টারঅ্যাকশন ইভেন্ট",LocalSearch:"স্থানীয় সার্চ",RawCapture:"কাঁচা ক্যাপচার",Retweeters:"রিটুইটকারী",RetweetersModule:"রিটুইটকারী",RuntimeLogs:"রানটাইম লগ",SearchTimeline:"সার্চ টাইমলাইন",TweetIndex:"টুইট ইনডেক্স",TweetDetail:"টুইট বিবরণ",UserDetail:"ব্যবহারকারী বিবরণ",UserMedia:"ব্যবহারকারীর মিডিয়া",UserTweets:"ব্যবহারকারীর টুইট",on:"চালু",off:"বন্ধ",unknown:"অজানা",online:"অনলাইন",offline:"অফলাইন",leader:"লিডার",follower:"ফলোয়ার",tab:"ট্যাব",both:"উভয়",xhr:"xhr",fetch:"fetch",watchdog:"ওয়াচডগ",all:"সব",explicit:"স্পষ্ট",loading:"লোড হচ্ছে",complete:"সম্পূর্ণ",idle:"নিষ্ক্রিয়","api-name":"API নাম","id-only":"শুধু ID","theme.system":"সিস্টেম","theme.cupcake":"হালকা","theme.dark":"গাঢ়","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"ব্যবসা","theme.winter":"শীত","Safe mode":"সেফ মোড","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"সক্রিয় থাকলে hook-ভিত্তিক ক্যাপচার বন্ধ করে। স্বাভাবিক ব্রাউজিং ও ডায়াগনস্টিক ক্যাপচারের জন্য এটি বন্ধ করুন।","Hook mode":"Hook মোড","Controls whether the userscript hooks XHR, fetch, both, or neither.":"userscript XHR, fetch, দুটোই বা কোনোটাই hook করবে কি না তা নিয়ন্ত্রণ করে।","Repair mode":"মেরামত মোড","Controls whether hook repair watchdog behavior is active.":"hook repair watchdog সক্রিয় থাকবে কি না তা নিয়ন্ত্রণ করে।","{{seconds}}s ago":"{{seconds}} সেকেন্ড আগে","Hooks: {{status}}":"হুকসমূহ:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"হুকসমূহ:xhr {{xhr}}, fetch {{fetch}}, শেষ {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"হুকসমূহ:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"মোড: সেফ {{safe}}, hook {{hook}}, মেরামত {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"মোড: সেফ {{safe}}, hook {{hook}}, মেরামত {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw ইভেন্ট: {{total}} | বাদ: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} লোড হচ্ছে / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow বাদ: {{drops}} | অনুপলব্ধ: {{unavailable}} | সবচেয়ে পুরনো pending: {{age}}ms","daemon: {{status}}":"ডেমন:{{status}}","daemon: {{status}} | last error: {{error}}":"ডেমন:{{status}} | শেষ ত্রুটি:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"মনিটর:{{role}} | লিডার:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | দমন করা route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"ডাটাবেস সংযুক্ত: {{name}}","App options loaded":"অ্যাপ অপশন লোড হয়েছে",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"অগঠিত টেক্সট কনটেন্ট-টার্ম মিল এবং উন্নত সংলগ্ন বাক্যাংশ উইন্ডোতে প্রসারিত হয়; উদ্ধৃত না থাকলে সাধারণ ফিলার শব্দের অগ্রাধিকার কমানো হয়।","Phrase search with optional slop.":"ঐচ্ছিক স্লপসহ বাক্যাংশ অনুসন্ধান।","Boolean operators with standard precedence and parentheses.":"স্ট্যান্ডার্ড অগ্রাধিকার ও বন্ধনীসহ বুলিয়ান অপারেটর।","Match the author handle or author id.":"লেখকের হ্যান্ডেল বা লেখক ID মিলান।","Shorthand for an enforced author constraint, equivalent to from:user.":"বাধ্যতামূলক লেখক সীমাবদ্ধতার সংক্ষিপ্ত রূপ, from:user-এর সমতুল্য।","Match reply targets, entity ids, or conversation ids.":"রিপ্লাই টার্গেট, এন্টিটি ID বা কথোপকথন ID মিলান।","Match bookmark folder id or folder name.":"বুকমার্ক ফোল্ডার ID বা নাম মিলান।","Match language, route surface, source text, or card name.":"ভাষা, রুট সারফেস, সোর্স টেক্সট বা কার্ড নাম মিলান।","Match domains or URLs found in tweets.":"টুইটে থাকা ডোমেইন বা URL মিলান।","Boolean state filters.":"বুলিয়ান অবস্থা ফিল্টার।","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"মিডিয়া, লিংক, মেনশন, হ্যাশট্যাগ, ক্যাশট্যাগ, এনগেজমেন্ট ও পোলের উপস্থিতি ফিল্টার।","Compatibility aliases retained for Twitter-style queries.":"Twitter-ধাঁচের কোয়েরির জন্য রাখা সামঞ্জস্যপূর্ণ alias।","Numeric threshold filters.":"সংখ্যাগত থ্রেশহোল্ড ফিল্টার।","Date, timestamp, and Snowflake-style boundary filters.":"তারিখ, টাইমস্ট্যাম্প ও Snowflake-ধাঁচের সীমা ফিল্টার।","Explicit mention filter plus shorthand hashtag and cashtag filters.":"স্পষ্ট মেনশন ফিল্টার এবং সংক্ষিপ্ত হ্যাশট্যাগ ও ক্যাশট্যাগ ফিল্টার।","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"ডটেড অবজেক্ট পাথ ও অ্যারে সহ কাঁচা নেস্টেড পাথে ফিল্ড-স্কোপড শব্দভিত্তিক অনুসন্ধান।","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"অ্যাপ অপশন v{{oldVersion}} থেকে v{{newVersion}}-এ মাইগ্রেট হয়েছে","Hooked into fetch":"fetch-এ hook করা হয়েছে","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest-এ hook করা হয়েছে (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode সক্রিয় ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook মেরামত ব্যর্থ ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking ইনস্টল ব্যর্থ; tracker ছাড়া চলবে ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} আইটেম পাওয়া গেছে","Exporting to ZIP file: {{filename}}":"ZIP ফাইলে রপ্তানি: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} ফাইলে রপ্তানি: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} ফাইলে streaming রপ্তানি: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"মাইগ্রেশন সম্পন্ন: {{users}} ব্যবহারকারী ও {{tweets}} টুইট আপডেট হয়েছে।","TweetTombstone received (Reason: {{reason}})":"TweetTombstone পাওয়া গেছে (কারণ: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest hook করতে ব্যর্থ","Fetch API not found, skipping fetch hooks":"Fetch API পাওয়া যায়নি, fetch hooks এড়িয়ে যাওয়া হচ্ছে","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function অনুপলব্ধ বা অনিরাপদ; safe mode চালু হচ্ছে","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation ব্যর্থ; safe mode চালু হচ্ছে","Fetch hook already installed":"Fetch hook ইতিমধ্যে ইনস্টল করা","Debug mode enabled":"Debug mode সক্রিয়","Database cleared":"ডাটাবেস পরিষ্কার হয়েছে","Upgrading database schema...":"ডাটাবেস schema আপগ্রেড হচ্ছে...","Database upgraded":"ডাটাবেস আপগ্রেড হয়েছে","Zip stream closed.":"ZIP stream বন্ধ হয়েছে।","Running migration_20250609: Migrating legacy user data format":"migration_20250609 চলছে: legacy user data format মাইগ্রেট হচ্ছে","TweetUnavailable received (Reason: unknown)":"TweetUnavailable পাওয়া গেছে (কারণ: অজানা)","Empty tweet received":"খালি টুইট পাওয়া গেছে","Unknown tweet type received":"অজানা টুইট টাইপ পাওয়া গেছে","Failed to extract tweet":"টুইট বের করতে ব্যর্থ","Failed to export file":"ফাইল রপ্তানি ব্যর্থ","Failed to stream export file":"stream export ফাইল ব্যর্থ"}},ob={exporter:{ID:"ID",Date:"Date",Content:"Content","Show Full Text":"Show Full Text",Media:"Media","Screen Name":"Screen Name","Profile Name":"Profile Name","Profile Image":"Profile Image","User ID":"User ID","Replying To":"Replying To","RT Source":"RT Source","Quote Source":"Quote Source","Media Tags":"Media Tags",Favorites:"Favorites",Retweets:"Retweets",Bookmarks:"Bookmarks",Quotes:"Quotes",Replies:"Replies",Views:"Views",Favorited:"Favorited",Retweeted:"Retweeted",Bookmarked:"Bookmarked","Bookmark Folder":"Bookmark Folder",URL:"URL",Actions:"Actions",Details:"Details",Description:"Description","Profile Banner":"Profile Banner",Followers:"Followers",FollowingCount:"Following Count",Statuses:"Statuses",Favourites:"Favourites",Listed:"Listed",Location:"Location",Website:"Website",Birthdate:"Birthdate","Verified Type":"Verified Type","Blue Verified":"Blue Verified",Following:"Following","Follows You":"Follows You","Can DM":"Can DM",Protected:"Protected","Created At":"Created At",Sender:"Sender",Recipient:"Recipient","Conversation ID":"Conversation ID","Conversation Type":"Conversation Type",Data:"Data","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.","Data length:":"Data length:","Export scope:":"Export scope:","All current results":"All current results","Selected rows":"Selected rows","Pinned result set":"Pinned result set",Query:"Query",Sort:"Sort","Include all metadata:":"Include all metadata:","Export as:":"Export as:","No data selected.":"No data selected.",Cancel:"Cancel","Start Export":"Start Export","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.","Filename template:":"Filename template:","Download scheduler":"Download scheduler","Faster defaults are intended for bulk CDN transfer.":"Faster defaults are intended for bulk CDN transfer.","Start delay (ms)":"Start delay (ms)","Global parallel":"Global parallel","Per host":"Per host",Videos:"Videos",Retries:"Retries","Use aria2 format:":"Use aria2 format:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.","Rate limit (ms):":"Rate limit (ms):","Media Filter:":"Media Filter:","File Name":"File Name","Media Type":"Media Type","Download URL":"Download URL","No media selected.":"No media selected.","Preview limited to first 250 media items.":"Preview limited to first 250 media items.",Zipping:"Zipping","Copied!":"Copied!","Copy URLs":"Copy URLs","The tweet ID":"The tweet ID","The username of tweet author":"The username of tweet author","The profile name of tweet author":"The profile name of tweet author","The media index in tweet (start from 0)":"The media index in tweet (start from 0)","The order of media in tweet (1/2/3/4)":"The order of media in tweet (1/2/3/4)","The post date in YYYYMMDD format":"The post date in YYYYMMDD format","The post time in HHmmss format":"The post time in HHmmss format","The media type (photo/video/animated_gif)":"The media type (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"The file extension of media (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Failed to export media. Open DevTools for more details.","Failed to copy media URLs. Open DevTools for more details.":"Failed to copy media URLs. Open DevTools for more details.","filter.photo":"Photo","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Include retweets","loading remaining rows":"loading remaining rows","Bundle ZIP compression:":"Bundle ZIP compression:","Fastest / store":"Fastest / store","Balanced / fast":"Balanced / fast","Smaller / slower":"Smaller / slower","Cancel Export":"Cancel Export","Export a canonical portable ZIP bundle for sharing/importing.":"Export a canonical portable ZIP bundle for sharing/importing.","Export Bundle ZIP":"Export Bundle ZIP","Source-backed media":"Source-backed media","rows scanned:":"rows scanned:","media URLs:":"media URLs:",loading:"loading","Loading media...":"Loading media..."},common:{"Open Control Panel":"Open Control Panel","Browse around to capture more data.":"Browse around to capture more data.",Settings:"Settings",General:"General",Theme:"Theme",Language:"Language",Debug:"Debug","Date Time Format":"Date Time Format","Click for more information. This will take effect on both previewer and exported files.":"Click for more information. This will take effect on both previewer and exported files.","Use dedicated DB for accounts":"Use dedicated DB for accounts","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.","Local Database":"Local Database","Analyze DB":"Analyze","Export DB":"Export","Clear DB":"Clear","Bundle Export":"Bundle Export","Bundle Library":"Bundle Library","QC Session":"QC Session","Diagnostic capture":"Diagnostic capture","Diagnostic buffers cleared.":"Diagnostic buffers cleared.","Clear Buffers":"Clear Buffers","Preparing...":"Preparing...","Preparing diagnostics...":"Preparing diagnostics...","Export QC Diagnostics":"Export QC Diagnostics","Export Diagnostics Bundle":"Export Diagnostics Bundle","QC idle.":"QC idle.","Are you sure to clear all data in the database?":"Are you sure to clear all data in the database?","Database cleared.":"Database cleared.",Module:"Module","Modules (Scroll to see more)":"Modules (Scroll to see more)",About:"About",Version:"Version","Search...":"Search...","Something went wrong.":"Something went wrong.","Error:":"Error:","Captured:":"Captured:","Rows per page:":"Rows per page:","Relation Types":"Relation Types","Subject Accounts":"Subject Accounts","Subject User IDs":"Subject User IDs","Last Observed At":"Last Observed At","A - B of N items":"{{from}} - {{to}} of {{total}} items","No data available.":"No data available.","No media available.":"No media available.",Clear:"Clear","Bookmark folders":"Bookmark folders","1 folder selected":"1 folder selected","{{count}} folders selected":"{{count}} folders selected","Export Media":"Export Media","Export Data":"Export Data","Export Search History":"Export Search History","JSON View":"JSON View","Media View":"Media View",Bookmarks:"Bookmarks",Tweets:"Tweets",Users:"Users","User Tweets":"User Tweets","User Media":"User Media","Tweet Details":"Tweet Details","Search Timeline":"Search Timeline","Home Timeline":"Home Timeline","List Timeline":"List Timeline","Community Timeline":"Community Timeline","Community Members":"Community Members","List Members":"List Members","List Subscribers":"List Subscribers","Direct Messages":"Direct Messages","Interaction Events":"Interaction Events","Local Search":"Local Search","Runtime Logs":"Runtime Logs","Bundle Viewer":"Bundle Viewer","{{count}} imported bundles":"{{count}} imported bundles","Search indexed tweets with Twitter-style operators":"Search indexed tweets with Twitter-style operators","Local Recorder Search":"Local Recorder Search",Quotes:"Quotes",CommunityMembers:"CommunityMembers",CommunityTimeline:"CommunityTimeline",DirectMessages:"DirectMessages",Followers:"Followers",Following:"Following",HomeTimeline:"HomeTimeline",Likes:"Likes",ListMembers:"ListMembers",ListSubscribers:"ListSubscribers",ListTimeline:"ListTimeline",InteractionEvents:"InteractionEvents",LocalSearch:"LocalSearch",RawCapture:"RawCapture",Retweeters:"Retweeters",RetweetersModule:"RetweetersModule",RuntimeLogs:"RuntimeLogs",SearchTimeline:"SearchTimeline",TweetIndex:"TweetIndex",TweetDetail:"TweetDetail",UserDetail:"UserDetail",UserMedia:"UserMedia",UserTweets:"UserTweets",on:"on",off:"off",unknown:"unknown",online:"online",offline:"offline",leader:"leader",follower:"follower",tab:"tab",both:"both",xhr:"xhr",fetch:"fetch",watchdog:"watchdog",all:"all",explicit:"explicit",loading:"loading",complete:"complete",idle:"idle","api-name":"api-name","id-only":"id-only","theme.system":"System","theme.cupcake":"Cupcake","theme.dark":"Dark","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Business","theme.winter":"Winter","Safe mode":"Safe mode","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.","Hook mode":"Hook mode","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controls whether the userscript hooks XHR, fetch, both, or neither.","Repair mode":"Repair mode","Controls whether hook repair watchdog behavior is active.":"Controls whether hook repair watchdog behavior is active.","{{seconds}}s ago":"{{seconds}}s ago","Hooks: {{status}}":"Hooks: {{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks: xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw events: {{total}} | dropped: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms","daemon: {{status}}":"daemon: {{status}}","daemon: {{status}} | last error: {{error}}":"daemon: {{status}} | last error: {{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor: {{role}} | leader: {{leader}} | lease: {{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Database connected: {{name}}","App options loaded":"App options loaded",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.","Phrase search with optional slop.":"Phrase search with optional slop.","Boolean operators with standard precedence and parentheses.":"Boolean operators with standard precedence and parentheses.","Match the author handle or author id.":"Match the author handle or author id.","Shorthand for an enforced author constraint, equivalent to from:user.":"Shorthand for an enforced author constraint, equivalent to from:user.","Match reply targets, entity ids, or conversation ids.":"Match reply targets, entity ids, or conversation ids.","Match bookmark folder id or folder name.":"Match bookmark folder id or folder name.","Match language, route surface, source text, or card name.":"Match language, route surface, source text, or card name.","Match domains or URLs found in tweets.":"Match domains or URLs found in tweets.","Boolean state filters.":"Boolean state filters.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.","Compatibility aliases retained for Twitter-style queries.":"Compatibility aliases retained for Twitter-style queries.","Numeric threshold filters.":"Numeric threshold filters.","Date, timestamp, and Snowflake-style boundary filters.":"Date, timestamp, and Snowflake-style boundary filters.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Explicit mention filter plus shorthand hashtag and cashtag filters.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"App options migrated from v{{oldVersion}} to v{{newVersion}}","Hooked into fetch":"Hooked into fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hooked into XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode enabled ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook repair failed ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking install failed; continuing without tracker ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} items received","Exporting to ZIP file: {{filename}}":"Exporting to ZIP file: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exporting to {{format}} file: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Streaming export to {{format}} file: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration completed: {{users}} users and {{tweets}} tweets updated.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone received (Reason: {{reason}})","Failed to hook into XMLHttpRequest":"Failed to hook into XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API not found, skipping fetch hooks","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function unavailable or unsafe; enabling safe mode","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation failed; enabling safe mode","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation failed; enabling safe mode","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation failed; enabling safe mode","Fetch hook already installed":"Fetch hook already installed","Debug mode enabled":"Debug mode enabled","Database cleared":"Database cleared","Upgrading database schema...":"Upgrading database schema...","Database upgraded":"Database upgraded","Zip stream closed.":"Zip stream closed.","Running migration_20250609: Migrating legacy user data format":"Running migration_20250609: Migrating legacy user data format","TweetUnavailable received (Reason: unknown)":"TweetUnavailable received (Reason: unknown)","Empty tweet received":"Empty tweet received","Unknown tweet type received":"Unknown tweet type received","Failed to extract tweet":"Failed to extract tweet","Failed to export file":"Failed to export file","Failed to stream export file":"Failed to stream export file"}},ab={exporter:{ID:"ID",Date:"Fecha",Content:"Contenido","Show Full Text":"Mostrar texto completo",Media:"Medios","Screen Name":"Nombre de usuario","Profile Name":"Nombre del perfil","Profile Image":"Imagen de perfil","User ID":"ID de usuario","Replying To":"Responde a","RT Source":"Fuente del RT","Quote Source":"Fuente de la cita","Media Tags":"Etiquetas de medios",Favorites:"Favoritos",Retweets:"Retweets",Bookmarks:"Marcadores",Quotes:"Citas",Replies:"Respuestas",Views:"Visualizaciones",Favorited:"Marcado como favorito",Retweeted:"Retuiteado",Bookmarked:"Guardado en marcadores","Bookmark Folder":"Carpeta de marcadores",URL:"URL",Actions:"Acciones",Details:"Detalles",Description:"Descripción","Profile Banner":"Banner del perfil",Followers:"Seguidores",FollowingCount:"Número de seguidos",Statuses:"Publicaciones",Favourites:"Favoritos",Listed:"En listas",Location:"Ubicación",Website:"Sitio web",Birthdate:"Fecha de nacimiento","Verified Type":"Tipo de verificación","Blue Verified":"Verificación Blue",Following:"Siguiendo","Follows You":"Te sigue","Can DM":"Puede recibir DM",Protected:"Protegido","Created At":"Creado el",Sender:"Remitente",Recipient:"Destinatario","Conversation ID":"ID de conversación","Conversation Type":"Tipo de conversación",Data:"Datos","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exporta los datos capturados como archivo JSON/HTML/CSV. Puede tardar según la cantidad de datos. El archivo exportado no incluye archivos multimedia como imágenes o videos, solo sus URL.","Data length:":"Longitud de datos:","Export scope:":"Alcance de exportación:","All current results":"Todos los resultados actuales","Selected rows":"Filas seleccionadas","Pinned result set":"Conjunto de resultados fijado",Query:"Consulta",Sort:"Orden","Include all metadata:":"Incluir todos los metadatos:","Export as:":"Exportar como:","No data selected.":"No hay datos seleccionados.",Cancel:"Cancelar","Start Export":"Iniciar exportación","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Descarga y guarda archivos multimedia desde los datos capturados. Puede tardar según la cantidad de datos. Se descargarán imágenes de perfil, banners de perfil (para usuarios), imágenes y videos (para tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Para más de 100 medios o archivos grandes, se recomienda copiar las URL y descargarlas con un gestor externo como aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"La exportación ZIP del navegador ahora usa descargas paralelas limitadas. Para trabajos muy grandes con muchos videos, exportar URL o aria2 sigue siendo la ruta más segura y de baja memoria.","Filename template:":"Plantilla de nombre de archivo:","Download scheduler":"Planificador de descargas","Faster defaults are intended for bulk CDN transfer.":"Los valores predeterminados más rápidos están pensados para transferencias masivas desde CDN.","Start delay (ms)":"Retraso inicial (ms)","Global parallel":"Paralelismo global","Per host":"Por host",Videos:"Videos",Retries:"Reintentos","Use aria2 format:":"Usar formato aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Haz clic para más información. Cada URL irá en una línea nueva, con su nombre de archivo en la línea siguiente. Este formato es compatible con aria2.","Rate limit (ms):":"Límite de tasa (ms):","Media Filter:":"Filtro de medios:","File Name":"Nombre de archivo","Media Type":"Tipo de medio","Download URL":"URL de descarga","No media selected.":"No hay medios seleccionados.","Preview limited to first 250 media items.":"La vista previa se limita a los primeros 250 elementos multimedia.",Zipping:"Comprimiendo","Copied!":"Copiado","Copy URLs":"Copiar URL","The tweet ID":"El ID del tweet","The username of tweet author":"El nombre de usuario del autor del tweet","The profile name of tweet author":"El nombre de perfil del autor del tweet","The media index in tweet (start from 0)":"El índice del medio en el tweet (empieza en 0)","The order of media in tweet (1/2/3/4)":"El orden del medio en el tweet (1/2/3/4)","The post date in YYYYMMDD format":"La fecha de publicación en formato YYYYMMDD","The post time in HHmmss format":"La hora de publicación en formato HHmmss","The media type (photo/video/animated_gif)":"El tipo de medio (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"La extensión del archivo multimedia (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"No se pudieron exportar los medios. Abre DevTools para más detalles.","Failed to copy media URLs. Open DevTools for more details.":"No se pudieron copiar las URL de medios. Abre DevTools para más detalles.","filter.photo":"Foto","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Incluir retweets","loading remaining rows":"cargando filas restantes","Bundle ZIP compression:":"Compresión del ZIP bundle:","Fastest / store":"Más rápido / almacenar","Balanced / fast":"Equilibrado / rápido","Smaller / slower":"Más pequeño / más lento","Cancel Export":"Cancelar exportación","Export a canonical portable ZIP bundle for sharing/importing.":"Exporta un ZIP bundle portátil canónico para compartir/importar.","Export Bundle ZIP":"Exportar ZIP bundle","Source-backed media":"Medios respaldados por fuente","rows scanned:":"filas escaneadas:","media URLs:":"URLs de medios:",loading:"cargando","Loading media...":"Cargando medios..."},common:{"Open Control Panel":"Abrir panel de control","Browse around to capture more data.":"Navega para capturar más datos.",Settings:"Configuración",General:"General",Theme:"Tema",Language:"Idioma",Debug:"Depuración","Date Time Format":"Formato de fecha y hora","Click for more information. This will take effect on both previewer and exported files.":"Haz clic para ver más información. Esto se aplicará tanto al visor previo como a los archivos exportados.","Use dedicated DB for accounts":"Usar una base de datos dedicada por cuenta","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Esto creará una base de datos separada para cada cuenta de Twitter, lo que ayuda a reducir la mezcla de datos al usar varias cuentas.","Local Database":"Base de datos local","Analyze DB":"Analizar","Export DB":"Exportar","Clear DB":"Borrar","Bundle Export":"Exportar paquete","Bundle Library":"Biblioteca de paquetes","QC Session":"Sesión de QC","Diagnostic capture":"Captura diagnóstica","Diagnostic buffers cleared.":"Búferes de diagnóstico borrados.","Clear Buffers":"Borrar búferes","Preparing...":"Preparando...","Preparing diagnostics...":"Preparando diagnósticos...","Export QC Diagnostics":"Exportar diagnósticos de QC","Export Diagnostics Bundle":"Exportar paquete de diagnósticos","QC idle.":"QC inactivo.","Are you sure to clear all data in the database?":"¿Seguro que quieres borrar todos los datos de la base de datos?","Database cleared.":"Base de datos borrada.",Module:"Módulo","Modules (Scroll to see more)":"Módulos (desplázate para ver más)",About:"Acerca de",Version:"Versión","Search...":"Buscar...","Something went wrong.":"Algo salió mal.","Error:":"Error:","Captured:":"Capturado:","Rows per page:":"Filas por página:","Relation Types":"Tipos de relación","Subject Accounts":"Cuentas sujeto","Subject User IDs":"ID de usuario sujeto","Last Observed At":"Última observación","A - B of N items":"{{from}} - {{to}} de {{total}} elementos","No data available.":"No hay datos disponibles.","No media available.":"No hay medios disponibles.",Clear:"Limpiar","Bookmark folders":"Carpetas de marcadores","1 folder selected":"1 carpeta seleccionada","{{count}} folders selected":"{{count}} carpetas seleccionadas","Export Media":"Exportar medios","Export Data":"Exportar datos","Export Search History":"Exportar historial de búsqueda","JSON View":"Vista JSON","Media View":"Vista de medios",Bookmarks:"Marcadores",Tweets:"Tweets",Users:"Usuarios","User Tweets":"Tweets de usuario","User Media":"Medios de usuario","Tweet Details":"Detalles del tweet","Search Timeline":"Cronología de búsqueda","Home Timeline":"Cronología de inicio","List Timeline":"Cronología de lista","Community Timeline":"Cronología de comunidad","Community Members":"Miembros de comunidad","List Members":"Miembros de lista","List Subscribers":"Suscriptores de lista","Direct Messages":"Mensajes directos","Interaction Events":"Eventos de interacción","Local Search":"Búsqueda local","Runtime Logs":"Registros de ejecución","Bundle Viewer":"Visor de paquetes","{{count}} imported bundles":"{{count}} paquetes importados","Search indexed tweets with Twitter-style operators":"Busca tweets indexados con operadores estilo Twitter","Local Recorder Search":"Búsqueda del registrador local",Quotes:"Citas",CommunityMembers:"Miembros de comunidad",CommunityTimeline:"Cronología de comunidad",DirectMessages:"Mensajes directos",Followers:"Seguidores",Following:"Siguiendo",HomeTimeline:"Cronología de inicio",Likes:"Me gusta",ListMembers:"Miembros de lista",ListSubscribers:"Suscriptores de lista",ListTimeline:"Cronología de lista",InteractionEvents:"Eventos de interacción",LocalSearch:"Búsqueda local",RawCapture:"Captura sin procesar",Retweeters:"Retuiteadores",RetweetersModule:"Retuiteadores",RuntimeLogs:"Registros de ejecución",SearchTimeline:"Búsqueda",TweetIndex:"Índice de tweets",TweetDetail:"Detalle del tweet",UserDetail:"Detalle de usuario",UserMedia:"Medios de usuario",UserTweets:"Tweets de usuario",on:"activado",off:"desactivado",unknown:"desconocido",online:"en línea",offline:"sin conexión",leader:"líder",follower:"seguidor",tab:"pestaña",both:"ambos",xhr:"xhr",fetch:"fetch",watchdog:"vigilante",all:"todo",explicit:"explícito",loading:"cargando",complete:"completo",idle:"inactivo","api-name":"nombre de API","id-only":"solo ID","theme.system":"Sistema","theme.cupcake":"Claro","theme.dark":"Oscuro","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Negocios","theme.winter":"Invierno","Safe mode":"Modo seguro","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Desactiva la captura basada en hooks cuando está habilitado. Desactívalo para navegación normal y captura diagnóstica.","Hook mode":"Modo de hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controla si el userscript engancha XHR, fetch, ambos o ninguno.","Repair mode":"Modo de reparación","Controls whether hook repair watchdog behavior is active.":"Controla si el watchdog de reparación de hooks está activo.","{{seconds}}s ago":"hace {{seconds}} s","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, último {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Modo: seguro {{safe}}, hook {{hook}}, reparación {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Modo: seguro {{safe}}, hook {{hook}}, reparación {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"eventos raw: {{total}} | descartados: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} en cola / {{enqueued}} enq / {{flushed}} volcados / {{failed}} fallidos","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"descartes por desborde de spool: {{drops}} | no disponible: {{unavailable}} | pendiente más antiguo: {{age}}ms","daemon: {{status}}":"servicio:{{status}}","daemon: {{status}} | last error: {{error}}":"servicio:{{status}} | último error:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | líder:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor ruta/viewport: {{route}}/{{viewport}} | suprimidos ruta/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Base de datos conectada: {{name}}","App options loaded":"Opciones de la app cargadas",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Busca con operadores, frases y lógica booleana: from:alice ("design system"~2 OR reliability)',"Search help":"Ayuda de búsqueda","Clear search":"Limpiar búsqueda","Table view":"Vista de tabla","Exit fullscreen":"Salir de pantalla completa",Fullscreen:"Pantalla completa","{{view}} is disabled for large source-backed result sets.":"{{view}} está deshabilitada para conjuntos grandes respaldados por fuente.","{{view}} view - {{status}}":"Vista {{view}} - {{status}}","{{view}} view":"Vista {{view}}","loading {{loaded}}/{{total}}":"cargando {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"cargando más {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"buscando {{matches}}/{{total}}","matches {{matches}}/{{total}}":"coincidencias {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"filas {{loaded}}/{{total}}","rows {{count}}":"filas {{count}}","buffering...":"almacenando...","history {{count}}":"historial {{count}}","selected {{count}} ({{mode}})":"seleccionados {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"renderizado {{rendered}}/{{total}} (ventana {{start}}-{{end}})","Search Operators":"Operadores de búsqueda","Query semantics now follow recorder-style precedence:":"La semántica de consulta ahora sigue precedencia estilo recorder:","with implicit":"con","between adjacent terms.":"implícito entre términos adyacentes.","search.category.lexical":"Léxico","search.category.identity":"Identidad","search.category.metadata":"Metadatos","search.category.presence":"Presencia","search.category.numeric_date":"Numérico/fecha","search.category.compatibility":"Compatibilidad","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"El texto no estructurado se expande en coincidencias de términos de contenido y ventanas de frases adyacentes con mayor peso; las palabras comunes pierden prioridad salvo que estén entre comillas.","Phrase search with optional slop.":"Búsqueda de frases con holgura opcional.","Boolean operators with standard precedence and parentheses.":"Operadores booleanos con precedencia estándar y paréntesis.","Match the author handle or author id.":"Coincide con el usuario o ID del autor.","Shorthand for an enforced author constraint, equivalent to from:user.":"Atajo para una restricción de autor obligatoria, equivalente a from:user.","Match reply targets, entity ids, or conversation ids.":"Coincide con destinos de respuesta, IDs de entidad o IDs de conversación.","Match bookmark folder id or folder name.":"Coincide con el ID o nombre de la carpeta de marcadores.","Match language, route surface, source text, or card name.":"Coincide con idioma, superficie de ruta, texto de origen o nombre de tarjeta.","Match domains or URLs found in tweets.":"Coincide con dominios o URLs encontrados en tweets.","Boolean state filters.":"Filtros de estado booleanos.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtros de presencia para medios, enlaces, menciones, hashtags, cashtags, interacción y encuestas.","Compatibility aliases retained for Twitter-style queries.":"Alias de compatibilidad conservados para consultas estilo Twitter.","Numeric threshold filters.":"Filtros de umbral numérico.","Date, timestamp, and Snowflake-style boundary filters.":"Filtros de límite por fecha, marca temporal y estilo Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtro explícito de mención más filtros abreviados de hashtag y cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Búsqueda léxica limitada a campos sobre rutas anidadas sin procesar, incluidas rutas con puntos y arrays.","loading source {{scanned}}/{{total}}":"cargando fuente {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"fuente {{status}} {{scanned}}/{{total}}","media {{count}}":"medios {{count}}","loaded media {{count}}":"medios cargados {{count}}","source rows {{scanned}}/{{total}} {{status}}":"filas fuente {{scanned}}/{{total}} {{status}}","source rows {{count}}":"filas fuente {{count}}","layout {{columns}} cols @ {{width}}px":"diseño {{columns}} cols @ {{width}}px","original tweet attachments only":"solo adjuntos del tweet original","Loading media.":"Cargando medios.","Comfortable density":"Densidad cómoda","Compact density":"Densidad compacta",Photo:"Foto",Video:"Video","Open tweet":"Abrir tweet","Export menu is open while remaining rows load in the background.":"El menú de exportación está abierto mientras las filas restantes cargan en segundo plano.","Wait for records to finish loading before exporting.":"Espera a que los registros terminen de cargar antes de exportar.","Exports stream from the active source without loading all rows into the table.":"Exporta en streaming desde la fuente activa sin cargar todas las filas en la tabla.","Opens immediately and loads remaining rows in the background.":"Se abre de inmediato y carga las filas restantes en segundo plano.","Export persisted bookmark search history":"Exportar historial de búsqueda de marcadores guardado","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`último: {{latest}}
nombre-api: {{apiName}}
solo-id: {{idOnly}}
ninguno: {{none}}`,"folder metadata: {{status}}":"metadatos de carpeta: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"La exportación de medios está deshabilitada para resultados grandes hasta que tenga stream respaldado por fuente.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opciones migradas de v{{oldVersion}} a v{{newVersion}}","Hooked into fetch":"Hook instalado en fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook instalado en XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Modo seguro de hooks activado ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Reparación de hook fallida ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Falló la instalación del rastreador de contexto de marcadores; continúa sin rastreador ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} elementos recibidos","Exporting to ZIP file: {{filename}}":"Exportando a archivo ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exportando a archivo {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Exportación streaming a archivo {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migración completada: {{users}} usuarios y {{tweets}} tweets actualizados.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone recibido (Razón: {{reason}})","Failed to hook into XMLHttpRequest":"Error al enganchar XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API no encontrada, omitiendo hooks de fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Función base de Fetch API no disponible o insegura; activando modo seguro","Fetch hook base invocation failed; enabling safe mode":"Invocación base del hook fetch fallida; activando modo seguro","XHR send hook base invocation failed; enabling safe mode":"Invocación base del hook XHR send fallida; activando modo seguro","XHR open hook base invocation failed; enabling safe mode":"Invocación base del hook XHR open fallida; activando modo seguro","Fetch hook already installed":"Hook de fetch ya instalado","Debug mode enabled":"Modo debug activado","Database cleared":"Base de datos borrada","Upgrading database schema...":"Actualizando esquema de base de datos...","Database upgraded":"Base de datos actualizada","Zip stream closed.":"Stream ZIP cerrado.","Running migration_20250609: Migrating legacy user data format":"Ejecutando migration_20250609: migrando formato heredado de datos de usuario","TweetUnavailable received (Reason: unknown)":"TweetUnavailable recibido (Razón: desconocida)","Empty tweet received":"Tweet vacío recibido","Unknown tweet type received":"Tipo de tweet desconocido recibido","Failed to extract tweet":"No se pudo extraer el tweet","Failed to export file":"No se pudo exportar el archivo","Failed to stream export file":"No se pudo exportar archivo en streaming"}},ib={exporter:{ID:"ID",Date:"Date",Content:"Contenu","Show Full Text":"Afficher le texte complet",Media:"Médias","Screen Name":"Nom d’utilisateur","Profile Name":"Nom du profil","Profile Image":"Image de profil","User ID":"ID utilisateur","Replying To":"Répond à","RT Source":"Source du RT","Quote Source":"Source de la citation","Media Tags":"Tags média",Favorites:"Favoris",Retweets:"Retweets",Bookmarks:"Signets",Quotes:"Citations",Replies:"Réponses",Views:"Vues",Favorited:"Ajouté aux favoris",Retweeted:"Retweeté",Bookmarked:"Ajouté aux signets","Bookmark Folder":"Dossier de signets",URL:"URL",Actions:"Actions",Details:"Détails",Description:"Description","Profile Banner":"Bannière du profil",Followers:"Abonnés",FollowingCount:"Nombre d’abonnements",Statuses:"Publications",Favourites:"Favoris",Listed:"Listé",Location:"Lieu",Website:"Site web",Birthdate:"Date de naissance","Verified Type":"Type de vérification","Blue Verified":"Vérifié Blue",Following:"Abonnements","Follows You":"Vous suit","Can DM":"DM possible",Protected:"Protégé","Created At":"Créé le",Sender:"Expéditeur",Recipient:"Destinataire","Conversation ID":"ID de conversation","Conversation Type":"Type de conversation",Data:"Données","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exportez les données capturées en fichier JSON/HTML/CSV. Cela peut prendre du temps selon la quantité de données. Le fichier exporté n’inclut pas les médias comme les images et vidéos, seulement leurs URL.","Data length:":"Longueur des données :","Export scope:":"Portée de l’export :","All current results":"Tous les résultats actuels","Selected rows":"Lignes sélectionnées","Pinned result set":"Ensemble de résultats épinglé",Query:"Requête",Sort:"Tri","Include all metadata:":"Inclure toutes les métadonnées :","Export as:":"Exporter en :","No data selected.":"Aucune donnée sélectionnée.",Cancel:"Annuler","Start Export":"Démarrer l’export","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Télécharge et enregistre les médias à partir des données capturées. Cela peut prendre du temps selon la quantité de données. Les médias téléchargés incluent les images de profil, les bannières de profil (pour les utilisateurs), les images et les vidéos (pour les tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Pour plus de 100 médias ou de gros fichiers, il est recommandé de copier les URL et de les télécharger avec un gestionnaire externe comme aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"L’export ZIP du navigateur utilise maintenant des téléchargements parallèles bornés. Pour les très gros travaux riches en vidéos, l’export URL ou aria2 reste la voie la plus sûre et la moins gourmande en mémoire.","Filename template:":"Modèle de nom de fichier :","Download scheduler":"Planificateur de téléchargement","Faster defaults are intended for bulk CDN transfer.":"Les valeurs par défaut plus rapides sont prévues pour les transferts CDN en masse.","Start delay (ms)":"Délai de départ (ms)","Global parallel":"Parallélisme global","Per host":"Par hôte",Videos:"Vidéos",Retries:"Tentatives","Use aria2 format:":"Utiliser le format aria2 :","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Cliquez pour plus d’informations. Chaque URL sera sur une nouvelle ligne, avec le nom de fichier sur la ligne suivante. Ce format est compatible avec aria2.","Rate limit (ms):":"Limite de débit (ms) :","Media Filter:":"Filtre média :","File Name":"Nom de fichier","Media Type":"Type de média","Download URL":"URL de téléchargement","No media selected.":"Aucun média sélectionné.","Preview limited to first 250 media items.":"Aperçu limité aux 250 premiers médias.",Zipping:"Compression ZIP","Copied!":"Copié !","Copy URLs":"Copier les URL","The tweet ID":"L’ID du tweet","The username of tweet author":"Le nom d’utilisateur de l’auteur du tweet","The profile name of tweet author":"Le nom de profil de l’auteur du tweet","The media index in tweet (start from 0)":"L’index du média dans le tweet (commence à 0)","The order of media in tweet (1/2/3/4)":"L’ordre du média dans le tweet (1/2/3/4)","The post date in YYYYMMDD format":"La date de publication au format YYYYMMDD","The post time in HHmmss format":"L’heure de publication au format HHmmss","The media type (photo/video/animated_gif)":"Le type de média (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"L’extension du fichier média (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Échec de l’export des médias. Ouvrez DevTools pour plus de détails.","Failed to copy media URLs. Open DevTools for more details.":"Échec de la copie des URL média. Ouvrez DevTools pour plus de détails.","filter.photo":"Photo","filter.video":"Vidéo","filter.animated_gif":"GIF","filter.retweet":"Inclure les retweets","loading remaining rows":"chargement des lignes restantes","Bundle ZIP compression:":"Compression du bundle ZIP :","Fastest / store":"Plus rapide / stocker","Balanced / fast":"Équilibré / rapide","Smaller / slower":"Plus petit / plus lent","Cancel Export":"Annuler l’export","Export a canonical portable ZIP bundle for sharing/importing.":"Exporte un bundle ZIP portable canonique pour partage/import.","Export Bundle ZIP":"Exporter le bundle ZIP","Source-backed media":"Médias basés sur source","rows scanned:":"lignes analysées :","media URLs:":"URL médias :",loading:"chargement","Loading media...":"Chargement des médias..."},common:{"Open Control Panel":"Ouvrir le panneau de contrôle","Browse around to capture more data.":"Parcourez les pages pour capturer plus de données.",Settings:"Paramètres",General:"Général",Theme:"Thème",Language:"Langue",Debug:"Débogage","Date Time Format":"Format de date et d’heure","Click for more information. This will take effect on both previewer and exported files.":"Cliquez pour plus d’informations. Cela s’appliquera à la prévisualisation et aux fichiers exportés.","Use dedicated DB for accounts":"Utiliser une base dédiée par compte","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Cela créera une base de données séparée pour chaque compte Twitter, ce qui réduit le risque de mélange des données lorsque vous utilisez plusieurs comptes.","Local Database":"Base de données locale","Analyze DB":"Analyser","Export DB":"Exporter","Clear DB":"Effacer","Bundle Export":"Exporter un paquet","Bundle Library":"Bibliothèque de paquets","QC Session":"Session QC","Diagnostic capture":"Capture diagnostique","Diagnostic buffers cleared.":"Tampons de diagnostic effacés.","Clear Buffers":"Effacer les tampons","Preparing...":"Préparation...","Preparing diagnostics...":"Préparation des diagnostics...","Export QC Diagnostics":"Exporter les diagnostics QC","Export Diagnostics Bundle":"Exporter le paquet de diagnostics","QC idle.":"QC inactif.","Are you sure to clear all data in the database?":"Voulez-vous vraiment effacer toutes les données de la base ?","Database cleared.":"Base de données effacée.",Module:"Module","Modules (Scroll to see more)":"Modules (faites défiler pour en voir plus)",About:"À propos",Version:"Version","Search...":"Rechercher...","Something went wrong.":"Une erreur est survenue.","Error:":"Erreur :","Captured:":"Capturé :","Rows per page:":"Lignes par page :","Relation Types":"Types de relation","Subject Accounts":"Comptes sujets","Subject User IDs":"ID utilisateur sujets","Last Observed At":"Dernière observation","A - B of N items":"{{from}} - {{to}} sur {{total}} éléments","No data available.":"Aucune donnée disponible.","No media available.":"Aucun média disponible.",Clear:"Effacer","Bookmark folders":"Dossiers de signets","1 folder selected":"1 dossier sélectionné","{{count}} folders selected":"{{count}} dossiers sélectionnés","Export Media":"Exporter les médias","Export Data":"Exporter les données","Export Search History":"Exporter l’historique de recherche","JSON View":"Vue JSON","Media View":"Vue média",Bookmarks:"Signets",Tweets:"Tweets",Users:"Utilisateurs","User Tweets":"Tweets utilisateur","User Media":"Médias utilisateur","Tweet Details":"Détails du tweet","Search Timeline":"Fil de recherche","Home Timeline":"Fil d’accueil","List Timeline":"Fil de liste","Community Timeline":"Fil de communauté","Community Members":"Membres de communauté","List Members":"Membres de liste","List Subscribers":"Abonnés de liste","Direct Messages":"Messages directs","Interaction Events":"Événements d’interaction","Local Search":"Recherche locale","Runtime Logs":"Journaux d’exécution","Bundle Viewer":"Visionneuse de paquets","{{count}} imported bundles":"{{count}} paquets importés","Search indexed tweets with Twitter-style operators":"Rechercher des tweets indexés avec des opérateurs de type Twitter","Local Recorder Search":"Recherche de l’enregistreur local",Quotes:"Citations",CommunityMembers:"Membres de communauté",CommunityTimeline:"Fil de communauté",DirectMessages:"Messages directs",Followers:"Abonnés",Following:"Abonnements",HomeTimeline:"Fil d’accueil",Likes:"J’aime",ListMembers:"Membres de liste",ListSubscribers:"Abonnés de liste",ListTimeline:"Fil de liste",InteractionEvents:"Événements d’interaction",LocalSearch:"Recherche locale",RawCapture:"Capture brute",Retweeters:"Retweeteurs",RetweetersModule:"Retweeteurs",RuntimeLogs:"Journaux d’exécution",SearchTimeline:"Fil de recherche",TweetIndex:"Index des tweets",TweetDetail:"Détail du tweet",UserDetail:"Détail utilisateur",UserMedia:"Médias utilisateur",UserTweets:"Tweets utilisateur",on:"activé",off:"désactivé",unknown:"inconnu",online:"en ligne",offline:"hors ligne",leader:"leader",follower:"suiveur",tab:"onglet",both:"les deux",xhr:"xhr",fetch:"fetch",watchdog:"watchdog",all:"tout",explicit:"explicite",loading:"chargement",complete:"terminé",idle:"inactif","api-name":"nom API","id-only":"ID seul","theme.system":"Système","theme.cupcake":"Clair","theme.dark":"Sombre","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Business","theme.winter":"Hiver","Safe mode":"Mode sûr","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Désactive la capture par hooks lorsqu’il est activé. Désactivez-le pour la navigation normale et la capture diagnostique.","Hook mode":"Mode hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Contrôle si le userscript hook XHR, fetch, les deux ou aucun.","Repair mode":"Mode réparation","Controls whether hook repair watchdog behavior is active.":"Contrôle si le watchdog de réparation des hooks est actif.","{{seconds}}s ago":"il y a {{seconds}} s","Hooks: {{status}}":"Hooks : {{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks : xhr {{xhr}}, fetch {{fetch}}, dernier {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks : xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode : sûr {{safe}}, hook {{hook}}, réparation {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode : sûr {{safe}}, hook {{hook}}, réparation {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"événements raw : {{total}} | abandonnés : {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool : {{queued}} en file / {{enqueued}} enq / {{flushed}} vidés / {{failed}} échoués","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"abandons par débordement spool : {{drops}} | indisponible : {{unavailable}} | plus ancien en attente : {{age}}ms","daemon: {{status}}":"daemon : {{status}}","daemon: {{status}} | last error: {{error}}":"daemon : {{status}} | dernière erreur : {{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor : {{role}} | leader : {{leader}} | bail : {{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor route/viewport : {{route}}/{{viewport}} | supprimés route/viewport : {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Base de données connectée : {{name}}","App options loaded":"Options de l’app chargées",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Rechercher avec opérateurs, phrases et logique booléenne : from:alice ("design system"~2 OR reliability)',"Search help":"Aide recherche","Clear search":"Effacer la recherche","Table view":"Vue tableau","Exit fullscreen":"Quitter le plein écran",Fullscreen:"Plein écran","{{view}} is disabled for large source-backed result sets.":"{{view}} est désactivé pour les grands ensembles basés sur source.","{{view}} view - {{status}}":"Vue {{view}} - {{status}}","{{view}} view":"Vue {{view}}","loading {{loaded}}/{{total}}":"chargement {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"chargement supplémentaire {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"recherche {{matches}}/{{total}}","matches {{matches}}/{{total}}":"résultats {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"lignes {{loaded}}/{{total}}","rows {{count}}":"lignes {{count}}","buffering...":"mise en mémoire...","history {{count}}":"historique {{count}}","selected {{count}} ({{mode}})":"sélectionnés {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendus {{rendered}}/{{total}} (fenêtre {{start}}-{{end}})","Search Operators":"Opérateurs de recherche","Query semantics now follow recorder-style precedence:":"La sémantique suit désormais la priorité style recorder :","with implicit":"avec","between adjacent terms.":"implicite entre termes adjacents.","search.category.lexical":"Lexical","search.category.identity":"Identité","search.category.metadata":"Métadonnées","search.category.presence":"Présence","search.category.numeric_date":"Numérique/date","search.category.compatibility":"Compatibilité","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Le texte non structuré est développé en correspondances de termes et en fenêtres de phrases adjacentes renforcées ; les mots de remplissage courants sont dépriorisés sauf s’ils sont entre guillemets.","Phrase search with optional slop.":"Recherche d’expression avec marge facultative.","Boolean operators with standard precedence and parentheses.":"Opérateurs booléens avec priorité standard et parenthèses.","Match the author handle or author id.":"Correspond au nom d’utilisateur ou à l’ID de l’auteur.","Shorthand for an enforced author constraint, equivalent to from:user.":"Raccourci pour une contrainte d’auteur obligatoire, équivalent à from:user.","Match reply targets, entity ids, or conversation ids.":"Correspond aux cibles de réponse, IDs d’entité ou IDs de conversation.","Match bookmark folder id or folder name.":"Correspond à l’ID ou au nom du dossier de signets.","Match language, route surface, source text, or card name.":"Correspond à la langue, à la surface de route, au texte source ou au nom de carte.","Match domains or URLs found in tweets.":"Correspond aux domaines ou URL trouvés dans les tweets.","Boolean state filters.":"Filtres d’état booléens.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtres de présence pour médias, liens, mentions, hashtags, cashtags, engagement et sondages.","Compatibility aliases retained for Twitter-style queries.":"Alias de compatibilité conservés pour les requêtes de style Twitter.","Numeric threshold filters.":"Filtres de seuil numérique.","Date, timestamp, and Snowflake-style boundary filters.":"Filtres de limites par date, horodatage et style Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtre de mention explicite avec raccourcis de hashtag et de cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Recherche lexicale limitée à un champ sur des chemins imbriqués bruts, y compris chemins pointés et tableaux.","loading source {{scanned}}/{{total}}":"chargement source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"médias {{count}}","loaded media {{count}}":"médias chargés {{count}}","source rows {{scanned}}/{{total}} {{status}}":"lignes source {{scanned}}/{{total}} {{status}}","source rows {{count}}":"lignes source {{count}}","layout {{columns}} cols @ {{width}}px":"disposition {{columns}} cols @ {{width}}px","original tweet attachments only":"pièces jointes du tweet original uniquement","Loading media.":"Chargement des médias.","Comfortable density":"Densité confortable","Compact density":"Densité compacte",Photo:"Photo",Video:"Vidéo","Open tweet":"Ouvrir le tweet","Export menu is open while remaining rows load in the background.":"Le menu d’export est ouvert pendant le chargement en arrière-plan des lignes restantes.","Wait for records to finish loading before exporting.":"Attendez la fin du chargement des enregistrements avant d’exporter.","Exports stream from the active source without loading all rows into the table.":"Exporte en flux depuis la source active sans charger toutes les lignes dans le tableau.","Opens immediately and loads remaining rows in the background.":"S’ouvre immédiatement et charge les lignes restantes en arrière-plan.","Export persisted bookmark search history":"Exporter l’historique de recherche de signets persistant","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`dernier : {{latest}}
nom-api : {{apiName}}
id-seul : {{idOnly}}
aucun : {{none}}`,"folder metadata: {{status}}":"métadonnées du dossier : {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"L’export média est désactivé pour les grands résultats tant qu’un flux source n’est pas disponible.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Options migrées de v{{oldVersion}} vers v{{newVersion}}","Hooked into fetch":"Hook installé dans fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook installé dans XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Mode sûr des hooks activé ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Réparation du hook échouée ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Installation du suivi de contexte des signets échouée ; poursuite sans tracker ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}} : {{count}} éléments reçus","Exporting to ZIP file: {{filename}}":"Export vers fichier ZIP : {{filename}}","Exporting to {{format}} file: {{filename}}":"Export vers fichier {{format}} : {{filename}}","Streaming export to {{format}} file: {{filename}}":"Export en flux vers fichier {{format}} : {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration terminée : {{users}} utilisateurs et {{tweets}} tweets mis à jour.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone reçu (Raison : {{reason}})","Failed to hook into XMLHttpRequest":"Échec du hook XMLHttpRequest","Fetch API not found, skipping fetch hooks":"API Fetch introuvable, hooks fetch ignorés","Fetch API base function unavailable or unsafe; enabling safe mode":"Fonction de base Fetch API indisponible ou dangereuse ; activation du mode sûr","Fetch hook base invocation failed; enabling safe mode":"Invocation de base du hook fetch échouée ; activation du mode sûr","XHR send hook base invocation failed; enabling safe mode":"Invocation de base du hook XHR send échouée ; activation du mode sûr","XHR open hook base invocation failed; enabling safe mode":"Invocation de base du hook XHR open échouée ; activation du mode sûr","Fetch hook already installed":"Hook fetch déjà installé","Debug mode enabled":"Mode debug activé","Database cleared":"Base de données effacée","Upgrading database schema...":"Mise à niveau du schéma de base de données...","Database upgraded":"Base de données mise à niveau","Zip stream closed.":"Flux ZIP fermé.","Running migration_20250609: Migrating legacy user data format":"Exécution de migration_20250609 : migration du format utilisateur hérité","TweetUnavailable received (Reason: unknown)":"TweetUnavailable reçu (Raison : inconnue)","Empty tweet received":"Tweet vide reçu","Unknown tweet type received":"Type de tweet inconnu reçu","Failed to extract tweet":"Échec de l’extraction du tweet","Failed to export file":"Échec de l’export du fichier","Failed to stream export file":"Échec de l’export du fichier en flux"}},sb={exporter:{ID:"ID",Date:"दिनांक",Content:"सामग्री","Show Full Text":"पूरा पाठ दिखाएँ",Media:"मीडिया","Screen Name":"यूज़रनेम","Profile Name":"प्रोफ़ाइल नाम","Profile Image":"प्रोफ़ाइल छवि","User ID":"उपयोगकर्ता ID","Replying To":"जिसे उत्तर दे रहा है","RT Source":"RT स्रोत","Quote Source":"कोट स्रोत","Media Tags":"मीडिया टैग",Favorites:"पसंदीदा",Retweets:"रीट्वीट",Bookmarks:"बुकमार्क",Quotes:"कोट्स",Replies:"उत्तर",Views:"दृश्य",Favorited:"पसंदीदा किया गया",Retweeted:"रीट्वीट किया गया",Bookmarked:"बुकमार्क किया गया","Bookmark Folder":"बुकमार्क फ़ोल्डर",URL:"URL",Actions:"क्रियाएँ",Details:"विवरण",Description:"विवरण","Profile Banner":"प्रोफ़ाइल बैनर",Followers:"फ़ॉलोअर",FollowingCount:"फ़ॉलोइंग संख्या",Statuses:"पोस्ट",Favourites:"पसंदीदा",Listed:"सूचियों में",Location:"स्थान",Website:"वेबसाइट",Birthdate:"जन्म तिथि","Verified Type":"सत्यापन प्रकार","Blue Verified":"Blue सत्यापित",Following:"फ़ॉलो कर रहे हैं","Follows You":"आपको फ़ॉलो करता है","Can DM":"DM कर सकते हैं",Protected:"संरक्षित","Created At":"बनाया गया",Sender:"प्रेषक",Recipient:"प्राप्तकर्ता","Conversation ID":"वार्तालाप ID","Conversation Type":"वार्तालाप प्रकार",Data:"डेटा","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"कैप्चर किए गए डेटा को JSON/HTML/CSV फ़ाइल के रूप में निर्यात करें। डेटा की मात्रा के अनुसार इसमें समय लग सकता है। निर्यात फ़ाइल में चित्र और वीडियो जैसी मीडिया फ़ाइलें शामिल नहीं होंगी, केवल उनके URL होंगे।","Data length:":"डेटा लंबाई:","Export scope:":"निर्यात दायरा:","All current results":"सभी मौजूदा परिणाम","Selected rows":"चयनित पंक्तियाँ","Pinned result set":"पिन किया गया परिणाम सेट",Query:"क्वेरी",Sort:"क्रम","Include all metadata:":"सारा मेटाडेटा शामिल करें:","Export as:":"इस रूप में निर्यात करें:","No data selected.":"कोई डेटा चयनित नहीं है।",Cancel:"रद्द करें","Start Export":"निर्यात शुरू करें","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"कैप्चर किए गए डेटा से मीडिया फ़ाइलें डाउनलोड और सेव करें। डेटा की मात्रा के अनुसार इसमें समय लग सकता है। डाउनलोड में प्रोफ़ाइल छवियाँ, प्रोफ़ाइल बैनर (उपयोगकर्ताओं के लिए), छवियाँ और वीडियो (ट्वीट के लिए) शामिल होंगे।","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100 से अधिक मीडिया या बड़ी फ़ाइलों के लिए URL कॉपी करके aria2 जैसे बाहरी डाउनलोड मैनेजर से डाउनलोड करना बेहतर है।","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ब्राउज़र ZIP निर्यात अब सीमित समानांतर डाउनलोड का उपयोग करता है। बहुत बड़े, वीडियो-भारी कार्यों के लिए URL या aria2 निर्यात अभी भी कम-मेमोरी वाला सबसे सुरक्षित रास्ता है।","Filename template:":"फ़ाइल नाम टेम्पलेट:","Download scheduler":"डाउनलोड शेड्यूलर","Faster defaults are intended for bulk CDN transfer.":"तेज़ डिफ़ॉल्ट बड़े CDN ट्रांसफ़र के लिए हैं।","Start delay (ms)":"आरंभ विलंब (ms)","Global parallel":"वैश्विक समानांतर","Per host":"प्रति होस्ट",Videos:"वीडियो",Retries:"पुनः प्रयास","Use aria2 format:":"aria2 प्रारूप इस्तेमाल करें:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"अधिक जानकारी के लिए क्लिक करें। हर URL नई पंक्ति में होगा, और अगली पंक्ति में उसका फ़ाइल नाम होगा। यह प्रारूप aria2 के साथ संगत है।","Rate limit (ms):":"दर सीमा (ms):","Media Filter:":"मीडिया फ़िल्टर:","File Name":"फ़ाइल नाम","Media Type":"मीडिया प्रकार","Download URL":"डाउनलोड URL","No media selected.":"कोई मीडिया चयनित नहीं है।","Preview limited to first 250 media items.":"पूर्वावलोकन पहले 250 मीडिया आइटम तक सीमित है।",Zipping:"ZIP बनाया जा रहा है","Copied!":"कॉपी किया गया!","Copy URLs":"URL कॉपी करें","The tweet ID":"ट्वीट ID","The username of tweet author":"ट्वीट लेखक का यूज़रनेम","The profile name of tweet author":"ट्वीट लेखक का प्रोफ़ाइल नाम","The media index in tweet (start from 0)":"ट्वीट में मीडिया इंडेक्स (0 से शुरू)","The order of media in tweet (1/2/3/4)":"ट्वीट में मीडिया का क्रम (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD प्रारूप में पोस्ट दिनांक","The post time in HHmmss format":"HHmmss प्रारूप में पोस्ट समय","The media type (photo/video/animated_gif)":"मीडिया प्रकार (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"मीडिया फ़ाइल एक्सटेंशन (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"मीडिया निर्यात विफल। अधिक जानकारी के लिए DevTools खोलें।","Failed to copy media URLs. Open DevTools for more details.":"मीडिया URL कॉपी करने में विफल। अधिक जानकारी के लिए DevTools खोलें।","filter.photo":"फ़ोटो","filter.video":"वीडियो","filter.animated_gif":"GIF","filter.retweet":"रीट्वीट शामिल करें","loading remaining rows":"बाकी पंक्तियाँ लोड हो रही हैं","Bundle ZIP compression:":"बंडल ZIP compression:","Fastest / store":"सबसे तेज़ / store","Balanced / fast":"संतुलित / तेज़","Smaller / slower":"छोटा / धीमा","Cancel Export":"निर्यात रद्द करें","Export a canonical portable ZIP bundle for sharing/importing.":"साझा/आयात करने के लिए canonical portable ZIP bundle निर्यात करें।","Export Bundle ZIP":"Bundle ZIP निर्यात करें","Source-backed media":"Source-backed मीडिया","rows scanned:":"स्कैन की गई पंक्तियाँ:","media URLs:":"मीडिया URL:",loading:"लोड हो रहा है","Loading media...":"मीडिया लोड हो रहा है..."},common:{"Open Control Panel":"कंट्रोल पैनल खोलें","Browse around to capture more data.":"अधिक डेटा कैप्चर करने के लिए ब्राउज़ करें।",Settings:"सेटिंग्स",General:"सामान्य",Theme:"थीम",Language:"भाषा",Debug:"डीबग","Date Time Format":"दिनांक और समय प्रारूप","Click for more information. This will take effect on both previewer and exported files.":"अधिक जानकारी के लिए क्लिक करें। यह प्रीव्यूअर और निर्यात की गई फ़ाइलों दोनों पर लागू होगा।","Use dedicated DB for accounts":"खातों के लिए अलग डेटाबेस इस्तेमाल करें","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"यह हर Twitter खाते के लिए अलग डेटाबेस बनाएगा, जिससे कई खाते इस्तेमाल करते समय डेटा मिल जाने की संभावना घटती है।","Local Database":"स्थानीय डेटाबेस","Analyze DB":"विश्लेषण","Export DB":"निर्यात","Clear DB":"साफ़ करें","Bundle Export":"बंडल निर्यात","Bundle Library":"बंडल लाइब्रेरी","QC Session":"QC सत्र","Diagnostic capture":"नैदानिक कैप्चर","Diagnostic buffers cleared.":"नैदानिक बफ़र साफ़ किए गए।","Clear Buffers":"बफ़र साफ़ करें","Preparing...":"तैयार हो रहा है...","Preparing diagnostics...":"डायग्नॉस्टिक्स तैयार हो रहे हैं...","Export QC Diagnostics":"QC डायग्नॉस्टिक्स निर्यात करें","Export Diagnostics Bundle":"डायग्नॉस्टिक्स बंडल निर्यात करें","QC idle.":"QC निष्क्रिय है।","Are you sure to clear all data in the database?":"क्या आप डेटाबेस का सारा डेटा साफ़ करना चाहते हैं?","Database cleared.":"डेटाबेस साफ़ कर दिया गया।",Module:"मॉड्यूल","Modules (Scroll to see more)":"मॉड्यूल (और देखने के लिए स्क्रॉल करें)",About:"परिचय",Version:"संस्करण","Search...":"खोजें...","Something went wrong.":"कुछ गलत हो गया।","Error:":"त्रुटि:","Captured:":"कैप्चर किया गया:","Rows per page:":"प्रति पृष्ठ पंक्तियाँ:","Relation Types":"संबंध प्रकार","Subject Accounts":"विषय खाते","Subject User IDs":"विषय उपयोगकर्ता ID","Last Observed At":"अंतिम बार देखा गया","A - B of N items":"{{total}} में से {{from}} - {{to}} आइटम","No data available.":"कोई डेटा उपलब्ध नहीं है।","No media available.":"कोई मीडिया उपलब्ध नहीं है।",Clear:"साफ़ करें","Bookmark folders":"बुकमार्क फ़ोल्डर","1 folder selected":"1 फ़ोल्डर चयनित","{{count}} folders selected":"{{count}} फ़ोल्डर चयनित","Export Media":"मीडिया निर्यात करें","Export Data":"डेटा निर्यात करें","Export Search History":"खोज इतिहास निर्यात करें","JSON View":"JSON दृश्य","Media View":"मीडिया दृश्य",Bookmarks:"बुकमार्क",Tweets:"ट्वीट",Users:"उपयोगकर्ता","User Tweets":"उपयोगकर्ता ट्वीट","User Media":"उपयोगकर्ता मीडिया","Tweet Details":"ट्वीट विवरण","Search Timeline":"खोज टाइमलाइन","Home Timeline":"होम टाइमलाइन","List Timeline":"सूची टाइमलाइन","Community Timeline":"समुदाय टाइमलाइन","Community Members":"समुदाय सदस्य","List Members":"सूची सदस्य","List Subscribers":"सूची सदस्यता लेने वाले","Direct Messages":"डायरेक्ट संदेश","Interaction Events":"इंटरैक्शन घटनाएँ","Local Search":"स्थानीय खोज","Runtime Logs":"रनटाइम लॉग","Bundle Viewer":"बंडल दर्शक","{{count}} imported bundles":"{{count}} आयातित बंडल","Search indexed tweets with Twitter-style operators":"Twitter-शैली ऑपरेटरों से इंडेक्स किए गए ट्वीट खोजें","Local Recorder Search":"स्थानीय रिकॉर्डर खोज",Quotes:"कोट्स",CommunityMembers:"समुदाय सदस्य",CommunityTimeline:"समुदाय टाइमलाइन",DirectMessages:"डायरेक्ट संदेश",Followers:"फ़ॉलोअर",Following:"फ़ॉलो कर रहे हैं",HomeTimeline:"होम टाइमलाइन",Likes:"लाइक",ListMembers:"सूची सदस्य",ListSubscribers:"सूची सदस्यता लेने वाले",ListTimeline:"सूची टाइमलाइन",InteractionEvents:"इंटरैक्शन घटनाएँ",LocalSearch:"स्थानीय खोज",RawCapture:"कच्चा कैप्चर",Retweeters:"रीट्वीट करने वाले",RetweetersModule:"रीट्वीट करने वाले",RuntimeLogs:"रनटाइम लॉग",SearchTimeline:"खोज टाइमलाइन",TweetIndex:"ट्वीट इंडेक्स",TweetDetail:"ट्वीट विवरण",UserDetail:"उपयोगकर्ता विवरण",UserMedia:"उपयोगकर्ता मीडिया",UserTweets:"उपयोगकर्ता ट्वीट",on:"चालू",off:"बंद",unknown:"अज्ञात",online:"ऑनलाइन",offline:"ऑफ़लाइन",leader:"लीडर",follower:"फ़ॉलोअर",tab:"टैब",both:"दोनों",xhr:"XHR",fetch:"fetch",watchdog:"वॉचडॉग",all:"सभी",explicit:"स्पष्ट",loading:"लोड हो रहा है",complete:"पूर्ण",idle:"निष्क्रिय","api-name":"API नाम","id-only":"केवल ID","theme.system":"सिस्टम","theme.cupcake":"हल्का","theme.dark":"गहरा","theme.emerald":"एमराल्ड","theme.cyberpunk":"साइबरपंक","theme.valentine":"वैलेंटाइन","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"व्यावसायिक","theme.winter":"सर्दी","Safe mode":"सुरक्षित मोड","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"सक्षम होने पर hook-आधारित कैप्चर बंद करता है। सामान्य ब्राउज़िंग और डायग्नॉस्टिक कैप्चर के लिए इसे बंद करें।","Hook mode":"Hook मोड","Controls whether the userscript hooks XHR, fetch, both, or neither.":"यह नियंत्रित करता है कि userscript XHR, fetch, दोनों या किसी को hook करे।","Repair mode":"मरम्मत मोड","Controls whether hook repair watchdog behavior is active.":"यह नियंत्रित करता है कि hook repair watchdog सक्रिय रहे या नहीं।","{{seconds}}s ago":"{{seconds}} सेकंड पहले","Hooks: {{status}}":"हुक:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"हुक:xhr {{xhr}}, fetch {{fetch}}, अंतिम {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"हुक:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"मोड: सुरक्षित {{safe}}, hook {{hook}}, मरम्मत {{repair}} | raw {{raw}}, spool {{spool}}, daemon: {{status}} {{daemon}}, monitor: {{role}} | लीडर: {{leader}} | lease: {{lease}} {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"मोड: सुरक्षित {{safe}}, hook {{hook}}, मरम्मत {{repair}} | raw {{raw}}, spool {{spool}}, daemon: {{status}} {{daemon}}, monitor: {{role}} | लीडर: {{leader}} | lease: {{lease}} {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw घटनाएँ: {{total}} | छोड़ी गई: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} कतार में / {{enqueued}} जोड़े गए / {{flushed}} फ्लश / {{failed}} विफल","daemon: {{status}}":"डेमन:{{status}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"मॉनिटर:{{role}} | लीडर:{{leader}} | lease:{{lease}}","Database connected: {{name}}":"डेटाबेस जुड़ा: {{name}}","App options loaded":"ऐप विकल्प लोड हुए",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'ऑपरेटर, वाक्यांश और बूलियन लॉजिक से खोजें: from:alice ("design system"~2 OR reliability)',"Search help":"खोज सहायता","Clear search":"खोज साफ़ करें","Table view":"तालिका दृश्य","Exit fullscreen":"पूर्ण स्क्रीन से बाहर निकलें",Fullscreen:"पूर्ण स्क्रीन","{{view}} is disabled for large source-backed result sets.":"बड़े source-backed परिणाम सेट के लिए {{view}} अक्षम है।","{{view}} view - {{status}}":"{{view}} दृश्य - {{status}}","{{view}} view":"{{view}} दृश्य","loading {{loaded}}/{{total}}":"लोड हो रहा है {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"और लोड हो रहा है {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"खोज रहा है {{matches}}/{{total}}","matches {{matches}}/{{total}}":"मिलान {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"पंक्तियाँ {{loaded}}/{{total}}","rows {{count}}":"पंक्तियाँ {{count}}","buffering...":"बफ़र हो रहा है...","history {{count}}":"इतिहास {{count}}","selected {{count}} ({{mode}})":"चयनित {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"रेंडर {{rendered}}/{{total}} (विंडो {{start}}-{{end}})","Search Operators":"खोज ऑपरेटर","Query semantics now follow recorder-style precedence:":"क्वेरी semantics अब recorder-style precedence का पालन करती है:","with implicit":"निहित","between adjacent terms.":"आस-पास के शब्दों के बीच।","search.category.lexical":"शाब्दिक","search.category.identity":"पहचान","search.category.metadata":"मेटाडेटा","search.category.presence":"उपस्थिति","search.category.numeric_date":"संख्या/दिनांक","search.category.compatibility":"संगतता","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"असंरचित पाठ सामग्री-शब्द मिलानों और बढ़े हुए आस-पास के वाक्यांश विंडो में फैलता है; उद्धरण न होने पर सामान्य भराव शब्दों की प्राथमिकता घटती है।","Phrase search with optional slop.":"वैकल्पिक slop के साथ वाक्यांश खोज।","Boolean operators with standard precedence and parentheses.":"मानक प्राथमिकता और कोष्ठकों वाले बूलियन ऑपरेटर।","Match the author handle or author id.":"लेखक हैंडल या लेखक ID मिलाएँ।","Shorthand for an enforced author constraint, equivalent to from:user.":"अनिवार्य लेखक बाधा का संक्षिप्त रूप, from:user के बराबर।","Match reply targets, entity ids, or conversation ids.":"उत्तर लक्ष्य, एंटिटी ID या बातचीत ID मिलाएँ।","Match bookmark folder id or folder name.":"बुकमार्क फ़ोल्डर ID या फ़ोल्डर नाम मिलाएँ।","Match language, route surface, source text, or card name.":"भाषा, रूट सतह, स्रोत पाठ या कार्ड नाम मिलाएँ।","Match domains or URLs found in tweets.":"ट्वीट में मिले डोमेन या URL मिलाएँ।","Boolean state filters.":"बूलियन स्थिति फ़िल्टर।","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"मीडिया, लिंक, उल्लेख, हैशटैग, कैशटैग, एंगेजमेंट और पोल की उपस्थिति के फ़िल्टर।","Compatibility aliases retained for Twitter-style queries.":"Twitter-शैली क्वेरी के लिए रखे गए संगत alias।","Numeric threshold filters.":"संख्यात्मक सीमा फ़िल्टर।","Date, timestamp, and Snowflake-style boundary filters.":"दिनांक, टाइमस्टैम्प और Snowflake-शैली सीमा फ़िल्टर।","Explicit mention filter plus shorthand hashtag and cashtag filters.":"स्पष्ट mention फ़िल्टर और संक्षिप्त hashtag/cashtag फ़िल्टर।","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"डॉटेड ऑब्जेक्ट पाथ और arrays सहित raw nested paths पर field-scoped lexical खोज।","loading source {{scanned}}/{{total}}":"source लोड हो रहा है {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"मीडिया {{count}}","loaded media {{count}}":"लोड मीडिया {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source पंक्तियाँ {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source पंक्तियाँ {{count}}","layout {{columns}} cols @ {{width}}px":"लेआउट {{columns}} कॉलम @ {{width}}px","original tweet attachments only":"केवल मूल ट्वीट attachments","Loading media.":"मीडिया लोड हो रहा है।","Comfortable density":"आरामदायक घनत्व","Compact density":"सघन घनत्व",Photo:"फ़ोटो",Video:"वीडियो","Open tweet":"ट्वीट खोलें","Export menu is open while remaining rows load in the background.":"निर्यात मेनू खुला है जबकि बाकी पंक्तियाँ पृष्ठभूमि में लोड हो रही हैं।","Wait for records to finish loading before exporting.":"निर्यात से पहले रिकॉर्ड लोड होने दें।","Exports stream from the active source without loading all rows into the table.":"सभी पंक्तियाँ तालिका में लोड किए बिना सक्रिय स्रोत से stream निर्यात करता है।","Opens immediately and loads remaining rows in the background.":"तुरंत खुलता है और बाकी पंक्तियाँ पृष्ठभूमि में लोड करता है।","Export persisted bookmark search history":"सहेजा गया बुकमार्क खोज इतिहास निर्यात करें","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`नवीनतम: {{latest}}
API नाम: {{apiName}}
केवल ID: {{idOnly}}
कोई नहीं: {{none}}`,"folder metadata: {{status}}":"फ़ोल्डर मेटाडेटा: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"बड़े परिणाम सेट के लिए मीडिया निर्यात तब तक अक्षम है जब तक source-backed stream उपलब्ध न हो।","Hooked into fetch":"fetch में hook किया गया","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest में hook किया गया (installed={{installed}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","Hook safe mode enabled ({{reason}})":"Hook safe mode सक्षम हुआ ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook मरम्मत विफल ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking इंस्टॉल विफल; tracker के बिना जारी ({{details}})","{{module}}: {{count}} items received":"{{module}}: {{count}} आइटम प्राप्त हुए","Exporting to ZIP file: {{filename}}":"ZIP फ़ाइल में निर्यात: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} फ़ाइल में निर्यात: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} फ़ाइल में streaming निर्यात: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"माइग्रेशन पूर्ण: {{users}} उपयोगकर्ता और {{tweets}} ट्वीट अपडेट हुए।","TweetTombstone received (Reason: {{reason}})":"TweetTombstone प्राप्त हुआ (कारण: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest में hook करने में विफल","Fetch API not found, skipping fetch hooks":"Fetch API नहीं मिला, fetch hooks छोड़े जा रहे हैं","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function अनुपलब्ध या असुरक्षित है; safe mode सक्षम हो रहा है","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation विफल; safe mode सक्षम हो रहा है","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation विफल; safe mode सक्षम हो रहा है","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation विफल; safe mode सक्षम हो रहा है","Fetch hook already installed":"Fetch hook पहले से इंस्टॉल है","Debug mode enabled":"Debug mode सक्षम","Database cleared":"डेटाबेस साफ़ किया गया","Upgrading database schema...":"डेटाबेस schema अपग्रेड हो रहा है...","Database upgraded":"डेटाबेस अपग्रेड हुआ","Zip stream closed.":"Zip stream बंद हुआ।","Running migration_20250609: Migrating legacy user data format":"migration_20250609 चल रहा है: legacy user data format माइग्रेट हो रहा है","TweetUnavailable received (Reason: unknown)":"TweetUnavailable प्राप्त हुआ (कारण: अज्ञात)","Empty tweet received":"खाली ट्वीट प्राप्त हुआ","Unknown tweet type received":"अज्ञात ट्वीट प्रकार प्राप्त हुआ","Failed to extract tweet":"ट्वीट निकालने में विफल","Failed to export file":"फ़ाइल निर्यात विफल","Failed to stream export file":"stream export फ़ाइल विफल","daemon: {{status}} | last error: {{error}}":"डेमन:{{status}} | अंतिम त्रुटि:{{error}}","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | अनुपलब्ध: {{unavailable}} | सबसे पुराना pending: {{age}}ms","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | दबाए गए route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","App options migrated from v{{oldVersion}} to v{{newVersion}}":"ऐप विकल्प v{{oldVersion}} से v{{newVersion}} में माइग्रेट हुए"}},lb={exporter:{ID:"ID",Date:"Tanggal",Content:"Konten","Show Full Text":"Tampilkan teks lengkap",Media:"Media","Screen Name":"Nama pengguna","Profile Name":"Nama profil","Profile Image":"Gambar profil","User ID":"ID pengguna","Replying To":"Membalas ke","RT Source":"Sumber RT","Quote Source":"Sumber kutipan","Media Tags":"Tag media",Favorites:"Favorit",Retweets:"Retweet",Bookmarks:"Bookmark",Quotes:"Kutipan",Replies:"Balasan",Views:"Tayangan",Favorited:"Difavoritkan",Retweeted:"Di-retweet",Bookmarked:"Di-bookmark","Bookmark Folder":"Folder bookmark",URL:"URL",Actions:"Tindakan",Details:"Detail",Description:"Deskripsi","Profile Banner":"Banner profil",Followers:"Pengikut",FollowingCount:"Jumlah mengikuti",Statuses:"Postingan",Favourites:"Favorit",Listed:"Masuk daftar",Location:"Lokasi",Website:"Situs web",Birthdate:"Tanggal lahir","Verified Type":"Jenis verifikasi","Blue Verified":"Terverifikasi Blue",Following:"Mengikuti","Follows You":"Mengikuti Anda","Can DM":"Bisa DM",Protected:"Dilindungi","Created At":"Dibuat pada",Sender:"Pengirim",Recipient:"Penerima","Conversation ID":"ID percakapan","Conversation Type":"Jenis percakapan",Data:"Data","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Ekspor data yang ditangkap sebagai file JSON/HTML/CSV. Ini mungkin memerlukan waktu tergantung jumlah data. File ekspor tidak menyertakan file media seperti gambar dan video, hanya URL-nya.","Data length:":"Panjang data:","Export scope:":"Cakupan ekspor:","All current results":"Semua hasil saat ini","Selected rows":"Baris dipilih","Pinned result set":"Set hasil yang dipin",Query:"Kueri",Sort:"Urutkan","Include all metadata:":"Sertakan semua metadata:","Export as:":"Ekspor sebagai:","No data selected.":"Tidak ada data dipilih.",Cancel:"Batal","Start Export":"Mulai ekspor","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Unduh dan simpan file media dari data yang ditangkap. Ini mungkin memerlukan waktu tergantung jumlah data. Media yang diunduh mencakup gambar profil, banner profil (untuk pengguna), gambar, dan video (untuk tweet).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Untuk lebih dari 100 media atau file besar, disarankan menyalin URL dan mengunduhnya dengan pengelola unduhan eksternal seperti aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"Ekspor ZIP browser sekarang menggunakan unduhan paralel terbatas. Untuk pekerjaan sangat besar dan banyak video, ekspor URL atau aria2 tetap jalur paling aman dengan memori rendah.","Filename template:":"Templat nama file:","Download scheduler":"Penjadwal unduhan","Faster defaults are intended for bulk CDN transfer.":"Default yang lebih cepat ditujukan untuk transfer massal CDN.","Start delay (ms)":"Jeda awal (ms)","Global parallel":"Paralel global","Per host":"Per host",Videos:"Video",Retries:"Coba lagi","Use aria2 format:":"Gunakan format aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Klik untuk informasi lebih lanjut. Setiap URL akan berada di baris baru, dengan nama file di baris berikutnya. Format ini kompatibel dengan aria2.","Rate limit (ms):":"Batas laju (ms):","Media Filter:":"Filter media:","File Name":"Nama file","Media Type":"Jenis media","Download URL":"URL unduhan","No media selected.":"Tidak ada media dipilih.","Preview limited to first 250 media items.":"Pratinjau dibatasi pada 250 item media pertama.",Zipping:"Membuat ZIP","Copied!":"Disalin!","Copy URLs":"Salin URL","The tweet ID":"ID tweet","The username of tweet author":"Nama pengguna penulis tweet","The profile name of tweet author":"Nama profil penulis tweet","The media index in tweet (start from 0)":"Indeks media dalam tweet (mulai dari 0)","The order of media in tweet (1/2/3/4)":"Urutan media dalam tweet (1/2/3/4)","The post date in YYYYMMDD format":"Tanggal posting dalam format YYYYMMDD","The post time in HHmmss format":"Waktu posting dalam format HHmmss","The media type (photo/video/animated_gif)":"Jenis media (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"Ekstensi file media (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Gagal mengekspor media. Buka DevTools untuk detail.","Failed to copy media URLs. Open DevTools for more details.":"Gagal menyalin URL media. Buka DevTools untuk detail.","filter.photo":"Foto","filter.video":"Video","filter.animated_gif":"GIF","filter.retweet":"Sertakan retweet","loading remaining rows":"memuat baris tersisa","Bundle ZIP compression:":"Kompresi ZIP bundle:","Fastest / store":"Tercepat / simpan","Balanced / fast":"Seimbang / cepat","Smaller / slower":"Lebih kecil / lebih lambat","Cancel Export":"Batalkan ekspor","Export a canonical portable ZIP bundle for sharing/importing.":"Ekspor ZIP bundle portabel kanonis untuk berbagi/impor.","Export Bundle ZIP":"Ekspor ZIP bundle","Source-backed media":"Media berbasis sumber","rows scanned:":"baris dipindai:","media URLs:":"URL media:",loading:"memuat","Loading media...":"Memuat media..."},common:{"Open Control Panel":"Buka Panel Kontrol","Browse around to capture more data.":"Jelajahi halaman untuk menangkap lebih banyak data.",Settings:"Pengaturan",General:"Umum",Theme:"Tema",Language:"Bahasa",Debug:"Debug","Date Time Format":"Format Tanggal dan Waktu","Click for more information. This will take effect on both previewer and exported files.":"Klik untuk informasi lebih lanjut. Ini akan berlaku pada pratinjau dan file yang diekspor.","Use dedicated DB for accounts":"Gunakan DB khusus untuk akun","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Ini akan membuat database terpisah untuk setiap akun Twitter, sehingga mengurangi kemungkinan data tercampur saat memakai beberapa akun.","Local Database":"Database lokal","Analyze DB":"Analisis","Export DB":"Ekspor","Clear DB":"Hapus","Bundle Export":"Ekspor bundel","Bundle Library":"Pustaka bundel","QC Session":"Sesi QC","Diagnostic capture":"Tangkapan diagnostik","Diagnostic buffers cleared.":"Buffer diagnostik dihapus.","Clear Buffers":"Hapus buffer","Preparing...":"Menyiapkan...","Preparing diagnostics...":"Menyiapkan diagnostik...","Export QC Diagnostics":"Ekspor diagnostik QC","Export Diagnostics Bundle":"Ekspor bundel diagnostik","QC idle.":"QC diam.","Are you sure to clear all data in the database?":"Yakin ingin menghapus semua data di database?","Database cleared.":"Database dihapus.",Module:"Modul","Modules (Scroll to see more)":"Modul (gulir untuk melihat lainnya)",About:"Tentang",Version:"Versi","Search...":"Cari...","Something went wrong.":"Terjadi kesalahan.","Error:":"Kesalahan:","Captured:":"Ditangkap:","Rows per page:":"Baris per halaman:","Relation Types":"Jenis relasi","Subject Accounts":"Akun subjek","Subject User IDs":"ID pengguna subjek","Last Observed At":"Terakhir diamati","A - B of N items":"{{from}} - {{to}} dari {{total}} item","No data available.":"Tidak ada data.","No media available.":"Tidak ada media.",Clear:"Bersihkan","Bookmark folders":"Folder bookmark","1 folder selected":"1 folder dipilih","{{count}} folders selected":"{{count}} folder dipilih","Export Media":"Ekspor media","Export Data":"Ekspor data","Export Search History":"Ekspor riwayat pencarian","JSON View":"Tampilan JSON","Media View":"Tampilan media",Bookmarks:"Bookmark",Tweets:"Tweet",Users:"Pengguna","User Tweets":"Tweet pengguna","User Media":"Media pengguna","Tweet Details":"Detail tweet","Search Timeline":"Linimasa pencarian","Home Timeline":"Linimasa beranda","List Timeline":"Linimasa daftar","Community Timeline":"Linimasa komunitas","Community Members":"Anggota komunitas","List Members":"Anggota daftar","List Subscribers":"Pelanggan daftar","Direct Messages":"Pesan langsung","Interaction Events":"Peristiwa interaksi","Local Search":"Pencarian lokal","Runtime Logs":"Log runtime","Bundle Viewer":"Penampil bundel","{{count}} imported bundles":"{{count}} bundel diimpor","Search indexed tweets with Twitter-style operators":"Cari tweet terindeks dengan operator gaya Twitter","Local Recorder Search":"Pencarian perekam lokal",Quotes:"Kutipan",CommunityMembers:"Anggota komunitas",CommunityTimeline:"Linimasa komunitas",DirectMessages:"Pesan langsung",Followers:"Pengikut",Following:"Mengikuti",HomeTimeline:"Linimasa beranda",Likes:"Suka",ListMembers:"Anggota daftar",ListSubscribers:"Pelanggan daftar",ListTimeline:"Linimasa daftar",InteractionEvents:"Peristiwa interaksi",LocalSearch:"Pencarian lokal",RawCapture:"Tangkapan mentah",Retweeters:"Pengguna yang me-retweet",RetweetersModule:"Pengguna yang me-retweet",RuntimeLogs:"Log runtime",SearchTimeline:"Pencarian",TweetIndex:"Indeks tweet",TweetDetail:"Detail tweet",UserDetail:"Detail pengguna",UserMedia:"Media pengguna",UserTweets:"Tweet pengguna",on:"aktif",off:"nonaktif",unknown:"tidak diketahui",online:"daring",offline:"luring",leader:"pemimpin",follower:"pengikut",tab:"tab",both:"keduanya",xhr:"xhr",fetch:"fetch",watchdog:"pengawas",all:"semua",explicit:"eksplisit",loading:"memuat",complete:"selesai",idle:"diam","api-name":"nama API","id-only":"hanya ID","theme.system":"Sistem","theme.cupcake":"Terang","theme.dark":"Gelap","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Bisnis","theme.winter":"Musim dingin","Safe mode":"Mode aman","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Menonaktifkan capture berbasis hook saat aktif. Matikan untuk browsing normal dan capture diagnostik.","Hook mode":"Mode hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Mengontrol apakah userscript memasang hook XHR, fetch, keduanya, atau tidak sama sekali.","Repair mode":"Mode perbaikan","Controls whether hook repair watchdog behavior is active.":"Mengontrol apakah watchdog perbaikan hook aktif.","{{seconds}}s ago":"{{seconds}} dtk lalu","Hooks: {{status}}":"Hook:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hook:xhr {{xhr}}, fetch {{fetch}}, terakhir {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hook:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Mode: aman {{safe}}, hook {{hook}}, perbaikan {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Mode: aman {{safe}}, hook {{hook}}, perbaikan {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"event raw: {{total}} | dibuang: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} memuat / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"drop overflow spool: {{drops}} | tidak tersedia: {{unavailable}} | pending tertua: {{age}}ms","daemon: {{status}}":"daemon:{{status}}","daemon: {{status}} | last error: {{error}}":"daemon:{{status}} | error terakhir:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | pemimpin:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"tick monitor route/viewport: {{route}}/{{viewport}} | ditekan route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Database terhubung: {{name}}","App options loaded":"Opsi aplikasi dimuat",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Teks tidak terstruktur diperluas menjadi kecocokan istilah konten dan jendela frasa berdekatan yang diberi bobot lebih; kata pengisi umum diturunkan prioritasnya kecuali diberi kutip.","Phrase search with optional slop.":"Pencarian frasa dengan slop opsional.","Boolean operators with standard precedence and parentheses.":"Operator boolean dengan prioritas standar dan tanda kurung.","Match the author handle or author id.":"Cocokkan handle penulis atau ID penulis.","Shorthand for an enforced author constraint, equivalent to from:user.":"Singkatan untuk batasan penulis wajib, setara dengan from:user.","Match reply targets, entity ids, or conversation ids.":"Cocokkan target balasan, ID entitas, atau ID percakapan.","Match bookmark folder id or folder name.":"Cocokkan ID folder bookmark atau nama folder.","Match language, route surface, source text, or card name.":"Cocokkan bahasa, permukaan rute, teks sumber, atau nama kartu.","Match domains or URLs found in tweets.":"Cocokkan domain atau URL yang ditemukan di tweet.","Boolean state filters.":"Filter status boolean.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filter keberadaan untuk media, tautan, mention, hashtag, cashtag, engagement, dan polling.","Compatibility aliases retained for Twitter-style queries.":"Alias kompatibilitas dipertahankan untuk kueri bergaya Twitter.","Numeric threshold filters.":"Filter ambang numerik.","Date, timestamp, and Snowflake-style boundary filters.":"Filter batas tanggal, timestamp, dan gaya Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filter mention eksplisit serta filter singkat hashtag dan cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Pencarian leksikal berbatas field pada path bertingkat mentah, termasuk path objek bertitik dan array.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opsi aplikasi dimigrasi dari v{{oldVersion}} ke v{{newVersion}}","Hooked into fetch":"Hook terpasang ke fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook terpasang ke XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Mode aman hook diaktifkan ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Perbaikan hook gagal ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Instalasi pelacak konteks bookmark gagal; lanjut tanpa pelacak ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} item diterima","Exporting to ZIP file: {{filename}}":"Mengekspor ke file ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Mengekspor ke file {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Ekspor streaming ke file {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migrasi selesai: {{users}} pengguna dan {{tweets}} tweet diperbarui.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone diterima (Alasan: {{reason}})","Failed to hook into XMLHttpRequest":"Gagal memasang hook ke XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API tidak ditemukan, melewati hook fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Fungsi dasar Fetch API tidak tersedia atau tidak aman; mengaktifkan mode aman","Fetch hook base invocation failed; enabling safe mode":"Invokasi dasar hook fetch gagal; mengaktifkan mode aman","XHR send hook base invocation failed; enabling safe mode":"Invokasi dasar hook XHR send gagal; mengaktifkan mode aman","XHR open hook base invocation failed; enabling safe mode":"Invokasi dasar hook XHR open gagal; mengaktifkan mode aman","Fetch hook already installed":"Hook fetch sudah terpasang","Debug mode enabled":"Mode debug aktif","Database cleared":"Database dibersihkan","Upgrading database schema...":"Memutakhirkan skema database...","Database upgraded":"Database dimutakhirkan","Zip stream closed.":"Stream ZIP ditutup.","Running migration_20250609: Migrating legacy user data format":"Menjalankan migration_20250609: migrasi format data pengguna lama","TweetUnavailable received (Reason: unknown)":"TweetUnavailable diterima (Alasan: tidak diketahui)","Empty tweet received":"Tweet kosong diterima","Unknown tweet type received":"Jenis tweet tidak dikenal diterima","Failed to extract tweet":"Gagal mengekstrak tweet","Failed to export file":"Gagal mengekspor file","Failed to stream export file":"Gagal mengekspor file streaming"}},cb={exporter:{ID:"ID",Date:"日付",Content:"内容","Show Full Text":"全文を表示",Media:"メディア","Screen Name":"ユーザー名","Profile Name":"プロフィール名","Profile Image":"プロフィール画像","User ID":"ユーザーID","Replying To":"返信先","RT Source":"RT元","Quote Source":"引用元","Media Tags":"メディアタグ",Favorites:"お気に入り",Retweets:"リツイート",Bookmarks:"ブックマーク",Quotes:"引用",Replies:"返信",Views:"表示回数",Favorited:"お気に入り済み",Retweeted:"リツイート済み",Bookmarked:"ブックマーク済み","Bookmark Folder":"ブックマークフォルダ",URL:"URL",Actions:"操作",Details:"詳細",Description:"説明","Profile Banner":"プロフィールバナー",Followers:"フォロワー",FollowingCount:"フォロー数",Statuses:"投稿数",Favourites:"お気に入り",Listed:"リスト登録数",Location:"場所",Website:"Webサイト",Birthdate:"生年月日","Verified Type":"認証タイプ","Blue Verified":"Blue認証",Following:"フォロー中","Follows You":"あなたをフォロー","Can DM":"DM可能",Protected:"非公開","Created At":"作成日時",Sender:"送信者",Recipient:"受信者","Conversation ID":"会話ID","Conversation Type":"会話タイプ",Data:"データ","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"取得したデータをJSON/HTML/CSVファイルとしてエクスポートします。データ量によって時間がかかる場合があります。エクスポートファイルには画像や動画などのメディアファイルは含まれず、URLのみが含まれます。","Data length:":"データ件数:","Export scope:":"エクスポート範囲:","All current results":"現在の全結果","Selected rows":"選択した行","Pinned result set":"固定された結果セット",Query:"クエリ",Sort:"並び順","Include all metadata:":"すべてのメタデータを含める:","Export as:":"形式:","No data selected.":"データが選択されていません。",Cancel:"キャンセル","Start Export":"エクスポート開始","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"取得データからメディアファイルをダウンロードして保存します。データ量によって時間がかかる場合があります。ダウンロード対象にはプロフィール画像、プロフィールバナー(ユーザー)、画像、動画(ツイート)が含まれます。","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100件を超えるメディアや大きなファイルでは、URLをコピーし、aria2などの外部ダウンロードマネージャーでダウンロードすることを推奨します。","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ブラウザのZIPエクスポートは、制限付き並列ダウンロードを使用するようになりました。非常に大きく動画の多い処理では、URLまたはaria2エクスポートが引き続き最も安全で低メモリな方法です。","Filename template:":"ファイル名テンプレート:","Download scheduler":"ダウンロードスケジューラ","Faster defaults are intended for bulk CDN transfer.":"高速な初期値はCDNからの一括転送向けです。","Start delay (ms)":"開始遅延 (ms)","Global parallel":"全体並列数","Per host":"ホストごと",Videos:"動画",Retries:"再試行","Use aria2 format:":"aria2形式を使用:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"詳細を確認するにはクリックしてください。各URLは新しい行に、その次の行にファイル名が出力されます。この形式はaria2と互換性があります。","Rate limit (ms):":"レート制限 (ms):","Media Filter:":"メディアフィルター:","File Name":"ファイル名","Media Type":"メディアタイプ","Download URL":"ダウンロードURL","No media selected.":"メディアが選択されていません。","Preview limited to first 250 media items.":"プレビューは最初の250件のメディアに制限されています。",Zipping:"ZIP作成中","Copied!":"コピーしました!","Copy URLs":"URLをコピー","The tweet ID":"ツイートID","The username of tweet author":"ツイート投稿者のユーザー名","The profile name of tweet author":"ツイート投稿者のプロフィール名","The media index in tweet (start from 0)":"ツイート内のメディアインデックス(0から開始)","The order of media in tweet (1/2/3/4)":"ツイート内のメディア順序(1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD形式の投稿日","The post time in HHmmss format":"HHmmss形式の投稿時刻","The media type (photo/video/animated_gif)":"メディアタイプ(photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"メディアファイル拡張子(jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"メディアのエクスポートに失敗しました。詳細はDevToolsを開いてください。","Failed to copy media URLs. Open DevTools for more details.":"メディアURLのコピーに失敗しました。詳細はDevToolsを開いてください。","filter.photo":"写真","filter.video":"動画","filter.animated_gif":"GIF","filter.retweet":"リツイートを含める","loading remaining rows":"残りの行を読み込み中","Bundle ZIP compression:":"バンドル ZIP 圧縮:","Fastest / store":"最速 / store","Balanced / fast":"バランス / 高速","Smaller / slower":"小さめ / 低速","Cancel Export":"エクスポートをキャンセル","Export a canonical portable ZIP bundle for sharing/importing.":"共有/インポート用の正規ポータブル ZIP バンドルをエクスポートします。","Export Bundle ZIP":"バンドル ZIP をエクスポート","Source-backed media":"ソース対応メディア","rows scanned:":"スキャン済み行:","media URLs:":"メディア URL:",loading:"読み込み中","Loading media...":"メディアを読み込み中..."},common:{"Open Control Panel":"コントロールパネルを開く","Browse around to capture more data.":"ページを閲覧して、さらにデータを取得します。",Settings:"設定",General:"一般",Theme:"テーマ",Language:"言語",Debug:"デバッグ","Date Time Format":"日時形式","Click for more information. This will take effect on both previewer and exported files.":"詳細を確認するにはクリックしてください。これはプレビューとエクスポートファイルの両方に適用されます。","Use dedicated DB for accounts":"アカウントごとに専用DBを使用","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Twitterアカウントごとに別々のデータベースを作成します。複数アカウント使用時のデータ混在を減らせます。","Local Database":"ローカルデータベース","Analyze DB":"分析","Export DB":"エクスポート","Clear DB":"削除","Bundle Export":"バンドルをエクスポート","Bundle Library":"バンドルライブラリ","QC Session":"QCセッション","Diagnostic capture":"診断キャプチャ","Diagnostic buffers cleared.":"診断バッファをクリアしました。","Clear Buffers":"バッファをクリア","Preparing...":"準備中...","Preparing diagnostics...":"診断を準備中...","Export QC Diagnostics":"QC診断をエクスポート","Export Diagnostics Bundle":"診断バンドルをエクスポート","QC idle.":"QCは待機中です。","Are you sure to clear all data in the database?":"データベース内のすべてのデータを削除しますか?","Database cleared.":"データベースを削除しました。",Module:"モジュール","Modules (Scroll to see more)":"モジュール(スクロールしてさらに表示)",About:"情報",Version:"バージョン","Search...":"検索...","Something went wrong.":"問題が発生しました。","Error:":"エラー:","Captured:":"取得済み:","Rows per page:":"ページあたりの行数:","Relation Types":"関係タイプ","Subject Accounts":"対象アカウント","Subject User IDs":"対象ユーザーID","Last Observed At":"最終観測日時","A - B of N items":"{{total}}件中 {{from}} - {{to}} 件","No data available.":"データがありません。","No media available.":"メディアがありません。",Clear:"クリア","Bookmark folders":"ブックマークフォルダ","1 folder selected":"1個のフォルダを選択中","{{count}} folders selected":"{{count}}個のフォルダを選択中","Export Media":"メディアをエクスポート","Export Data":"データをエクスポート","Export Search History":"検索履歴をエクスポート","JSON View":"JSON表示","Media View":"メディア表示",Bookmarks:"ブックマーク",Tweets:"ツイート",Users:"ユーザー","User Tweets":"ユーザーのツイート","User Media":"ユーザーメディア","Tweet Details":"ツイート詳細","Search Timeline":"検索タイムライン","Home Timeline":"ホームタイムライン","List Timeline":"リストタイムライン","Community Timeline":"コミュニティタイムライン","Community Members":"コミュニティメンバー","List Members":"リストメンバー","List Subscribers":"リスト購読者","Direct Messages":"ダイレクトメッセージ","Interaction Events":"インタラクションイベント","Local Search":"ローカル検索","Runtime Logs":"ランタイムログ","Bundle Viewer":"バンドルビューア","{{count}} imported bundles":"{{count}}個のバンドルをインポート済み","Search indexed tweets with Twitter-style operators":"Twitter風の演算子でインデックス済みツイートを検索","Local Recorder Search":"ローカルレコーダー検索",Quotes:"引用",CommunityMembers:"コミュニティメンバー",CommunityTimeline:"コミュニティタイムライン",DirectMessages:"ダイレクトメッセージ",Followers:"フォロワー",Following:"フォロー中",HomeTimeline:"ホームタイムライン",Likes:"いいね",ListMembers:"リストメンバー",ListSubscribers:"リスト購読者",ListTimeline:"リストタイムライン",InteractionEvents:"インタラクションイベント",LocalSearch:"ローカル検索",RawCapture:"生キャプチャ",Retweeters:"リツイートしたユーザー",RetweetersModule:"リツイートしたユーザー",RuntimeLogs:"ランタイムログ",SearchTimeline:"検索",TweetIndex:"ツイートインデックス",TweetDetail:"ツイート詳細",UserDetail:"ユーザー詳細",UserMedia:"ユーザーメディア",UserTweets:"ユーザーのツイート",on:"オン",off:"オフ",unknown:"不明",online:"オンライン",offline:"オフライン",leader:"リーダー",follower:"フォロワー",tab:"タブ",both:"両方",xhr:"xhr",fetch:"fetch",watchdog:"ウォッチドッグ",all:"すべて",explicit:"明示",loading:"読み込み中",complete:"完了",idle:"アイドル","api-name":"API 名","id-only":"ID のみ","theme.system":"システム","theme.cupcake":"ライト","theme.dark":"ダーク","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"ビジネス","theme.winter":"冬","Safe mode":"セーフモード","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"有効時は hook ベースのキャプチャを無効にします。通常の閲覧と診断キャプチャではオフにしてください。","Hook mode":"Hook モード","Controls whether the userscript hooks XHR, fetch, both, or neither.":"userscript が XHR、fetch、両方、またはどちらも hook しないかを制御します。","Repair mode":"修復モード","Controls whether hook repair watchdog behavior is active.":"hook 修復 watchdog の有効/無効を制御します。","{{seconds}}s ago":"{{seconds}} 秒前","Hooks: {{status}}":"フック:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"フック:xhr {{xhr}}, fetch {{fetch}}, 最後 {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"フック:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"モード: 安全 {{safe}}, hook {{hook}}, 修復 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"モード: 安全 {{safe}}, hook {{hook}}, 修復 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw イベント: {{total}} | 破棄: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} 読み込み中 / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool オーバーフロー破棄: {{drops}} | 利用不可: {{unavailable}} | 最古 pending: {{age}}ms","daemon: {{status}}":"デーモン:{{status}}","daemon: {{status}} | last error: {{error}}":"デーモン:{{status}} | 最後のエラー:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"モニター:{{role}} | リーダー:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor tick route/viewport: {{route}}/{{viewport}} | 抑制 route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"データベース接続済み: {{name}}","App options loaded":"アプリオプションを読み込みました",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"非構造テキストはコンテンツ語の一致と強化された隣接フレーズ窓に展開されます。引用符で囲まれていない一般的な埋め草語は優先度が下がります。","Phrase search with optional slop.":"任意の slop を指定できるフレーズ検索。","Boolean operators with standard precedence and parentheses.":"標準の優先順位と括弧に対応したブール演算子。","Match the author handle or author id.":"作者のハンドルまたは作者 ID に一致します。","Shorthand for an enforced author constraint, equivalent to from:user.":"必須の作者条件の短縮形で、from:user と同等です。","Match reply targets, entity ids, or conversation ids.":"返信先、エンティティ ID、会話 ID に一致します。","Match bookmark folder id or folder name.":"ブックマークフォルダ ID またはフォルダ名に一致します。","Match language, route surface, source text, or card name.":"言語、ルート面、ソーステキスト、カード名に一致します。","Match domains or URLs found in tweets.":"ツイート内のドメインまたは URL に一致します。","Boolean state filters.":"ブール状態フィルター。","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"メディア、リンク、メンション、ハッシュタグ、キャッシュタグ、エンゲージメント、投票の有無フィルター。","Compatibility aliases retained for Twitter-style queries.":"Twitter 形式のクエリ向けに保持された互換エイリアス。","Numeric threshold filters.":"数値しきい値フィルター。","Date, timestamp, and Snowflake-style boundary filters.":"日付、タイムスタンプ、Snowflake 形式の境界フィルター。","Explicit mention filter plus shorthand hashtag and cashtag filters.":"明示的なメンションフィルターと、ハッシュタグ/キャッシュタグの短縮フィルター。","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"ドット区切りのオブジェクトパスや配列を含む raw のネストパスに対するフィールド限定の語彙検索。","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"アプリオプションを v{{oldVersion}} から v{{newVersion}} に移行しました","Hooked into fetch":"fetch に hook しました","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest に hook しました (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook セーフモードを有効化しました ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook 修復に失敗しました ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"ブックマークコンテキスト追跡のインストールに失敗しました。トラッカーなしで続行します ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} 件を受信","Exporting to ZIP file: {{filename}}":"ZIP ファイルへエクスポート: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} ファイルへエクスポート: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} ファイルへストリーミングエクスポート: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"移行完了: {{users}} ユーザーと {{tweets}} ツイートを更新しました。","TweetTombstone received (Reason: {{reason}})":"TweetTombstone を受信しました (理由: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest への hook に失敗しました","Fetch API not found, skipping fetch hooks":"Fetch API が見つからないため fetch hooks をスキップします","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API のベース関数が利用不可または安全でないためセーフモードを有効化します","Fetch hook base invocation failed; enabling safe mode":"fetch hook のベース呼び出しに失敗したためセーフモードを有効化します","XHR send hook base invocation failed; enabling safe mode":"XHR send hook のベース呼び出しに失敗したためセーフモードを有効化します","XHR open hook base invocation failed; enabling safe mode":"XHR open hook のベース呼び出しに失敗したためセーフモードを有効化します","Fetch hook already installed":"fetch hook は既にインストール済みです","Debug mode enabled":"デバッグモード有効","Database cleared":"データベースを消去しました","Upgrading database schema...":"データベーススキーマをアップグレード中...","Database upgraded":"データベースをアップグレードしました","Zip stream closed.":"ZIP ストリームを閉じました。","Running migration_20250609: Migrating legacy user data format":"migration_20250609 実行中: レガシーユーザーデータ形式を移行しています","TweetUnavailable received (Reason: unknown)":"TweetUnavailable を受信しました (理由: 不明)","Empty tweet received":"空のツイートを受信しました","Unknown tweet type received":"不明なツイートタイプを受信しました","Failed to extract tweet":"ツイート抽出に失敗しました","Failed to export file":"ファイルのエクスポートに失敗しました","Failed to stream export file":"ストリームエクスポートファイルに失敗しました"}},ub={exporter:{ID:"ID",Date:"Data",Content:"Conteúdo","Show Full Text":"Mostrar texto completo",Media:"Mídia","Screen Name":"Nome de usuário","Profile Name":"Nome do perfil","Profile Image":"Imagem do perfil","User ID":"ID do usuário","Replying To":"Respondendo a","RT Source":"Fonte do RT","Quote Source":"Fonte da citação","Media Tags":"Tags de mídia",Favorites:"Favoritos",Retweets:"Retweets",Bookmarks:"Favoritos",Quotes:"Citações",Replies:"Respostas",Views:"Visualizações",Favorited:"Favoritado",Retweeted:"Retweetado",Bookmarked:"Salvo nos favoritos","Bookmark Folder":"Pasta de favoritos",URL:"URL",Actions:"Ações",Details:"Detalhes",Description:"Descrição","Profile Banner":"Banner do perfil",Followers:"Seguidores",FollowingCount:"Contagem de seguindo",Statuses:"Publicações",Favourites:"Favoritos",Listed:"Em listas",Location:"Localização",Website:"Site",Birthdate:"Data de nascimento","Verified Type":"Tipo de verificação","Blue Verified":"Verificado Blue",Following:"Seguindo","Follows You":"Segue você","Can DM":"Pode receber DM",Protected:"Protegido","Created At":"Criado em",Sender:"Remetente",Recipient:"Destinatário","Conversation ID":"ID da conversa","Conversation Type":"Tipo de conversa",Data:"Dados","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Exporte os dados capturados como arquivo JSON/HTML/CSV. Isso pode demorar conforme a quantidade de dados. O arquivo exportado não inclui arquivos de mídia, como imagens e vídeos, apenas as URLs.","Data length:":"Tamanho dos dados:","Export scope:":"Escopo da exportação:","All current results":"Todos os resultados atuais","Selected rows":"Linhas selecionadas","Pinned result set":"Conjunto de resultados fixado",Query:"Consulta",Sort:"Ordenação","Include all metadata:":"Incluir todos os metadados:","Export as:":"Exportar como:","No data selected.":"Nenhum dado selecionado.",Cancel:"Cancelar","Start Export":"Iniciar exportação","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Baixe e salve arquivos de mídia dos dados capturados. Isso pode demorar conforme a quantidade de dados. A mídia baixada inclui imagens de perfil, banners de perfil (para usuários), imagens e vídeos (para tweets).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Para mais de 100 mídias ou arquivos grandes, recomenda-se copiar as URLs e baixar com um gerenciador externo como aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"A exportação ZIP no navegador agora usa downloads paralelos limitados. Para tarefas muito grandes com muitos vídeos, exportar URLs ou usar aria2 ainda é o caminho mais seguro e com menor uso de memória.","Filename template:":"Modelo de nome de arquivo:","Download scheduler":"Agendador de downloads","Faster defaults are intended for bulk CDN transfer.":"Os padrões mais rápidos são pensados para transferência em massa via CDN.","Start delay (ms)":"Atraso inicial (ms)","Global parallel":"Paralelo global","Per host":"Por host",Videos:"Vídeos",Retries:"Tentativas","Use aria2 format:":"Usar formato aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Clique para mais informações. Cada URL ficará em uma nova linha, com o nome do arquivo na linha seguinte. Esse formato é compatível com aria2.","Rate limit (ms):":"Limite de taxa (ms):","Media Filter:":"Filtro de mídia:","File Name":"Nome do arquivo","Media Type":"Tipo de mídia","Download URL":"URL de download","No media selected.":"Nenhuma mídia selecionada.","Preview limited to first 250 media items.":"Prévia limitada aos primeiros 250 itens de mídia.",Zipping:"Compactando","Copied!":"Copiado!","Copy URLs":"Copiar URLs","The tweet ID":"O ID do tweet","The username of tweet author":"O nome de usuário do autor do tweet","The profile name of tweet author":"O nome de perfil do autor do tweet","The media index in tweet (start from 0)":"O índice da mídia no tweet (começa em 0)","The order of media in tweet (1/2/3/4)":"A ordem da mídia no tweet (1/2/3/4)","The post date in YYYYMMDD format":"A data da publicação no formato YYYYMMDD","The post time in HHmmss format":"A hora da publicação no formato HHmmss","The media type (photo/video/animated_gif)":"O tipo de mídia (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"A extensão do arquivo de mídia (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Falha ao exportar mídia. Abra o DevTools para mais detalhes.","Failed to copy media URLs. Open DevTools for more details.":"Falha ao copiar URLs de mídia. Abra o DevTools para mais detalhes.","filter.photo":"Foto","filter.video":"Vídeo","filter.animated_gif":"GIF","filter.retweet":"Incluir retweets","loading remaining rows":"carregando linhas restantes","Bundle ZIP compression:":"Compressão do ZIP bundle:","Fastest / store":"Mais rápido / armazenar","Balanced / fast":"Equilibrado / rápido","Smaller / slower":"Menor / mais lento","Cancel Export":"Cancelar exportação","Export a canonical portable ZIP bundle for sharing/importing.":"Exporta um ZIP bundle portátil canônico para compartilhar/importar.","Export Bundle ZIP":"Exportar ZIP bundle","Source-backed media":"Mídia com suporte de origem","rows scanned:":"linhas escaneadas:","media URLs:":"URLs de mídia:",loading:"carregando","Loading media...":"Carregando mídia..."},common:{"Open Control Panel":"Abrir painel de controle","Browse around to capture more data.":"Navegue para capturar mais dados.",Settings:"Configurações",General:"Geral",Theme:"Tema",Language:"Idioma",Debug:"Depuração","Date Time Format":"Formato de data e hora","Click for more information. This will take effect on both previewer and exported files.":"Clique para mais informações. Isso terá efeito no visualizador e nos arquivos exportados.","Use dedicated DB for accounts":"Usar DB dedicado para contas","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Isso criará um banco de dados separado para cada conta do Twitter, ajudando a reduzir a chance de mistura de dados ao usar várias contas.","Local Database":"Banco de dados local","Analyze DB":"Analisar","Export DB":"Exportar","Clear DB":"Limpar","Bundle Export":"Exportar pacote","Bundle Library":"Biblioteca de pacotes","QC Session":"Sessão de QC","Diagnostic capture":"Captura diagnóstica","Diagnostic buffers cleared.":"Buffers de diagnóstico limpos.","Clear Buffers":"Limpar buffers","Preparing...":"Preparando...","Preparing diagnostics...":"Preparando diagnósticos...","Export QC Diagnostics":"Exportar diagnósticos de QC","Export Diagnostics Bundle":"Exportar pacote de diagnósticos","QC idle.":"QC ocioso.","Are you sure to clear all data in the database?":"Tem certeza de que deseja limpar todos os dados do banco?","Database cleared.":"Banco de dados limpo.",Module:"Módulo","Modules (Scroll to see more)":"Módulos (role para ver mais)",About:"Sobre",Version:"Versão","Search...":"Pesquisar...","Something went wrong.":"Algo deu errado.","Error:":"Erro:","Captured:":"Capturado:","Rows per page:":"Linhas por página:","Relation Types":"Tipos de relação","Subject Accounts":"Contas sujeitas","Subject User IDs":"IDs de usuário sujeitos","Last Observed At":"Última observação","A - B of N items":"{{from}} - {{to}} de {{total}} itens","No data available.":"Nenhum dado disponível.","No media available.":"Nenhuma mídia disponível.",Clear:"Limpar","Bookmark folders":"Pastas de favoritos","1 folder selected":"1 pasta selecionada","{{count}} folders selected":"{{count}} pastas selecionadas","Export Media":"Exportar mídia","Export Data":"Exportar dados","Export Search History":"Exportar histórico de pesquisa","JSON View":"Visualização JSON","Media View":"Visualização de mídia",Bookmarks:"Favoritos",Tweets:"Tweets",Users:"Usuários","User Tweets":"Tweets do usuário","User Media":"Mídia do usuário","Tweet Details":"Detalhes do tweet","Search Timeline":"Linha do tempo de pesquisa","Home Timeline":"Linha do tempo inicial","List Timeline":"Linha do tempo da lista","Community Timeline":"Linha do tempo da comunidade","Community Members":"Membros da comunidade","List Members":"Membros da lista","List Subscribers":"Assinantes da lista","Direct Messages":"Mensagens diretas","Interaction Events":"Eventos de interação","Local Search":"Pesquisa local","Runtime Logs":"Logs de execução","Bundle Viewer":"Visualizador de pacotes","{{count}} imported bundles":"{{count}} pacotes importados","Search indexed tweets with Twitter-style operators":"Pesquise tweets indexados com operadores no estilo Twitter","Local Recorder Search":"Pesquisa do gravador local",Quotes:"Citações",CommunityMembers:"Membros da comunidade",CommunityTimeline:"Linha do tempo da comunidade",DirectMessages:"Mensagens diretas",Followers:"Seguidores",Following:"Seguindo",HomeTimeline:"Linha do tempo inicial",Likes:"Curtidas",ListMembers:"Membros da lista",ListSubscribers:"Assinantes da lista",ListTimeline:"Linha do tempo da lista",InteractionEvents:"Eventos de interação",LocalSearch:"Pesquisa local",RawCapture:"Captura bruta",Retweeters:"Retuitadores",RetweetersModule:"Retuitadores",RuntimeLogs:"Logs de execução",SearchTimeline:"Pesquisa",TweetIndex:"Índice de tweets",TweetDetail:"Detalhe do tweet",UserDetail:"Detalhe do usuário",UserMedia:"Mídia do usuário",UserTweets:"Tweets do usuário",on:"ligado",off:"desligado",unknown:"desconhecido",online:"conectado",offline:"desconectado",leader:"líder",follower:"seguidor",tab:"aba",both:"ambos",xhr:"xhr",fetch:"fetch",watchdog:"vigia",all:"todos",explicit:"explícito",loading:"carregando",complete:"concluído",idle:"ocioso","api-name":"nome da API","id-only":"somente ID","theme.system":"Sistema","theme.cupcake":"Claro","theme.dark":"Escuro","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Negócios","theme.winter":"Inverno","Safe mode":"Modo seguro","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"Desativa a captura baseada em hooks quando ativado. Desative para navegação normal e captura diagnóstica.","Hook mode":"Modo de hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Controla se o userscript aplica hook em XHR, fetch, ambos ou nenhum.","Repair mode":"Modo de reparo","Controls whether hook repair watchdog behavior is active.":"Controla se o watchdog de reparo de hooks está ativo.","{{seconds}}s ago":"há {{seconds}} s","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, último {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Modo: seguro {{safe}}, hook {{hook}}, reparo {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Modo: seguro {{safe}}, hook {{hook}}, reparo {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"eventos raw: {{total}} | descartados: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} carregando / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"descartes por overflow do spool: {{drops}} | indisponível: {{unavailable}} | pendente mais antigo: {{age}}ms","daemon: {{status}}":"serviço:{{status}}","daemon: {{status}} | last error: {{error}}":"serviço:{{status}} | último erro:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"monitor:{{role}} | líder:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"ticks monitor rota/viewport: {{route}}/{{viewport}} | suprimidos rota/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"Banco de dados conectado: {{name}}","App options loaded":"Opções do app carregadas",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Texto não estruturado é expandido em correspondências de termos de conteúdo e janelas de frases adjacentes reforçadas; palavras comuns perdem prioridade salvo se estiverem entre aspas.","Phrase search with optional slop.":"Busca por frase com folga opcional.","Boolean operators with standard precedence and parentheses.":"Operadores booleanos com precedência padrão e parênteses.","Match the author handle or author id.":"Corresponde ao usuário ou ID do autor.","Shorthand for an enforced author constraint, equivalent to from:user.":"Atalho para uma restrição obrigatória de autor, equivalente a from:user.","Match reply targets, entity ids, or conversation ids.":"Corresponde a alvos de resposta, IDs de entidade ou IDs de conversa.","Match bookmark folder id or folder name.":"Corresponde ao ID ou nome da pasta de favoritos.","Match language, route surface, source text, or card name.":"Corresponde a idioma, superfície de rota, texto de origem ou nome do card.","Match domains or URLs found in tweets.":"Corresponde a domínios ou URLs encontrados em tweets.","Boolean state filters.":"Filtros de estado booleanos.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Filtros de presença para mídia, links, menções, hashtags, cashtags, engajamento e enquetes.","Compatibility aliases retained for Twitter-style queries.":"Aliases de compatibilidade preservados para consultas no estilo Twitter.","Numeric threshold filters.":"Filtros de limite numérico.","Date, timestamp, and Snowflake-style boundary filters.":"Filtros de limite por data, timestamp e estilo Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Filtro explícito de menção mais filtros abreviados de hashtag e cashtag.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Busca lexical com escopo de campo em caminhos aninhados brutos, incluindo caminhos pontilhados e arrays.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Opções do app migradas de v{{oldVersion}} para v{{newVersion}}","Hooked into fetch":"Hook instalado em fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook instalado em XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Modo seguro de hooks ativado ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Reparo de hook falhou ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Instalação do rastreador de contexto de favoritos falhou; continuando sem rastreador ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} itens recebidos","Exporting to ZIP file: {{filename}}":"Exportando para arquivo ZIP: {{filename}}","Exporting to {{format}} file: {{filename}}":"Exportando para arquivo {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Exportação em stream para arquivo {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migração concluída: {{users}} usuários e {{tweets}} tweets atualizados.","TweetTombstone received (Reason: {{reason}})":"TweetTombstone recebido (Motivo: {{reason}})","Failed to hook into XMLHttpRequest":"Falha ao aplicar hook em XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API não encontrada, pulando hooks de fetch","Fetch API base function unavailable or unsafe; enabling safe mode":"Função base da Fetch API indisponível ou insegura; ativando modo seguro","Fetch hook base invocation failed; enabling safe mode":"Invocação base do hook fetch falhou; ativando modo seguro","XHR send hook base invocation failed; enabling safe mode":"Invocação base do hook XHR send falhou; ativando modo seguro","XHR open hook base invocation failed; enabling safe mode":"Invocação base do hook XHR open falhou; ativando modo seguro","Fetch hook already installed":"Hook de fetch já instalado","Debug mode enabled":"Modo debug ativado","Database cleared":"Banco de dados limpo","Upgrading database schema...":"Atualizando esquema do banco de dados...","Database upgraded":"Banco de dados atualizado","Zip stream closed.":"Stream ZIP fechado.","Running migration_20250609: Migrating legacy user data format":"Executando migration_20250609: migrando formato legado de dados de usuário","TweetUnavailable received (Reason: unknown)":"TweetUnavailable recebido (Motivo: desconhecido)","Empty tweet received":"Tweet vazio recebido","Unknown tweet type received":"Tipo de tweet desconhecido recebido","Failed to extract tweet":"Falha ao extrair tweet","Failed to export file":"Falha ao exportar arquivo","Failed to stream export file":"Falha ao exportar arquivo em stream"}},db={exporter:{ID:"ID",Date:"Дата",Content:"Содержимое","Show Full Text":"Показать полный текст",Media:"Медиа","Screen Name":"Имя пользователя","Profile Name":"Имя профиля","Profile Image":"Изображение профиля","User ID":"ID пользователя","Replying To":"Ответ на","RT Source":"Источник RT","Quote Source":"Источник цитаты","Media Tags":"Медиа-теги",Favorites:"Избранное",Retweets:"Ретвиты",Bookmarks:"Закладки",Quotes:"Цитаты",Replies:"Ответы",Views:"Просмотры",Favorited:"В избранном",Retweeted:"Ретвитнуто",Bookmarked:"В закладках","Bookmark Folder":"Папка закладок",URL:"URL",Actions:"Действия",Details:"Детали",Description:"Описание","Profile Banner":"Баннер профиля",Followers:"Подписчики",FollowingCount:"Количество подписок",Statuses:"Публикации",Favourites:"Избранное",Listed:"В списках",Location:"Местоположение",Website:"Сайт",Birthdate:"Дата рождения","Verified Type":"Тип верификации","Blue Verified":"Blue верифицирован",Following:"Подписки","Follows You":"Подписан на вас","Can DM":"Можно написать в DM",Protected:"Защищён","Created At":"Создано",Sender:"Отправитель",Recipient:"Получатель","Conversation ID":"ID беседы","Conversation Type":"Тип беседы",Data:"Данные","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"Экспортируйте захваченные данные в JSON/HTML/CSV. Это может занять время в зависимости от объёма данных. Экспортируемый файл не содержит медиафайлы, такие как изображения и видео, а только URL.","Data length:":"Длина данных:","Export scope:":"Область экспорта:","All current results":"Все текущие результаты","Selected rows":"Выбранные строки","Pinned result set":"Закреплённый набор результатов",Query:"Запрос",Sort:"Сортировка","Include all metadata:":"Включить все метаданные:","Export as:":"Экспортировать как:","No data selected.":"Данные не выбраны.",Cancel:"Отмена","Start Export":"Начать экспорт","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"Скачать и сохранить медиафайлы из захваченных данных. Это может занять время в зависимости от объёма данных. Будут скачаны изображения профиля, баннеры профиля (для пользователей), изображения и видео (для твитов).","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"Для более чем 100 медиа или крупных файлов рекомендуется скопировать URL и скачать их внешним менеджером, например aria2.","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"ZIP-экспорт в браузере теперь использует ограниченные параллельные загрузки. Для очень больших задач с множеством видео экспорт URL или aria2 остаётся самым безопасным вариантом с низким потреблением памяти.","Filename template:":"Шаблон имени файла:","Download scheduler":"Планировщик загрузок","Faster defaults are intended for bulk CDN transfer.":"Более быстрые значения по умолчанию предназначены для массовой передачи через CDN.","Start delay (ms)":"Начальная задержка (мс)","Global parallel":"Общий параллелизм","Per host":"На хост",Videos:"Видео",Retries:"Повторы","Use aria2 format:":"Использовать формат aria2:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"Нажмите для подробностей. Каждый URL будет на новой строке, а имя файла — на следующей. Формат совместим с aria2.","Rate limit (ms):":"Ограничение скорости (мс):","Media Filter:":"Фильтр медиа:","File Name":"Имя файла","Media Type":"Тип медиа","Download URL":"URL загрузки","No media selected.":"Медиа не выбраны.","Preview limited to first 250 media items.":"Предпросмотр ограничен первыми 250 медиаэлементами.",Zipping:"Упаковка ZIP","Copied!":"Скопировано!","Copy URLs":"Копировать URL","The tweet ID":"ID твита","The username of tweet author":"Имя пользователя автора твита","The profile name of tweet author":"Имя профиля автора твита","The media index in tweet (start from 0)":"Индекс медиа в твите (начинается с 0)","The order of media in tweet (1/2/3/4)":"Порядок медиа в твите (1/2/3/4)","The post date in YYYYMMDD format":"Дата публикации в формате YYYYMMDD","The post time in HHmmss format":"Время публикации в формате HHmmss","The media type (photo/video/animated_gif)":"Тип медиа (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"Расширение медиафайла (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"Не удалось экспортировать медиа. Откройте DevTools для подробностей.","Failed to copy media URLs. Open DevTools for more details.":"Не удалось скопировать URL медиа. Откройте DevTools для подробностей.","filter.photo":"Фото","filter.video":"Видео","filter.animated_gif":"GIF","filter.retweet":"Включить ретвиты","loading remaining rows":"загрузка оставшихся строк","Bundle ZIP compression:":"Сжатие ZIP-бандла:","Fastest / store":"Самое быстрое / store","Balanced / fast":"Сбалансировано / быстро","Smaller / slower":"Меньше / медленнее","Cancel Export":"Отменить экспорт","Export a canonical portable ZIP bundle for sharing/importing.":"Экспортировать канонический переносимый ZIP-бандл для передачи/импорта.","Export Bundle ZIP":"Экспортировать ZIP-бандл","Source-backed media":"Медиа с поддержкой источника","rows scanned:":"просканировано строк:","media URLs:":"URL медиа:",loading:"загрузка","Loading media...":"Загрузка медиа..."},common:{"Open Control Panel":"Открыть панель управления","Browse around to capture more data.":"Просматривайте страницы, чтобы захватывать больше данных.",Settings:"Настройки",General:"Общие",Theme:"Тема",Language:"Язык",Debug:"Отладка","Date Time Format":"Формат даты и времени","Click for more information. This will take effect on both previewer and exported files.":"Нажмите, чтобы узнать подробнее. Это повлияет и на предпросмотр, и на экспортируемые файлы.","Use dedicated DB for accounts":"Использовать отдельную БД для аккаунтов","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"Это создаст отдельную базу данных для каждого аккаунта Twitter и снизит риск смешивания данных при использовании нескольких аккаунтов.","Local Database":"Локальная база данных","Analyze DB":"Анализ","Export DB":"Экспорт","Clear DB":"Очистить","Bundle Export":"Экспорт пакета","Bundle Library":"Библиотека пакетов","QC Session":"Сессия QC","Diagnostic capture":"Диагностический захват","Diagnostic buffers cleared.":"Диагностические буферы очищены.","Clear Buffers":"Очистить буферы","Preparing...":"Подготовка...","Preparing diagnostics...":"Подготовка диагностики...","Export QC Diagnostics":"Экспорт диагностики QC","Export Diagnostics Bundle":"Экспорт диагностического пакета","QC idle.":"QC бездействует.","Are you sure to clear all data in the database?":"Вы уверены, что хотите удалить все данные из базы?","Database cleared.":"База данных очищена.",Module:"Модуль","Modules (Scroll to see more)":"Модули (прокрутите, чтобы увидеть больше)",About:"О программе",Version:"Версия","Search...":"Поиск...","Something went wrong.":"Что-то пошло не так.","Error:":"Ошибка:","Captured:":"Захвачено:","Rows per page:":"Строк на странице:","Relation Types":"Типы связей","Subject Accounts":"Целевые аккаунты","Subject User IDs":"ID целевых пользователей","Last Observed At":"Последнее наблюдение","A - B of N items":"{{from}} - {{to}} из {{total}} элементов","No data available.":"Нет доступных данных.","No media available.":"Нет доступных медиа.",Clear:"Очистить","Bookmark folders":"Папки закладок","1 folder selected":"Выбрана 1 папка","{{count}} folders selected":"Выбрано папок: {{count}}","Export Media":"Экспорт медиа","Export Data":"Экспорт данных","Export Search History":"Экспорт истории поиска","JSON View":"JSON-представление","Media View":"Медиа-представление",Bookmarks:"Закладки",Tweets:"Твиты",Users:"Пользователи","User Tweets":"Твиты пользователя","User Media":"Медиа пользователя","Tweet Details":"Детали твита","Search Timeline":"Лента поиска","Home Timeline":"Домашняя лента","List Timeline":"Лента списка","Community Timeline":"Лента сообщества","Community Members":"Участники сообщества","List Members":"Участники списка","List Subscribers":"Подписчики списка","Direct Messages":"Личные сообщения","Interaction Events":"События взаимодействия","Local Search":"Локальный поиск","Runtime Logs":"Журналы выполнения","Bundle Viewer":"Просмотр пакетов","{{count}} imported bundles":"Импортировано пакетов: {{count}}","Search indexed tweets with Twitter-style operators":"Поиск индексированных твитов с операторами в стиле Twitter","Local Recorder Search":"Поиск локального регистратора",Quotes:"Цитаты",CommunityMembers:"Участники сообщества",CommunityTimeline:"Лента сообщества",DirectMessages:"Личные сообщения",Followers:"Подписчики",Following:"Подписки",HomeTimeline:"Домашняя лента",Likes:"Лайки",ListMembers:"Участники списка",ListSubscribers:"Подписчики списка",ListTimeline:"Лента списка",InteractionEvents:"События взаимодействия",LocalSearch:"Локальный поиск",RawCapture:"Сырой захват",Retweeters:"Ретвитнувшие",RetweetersModule:"Ретвитнувшие",RuntimeLogs:"Журналы выполнения",SearchTimeline:"Поиск",TweetIndex:"Индекс твитов",TweetDetail:"Детали твита",UserDetail:"Детали пользователя",UserMedia:"Медиа пользователя",UserTweets:"Твиты пользователя",on:"вкл.",off:"выкл.",unknown:"неизвестно",online:"онлайн",offline:"офлайн",leader:"лидер",follower:"подписчик",tab:"вкладка",both:"оба",xhr:"xhr",fetch:"fetch",watchdog:"сторож",all:"все",explicit:"явно",loading:"загрузка",complete:"готово",idle:"ожидание","api-name":"имя API","id-only":"только ID","theme.system":"Система","theme.cupcake":"Светлая","theme.dark":"Тёмная","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"Бизнес","theme.winter":"Зима","Safe mode":"Безопасный режим","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"При включении отключает захват через hooks. Отключите для обычного просмотра и диагностики.","Hook mode":"Режим hook","Controls whether the userscript hooks XHR, fetch, both, or neither.":"Управляет тем, будет ли userscript подключать XHR, fetch, оба или ничего.","Repair mode":"Режим восстановления","Controls whether hook repair watchdog behavior is active.":"Управляет активностью watchdog восстановления hooks.","{{seconds}}s ago":"{{seconds}} с назад","Hooks: {{status}}":"Хуки:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Хуки:xhr {{xhr}}, fetch {{fetch}}, последний {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Хуки:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"Режим: безопасный {{safe}}, hook {{hook}}, восстановление {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"Режим: безопасный {{safe}}, hook {{hook}}, восстановление {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw события: {{total}} | отброшено: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} загрузка / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"сбросы переполнения spool: {{drops}} | недоступно: {{unavailable}} | самый старый pending: {{age}}ms","daemon: {{status}}":"демон:{{status}}","daemon: {{status}} | last error: {{error}}":"демон:{{status}} | последняя ошибка:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"монитор:{{role}} | лидер:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"тики monitor route/viewport: {{route}}/{{viewport}} | подавлено route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"База данных подключена: {{name}}","App options loaded":"Параметры приложения загружены",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"Неструктурированный текст расширяется до совпадений терминов содержимого и усиленных окон соседних фраз; распространённые служебные слова имеют меньший приоритет, если не взяты в кавычки.","Phrase search with optional slop.":"Поиск фразы с необязательным допуском.","Boolean operators with standard precedence and parentheses.":"Булевы операторы со стандартным приоритетом и скобками.","Match the author handle or author id.":"Совпадение с именем пользователя или ID автора.","Shorthand for an enforced author constraint, equivalent to from:user.":"Краткая форма обязательного ограничения автора, эквивалент from:user.","Match reply targets, entity ids, or conversation ids.":"Совпадение с целями ответа, ID сущностей или ID бесед.","Match bookmark folder id or folder name.":"Совпадение с ID или названием папки закладок.","Match language, route surface, source text, or card name.":"Совпадение с языком, поверхностью маршрута, исходным текстом или названием карточки.","Match domains or URLs found in tweets.":"Совпадение с доменами или URL в твитах.","Boolean state filters.":"Булевы фильтры состояния.","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"Фильтры наличия медиа, ссылок, упоминаний, хэштегов, кэштегов, вовлечённости и опросов.","Compatibility aliases retained for Twitter-style queries.":"Совместимые псевдонимы, сохранённые для запросов в стиле Twitter.","Numeric threshold filters.":"Фильтры числовых порогов.","Date, timestamp, and Snowflake-style boundary filters.":"Граничные фильтры даты, timestamp и в стиле Snowflake.","Explicit mention filter plus shorthand hashtag and cashtag filters.":"Явный фильтр упоминания плюс краткие фильтры хэштега и кэштега.","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"Лексический поиск по полю в сырых вложенных путях, включая точечные пути объектов и массивы.","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"Параметры приложения перенесены с v{{oldVersion}} на v{{newVersion}}","Hooked into fetch":"Hook установлен в fetch","Hooked into XMLHttpRequest (installed={{installed}})":"Hook установлен в XMLHttpRequest (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Безопасный режим hooks включён ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Восстановление hook не удалось ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Установка отслеживания контекста закладок не удалась; продолжаем без трекера ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: получено {{count}} элементов","Exporting to ZIP file: {{filename}}":"Экспорт в ZIP-файл: {{filename}}","Exporting to {{format}} file: {{filename}}":"Экспорт в файл {{format}}: {{filename}}","Streaming export to {{format}} file: {{filename}}":"Потоковый экспорт в файл {{format}}: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Миграция завершена: обновлено пользователей {{users}} и твитов {{tweets}}.","TweetTombstone received (Reason: {{reason}})":"Получен TweetTombstone (Причина: {{reason}})","Failed to hook into XMLHttpRequest":"Не удалось установить hook в XMLHttpRequest","Fetch API not found, skipping fetch hooks":"Fetch API не найден, hooks fetch пропущены","Fetch API base function unavailable or unsafe; enabling safe mode":"Базовая функция Fetch API недоступна или небезопасна; включается безопасный режим","Fetch hook base invocation failed; enabling safe mode":"Базовый вызов hook fetch не удался; включается безопасный режим","XHR send hook base invocation failed; enabling safe mode":"Базовый вызов hook XHR send не удался; включается безопасный режим","XHR open hook base invocation failed; enabling safe mode":"Базовый вызов hook XHR open не удался; включается безопасный режим","Fetch hook already installed":"Hook fetch уже установлен","Debug mode enabled":"Режим отладки включён","Database cleared":"База данных очищена","Upgrading database schema...":"Обновление схемы базы данных...","Database upgraded":"База данных обновлена","Zip stream closed.":"ZIP-поток закрыт.","Running migration_20250609: Migrating legacy user data format":"Запуск migration_20250609: перенос устаревшего формата данных пользователей","TweetUnavailable received (Reason: unknown)":"Получен TweetUnavailable (Причина: неизвестна)","Empty tweet received":"Получен пустой твит","Unknown tweet type received":"Получен неизвестный тип твита","Failed to extract tweet":"Не удалось извлечь твит","Failed to export file":"Не удалось экспортировать файл","Failed to stream export file":"Не удалось выполнить потоковый экспорт файла"}},fb={exporter:{ID:"ID",Date:"تاریخ",Content:"مواد","Show Full Text":"مکمل متن دکھائیں",Media:"میڈیا","Screen Name":"صارف نام","Profile Name":"پروفائل نام","Profile Image":"پروفائل تصویر","User ID":"صارف ID","Replying To":"جواب برائے","RT Source":"RT ماخذ","Quote Source":"اقتباس ماخذ","Media Tags":"میڈیا ٹیگز",Favorites:"پسندیدہ",Retweets:"ری ٹویٹس",Bookmarks:"بک مارکس",Quotes:"اقتباسات",Replies:"جوابات",Views:"دیکھے جانے کی تعداد",Favorited:"پسندیدہ کیا گیا",Retweeted:"ری ٹویٹ کیا گیا",Bookmarked:"بک مارک کیا گیا","Bookmark Folder":"بک مارک فولڈر",URL:"URL",Actions:"اعمال",Details:"تفصیلات",Description:"تفصیل","Profile Banner":"پروفائل بینر",Followers:"فالوورز",FollowingCount:"فالوونگ تعداد",Statuses:"پوسٹس",Favourites:"پسندیدہ",Listed:"لسٹ میں شامل",Location:"مقام",Website:"ویب سائٹ",Birthdate:"تاریخ پیدائش","Verified Type":"تصدیق کی قسم","Blue Verified":"Blue تصدیق شدہ",Following:"فالو کر رہے ہیں","Follows You":"آپ کو فالو کرتا ہے","Can DM":"DM ہو سکتا ہے",Protected:"محفوظ","Created At":"بنایا گیا",Sender:"بھیجنے والا",Recipient:"وصول کنندہ","Conversation ID":"گفتگو ID","Conversation Type":"گفتگو کی قسم",Data:"ڈیٹا","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"محفوظ شدہ ڈیٹا کو JSON/HTML/CSV فائل کے طور پر برآمد کریں۔ ڈیٹا کی مقدار کے مطابق وقت لگ سکتا ہے۔ برآمد شدہ فائل میں تصاویر اور ویڈیوز جیسے میڈیا فائلز شامل نہیں ہوں گے، صرف URL ہوں گے۔","Data length:":"ڈیٹا لمبائی:","Export scope:":"برآمد کا دائرہ:","All current results":"تمام موجودہ نتائج","Selected rows":"منتخب قطاریں","Pinned result set":"پن کیا ہوا نتیجہ سیٹ",Query:"Query",Sort:"ترتیب","Include all metadata:":"تمام میٹا ڈیٹا شامل کریں:","Export as:":"اس طور پر برآمد کریں:","No data selected.":"کوئی ڈیٹا منتخب نہیں۔",Cancel:"منسوخ","Start Export":"برآمد شروع کریں","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"محفوظ شدہ ڈیٹا سے میڈیا فائلیں ڈاؤن لوڈ اور محفوظ کریں۔ ڈیٹا کی مقدار کے مطابق وقت لگ سکتا ہے۔ ڈاؤن لوڈ ہونے والے میڈیا میں پروفائل تصاویر، پروفائل بینرز (صارفین کے لیے)، تصاویر اور ویڈیوز (ٹویٹس کے لیے) شامل ہیں۔","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"100 سے زیادہ میڈیا یا بڑی فائلوں کے لیے URL کاپی کر کے aria2 جیسے بیرونی ڈاؤن لوڈ مینیجر سے ڈاؤن لوڈ کرنا بہتر ہے۔","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"براؤزر ZIP برآمد اب محدود متوازی ڈاؤن لوڈز استعمال کرتی ہے۔ بہت بڑے ویڈیو والے کاموں کے لیے URL یا aria2 برآمد اب بھی کم میموری والا محفوظ ترین راستہ ہے۔","Filename template:":"فائل نام ٹیمپلیٹ:","Download scheduler":"ڈاؤن لوڈ شیڈولر","Faster defaults are intended for bulk CDN transfer.":"تیز ڈیفالٹس بڑے CDN ٹرانسفر کے لیے ہیں۔","Start delay (ms)":"آغاز تاخیر (ms)","Global parallel":"عالمی متوازی","Per host":"فی ہوسٹ",Videos:"ویڈیوز",Retries:"دوبارہ کوششیں","Use aria2 format:":"aria2 فارمیٹ استعمال کریں:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"مزید معلومات کے لیے کلک کریں۔ ہر URL نئی لائن میں ہوگا، اور اس کا فائل نام اگلی لائن میں ہوگا۔ یہ فارمیٹ aria2 سے مطابقت رکھتا ہے۔","Rate limit (ms):":"رفتار حد (ms):","Media Filter:":"میڈیا فلٹر:","File Name":"فائل نام","Media Type":"میڈیا قسم","Download URL":"ڈاؤن لوڈ URL","No media selected.":"کوئی میڈیا منتخب نہیں۔","Preview limited to first 250 media items.":"پیش نظارہ پہلے 250 میڈیا آئٹمز تک محدود ہے۔",Zipping:"ZIP بن رہی ہے","Copied!":"کاپی ہو گیا!","Copy URLs":"URL کاپی کریں","The tweet ID":"ٹویٹ ID","The username of tweet author":"ٹویٹ مصنف کا صارف نام","The profile name of tweet author":"ٹویٹ مصنف کا پروفائل نام","The media index in tweet (start from 0)":"ٹویٹ میں میڈیا انڈیکس (0 سے شروع)","The order of media in tweet (1/2/3/4)":"ٹویٹ میں میڈیا ترتیب (1/2/3/4)","The post date in YYYYMMDD format":"YYYYMMDD فارمیٹ میں پوسٹ تاریخ","The post time in HHmmss format":"HHmmss فارمیٹ میں پوسٹ وقت","The media type (photo/video/animated_gif)":"میڈیا قسم (photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"میڈیا فائل ایکسٹینشن (jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"میڈیا برآمد ناکام۔ مزید تفصیلات کے لیے DevTools کھولیں۔","Failed to copy media URLs. Open DevTools for more details.":"میڈیا URL کاپی ناکام۔ مزید تفصیلات کے لیے DevTools کھولیں۔","filter.photo":"تصویر","filter.video":"ویڈیو","filter.animated_gif":"GIF","filter.retweet":"ری ٹویٹس شامل کریں","loading remaining rows":"باقی قطاریں لوڈ ہو رہی ہیں","Bundle ZIP compression:":"Bundle ZIP کمپریشن:","Fastest / store":"تیز ترین / store","Balanced / fast":"متوازن / تیز","Smaller / slower":"چھوٹا / سست","Cancel Export":"Export منسوخ کریں","Export a canonical portable ZIP bundle for sharing/importing.":"share/import کے لیے canonical portable ZIP bundle export کریں۔","Export Bundle ZIP":"Bundle ZIP export کریں","Source-backed media":"Source-backed میڈیا","rows scanned:":"scan شدہ قطاریں:","media URLs:":"میڈیا URLs:",loading:"لوڈ ہو رہا ہے","Loading media...":"media لوڈ ہو رہا ہے..."},common:{"Open Control Panel":"کنٹرول پینل کھولیں","Browse around to capture more data.":"مزید ڈیٹا محفوظ کرنے کے لیے براؤز کریں۔",Settings:"ترتیبات",General:"عمومی",Theme:"تھیم",Language:"زبان",Debug:"ڈیبگ","Date Time Format":"تاریخ اور وقت کا فارمیٹ","Click for more information. This will take effect on both previewer and exported files.":"مزید معلومات کے لیے کلک کریں۔ یہ پیش نظارہ اور برآمد شدہ فائلوں دونوں پر لاگو ہوگا۔","Use dedicated DB for accounts":"اکاؤنٹس کے لیے الگ DB استعمال کریں","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"یہ ہر Twitter اکاؤنٹ کے لیے الگ ڈیٹابیس بنائے گا، جس سے متعدد اکاؤنٹس استعمال کرتے وقت ڈیٹا کے مل جانے کا امکان کم ہوتا ہے۔","Local Database":"مقامی ڈیٹابیس","Analyze DB":"تجزیہ","Export DB":"برآمد","Clear DB":"صاف کریں","Bundle Export":"بنڈل برآمد","Bundle Library":"بنڈل لائبریری","QC Session":"QC سیشن","Diagnostic capture":"تشخیصی کیپچر","Diagnostic buffers cleared.":"تشخیصی بفر صاف کر دیے گئے۔","Clear Buffers":"بفر صاف کریں","Preparing...":"تیاری ہو رہی ہے...","Preparing diagnostics...":"تشخیص تیار ہو رہی ہے...","Export QC Diagnostics":"QC تشخیص برآمد کریں","Export Diagnostics Bundle":"تشخیصی بنڈل برآمد کریں","QC idle.":"QC غیر فعال ہے۔","Are you sure to clear all data in the database?":"کیا آپ واقعی ڈیٹابیس کا تمام ڈیٹا صاف کرنا چاہتے ہیں؟","Database cleared.":"ڈیٹابیس صاف کر دی گئی۔",Module:"ماڈیول","Modules (Scroll to see more)":"ماڈیولز (مزید دیکھنے کے لیے اسکرول کریں)",About:"متعلق",Version:"ورژن","Search...":"تلاش...","Something went wrong.":"کچھ غلط ہو گیا۔","Error:":"خرابی:","Captured:":"محفوظ شدہ:","Rows per page:":"فی صفحہ قطاریں:","Relation Types":"رشتہ کی اقسام","Subject Accounts":"موضوع اکاؤنٹس","Subject User IDs":"موضوع صارف ID","Last Observed At":"آخری مشاہدہ","A - B of N items":"{{total}} میں سے {{from}} - {{to}} آئٹمز","No data available.":"کوئی ڈیٹا دستیاب نہیں۔","No media available.":"کوئی میڈیا دستیاب نہیں۔",Clear:"صاف کریں","Bookmark folders":"بک مارک فولڈرز","1 folder selected":"1 فولڈر منتخب","{{count}} folders selected":"{{count}} فولڈرز منتخب","Export Media":"میڈیا برآمد کریں","Export Data":"ڈیٹا برآمد کریں","Export Search History":"تلاش کی تاریخ برآمد کریں","JSON View":"JSON منظر","Media View":"میڈیا منظر",Bookmarks:"بک مارکس",Tweets:"ٹویٹس",Users:"صارفین","User Tweets":"صارف کی ٹویٹس","User Media":"صارف کا میڈیا","Tweet Details":"ٹویٹ کی تفصیلات","Search Timeline":"تلاش ٹائم لائن","Home Timeline":"ہوم ٹائم لائن","List Timeline":"لسٹ ٹائم لائن","Community Timeline":"کمیونٹی ٹائم لائن","Community Members":"کمیونٹی اراکین","List Members":"لسٹ اراکین","List Subscribers":"لسٹ سبسکرائبرز","Direct Messages":"براہ راست پیغامات","Interaction Events":"تعامل کے واقعات","Local Search":"مقامی تلاش","Runtime Logs":"رن ٹائم لاگز","Bundle Viewer":"بنڈل ویور","{{count}} imported bundles":"{{count}} درآمد شدہ بنڈلز","Search indexed tweets with Twitter-style operators":"Twitter طرز کے آپریٹرز سے انڈیکس شدہ ٹویٹس تلاش کریں","Local Recorder Search":"مقامی ریکارڈر تلاش",Quotes:"اقتباسات",CommunityMembers:"کمیونٹی اراکین",CommunityTimeline:"کمیونٹی ٹائم لائن",DirectMessages:"براہ راست پیغامات",Followers:"فالوورز",Following:"فالو کر رہے ہیں",HomeTimeline:"ہوم ٹائم لائن",Likes:"لائکس",ListMembers:"لسٹ اراکین",ListSubscribers:"لسٹ سبسکرائبرز",ListTimeline:"لسٹ ٹائم لائن",InteractionEvents:"تعامل کے واقعات",LocalSearch:"مقامی تلاش",RawCapture:"خام کیپچر",Retweeters:"ری ٹویٹ کرنے والے",RetweetersModule:"ری ٹویٹ کرنے والے",RuntimeLogs:"رن ٹائم لاگز",SearchTimeline:"تلاش",TweetIndex:"ٹویٹ انڈیکس",TweetDetail:"ٹویٹ تفصیل",UserDetail:"صارف تفصیل",UserMedia:"صارف میڈیا",UserTweets:"صارف ٹویٹس",on:"آن",off:"آف",unknown:"نامعلوم",online:"آن لائن",offline:"آف لائن",leader:"لیڈر",follower:"فالوور",tab:"ٹیب",both:"دونوں",xhr:"xhr",fetch:"fetch",watchdog:"واچ ڈاگ",all:"سب",explicit:"واضح",loading:"لوڈ ہو رہا ہے",complete:"مکمل",idle:"خالی","api-name":"API نام","id-only":"صرف ID","theme.system":"سسٹم","theme.cupcake":"ہلکا","theme.dark":"گہرا","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"بزنس","theme.winter":"سردی","Safe mode":"محفوظ موڈ","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"فعال ہونے پر hook-based capture بند کرتا ہے۔ عام browsing اور diagnostic capture کے لیے اسے بند کریں۔","Hook mode":"Hook موڈ","Controls whether the userscript hooks XHR, fetch, both, or neither.":"یہ کنٹرول کرتا ہے کہ userscript XHR، fetch، دونوں یا کوئی بھی hook کرے۔","Repair mode":"Repair موڈ","Controls whether hook repair watchdog behavior is active.":"یہ کنٹرول کرتا ہے کہ hook repair watchdog فعال ہے یا نہیں۔","{{seconds}}s ago":"{{seconds}} سیکنڈ پہلے","Hooks: {{status}}":"ہکس:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"ہکس:xhr {{xhr}}, fetch {{fetch}}, آخری {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"ہکس:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"موڈ: محفوظ {{safe}}, hook {{hook}}, مرمت {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"موڈ: محفوظ {{safe}}, hook {{hook}}, مرمت {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw واقعات: {{total}} | dropped: {{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool: {{queued}} لوڈ ہو رہا ہے / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool overflow drops: {{drops}} | unavailable: {{unavailable}} | سب سے پرانا pending: {{age}}ms","daemon: {{status}}":"ڈیمون:{{status}}","daemon: {{status}} | last error: {{error}}":"ڈیمون:{{status}} | آخری خرابی:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"مانیٹر:{{role}} | لیڈر:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor ticks route/viewport: {{route}}/{{viewport}} | دبائے گئے route/viewport: {{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"ڈیٹابیس منسلک: {{name}}","App options loaded":"App options لوڈ ہو گئے",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"غیر ساختہ متن مواد کے الفاظ کی مماثلت اور مضبوط قریبی فقرہ ونڈوز میں پھیلتا ہے؛ عام بھرائی الفاظ کو کم ترجیح دی جاتی ہے جب تک وہ اقتباس میں نہ ہوں۔","Phrase search with optional slop.":"اختیاری slop کے ساتھ فقرہ تلاش۔","Boolean operators with standard precedence and parentheses.":"معیاری ترجیح اور قوسین کے ساتھ بولین آپریٹرز۔","Match the author handle or author id.":"مصنف کا ہینڈل یا مصنف ID ملائیں۔","Shorthand for an enforced author constraint, equivalent to from:user.":"لازمی مصنف قید کا مختصر طریقہ، from:user کے برابر۔","Match reply targets, entity ids, or conversation ids.":"جواب کے اہداف، entity IDs یا conversation IDs ملائیں۔","Match bookmark folder id or folder name.":"بک مارک فولڈر ID یا نام ملائیں۔","Match language, route surface, source text, or card name.":"زبان، route surface، source text یا card name ملائیں۔","Match domains or URLs found in tweets.":"ٹویٹس میں موجود domains یا URLs ملائیں۔","Boolean state filters.":"بولین حالت فلٹرز۔","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"میڈیا، links، mentions، hashtags، cashtags، engagement اور polls کی موجودگی کے فلٹرز۔","Compatibility aliases retained for Twitter-style queries.":"Twitter طرز queries کے لیے compatibility aliases برقرار رکھے گئے۔","Numeric threshold filters.":"عددی حد فلٹرز۔","Date, timestamp, and Snowflake-style boundary filters.":"تاریخ، timestamp اور Snowflake طرز boundary فلٹرز۔","Explicit mention filter plus shorthand hashtag and cashtag filters.":"واضح mention فلٹر، نیز مختصر hashtag اور cashtag فلٹرز۔","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"dotted object paths اور arrays سمیت raw nested paths پر field-scoped lexical تلاش۔","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"App options v{{oldVersion}} سے v{{newVersion}} میں migrate ہو گئے","Hooked into fetch":"fetch میں hook کیا گیا","Hooked into XMLHttpRequest (installed={{installed}})":"XMLHttpRequest میں hook کیا گیا (installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook safe mode فعال ہوا ({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook repair ناکام ({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"Bookmark context tracking install ناکام؛ tracker کے بغیر جاری ({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}: {{count}} items موصول ہوئے","Exporting to ZIP file: {{filename}}":"ZIP file میں export: {{filename}}","Exporting to {{format}} file: {{filename}}":"{{format}} file میں export: {{filename}}","Streaming export to {{format}} file: {{filename}}":"{{format}} file میں streaming export: {{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"Migration مکمل: {{users}} users اور {{tweets}} tweets update ہوئے۔","TweetTombstone received (Reason: {{reason}})":"TweetTombstone موصول ہوا (Reason: {{reason}})","Failed to hook into XMLHttpRequest":"XMLHttpRequest میں hook ناکام","Fetch API not found, skipping fetch hooks":"Fetch API نہیں ملا، fetch hooks چھوڑے جا رہے ہیں","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API base function unavailable یا unsafe ہے؛ safe mode فعال ہو رہا ہے","Fetch hook base invocation failed; enabling safe mode":"Fetch hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","XHR send hook base invocation failed; enabling safe mode":"XHR send hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","XHR open hook base invocation failed; enabling safe mode":"XHR open hook base invocation ناکام؛ safe mode فعال ہو رہا ہے","Fetch hook already installed":"Fetch hook پہلے سے installed ہے","Debug mode enabled":"Debug mode فعال","Database cleared":"Database صاف کیا گیا","Upgrading database schema...":"Database schema upgrade ہو رہا ہے...","Database upgraded":"Database upgrade ہو گیا","Zip stream closed.":"ZIP stream بند ہو گیا۔","Running migration_20250609: Migrating legacy user data format":"migration_20250609 چل رہا ہے: legacy user data format migrate ہو رہا ہے","TweetUnavailable received (Reason: unknown)":"TweetUnavailable موصول ہوا (Reason: unknown)","Empty tweet received":"خالی tweet موصول ہوا","Unknown tweet type received":"Unknown tweet type موصول ہوا","Failed to extract tweet":"Tweet extract ناکام","Failed to export file":"File export ناکام","Failed to stream export file":"Stream export file ناکام"}},hb={exporter:{ID:"ID",Date:"日期",Content:"内容","Show Full Text":"显示全文",Media:"媒体","Screen Name":"用户名","Profile Name":"用户昵称","Profile Image":"用户头像","User ID":"用户 ID","Replying To":"回复推文","RT Source":"转推来源","Quote Source":"引用来源","Media Tags":"圈人",Favorites:"喜欢数量",Retweets:"转推数量",Bookmarks:"书签数量",Quotes:"引用数量",Replies:"回复数量",Views:"查看次数",Favorited:"已喜欢",Retweeted:"已转推",Bookmarked:"已加书签","Bookmark Folder":"书签文件夹",URL:"URL",Actions:"操作",Details:"查看详情",Description:"简介","Profile Banner":"个人资料头图",Followers:"关注者数量",FollowingCount:"正在关注数量",Statuses:"推文数量",Favourites:"喜欢数量",Listed:"被加入列表数",Location:"位置",Website:"网站",Birthdate:"出生日期","Verified Type":"认证类型","Blue Verified":"蓝标认证",Following:"正在关注","Follows You":"关注你","Can DM":"可私信",Protected:"受保护","Created At":"创建时间",Sender:"发送者",Recipient:"接收者","Conversation ID":"对话 ID","Conversation Type":"对话类型",Data:"数据","Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.":"将捕获的数据导出为 JSON/HTML/CSV 文件。这可能需要一些时间,具体取决于数据量。导出的文件不包括图片和视频等媒体文件,只包括它们的 URL。","Data length:":"数据长度:","Export scope:":"导出范围:","All current results":"当前全部结果","Selected rows":"已选择行","Pinned result set":"已固定结果集",Query:"查询",Sort:"排序","Include all metadata:":"包括所有元数据:","Export as:":"导出为:","No data selected.":"未选择数据。",Cancel:"取消","Start Export":"开始导出","Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).":"从捕获的数据中下载并保存媒体文件。这可能需要一些时间,具体取决于数据量。将下载的媒体包括:用户的个人资料图片、个人资料头图、图片、推文中的视频。","For more than 100 media or large files, it is recommended to copy the URLs and download them with an external download manager such as aria2.":"对于超过 100 个媒体或大文件,建议复制 URL 并使用外部下载管理器(如 aria2)下载。","Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.":"浏览器 ZIP 导出现在使用有界并行下载。对于非常大的视频密集任务,URL 或 aria2 导出仍是内存占用最低的安全路径。","Filename template:":"文件名模板:","Download scheduler":"下载调度器","Faster defaults are intended for bulk CDN transfer.":"更快的默认值用于批量 CDN 传输。","Start delay (ms)":"启动间隔 (ms)","Global parallel":"全局并行","Per host":"每主机",Videos:"视频",Retries:"重试","Use aria2 format:":"使用 aria2 格式:","Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2.":"点击获取更多信息。每个 URL 将在新行中显示,其文件名在下一行。此格式与 aria2 兼容。","Rate limit (ms):":"速率限制(毫秒):","Media Filter:":"媒体过滤器:","File Name":"文件名","Media Type":"媒体类型","Download URL":"下载地址","No media selected.":"未选择媒体。","Preview limited to first 250 media items.":"预览限制为前 250 个媒体项。",Zipping:"正在打包","Copied!":"已复制!","Copy URLs":"复制 URL","The tweet ID":"推文 ID","The username of tweet author":"推文作者的用户名","The profile name of tweet author":"推文作者的用户昵称","The media index in tweet (start from 0)":"推文中的媒体索引(从 0 开始)","The order of media in tweet (1/2/3/4)":"推文中的媒体顺序(1/2/3/4)","The post date in YYYYMMDD format":"发布日期(YYYYMMDD 格式)","The post time in HHmmss format":"发布时间(HHmmss 格式)","The media type (photo/video/animated_gif)":"媒体类型(photo/video/animated_gif)","The file extension of media (jpg/png/mp4)":"媒体文件扩展名(jpg/png/mp4)","Failed to export media. Open DevTools for more details.":"导出媒体失败。打开 DevTools 以获取更多详细信息。","Failed to copy media URLs. Open DevTools for more details.":"复制媒体 URL 失败。打开 DevTools 以获取更多详细信息。","filter.photo":"图片","filter.video":"视频","filter.animated_gif":"GIF","filter.retweet":"包括转推","loading remaining rows":"正在加载剩余行","Bundle ZIP compression:":"捆绑 ZIP 压缩:","Fastest / store":"最快 / 仅存储","Balanced / fast":"平衡 / 快速","Smaller / slower":"更小 / 更慢","Cancel Export":"取消导出","Export a canonical portable ZIP bundle for sharing/importing.":"导出用于分享/导入的规范可移植 ZIP 捆绑包。","Export Bundle ZIP":"导出捆绑 ZIP","Source-backed media":"源支持媒体","rows scanned:":"已扫描行:","media URLs:":"媒体 URL:",loading:"加载中","Loading media...":"正在加载媒体..."},common:{"Open Control Panel":"打开控制面板","Browse around to capture more data.":"浏览页面以捕获更多数据。",Settings:"设置",General:"通用",Theme:"主题",Language:"语言",Debug:"调试开关","Date Time Format":"日期时间格式","Click for more information. This will take effect on both previewer and exported files.":"点击查看详细信息。此选项会影响预览和导出的文件。","Use dedicated DB for accounts":"为每个账户使用专用数据库","This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts.":"这将为每个 Twitter 账户创建单独的数据库,这有助于避免使用多个账户时数据混淆。","Local Database":"本地数据库","Analyze DB":"统计","Export DB":"导出","Clear DB":"清空","Bundle Export":"导出捆绑包","Bundle Library":"捆绑包库","QC Session":"质检会话","Diagnostic capture":"诊断捕获","Diagnostic buffers cleared.":"诊断缓冲区已清除。","Clear Buffers":"清除缓冲区","Preparing...":"准备中...","Preparing diagnostics...":"正在准备诊断...","Export QC Diagnostics":"导出质检诊断","Export Diagnostics Bundle":"导出诊断捆绑包","QC idle.":"质检空闲。","Are you sure to clear all data in the database?":"确定要清空数据库中的所有数据吗?","Database cleared.":"数据库已清空。",Module:"模块","Modules (Scroll to see more)":"模块列表(滑动以查看完整列表)",About:"关于",Version:"版本","Search...":"搜索...","Something went wrong.":"出错了。","Error:":"错误:","Captured:":"已捕获:","Rows per page:":"每页显示行数:","Relation Types":"关系类型","Subject Accounts":"主体账户","Subject User IDs":"主体用户 ID","Last Observed At":"最后观察时间","A - B of N items":"第 {{from}} - {{to}} 项,共 {{total}} 项","No data available.":"没有数据。","No media available.":"没有可用媒体。",Clear:"清除","Bookmark folders":"书签文件夹","1 folder selected":"已选择 1 个文件夹","{{count}} folders selected":"已选择 {{count}} 个文件夹","Export Media":"导出媒体文件","Export Data":"导出数据","Export Search History":"导出搜索历史","JSON View":"JSON 数据预览","Media View":"媒体预览",Bookmarks:"书签",Tweets:"推文",Users:"用户","User Tweets":"用户推文","User Media":"用户媒体","Tweet Details":"推文详情","Search Timeline":"搜索时间线","Home Timeline":"主页时间线","List Timeline":"列表时间线","Community Timeline":"社群时间线","Community Members":"社群成员","List Members":"列表成员","List Subscribers":"列表关注者","Direct Messages":"私信","Interaction Events":"交互事件","Local Search":"本地搜索","Runtime Logs":"运行时日志","Bundle Viewer":"捆绑包查看器","{{count}} imported bundles":"已导入 {{count}} 个捆绑包","Search indexed tweets with Twitter-style operators":"用 Twitter 风格运算符搜索已索引推文","Local Recorder Search":"本地记录器搜索",Quotes:"引用推文",CommunityMembers:"社群成员",CommunityTimeline:"社群时间线",DirectMessages:"私信",Followers:"关注者",Following:"正在关注",HomeTimeline:"主页时间线",Likes:"喜欢",ListMembers:"列表成员",ListSubscribers:"列表关注者",ListTimeline:"列表时间线",InteractionEvents:"交互事件",LocalSearch:"本地搜索",RawCapture:"原始捕获",Retweeters:"转推者",RetweetersModule:"转推者",RuntimeLogs:"运行时日志",SearchTimeline:"搜索结果",TweetIndex:"推文索引",TweetDetail:"推文详情",UserDetail:"用户详情",UserMedia:"用户媒体",UserTweets:"用户推文",on:"开",off:"关",unknown:"未知",online:"在线",offline:"离线",leader:"主控",follower:"跟随",tab:"标签页",both:"两者",xhr:"xhr",fetch:"fetch",watchdog:"看门狗",all:"全部",explicit:"显式",loading:"加载中",complete:"完成",idle:"空闲","api-name":"API 名称","id-only":"仅 ID","theme.system":"跟随 X/系统","theme.cupcake":"浅色","theme.dark":"深色","theme.emerald":"Emerald","theme.cyberpunk":"Cyberpunk","theme.valentine":"Valentine","theme.lofi":"Lo-fi","theme.dracula":"Dracula","theme.cmyk":"CMYK","theme.business":"商务","theme.winter":"冬季","Safe mode":"安全模式","Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture.":"启用后会停用基于 hook 的捕获。正常浏览和诊断捕获时请关闭它。","Hook mode":"Hook 模式","Controls whether the userscript hooks XHR, fetch, both, or neither.":"控制用户脚本 hook XHR、fetch、两者,还是都不 hook。","Repair mode":"修复模式","Controls whether hook repair watchdog behavior is active.":"控制 hook 修复看门狗是否启用。","{{seconds}}s ago":"{{seconds}} 秒前","Hooks: {{status}}":"Hooks:{{status}}","Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})":"Hooks:xhr {{xhr}}, fetch {{fetch}}, 上次 {{url}} ({{age}})","Hooks: xhr {{xhr}}, fetch {{fetch}}":"Hooks:xhr {{xhr}}, fetch {{fetch}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}":"模式: 安全 {{safe}}, hook {{hook}}, 修复 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}","Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}":"模式: 安全 {{safe}}, hook {{hook}}, 修复 {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}","raw events: {{total}} | dropped: {{dropped}}":"raw 事件:{{total}} | 丢弃:{{dropped}}","spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed":"spool:{{queued}} 排队 / {{enqueued}} 入队 / {{flushed}} 已刷新 / {{failed}} 失败","spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms":"spool 溢出丢弃:{{drops}} | 不可用:{{unavailable}} | 最旧待处理:{{age}}ms","daemon: {{status}}":"守护进程:{{status}}","daemon: {{status}} | last error: {{error}}":"守护进程:{{status}} | 最近错误:{{error}}","monitor: {{role}} | leader: {{leader}} | lease: {{lease}}":"监控器:{{role}} | 主控:{{leader}} | lease:{{lease}}","monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}":"monitor tick 路由/视口:{{route}}/{{viewport}} | 抑制 路由/视口:{{suppressedRoute}}/{{suppressedViewport}}","Database connected: {{name}}":"数据库已连接:{{name}}","App options loaded":"应用选项已加载",'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)':'Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)',"Search help":"Search help","Clear search":"Clear search","Table view":"Table view","Exit fullscreen":"Exit fullscreen",Fullscreen:"Fullscreen","{{view}} is disabled for large source-backed result sets.":"{{view}} is disabled for large source-backed result sets.","{{view}} view - {{status}}":"{{view}} view - {{status}}","{{view}} view":"{{view}} view","loading {{loaded}}/{{total}}":"loading {{loaded}}/{{total}}","loading more {{loaded}}/{{total}}":"loading more {{loaded}}/{{total}}","searching {{matches}}/{{total}}":"searching {{matches}}/{{total}}","matches {{matches}}/{{total}}":"matches {{matches}}/{{total}}","rows {{loaded}}/{{total}}":"rows {{loaded}}/{{total}}","rows {{count}}":"rows {{count}}","buffering...":"buffering...","history {{count}}":"history {{count}}","selected {{count}} ({{mode}})":"selected {{count}} ({{mode}})","rendered {{rendered}}/{{total}} (window {{start}}-{{end}})":"rendered {{rendered}}/{{total}} (window {{start}}-{{end}})","Search Operators":"Search Operators","Query semantics now follow recorder-style precedence:":"Query semantics now follow recorder-style precedence:","with implicit":"with implicit","between adjacent terms.":"between adjacent terms.","search.category.lexical":"Lexical","search.category.identity":"Identity","search.category.metadata":"Metadata","search.category.presence":"Presence","search.category.numeric_date":"Numeric/date","search.category.compatibility":"Compatibility","Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.":"非结构化文本会扩展为内容词匹配,并提升相邻短语窗口;除非加引号,常见填充词会降低权重。","Phrase search with optional slop.":"短语搜索,可选 slop。","Boolean operators with standard precedence and parentheses.":"布尔运算符,支持标准优先级和括号。","Match the author handle or author id.":"匹配作者用户名或作者 ID。","Shorthand for an enforced author constraint, equivalent to from:user.":"强制作者约束的简写,等同于 from:user。","Match reply targets, entity ids, or conversation ids.":"匹配回复目标、实体 ID 或会话 ID。","Match bookmark folder id or folder name.":"匹配书签文件夹 ID 或名称。","Match language, route surface, source text, or card name.":"匹配语言、路由页面、来源文本或卡片名称。","Match domains or URLs found in tweets.":"匹配推文中的域名或 URL。","Boolean state filters.":"布尔状态筛选器。","Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.":"按媒体、链接、提及、话题标签、股票标签、互动和投票是否存在筛选。","Compatibility aliases retained for Twitter-style queries.":"为 Twitter 风格查询保留的兼容别名。","Numeric threshold filters.":"数值阈值筛选器。","Date, timestamp, and Snowflake-style boundary filters.":"日期、时间戳和 Snowflake 风格边界筛选器。","Explicit mention filter plus shorthand hashtag and cashtag filters.":"显式提及筛选,以及话题标签和股票标签简写筛选。","Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.":"在原始嵌套路径上执行字段限定词法搜索,包括点分对象路径和数组。","loading source {{scanned}}/{{total}}":"loading source {{scanned}}/{{total}}","source {{status}} {{scanned}}/{{total}}":"source {{status}} {{scanned}}/{{total}}","media {{count}}":"media {{count}}","loaded media {{count}}":"loaded media {{count}}","source rows {{scanned}}/{{total}} {{status}}":"source rows {{scanned}}/{{total}} {{status}}","source rows {{count}}":"source rows {{count}}","layout {{columns}} cols @ {{width}}px":"layout {{columns}} cols @ {{width}}px","original tweet attachments only":"original tweet attachments only","Loading media.":"Loading media.","Comfortable density":"Comfortable density","Compact density":"Compact density",Photo:"Photo",Video:"Video","Open tweet":"Open tweet","Export menu is open while remaining rows load in the background.":"Export menu is open while remaining rows load in the background.","Wait for records to finish loading before exporting.":"Wait for records to finish loading before exporting.","Exports stream from the active source without loading all rows into the table.":"Exports stream from the active source without loading all rows into the table.","Opens immediately and loads remaining rows in the background.":"Opens immediately and loads remaining rows in the background.","Export persisted bookmark search history":"Export persisted bookmark search history","latest: {{latest}}\napi-name: {{apiName}}\nid-only: {{idOnly}}\nnone: {{none}}":`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,"folder metadata: {{status}}":"folder metadata: {{status}}","Media export is disabled for large result sets until media export has a source-backed stream.":"Media export is disabled for large result sets until media export has a source-backed stream.","App options migrated from v{{oldVersion}} to v{{newVersion}}":"应用选项已从 v{{oldVersion}} 迁移到 v{{newVersion}}","Hooked into fetch":"已 hook fetch","Hooked into XMLHttpRequest (installed={{installed}})":"已 hook XMLHttpRequest(installed={{installed}})","Hook safe mode enabled ({{reason}})":"Hook 安全模式已启用({{reason}})","Hook repair failed ({{failures}}/{{limit}})":"Hook 修复失败({{failures}}/{{limit}})","Bookmark context tracking install failed; continuing without tracker ({{details}})":"书签上下文跟踪安装失败;将在没有跟踪器的情况下继续({{details}})","TWE_DIAG {{phase}}":"TWE_DIAG {{phase}}","{{module}}: {{count}} items received":"{{module}}:已收到 {{count}} 项","Exporting to ZIP file: {{filename}}":"正在导出到 ZIP 文件:{{filename}}","Exporting to {{format}} file: {{filename}}":"正在导出到 {{format}} 文件:{{filename}}","Streaming export to {{format}} file: {{filename}}":"正在流式导出到 {{format}} 文件:{{filename}}","Migration completed: {{users}} users and {{tweets}} tweets updated.":"迁移完成:已更新 {{users}} 个用户和 {{tweets}} 条推文。","TweetTombstone received (Reason: {{reason}})":"收到 TweetTombstone(原因:{{reason}})","Failed to hook into XMLHttpRequest":"hook XMLHttpRequest 失败","Fetch API not found, skipping fetch hooks":"未找到 Fetch API,跳过 fetch hooks","Fetch API base function unavailable or unsafe; enabling safe mode":"Fetch API 基础函数不可用或不安全;正在启用安全模式","Fetch hook base invocation failed; enabling safe mode":"Fetch hook 基础调用失败;正在启用安全模式","XHR send hook base invocation failed; enabling safe mode":"XHR send hook 基础调用失败;正在启用安全模式","XHR open hook base invocation failed; enabling safe mode":"XHR open hook 基础调用失败;正在启用安全模式","Fetch hook already installed":"Fetch hook 已安装","Debug mode enabled":"调试模式已启用","Database cleared":"数据库已清除","Upgrading database schema...":"正在升级数据库架构...","Database upgraded":"数据库已升级","Zip stream closed.":"ZIP 流已关闭。","Running migration_20250609: Migrating legacy user data format":"正在运行 migration_20250609:迁移旧版用户数据格式","TweetUnavailable received (Reason: unknown)":"收到 TweetUnavailable(原因:未知)","Empty tweet received":"收到空推文","Unknown tweet type received":"收到未知推文类型","Failed to extract tweet":"提取推文失败","Failed to export file":"导出文件失败","Failed to stream export file":"流式导出文件失败"}},pb={ar:nb,bn:rb,en:ob,es:ab,fr:ib,hi:sb,id:lb,ja:cb,"pt-BR":ub,ru:db,ur:fb,"zh-Hans":hb};var mb=Symbol.for("preact-signals");function Sl(){if(Co>1)Co--;else {for(var e,t=false;yi!==void 0;){var n=yi;for(yi=void 0,wu++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Bm(n))try{n.c();}catch(o){t||(e=o,t=true);}n=r;}}if(wu=0,Co--,t)throw e}}function gb(e){if(Co>0)return e();Co++;try{return e()}finally{Sl();}}var un=void 0,yi=void 0,Co=0,wu=0,Ys=0;function Nm(e){if(un!==void 0){var t=e.n;if(t===void 0||t.t!==un)return t={i:0,S:e,p:un.s,n:void 0,t:un,e:void 0,x:void 0,r:t},un.s!==void 0&&(un.s.n=t),un.s=t,e.n=t,32&un.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=un.s,t.n=void 0,un.s.n=t,un.s=t),t}}function Fn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0;}Fn.prototype.brand=mb;Fn.prototype.h=function(){return true};Fn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e);};Fn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n);}};Fn.prototype.subscribe=function(e){var t=this;return Cl(function(){var n=t.value,r=un;un=void 0;try{e(n);}finally{un=r;}})};Fn.prototype.valueOf=function(){return this.value};Fn.prototype.toString=function(){return this.value+""};Fn.prototype.toJSON=function(){return this.value};Fn.prototype.peek=function(){var e=un;un=void 0;try{return this.value}finally{un=e;}};Object.defineProperty(Fn.prototype,"value",{get:function(){var e=Nm(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(wu>100)throw new Error("Cycle detected");this.v=e,this.i++,Ys++,Co++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N();}finally{Sl();}}}});function Ha(e){return new Fn(e)}function Bm(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return true;return false}function Um(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $m(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r;}e.s=n;}function ja(e){Fn.call(this,void 0),this.x=e,this.s=void 0,this.g=Ys-1,this.f=4;}(ja.prototype=new Fn).h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===Ys))return true;if(this.g=Ys,this.f|=1,this.i>0&&!Bm(this))return this.f&=-2,true;var e=un;try{Um(this),un=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++);}catch(n){this.v=n,this.f|=16,this.i++;}return un=e,$m(this),this.f&=-2,true};ja.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t);}Fn.prototype.S.call(this,e);};ja.prototype.U=function(e){if(this.t!==void 0&&(Fn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t);}};ja.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N();}};Object.defineProperty(ja.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Nm(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ff(e){return new ja(e)}function Hm(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Co++;var n=un;un=void 0;try{t();}catch(r){throw e.f&=-2,e.f|=8,ud(e),r}finally{un=n,Sl();}}}function ud(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Hm(e);}function yb(e){if(un!==this)throw new Error("Out-of-order effect");$m(this),un=e,this.f&=-2,8&this.f&&ud(this),Sl();}function Hi(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32;}Hi.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t);}finally{e();}};Hi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Hm(this),Um(this),Co++;var e=un;return un=this,yb.bind(this,e)};Hi.prototype.N=function(){2&this.f||(this.f|=2,this.o=yi,yi=this);};Hi.prototype.d=function(){this.f|=8,1&this.f||ud(this);};function Cl(e){var t=new Hi(e);try{t.c();}catch(n){throw t.d(),n}return t.d.bind(t)}var pc;function qa(e,t){on[e]=t.bind(null,on[e]||function(){});}function Xs(e){pc&&pc(),pc=e&&e.S();}function jm(e){var t=this,n=e.data,r=rn(n);r.value=n;var o=Tt(function(){for(var a=t,i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}var s=Ff(function(){var c=r.value.value;return c===0?0:c===true?"":c||""}),l=Ff(function(){var c;return hu(s.value)||((c=t.base)==null?void 0:c.nodeType)!==3});return t.__$u.c=function(){var c;!hu(o.peek())&&((c=t.base)==null?void 0:c.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}));},Cl(function(){Pi||(Pi=this.N),this.N=Vm,l.value&&a.base&&(a.base.data=s.value);}),s},[]);return o.value}jm.displayName="_st";Object.defineProperties(Fn.prototype,{constructor:{configurable:true,value:void 0},type:{configurable:true,value:jm},props:{configurable:true,get:function(){return {data:this}}},__b:{configurable:true,value:1}});qa("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var a=r[o];a instanceof Fn&&(n||(t.__np=n={}),n[o]=a,r[o]=a.peek());}}e(t);});qa("__r",function(e,t){Xs();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(o){var a;return Cl(function(){a=this;}),a.c=function(){r.__$f|=1,r.setState({});},a})())),Xs(n),e(t);});qa("__e",function(e,t,n,r){Xs(),e(t,n,r);});qa("diffed",function(e,t){Xs();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var a=n.U;if(a)for(var i in a){var s=a[i];s!==void 0&&!(i in r)&&(s.d(),a[i]=void 0);}else n.U=a={};for(var l in r){var c=a[l],h=r[l];c===void 0?(c=_b(n,l,h,o),a[l]=c):c.o(h,o);}}}e(t);});function _b(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,a=Ha(n);return {o:function(i,s){a.value=i,r=s;},d:Cl(function(){Pi||(Pi=this.N),this.N=Vm;var i=a.value.value;r[t]!==i&&(r[t]=i,o?e[t]=i:i?e.setAttribute(t,i):e.removeAttribute(t));})}}qa("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var o in r){var a=r[o];a&&a.d();}}}}else {var i=t.__c;if(i){var s=i.__$u;s&&(i.__$u=void 0,s.d());}}e(t);});qa("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r);});Aa.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return true;for(var r in t)return true;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return true;for(var a in this.props)if(!(a in e))return true;return false};function rn(e){return Tt(function(){return Ha(e)},[])}var Pi,qm=[],wb=function(e){queueMicrotask(function(){queueMicrotask(e);});};function bb(){gb(function(){for(var e;e=qm.shift();)Pi.call(e);});}function Vm(){qm.push(this)===1&&(on.requestAnimationFrame||wb)(bb);}var vb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Os={exports:{}},kb=Os.exports,Of;function xb(){return Of||(Of=1,(function(e,t){(function(n,r){e.exports=r();})(kb,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",l="hour",c="day",h="week",f="month",m="quarter",g="year",_="date",b="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(X){var re=["th","st","nd","rd"],Z=X%100;return "["+X+(re[(Z-20)%10]||re[Z]||re[0])+"]"}},R=function(X,re,Z){var ce=String(X);return !ce||ce.length>=re?X:""+Array(re+1-ce.length).join(Z)+X},P={s:R,z:function(X){var re=-X.utcOffset(),Z=Math.abs(re),ce=Math.floor(Z/60),he=Z%60;return (re<=0?"+":"-")+R(ce,2,"0")+":"+R(he,2,"0")},m:function X(re,Z){if(re.date()<Z.date())return -X(Z,re);var ce=12*(Z.year()-re.year())+(Z.month()-re.month()),he=re.clone().add(ce,f),fe=Z-he<0,me=re.clone().add(ce+(fe?-1:1),f);return +(-(ce+(Z-he)/(fe?he-me:me-he))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return {M:f,y:g,w:h,d:c,D:_,h:l,m:s,s:i,ms:a,Q:m}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},L="en",D={};D[L]=T;var O="$isDayjsObject",B=function(X){return X instanceof U||!(!X||!X[O])},I=function X(re,Z,ce){var he;if(!re)return L;if(typeof re=="string"){var fe=re.toLowerCase();D[fe]&&(he=fe),Z&&(D[fe]=Z,he=fe);var me=re.split("-");if(!he&&me.length>1)return X(me[0])}else {var z=re.name;D[z]=re,he=z;}return !ce&&he&&(L=he),he||!ce&&L},x=function(X,re){if(B(X))return X.clone();var Z=typeof re=="object"?re:{};return Z.date=X,Z.args=arguments,new U(Z)},F=P;F.l=I,F.i=B,F.w=function(X,re){return x(X,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var U=(function(){function X(Z){this.$L=I(Z.locale,null,true),this.parse(Z),this.$x=this.$x||Z.x||{},this[O]=true;}var re=X.prototype;return re.parse=function(Z){this.$d=(function(ce){var he=ce.date,fe=ce.utc;if(he===null)return new Date(NaN);if(F.u(he))return new Date;if(he instanceof Date)return new Date(he);if(typeof he=="string"&&!/Z$/i.test(he)){var me=he.match(C);if(me){var z=me[2]-1||0,ue=(me[7]||"0").substring(0,3);return fe?new Date(Date.UTC(me[1],z,me[3]||1,me[4]||0,me[5]||0,me[6]||0,ue)):new Date(me[1],z,me[3]||1,me[4]||0,me[5]||0,me[6]||0,ue)}}return new Date(he)})(Z),this.init();},re.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds();},re.$utils=function(){return F},re.isValid=function(){return this.$d.toString()!==b},re.isSame=function(Z,ce){var he=x(Z);return this.startOf(ce)<=he&&he<=this.endOf(ce)},re.isAfter=function(Z,ce){return x(Z)<this.startOf(ce)},re.isBefore=function(Z,ce){return this.endOf(ce)<x(Z)},re.$g=function(Z,ce,he){return F.u(Z)?this[ce]:this.set(he,Z)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(Z,ce){var he=this,fe=!!F.u(ce)||ce,me=F.p(Z),z=function(V,se){var _e=F.w(he.$u?Date.UTC(he.$y,se,V):new Date(he.$y,se,V),he);return fe?_e:_e.endOf(c)},ue=function(V,se){return F.w(he.toDate()[V].apply(he.toDate("s"),(fe?[0,0,0,0]:[23,59,59,999]).slice(se)),he)},Ae=this.$W,ie=this.$M,Oe=this.$D,Le="set"+(this.$u?"UTC":"");switch(me){case g:return fe?z(1,0):z(31,11);case f:return fe?z(1,ie):z(0,ie+1);case h:var ee=this.$locale().weekStart||0,ne=(Ae<ee?Ae+7:Ae)-ee;return z(fe?Oe-ne:Oe+(6-ne),ie);case c:case _:return ue(Le+"Hours",0);case l:return ue(Le+"Minutes",1);case s:return ue(Le+"Seconds",2);case i:return ue(Le+"Milliseconds",3);default:return this.clone()}},re.endOf=function(Z){return this.startOf(Z,false)},re.$set=function(Z,ce){var he,fe=F.p(Z),me="set"+(this.$u?"UTC":""),z=(he={},he[c]=me+"Date",he[_]=me+"Date",he[f]=me+"Month",he[g]=me+"FullYear",he[l]=me+"Hours",he[s]=me+"Minutes",he[i]=me+"Seconds",he[a]=me+"Milliseconds",he)[fe],ue=fe===c?this.$D+(ce-this.$W):ce;if(fe===f||fe===g){var Ae=this.clone().set(_,1);Ae.$d[z](ue),Ae.init(),this.$d=Ae.set(_,Math.min(this.$D,Ae.daysInMonth())).$d;}else z&&this.$d[z](ue);return this.init(),this},re.set=function(Z,ce){return this.clone().$set(Z,ce)},re.get=function(Z){return this[F.p(Z)]()},re.add=function(Z,ce){var he,fe=this;Z=Number(Z);var me=F.p(ce),z=function(ie){var Oe=x(fe);return F.w(Oe.date(Oe.date()+Math.round(ie*Z)),fe)};if(me===f)return this.set(f,this.$M+Z);if(me===g)return this.set(g,this.$y+Z);if(me===c)return z(1);if(me===h)return z(7);var ue=(he={},he[s]=r,he[l]=o,he[i]=n,he)[me]||1,Ae=this.$d.getTime()+Z*ue;return F.w(Ae,this)},re.subtract=function(Z,ce){return this.add(-1*Z,ce)},re.format=function(Z){var ce=this,he=this.$locale();if(!this.isValid())return he.invalidDate||b;var fe=Z||"YYYY-MM-DDTHH:mm:ssZ",me=F.z(this),z=this.$H,ue=this.$m,Ae=this.$M,ie=he.weekdays,Oe=he.months,Le=he.meridiem,ee=function(se,_e,ke,Ze){return se&&(se[_e]||se(ce,fe))||ke[_e].slice(0,Ze)},ne=function(se){return F.s(z%12||12,se,"0")},V=Le||function(se,_e,ke){var Ze=se<12?"AM":"PM";return ke?Ze.toLowerCase():Ze};return fe.replace(v,(function(se,_e){return _e||(function(ke){switch(ke){case "YY":return String(ce.$y).slice(-2);case "YYYY":return F.s(ce.$y,4,"0");case "M":return Ae+1;case "MM":return F.s(Ae+1,2,"0");case "MMM":return ee(he.monthsShort,Ae,Oe,3);case "MMMM":return ee(Oe,Ae);case "D":return ce.$D;case "DD":return F.s(ce.$D,2,"0");case "d":return String(ce.$W);case "dd":return ee(he.weekdaysMin,ce.$W,ie,2);case "ddd":return ee(he.weekdaysShort,ce.$W,ie,3);case "dddd":return ie[ce.$W];case "H":return String(z);case "HH":return F.s(z,2,"0");case "h":return ne(1);case "hh":return ne(2);case "a":return V(z,ue,true);case "A":return V(z,ue,false);case "m":return String(ue);case "mm":return F.s(ue,2,"0");case "s":return String(ce.$s);case "ss":return F.s(ce.$s,2,"0");case "SSS":return F.s(ce.$ms,3,"0");case "Z":return me}return null})(se)||me.replace(":","")}))},re.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},re.diff=function(Z,ce,he){var fe,me=this,z=F.p(ce),ue=x(Z),Ae=(ue.utcOffset()-this.utcOffset())*r,ie=this-ue,Oe=function(){return F.m(me,ue)};switch(z){case g:fe=Oe()/12;break;case f:fe=Oe();break;case m:fe=Oe()/3;break;case h:fe=(ie-Ae)/6048e5;break;case c:fe=(ie-Ae)/864e5;break;case l:fe=ie/o;break;case s:fe=ie/r;break;case i:fe=ie/n;break;default:fe=ie;}return he?fe:F.a(fe)},re.daysInMonth=function(){return this.endOf(f).$D},re.$locale=function(){return D[this.$L]},re.locale=function(Z,ce){if(!Z)return this.$L;var he=this.clone(),fe=I(Z,ce,true);return fe&&(he.$L=fe),he},re.clone=function(){return F.w(this.$d,this)},re.toDate=function(){return new Date(this.valueOf())},re.toJSON=function(){return this.isValid()?this.toISOString():null},re.toISOString=function(){return this.$d.toISOString()},re.toString=function(){return this.$d.toUTCString()},X})(),Ce=U.prototype;return x.prototype=Ce,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",c],["$M",f],["$y",g],["$D",_]].forEach((function(X){Ce[X[1]]=function(re){return this.$g(re,X[0],X[1])};})),x.extend=function(X,re){return X.$i||(X(re,U,x),X.$i=true),x},x.locale=I,x.isDayjs=B,x.unix=function(X){return x(1e3*X)},x.en=D[L],x.Ls=D,x.p={},x}));})(Os)),Os.exports}var Sb=xb();const Fi=zm(Sb),bu="twe_diagnostic_capture_enabled_v1",Qs="__twe_diagnostic_parser_events_v1",Zs="__twe_diagnostic_db_events_v1",Js="__twe_diagnostic_interaction_events_v1",dd="twe:diagnostic-event-v1",Lf=500;function ji(){return globalThis}function Cb(e,t=false){try{if(typeof localStorage>"u")return t;const n=localStorage.getItem(e);return n===null?t:n==="1"||n==="true"}catch{return t}}function Tb(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(e,t?"1":"0");}catch{}}function fd(e,t){const n=ji(),r=Array.isArray(n[e])?n[e]:[];if(r.push(t),r.length>Lf&&r.splice(0,r.length-Lf),n[e]=r,typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(dd,{detail:{key:e}}));}catch{}}function kr(){const e=ji(),t=e.__twe_diagnostic_capture_enabled_v1;if(typeof t=="boolean")return t;const n=Cb(bu,false);return e.__twe_diagnostic_capture_enabled_v1=n,n}function Km(e){const t=ji();if(t.__twe_diagnostic_capture_enabled_v1=e,Tb(bu,e),typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(dd,{detail:{key:bu,enabled:e}}));}catch{}}function mc(e){kr()&&fd(Qs,e);}function Mb(e){kr()&&fd(Zs,e);}function Rb(e){kr()&&fd(Js,e);}function Ib(){const e=ji();return {parser:Array.isArray(e[Qs])?[...e[Qs]]:[],db:Array.isArray(e[Zs])?[...e[Zs]]:[],interaction:Array.isArray(e[Js])?[...e[Js]]:[]}}function Gm(){const e=ji();e[Qs]=[],e[Zs]=[],e[Js]=[];}const Nf={eventName:dd},el=Ha([]),Eb=200,Ab=400,Db="twe_console_info_v1",Wm="twe_console_verbose_v1";function vu(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function Pb(){try{if(vu(localStorage.getItem(Wm)))return !0}catch{}try{if(vu(localStorage.getItem(Db)))return !0}catch{}return false}function Ym(){try{return vu(localStorage.getItem(Wm))}catch{return false}}function Fb(){return kr()||Ym()?Ab:Eb}class Ob{constructor(){Ve(this,"index",0);Ve(this,"buffer",[]);Ve(this,"bufferTimer",null);}info(t,...n){Pb()&&console.info("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"info",line:t,index:this.index++});}warn(t,...n){console.warn("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"warn",line:t,index:this.index++});}error(t,...n){console.error("[twitter-web-exporter]",t,...n),this.writeBuffer({type:"error",line:t,index:this.index++});}errorWithBanner(t,n,...r){this.error(`${t} (Message: ${(n==null?void 0:n.message)??"none"})
This may be a problem caused by Twitter updates.
Please file an issue on GitHub:
https://github.com/kmccleary3301/scrollmark/issues`,...r);}debug(...t){Ym()&&console.debug("[twitter-web-exporter]",...t);}writeBuffer(t){this.buffer.push(t),this.bufferTimer&&clearTimeout(this.bufferTimer),this.bufferTimer=window.setTimeout(()=>{this.bufferTimer=null,this.flushBuffer();},0);}flushBuffer(){const t=[...el.value,...this.buffer],n=Fb();el.value=t.length>n?t.slice(t.length-n):t,this.buffer=[];}}const Ie=new Ob;function Lb(e){try{return JSON.parse(e)}catch(t){return Ie.error(t.message),null}}function $n(e){const t=rn(e),n=r=>{t.value=r;};return [t.value,n,t]}function ir(e=false){const t=rn(e),n=()=>{t.value=!t.value;};return [t.value,n,t]}function an(...e){return e.filter(Boolean).join(" ")}function Nb(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ha(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Bb(e){if(!e)return null;try{const t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.href}catch{return null}}function tl(e,t){if(!(t!=null&&t.length))return ha(e);let n=0,r="";const o=[...t].filter(a=>Array.isArray(a.indices)&&a.indices.length>=2).map(a=>({...a,start:Math.max(0,Number(a.indices[0])||0),end:Math.max(0,Number(a.indices[1])||0)})).filter(a=>a.end>a.start&&a.start<e.length).sort((a,i)=>a.start-i.start);for(const a of o){const i=Math.max(n,a.start),s=Math.min(e.length,a.end);i>n&&(r+=ha(e.slice(n,i)));const l=e.slice(i,s),c=Bb(a.expanded_url??a.url);c?r+=`<a class="link" target="_blank" rel="noopener noreferrer" href="${ha(c)}">${ha(a.display_url??l)}</a>`:r+=ha(l),n=s;}return n<e.length&&(r+=ha(e.slice(n))),r}function Na(e){if(!e)return Fi(0);const t=e.replace(/^\w+ (.*)$/,"$1");return Fi(t,"MMM DD HH:mm:ss ZZ YYYY","en")}function Ir(e,t){return (typeof e=="number"||typeof e=="string")&&(e=Fi(e)),e.format(t)}function Bf(e){if(!e)return null;const{day:t,month:n,year:r}=e,o=Fi().set("year",r??0).set("month",n-1).set("date",t);return r?o.format("MMM DD, YYYY"):o.format("MMM DD")}function Xm(e){if(typeof e!="number"||Number.isNaN(e))return "N/A";const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return `${n}:${r.toString().padStart(2,"0")}`}const Ub="scrollmark",$b="Scrollmark: local-first X/Twitter research archive, search, and portable bundle export.",Hb="1.2.0",jb="Kyle McCleary",qb="MIT",Vb="https://github.com/kmccleary3301/scrollmark",zb="https://github.com/kmccleary3301/scrollmark/issues",Kb="module",Gb={clean:"rm -rf dist",dev:"vite",build:"tsc && vite build","build:store":"tsc && SCROLLMARK_BUILD_TARGET=store vite build","build:e2e":"tsc && TWE_BUILD_VARIANT=e2e vite build","build:chrome-e2e":"tsc && TWE_BUILD_VARIANT=chrome-e2e vite build","sync:store-artifact":"mkdir -p store && cp dist/scrollmark.store.user.js store/scrollmark.user.js","build:all":"npm run clean && npm run build && npm run build:store && npm run sync:store-artifact && npm run build:e2e && npm run build:chrome-e2e",prepare:"husky",lint:"eslint .","check:metadata":"node scripts/check-userscript-metadata.mjs","perf:large-count-smoke":"node scripts/large-count-smoke.mjs","test:result-source-contract":"tsx e2e/perf/result_source_contract_harness.ts","test:export-stream-integrity":"tsx e2e/perf/export_stream_integrity_harness.ts","test:db-source-live":"tsx e2e/perf/db_source_live_harness.ts","test:db-migration-compat":"tsx e2e/perf/db_migration_compat_harness.ts","test:write-indexing-regression":"tsx e2e/perf/write_indexing_regression_harness.ts","test:synthetic-seed-matrix":"tsx e2e/perf/synthetic_seed_matrix_harness.ts","test:recovered-db-import":"tsx e2e/perf/recovered_db_import_harness.ts","test:recovered-db-browser":"node e2e/perf/recovered_db_browser_harness.mjs","test:bookmarks-strict-folder":"tsx e2e/perf/bookmarks_strict_folder_harness.ts","test:result-set-lookup":"tsx e2e/perf/result_set_lookup_harness.ts","test:search-phrase-quality":"tsx e2e/perf/search_phrase_quality_harness.ts","test:search-performance":"tsx e2e/perf/search_performance_harness.ts","test:app-diagnostics-smoke":"node e2e/perf/app_diagnostics_smoke.mjs","test:search-threshold-guard":"tsx e2e/perf/search_threshold_guard_harness.ts","test:search-threshold-app":"node e2e/perf/search_threshold_app_harness.mjs","test:search-cancellation-app":"node e2e/perf/search_cancellation_app_harness.mjs","test:deep-scroll-app":"node e2e/perf/deep_scroll_app_harness.mjs","test:variable-height-table":"node e2e/perf/variable_height_table_harness.mjs","test:small-dataset-workflow":"node e2e/perf/small_dataset_workflow_harness.mjs","test:folder-source-stress":"node e2e/perf/folder_source_stress_harness.mjs","test:media-masonry-app":"node e2e/perf/media_masonry_app_harness.mjs","test:export-memory-app":"node e2e/perf/export_memory_app_harness.mjs","test:export-modal-app":"node e2e/perf/export_modal_app_harness.mjs",commitlint:"commitlint --edit",changelog:"git-cliff -o CHANGELOG.md",preview:"vite preview"},Wb={"@preact/signals":"2.0.0","@preact/signals-core":"1.8.0","@tabler/icons-preact":"3.31.0","@tanstack/table-core":"8.21.2",dayjs:"1.11.13",dexie:"4.0.11","dexie-export-import":"4.1.4",fflate:"^0.8.2","file-saver-es":"2.0.5",i18next:"24.2.3",preact:"10.26.4"},Yb={"@commitlint/cli":"^19.8.0","@commitlint/config-conventional":"^19.8.0","@eslint/js":"^9.23.0","@preact/preset-vite":"^2.10.1","@types/file-saver-es":"^2.0.3","@types/node":"^22.14.0",autoprefixer:"^10.4.21",daisyui:"^4",eslint:"^9.23.0","eslint-config-prettier":"^10.1.1","eslint-plugin-prettier":"^5.2.6","fake-indexeddb":"^6.2.5","git-cliff":"^2.8.0",husky:"^9.1.7",playwright:"^1.60.0",postcss:"^8.5.3","postcss-prefix-selector":"^2.1.1","postcss-rem-to-pixel-next":"^5.0.3",tailwindcss:"^3",tsx:"^4.22.2",typescript:"^5.8.2","typescript-eslint":"^8.29.0",vite:"^6.2.5","vite-plugin-i18next-loader":"^3.1.2","vite-plugin-monkey":"^5.0.8"},vr={name:Ub,description:$b,version:Hb,author:jb,license:qb,homepage:Vb,bugs:zb,private:true,type:Kb,scripts:Gb,dependencies:Wb,devDependencies:Yb},Ls={theme:"system",debug:false,showControlPanel:true,disabledExtensions:["HomeTimelineModule"],dateTimeFormat:"YYYY-MM-DD HH:mm:ss Z",filenamePattern:"{screen_name}_{id}_{type}_{num}_{date}.{ext}",language:"",dedicatedDbForAccounts:false,safeMode:false,hookMode:"both",repairMode:"watchdog",directMessagesCaptureEnabled:false,rawCaptureEncryptedStorageReady:false,rawCapturePolicyPublicEnabled:true,rawCapturePolicySensitiveEnabled:true,rawCapturePolicyDmEnabled:true,rawCaptureEnabled:true,rawCaptureStreamEnabled:false,rawCaptureDaemonUrl:"http://127.0.0.1:8754",version:vr.version},Xb=["system","cupcake","dark","emerald","cyberpunk","valentine","lofi","dracula","cmyk","business","winter"],Uf=vr.name,Qb=new Set(["RetweetersModule","ListTimelineModule","ListSubscribersModule","ListMembersModule","CommunityMembersModule","CommunityTimelineModule"]);function $f(e){const n=(Array.isArray(e)?e.filter(r=>typeof r=="string"):[]).filter(r=>!Qb.has(r));return Array.from(new Set(n))}class Zb{constructor(){Ve(this,"appOptions",{...Ls});Ve(this,"previous",{...Ls});Ve(this,"signal",new Fn(0));this.loadAppOptions();}get(t,n){return this.appOptions[t]??n}set(t,n){this.appOptions[t]=n,this.saveAppOptions();}loadAppOptions(){this.appOptions={...this.appOptions,...Lb(localStorage.getItem(Uf)||"{}")},this.appOptions.disabledExtensions=$f(this.appOptions.disabledExtensions);const t=this.appOptions.version??"",n=Ls.version;n.startsWith("1.1")&&t.startsWith("1.0")&&(this.appOptions.disabledExtensions=[...$f(this.appOptions.disabledExtensions),"HomeTimelineModule","ListTimelineModule"],Ie.info(`App options migrated from v${t} to v${n}`),setTimeout(()=>this.saveAppOptions(),0)),this.previous={...this.appOptions},Ie.info("App options loaded",this.appOptions),this.signal.value++;}saveAppOptions(){const t=this.previous,n={...this.appOptions,version:vr.version};Nb(t,n)||(this.appOptions=n,localStorage.setItem(Uf,JSON.stringify(this.appOptions)),this.previous={...this.appOptions},Ie.debug("App options saved",this.appOptions),this.signal.value++);}}const ut=new Zb,Qm={en:{name:"English",nameEn:"English",test:e=>/^en/.test(e)},"zh-Hans":{name:"简体中文",nameEn:"Simplified Chinese",test:e=>/^zh/.test(e)},es:{name:"Español",nameEn:"Spanish",test:e=>/^es/.test(e)},hi:{name:"हिन्दी",nameEn:"Hindi",test:e=>/^hi/.test(e)},fr:{name:"Français",nameEn:"French",test:e=>/^fr/.test(e)},ar:{name:"العربية",nameEn:"Arabic",test:e=>/^ar/.test(e)},bn:{name:"বাংলা",nameEn:"Bengali",test:e=>/^bn/.test(e)},"pt-BR":{name:"Português (Brasil)",nameEn:"Portuguese",test:e=>/^pt/.test(e)},ru:{name:"Русский",nameEn:"Russian",test:e=>/^ru/.test(e)},ur:{name:"اردو",nameEn:"Urdu",test:e=>/^ur/.test(e)},id:{name:"Bahasa Indonesia",nameEn:"Indonesian",test:e=>/^id/.test(e)},ja:{name:"日本語",nameEn:"Japanese",test:e=>/^ja/.test(e)}};function Zm(){const e=window.navigator.language||"en";for(const[t,n]of Object.entries(Qm))if(n.test(e))return t;return e}const Jb={type:"languageDetector",detect:function(){return ut.get("language")||Zm()}},ev="twe_i18n_debug_v1";function tv(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function nv(){try{return tv(localStorage.getItem(ev))}catch{return false}}function rv(){return En.isInitialized||(En.on("languageChanged",e=>{ut.get("language")||ut.set("language",e);}),En.use(Jb).init({initImmediate:true,defaultNS:"common",fallbackLng:"en",nsSeparator:"::",interpolation:{escapeValue:false},debug:nv(),resources:pb})),En}function Qn(e){const t=rv(),[n,r]=Ne(()=>t.getFixedT(null,e??null)),o=kt(true),a=kt(e);return it(()=>{o.current=true,a.current!==e&&(a.current=e,r(()=>t.getFixedT(null,e??null)));function i(){o.current&&r(()=>t.getFixedT(null,e??null));}return t.on("languageChanged",i),()=>{o.current=false,t.off("languageChanged",i);}},[e]),{t:n,i18n:t}}function pt({i18nKey:e,ns:t="exporter"}){const{t:n}=Qn(t);return d("span",{children:n(e)})}class _i extends Aa{constructor(){super(...arguments);Ve(this,"state",{error:null});}static getDerivedStateFromError(n){return {error:n.message}}componentDidCatch(n){Ie.error(n.message,n),this.setState({error:n.message});}render(){return this.state.error?d("div",{class:"alert alert-error p-2",children:[d(gw,{}),d("div",{children:[d("h3",{class:"font-bold leading-normal",children:d(pt,{ns:"common",i18nKey:"Something went wrong."})}),d("p",{class:"text-xs",children:[d(pt,{ns:"common",i18nKey:"Error:"})," ",this.state.error]})]})]}):this.props.children}}var nl=typeof GM_registerMenuCommand<"u"?GM_registerMenuCommand:void 0,ov=typeof unsafeWindow<"u"?unsafeWindow:void 0;class av{dispatch(t,n,r){t.filter(o=>o.enabled).forEach(o=>{try{const a=o.intercept();if(!a)return;const i=Date.now();mc({ts:i,extension:o.name,phase:"claimed",request_id:n.requestId,method:n.method,url:n.url,status:r.status}),a(n,r,o),mc({ts:Date.now(),extension:o.name,phase:"completed",request_id:n.requestId,method:n.method,url:n.url,status:r.status,duration_ms:Math.max(0,Date.now()-i)});}catch(a){mc({ts:Date.now(),extension:o.name,phase:"error",request_id:n.requestId,method:n.method,url:n.url,status:r.status,error:a instanceof Error?a.message:String(a)}),Ie.error(`Interceptor error (${o.name}):`,a);}});}}const iv="twe_safe_mode_v1",sv="twe_hook_mode_v1",lv="twe_repair_mode_v1",cv="twe_debug_disable_xhr_open_wrap_v1",uv="twe_debug_disable_xhr_send_wrap_v1",dv="twe_debug_disable_xhr_load_listener_v1",fv="twe_debug_disable_fetch_wrap_v1",hv="twe_debug_disable_expando_meta_v1",pv="twe_debug_force_call_not_apply_v1",mv="twe_debug_hook_diag_v1",gv="twe_console_verbose_v1",yv=6,Hf=1100,_v=6e4,jf=5;function wv(e){return e==="xhr"||e==="fetch"||e==="off"?e:"both"}function bv(e){return e==="off"?"off":"watchdog"}function po(e){try{return typeof localStorage>"u"?null:localStorage.getItem(e)}catch{return null}}function gc(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(e,t);}catch{}}function mo(e){if(!e)return false;const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"}function qf(){const e=mo(po(mv)),t=mo(po(gv));return {disableXhrOpenWrap:mo(po(cv)),disableXhrSendWrap:mo(po(uv)),disableXhrLoadListener:mo(po(dv)),disableFetchWrap:mo(po(fv)),disableExpandoMeta:mo(po(hv)),forceCallNotApply:mo(po(pv)),hookDiag:e&&t}}function Vf(){const e=!!ut.get("safeMode",false),t=wv(ut.get("hookMode","both")),n=bv(ut.get("repairMode","watchdog"));return {safeMode:e,hookMode:t,repairMode:n}}class vv{constructor(t){Ve(this,"runtimeModes",Vf());Ve(this,"hookDebugConfig",qf());Ve(this,"hookDiagCounters",Object.create(null));Ve(this,"runtimeModeReason","");Ve(this,"hookRepairInterval",null);Ve(this,"hookBootProbeTimeout",null);Ve(this,"hookRepairBackoffMs",Hf);Ve(this,"hookRepairFailures",0);this.host=t;}initialize(){if(this.refreshRuntimeModes(),this.runtimeModes.hookMode!=="off")try{this.host.installPageMessageBridge();}catch(t){this.enableSafeMode("install-page-message-bridge-failed",t);}if(!this.runtimeModes.safeMode&&this.runtimeModes.hookMode!=="off")try{this.host.installBookmarkContextTracking();}catch(t){const n=t instanceof Error?`${t.name}: ${t.message}`:`unknown error: ${String(t)}`;Ie.warn(`Bookmark context tracking install failed; continuing without tracker (${n})`);}try{this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks();const t=this.host.runHookSelfTest();t.ok?!this.runtimeModes.safeMode&&this.runtimeModes.repairMode!=="off"&&this.startHookRepairLoop():this.enableSafeMode("hook-self-test-failed",t.error),this.runtimeModes.safeMode||this.startFetchHookBootProbe();}catch(t){this.enableSafeMode("hook-install-failed",t);}}dispose(){this.clearHookRepairLoop(),this.clearFetchHookBootProbe(),this.host.uninstallHooks();}applyRuntimeModesFromOptions(){const t={...this.runtimeModes};this.refreshRuntimeModes();const n=this.runtimeModes;if(!(t.safeMode===n.safeMode&&t.hookMode===n.hookMode&&t.repairMode===n.repairMode)){if(n.safeMode||(this.runtimeModeReason=""),n.hookMode==="off"){this.host.uninstallHooks(),this.clearHookRepairLoop(),this.clearFetchHookBootProbe();return}if(n.safeMode){this.host.uninstallHooks(),this.clearHookRepairLoop(),this.clearFetchHookBootProbe();try{this.host.installPageMessageBridge(),this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(!0),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks(!0);}catch(r){Ie.warn("Failed to reconfigure lightweight safe mode hooks",r??"");}return}try{this.host.installPageMessageBridge(),this.host.installBookmarkContextTracking(),this.isHookModeEnabled("xhr")&&this.host.installHttpHooks(!0),this.isHookModeEnabled("fetch")&&this.host.installFetchHooks(!0);const r=this.host.runHookSelfTest();if(!r.ok){this.runtimeModeReason="hook-self-test-failed",Ie.warn("Hook self-test failed after runtime reconfigure",r.error??""),this.publishRuntimeModes({enabledAt:Date.now(),error:r.error?String(r.error):void 0});return}this.runtimeModes.repairMode!=="off"?this.startHookRepairLoop():this.clearHookRepairLoop(),this.startFetchHookBootProbe();}catch(r){this.enableSafeMode("hook-reconfigure-failed",r);}}}getRuntimeModesSnapshot(){return {safeMode:this.runtimeModes.safeMode,hookMode:this.runtimeModes.hookMode,repairMode:this.runtimeModes.repairMode,reason:this.runtimeModeReason||void 0}}getHookStatsSnapshot(){return this.host.readHookStatsSnapshot()}getRuntimeModes(){return this.runtimeModes}getHookDebugConfig(){return this.hookDebugConfig}refreshHookDebugConfig(){this.hookDebugConfig=qf();}isHookModeEnabled(t){return this.runtimeModes.hookMode==="off"?false:this.runtimeModes.hookMode==="both"?true:this.runtimeModes.hookMode===t}emitHookDiag(t,n,r){const o=!!(r!=null&&r.force);if(!this.hookDebugConfig.hookDiag)return;const a=(this.hookDiagCounters[t]??0)+1;this.hookDiagCounters[t]=a,!(!o&&a>yv)&&Ie.info(`TWE_DIAG ${t}`,{...n,count:a,safeMode:this.runtimeModes.safeMode,hookMode:this.runtimeModes.hookMode,repairMode:this.runtimeModes.repairMode,forceCallNotApply:this.hookDebugConfig.forceCallNotApply,disableExpandoMeta:this.hookDebugConfig.disableExpandoMeta,ts:Date.now()});}enableSafeMode(t,n){this.clearFetchHookBootProbe(),this.runtimeModes.safeMode=true,this.runtimeModeReason=t,this.persistRuntimeModes(),this.publishRuntimeModes({enabledAt:Date.now(),error:n?String(n):void 0}),this.host.uninstallHooks(),this.clearHookRepairLoop(),Ie.error(`Hook safe mode enabled (${t})`,n??"");}startFetchHookBootProbe(t=1200){this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch")||(this.clearFetchHookBootProbe(),this.hookBootProbeTimeout=setTimeout(()=>{this.hookBootProbeTimeout=null,!(this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch"))&&this.host.runFetchHookBootProbePass();},t));}startHookRepairLoop(){if(this.runtimeModes.safeMode||this.runtimeModes.repairMode==="off"||this.hookRepairInterval!==null)return;const t=r=>{this.hookRepairInterval=setTimeout(()=>{this.hookRepairInterval=null,n();},r);},n=()=>{if(!(this.runtimeModes.safeMode||this.runtimeModes.repairMode==="off")){try{const r=this.host.runHookRepairPass();if(!r.ok){this.enableSafeMode("hook-repair-self-test-failed",r.error);return}this.hookRepairFailures=0,this.hookRepairBackoffMs=Hf;}catch(r){if(this.hookRepairFailures+=1,this.hookRepairBackoffMs=Math.min(this.hookRepairBackoffMs*2,_v),Ie.warn(`Hook repair failed (${this.hookRepairFailures}/${jf})`,r),this.hookRepairFailures>=jf){this.enableSafeMode("hook-repair-failure-limit",r);return}}t(this.hookRepairBackoffMs);}};t(0);}clearHookRepairLoop(){this.hookRepairInterval!==null&&(clearTimeout(this.hookRepairInterval),this.hookRepairInterval=null);}clearFetchHookBootProbe(){this.hookBootProbeTimeout!==null&&(clearTimeout(this.hookBootProbeTimeout),this.hookBootProbeTimeout=null);}persistRuntimeModes(){gc(iv,this.runtimeModes.safeMode?"1":"0"),gc(sv,this.runtimeModes.hookMode),gc(lv,this.runtimeModes.repairMode);try{ut.set("safeMode",this.runtimeModes.safeMode),ut.set("hookMode",this.runtimeModes.hookMode),ut.set("repairMode",this.runtimeModes.repairMode);}catch{}}publishRuntimeModes(t){}refreshRuntimeModes(){this.runtimeModes=Vf(),this.refreshHookDebugConfig(),this.persistRuntimeModes(),this.publishRuntimeModes();}}function Jm(){try{return ov??null}catch{return null}}function eg(e){try{const t=e;return !(t!=null&&t.wrappedJSObject)||typeof t.wrappedJSObject!="object"?null:t.wrappedJSObject}catch{return null}}let us=null;function wi(){if(us)return us;const e=Jm();return us=eg(e)??e??(typeof window<"u"?window:null)??globalThis,us}const Rn=new Proxy({},{get(e,t){const n=wi();return Reflect.get(n,t,n)},set(e,t,n){const r=wi();return Reflect.set(r,t,n,r)}});function tg(){try{return globalThis.exportFunction}catch{return}}const kv="__twe_mcp_hook_v1",Br="__twe_orig_xhr_open_v1",Ur="__twe_orig_xhr_send_v1",pa="__twe_orig_fetch_v1",xv="__twe_bootstrap_error_v1",bi=45e3,Sv=18e4,Cv=6,Tv=12,ng=200,so=3,Mv="twitter-web-exporter-extension-manager-v1",Rv=3,rg=2600,Iv=500,Ev=120;function Av(){const e=Jm();return {hasUnsafeWindow:!!e,hasWrappedJSObject:!!eg(e),hasExportFunction:!!tg()}}function Dv(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return (t>>>0).toString(16)}function Pv(e,t,n,r){return `${e.toUpperCase()} ${t} ${n} ${Dv(r)}`}function Fv(e){const t=Date.now();if(e.size<=Iv)return;const n=[...e.entries()].filter(([,r])=>t-r.at>rg).sort((r,o)=>r[1].at-o[1].at);for(const[r]of n.slice(0,Ev))e.delete(r);}function yc(e){return {xhrMessages:0,fetchMessages:0,lastUrl:"",lastAt:0,loggedUrls:0,messagesTotal:0,messagesLegacyShape:0,messagesMissingContext:0,messagesRepairedAtBridge:0,messagesMissingBody:0,responsesProcessed:0,responsesSkippedDuplicate:0,lastMessageAt:0,activeInstanceId:e,rev:so,repairCount:0,endpointStats:Object.create(null)}}let jr={folderId:null,pageUrl:"",source:"startup",capturedAt:0},hd=null,zf=[];const ku=new WeakMap;function Ov(){return {method:"GET",url:"",body:"",requestId:"",bookmarkContext:null,hooked:false}}function Lv(e){const t=ku.get(e);if(t)return t;const n=Ov();return ku.set(e,n),n}function _c(e,t){if(t.disableExpandoMeta)return Lv(e);const n=typeof e.__twe_req_method_v1=="string"?e.__twe_req_method_v1:"GET",r=typeof e.__twe_req_url_v1=="string"?e.__twe_req_url_v1:"",o=typeof e.__twe_req_body_v1=="string"?e.__twe_req_body_v1:"",a=typeof e.__twe_req_id_v1=="string"?e.__twe_req_id_v1:"",i=e.__twe_req_bookmark_context_v1&&typeof e.__twe_req_bookmark_context_v1=="object"?e.__twe_req_bookmark_context_v1:null,s=!!e.__twe_hooked_v1;return {method:n,url:r,body:o,requestId:a,bookmarkContext:i,hooked:s}}function wc(e,t,n){if(t.disableExpandoMeta){ku.set(e,n);return}e.__twe_req_method_v1=n.method,e.__twe_req_url_v1=n.url,e.__twe_req_body_v1=n.body,e.__twe_req_id_v1=n.requestId,e.__twe_req_bookmark_context_v1=n.bookmarkContext,e.__twe_hooked_v1=n.hooked;}function bc(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2]);case 4:return e.call(t,n[0],n[1],n[2],n[3]);default:return e.call(t,n[0],n[1],n[2],n[3],n[4])}}function Nv(e,t,n){const r=n instanceof Error?`${n.name}: ${n.message}`:String(n),o=n instanceof Error?n.stack:void 0;return {message:r,stack:o,phase:e,instanceId:t,at:Date.now()}}function Bv(){try{((t,n)=>{t&&typeof t=="object"&&delete t[n];})(globalThis,xv);}catch{}}function Uv(e,t){if(!e||typeof e!="object")return t;const n=e;return {...n,xhrMessages:Number(n.xhrMessages)||0,fetchMessages:Number(n.fetchMessages)||0,lastUrl:typeof n.lastUrl=="string"?n.lastUrl:"",lastAt:Number(n.lastAt)||0,loggedUrls:Number(n.loggedUrls)||0,messagesTotal:Number(n.messagesTotal)||0,messagesLegacyShape:Number(n.messagesLegacyShape)||0,messagesMissingContext:Number(n.messagesMissingContext)||0,messagesRepairedAtBridge:Number(n.messagesRepairedAtBridge)||0,messagesMissingBody:Number(n.messagesMissingBody)||0,responsesProcessed:Number(n.responsesProcessed)||0,responsesSkippedDuplicate:Number(n.responsesSkippedDuplicate)||0,lastMessageAt:Number(n.lastMessageAt)||0,activeInstanceId:typeof n.activeInstanceId=="string"?n.activeInstanceId:t.activeInstanceId,rev:Number(n.rev)||so,repairCount:Number(n.repairCount)||0,endpointStats:n.endpointStats||Object.create(null)}}function $v(e){if(typeof e!="function")return "";try{return Function.prototype.toString.call(e)}catch{return ""}}function ma(e,t){if(!e||typeof e!="function")return false;const n=e;return n[t]?n.__twe_is_hook_revision_v1===so:false}function rl(e,t){if(!e||typeof e!="function")return false;const n=e;if(n.__twe_is_hook_open_v1||n.__twe_is_hook_send_v1||n.__twe_is_hook_fetch_v1||n.__twe_orig_xhr_open_v1||n.__twe_orig_xhr_send_v1||n.__twe_orig_fetch_v1||t&&n[t])return true;const r=$v(e);return r?r.includes("__twe_mcp_hook_v1")||r.includes("__twe_is_hook_open_v1")||r.includes("__twe_is_hook_send_v1")||r.includes("__twe_is_hook_fetch_v1")||r.includes("__twe_is_hook_revision_v1")||r.includes("__twe_orig_xhr_open_v1")||r.includes("__twe_orig_xhr_send_v1")||r.includes("__twe_orig_fetch_v1")||r.includes("__twe_req_body_v1")||r.includes("__twe_req_url_v1")||r.includes("__twe_req_bookmark_context_v1"):false}const og=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;let Kf=0;function Ca(){return Kf+=1,`${og}-${Kf}`}function Hv(e){var n,r,o,a,i,s,l,c;if(!Array.isArray(e))return [];const t=[];for(const h of e){const f=h;f&&typeof f.requestId=="string"&&typeof f.ts=="number"&&typeof f.url=="string"&&t.push({requestId:f.requestId,ts:f.ts,method:typeof f.method=="string"?f.method:"GET",url:f.url,hasBody:!!f.hasBody,confidenceSource:typeof f.confidenceSource=="string"&&f.confidenceSource?f.confidenceSource:typeof((n=f.context)==null?void 0:n.source)=="string"?f.context.source:"unknown",context:{folderId:typeof((r=f.context)==null?void 0:r.folderId)=="string"?f.context.folderId:null,pageUrl:typeof((o=f.context)==null?void 0:o.pageUrl)=="string"?f.context.pageUrl:"",source:typeof((a=f.context)==null?void 0:a.source)=="string"?f.context.source:"unknown",capturedAt:typeof((i=f.context)==null?void 0:i.capturedAt)=="number"?f.context.capturedAt:Date.now(),requestId:typeof((s=f.context)==null?void 0:s.requestId)=="string"?f.context.requestId:void 0,routeSource:typeof((l=f.context)==null?void 0:l.routeSource)=="string"?f.context.routeSource:void 0,pageRouteUrl:typeof((c=f.context)==null?void 0:c.pageRouteUrl)=="string"?f.context.pageRouteUrl:void 0},normalizedRoute:typeof f.normalizedRoute=="string"?f.normalizedRoute:""});}return t.sort((h,f)=>f.ts-h.ts).slice(0,ng)}function jv(e){var s,l,c,h,f,m,g,_;const t=Date.now(),n={requestId:e.requestId||`${og}-${t}`,ts:Number.isFinite(e.ts)?e.ts:t,method:e.method||"GET",url:e.url||"",hasBody:!!e.hasBody,confidenceSource:typeof e.confidenceSource=="string"&&e.confidenceSource?e.confidenceSource:((s=e.context)==null?void 0:s.source)||"unknown",context:{folderId:((l=e.context)==null?void 0:l.folderId)??null,pageUrl:((c=e.context)==null?void 0:c.pageUrl)||"",source:((h=e.context)==null?void 0:h.source)||"unknown",capturedAt:Number.isFinite((f=e.context)==null?void 0:f.capturedAt)?e.context.capturedAt:t,requestId:(m=e.context)==null?void 0:m.requestId,routeSource:(g=e.context)==null?void 0:g.routeSource,pageRouteUrl:(_=e.context)==null?void 0:_.pageRouteUrl},normalizedRoute:e.normalizedRoute||""},r=Hv(zf);r.unshift(n);const o=new Map;for(const b of r)o.has(b.requestId)||o.set(b.requestId,b);const a=Array.from(o.values()).slice(0,ng).sort((b,C)=>C.ts-b.ts),i=Date.now()-bi*6;zf=a.filter(b=>!i||b.ts>=i);}function qv(e){const t={folderId:e.folderId,pageUrl:e.pageUrl||"",source:e.source||"lock",capturedAt:e.capturedAt||Date.now(),requestId:e.requestId,routeSource:e.routeSource,pageRouteUrl:e.pageRouteUrl};t.folderId&&(hd=t);}function Vv(e=Date.now()){const t=[hd];for(const n of t){if(!n||typeof n!="object")continue;const r=n;if(typeof r.folderId!="string"||!r.folderId)continue;const o=typeof r.capturedAt=="number"&&Number.isFinite(r.capturedAt)?r.capturedAt:0;if(!(!o||e-o>Sv))return {folderId:r.folderId,pageUrl:typeof r.pageUrl=="string"?r.pageUrl:"",source:typeof r.source=="string"?r.source:"lock",capturedAt:o,requestId:typeof r.requestId=="string"?r.requestId:void 0,routeSource:typeof r.routeSource=="string"?r.routeSource:void 0,pageRouteUrl:typeof r.pageRouteUrl=="string"?r.pageRouteUrl:void 0}}return null}function zv(){hd=null;}function ag(e){return Ro(e)||{folderId:null,pageUrl:e}}function Ho(e,t){if(typeof e=="function")try{const n=e;n[t]=!0,n.__twe_is_hook_revision_v1=so;}catch{}}function ig(e){const t=e,n={method:typeof t.method=="string"?t.method:"GET",url:typeof t.url=="string"?t.url:""};return typeof t.body=="string"&&(n.body=t.body),t.bookmarkContext!==void 0&&(n.bookmarkContext=t.bookmarkContext),n.bookmarkContext===void 0&&t.requestContext!==void 0&&(n.bookmarkContext=t.requestContext),typeof t.requestId=="string"&&t.requestId&&(n.requestId=t.requestId),typeof t.__twe_hook_revision_v1=="number"&&Number.isFinite(t.__twe_hook_revision_v1)&&(n.hookRevision=t.__twe_hook_revision_v1),n}function Ns(e){const t=ig(e),n=typeof t.requestId=="string"&&t.requestId.trim().length>0?t.requestId:Ca(),r=typeof t.method=="string"&&t.method?t.method:"GET",o=typeof t.url=="string"?t.url:"",a=typeof t.body=="string"?t.body:"",i=Tl(t.bookmarkContext,{requestId:n,hasBody:a.length>0});return {method:r,url:o,body:a,bookmarkContext:i,requestId:n,hookRevision:so,__twe_hook_revision_v1:so}}function Kv(e){if(!e||typeof e!="object")return null;const t=e;return t.req&&typeof t.req=="object"?t.req:t}function Gv(e){if(!e||typeof e!="object")return null;const t=e,n=t.req;return typeof t.__twe_msg_revision_v1=="number"?Number(t.__twe_msg_revision_v1):n&&typeof n=="object"&&typeof n.__twe_hook_revision_v1=="number"?Number(n.__twe_hook_revision_v1):null}function Gf(){return {received:0,processed:0,skippedDuplicate:0,newUniqueTweets:0,legacyShape:0,missingContext:0,lastAt:0,lastStatus:0,lastUrl:""}}function Wv(e){try{const n=new URL(e,"https://x.com").pathname.toLowerCase(),r=n.match(/\/graphql\/[^/]+\/([^/?#]+)/);if(r!=null&&r[1])return `graphql:${r[1]}`;const o=n.match(/\/i\/api\/1\.1\/([^/?#]+)/);if(o!=null&&o[1])return `api:${o[1]}`}catch{}return "other"}function Yv(e){const t=new Set,n=/"rest_id"\s*:\s*"(\d{10,})"/g;for(;;){const r=n.exec(e);if(!r)break;r[1]&&t.add(r[1]);}return t.size}function Wf(e){try{if(!e)return;if(typeof e=="string")return e;if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams)return e.toString();if(typeof FormData<"u"&&e instanceof FormData)try{return [...e.entries()].map(([n,r])=>`${n}=${String(r).slice(0,200)}`).join("&")}catch{return}return typeof Blob<"u"&&e instanceof Blob?`blob:${e.type||"application/octet-stream"}:${e.size}`:void 0}catch{return}}function Ro(e){try{const t=new URL(e,"https://x.com"),n=t.pathname.match(/\/bookmarks\/(\d+)/);return {folderId:(n==null?void 0:n[1])??null,pageUrl:t.href}}catch{return null}}function sg(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return /^\d+$/.test(n)?n:null}if(typeof e!="string")return null;const t=e.trim();return /^\d+$/.test(t)?t:null}function Xv(e){const t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return /^(bookmarkcollectionid|bookmarkfolderid|bookmarkcollection|folderid|collectionid|bookmarkfolder|bookmarkcollectionid)/.test(t)}function Ba(e,t=0,n=new Set){if(!e||t>Cv)return null;if(typeof e=="string"){const o=Ro(e);if(o!=null&&o.folderId)return {folderId:o.folderId,pageUrl:o.pageUrl};const a=e.match(/(?:bookmark|folder|collection)[^\w]{0,20}(?:id|_id|Id|_Id)\W*[:=]\W*["']?(\d{5,})["']?/i);return a!=null&&a[1]?{folderId:a[1]}:null}if(typeof e!="object")return null;if(Array.isArray(e)){for(const o of e){const a=Ba(o,t+1,n);if(a!=null&&a.folderId)return a}return null}const r=e;if(n.has(r))return null;n.add(r);for(const[o,a]of Object.entries(r)){const i=Xv(o)?sg(a):null;if(i){const l=typeof a=="string"?a:"",c=l?Ro(l):null;return c!=null&&c.folderId?{folderId:c.folderId,pageUrl:c.pageUrl}:{folderId:i}}const s=Ba(a,t+1,n);if(s!=null&&s.folderId)return s}return null}const lg=["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"];function Qv(e){if(!e)return null;let t;try{t=JSON.parse(decodeURIComponent(e));}catch{try{t=JSON.parse(e);}catch{return null}}const n=Ba(t);if(n!=null&&n.folderId)return n.folderId;if(t&&typeof t=="object"){const r=t;for(const o of lg){const a=r[o],i=sg(a);if(i)return i}}return null}function Zv(e){try{const t=new URL(e,"https://x.com"),n=lg.map(o=>t.searchParams.get(o)).find(o=>!!o&&/^\d+$/.test(o));if(n)return n;const r=Qv(t.searchParams.get("variables"));return r||null}catch{return null}}function Jv(e){if(!e)return null;let t;try{t=JSON.parse(e);}catch{try{const o=new URLSearchParams(e).get("variables");if(o)t=JSON.parse(o);else return null}catch{return null}}const n=Ba(t);return n!=null&&n.folderId?n.folderId:null}function ek(e){try{const n=new URL(e,location.href).pathname.match(/\/bookmarks\/(\d+)/);return (n==null?void 0:n[1])??null}catch{return null}}function tk(e){return e||"bookmark-tab"}function nk(){try{if(typeof performance>"u"||typeof performance.getEntriesByType!="function")return null;const e=performance.getEntriesByType("navigation"),t=e[e.length-1];if(!t||!t.name)return null;const n=Ro(t.name);return n!=null&&n.folderId?{folderId:n.folderId,pageUrl:n.pageUrl,source:"performance",confidence:88}:null}catch{return null}}function rk(){if(typeof document>"u")return null;const e=['[role="tab"] a[href*="/i/bookmarks/"]','a[role="tab"][href*="/i/bookmarks/"]','[role="tablist"] a[href*="/i/bookmarks/"]','a[href*="/i/bookmarks/"]','nav a[href*="/bookmarks/"]','[data-testid="primaryColumn"] a[href*="/bookmarks/"]','a[href*="/bookmarks/"]'],t=[],n=[],r=new Set;for(const i of e){const s=Array.from(document.querySelectorAll(i));for(const l of s){if(!(l instanceof HTMLAnchorElement))continue;const c=l.getAttribute("href");if(!c)continue;const h=ek(c);if(!h)continue;const f=h;if(r.has(f))continue;r.add(f);const m=(()=>{try{return new URL(c,location.href).href}catch{return c}})(),g=l.closest("a[href]")||l,_=(O,B)=>O==null?void 0:O.getAttribute(B),b=(O,B)=>_(O,B)==="true",C=b(g,"aria-selected")||b(g,"aria-current")||b(g,"data-selected")||b(g,"data-state"),v=!!g.closest('[role="tablist"]'),T=g instanceof HTMLAnchorElement&&(g.role==="tab"||!!g.closest('[role="tab"]'));let R=null;try{R=window.getComputedStyle(g);}catch{}const P=R?R.display!=="none"&&R.visibility!=="hidden"&&R.opacity!=="0":true;let L=0;C&&(L+=20),v&&(L+=5),T&&(L+=3),P&&(L+=2);const D={folderId:f,pageUrl:m,source:tk(g.getAttribute("data-testid")??(T?"bookmark-tab":null)),score:L};n.push(D),C&&t.push(D);}}const o=t.length>0?t:n;if(!o.length)return null;o.sort((i,s)=>i.score!==s.score?s.score-i.score:i.folderId.localeCompare(s.folderId));const a=o[0];return a?{folderId:a.folderId,pageUrl:a.pageUrl,source:a.source,confidence:Math.max(t.length>0?45:25,a.score+(t.length>0?45:25))}:null}function ok(){var e;try{const t=(e=Rn.history)==null?void 0:e.state;if(!t)return null;const n=Ba(t);if(!(n!=null&&n.folderId))return null;const r=n.pageUrl||(typeof location<"u"?location.href:"");return {folderId:n.folderId,pageUrl:r,source:"history-state",confidence:86}}catch{return null}}function ak(){const e=["__INITIAL_STATE__","__NEXT_DATA__","__INITIAL_PROPS__","__NEXT_REDUX_STATE__","__META_DATA__"],t=[],n=Rn;for(const r of e){const o=n[r];o&&t.push({source:r,value:o});}for(const{source:r,value:o}of t){const a=Ba(o);if(a!=null&&a.folderId)return {folderId:a.folderId,pageUrl:a.pageUrl||(typeof location<"u"?location.href:""),source:r,confidence:82}}return null}function ik(e){var i;if(!e||typeof e!="object")return null;const t=[],n=new Set,r=s=>{s instanceof Element&&!n.has(s)&&(n.add(s),t.push(s));};r(e);const o=e;typeof o.composedPath=="function"&&(o.composedPath()||[]).forEach(l=>{r(l);});const a=e;r(a.target),r(a.currentTarget);for(const s of t){const l=(i=s.closest)==null?void 0:i.call(s,"a[href]"),c=s instanceof HTMLAnchorElement?s:l;if(!c)continue;const h=c.getAttribute("href");if(!h||!h.includes("/i/bookmarks/"))continue;const f=Ro(h);if(f!=null&&f.folderId)return {folderId:f.folderId,pageUrl:f.pageUrl,source:"bookmark-click",confidence:92}}return null}function zo(e){try{const t=new URL(e,"https://x.com").pathname.toLowerCase();return /(bookmarks|bookmarkfolderslice|bookmarkfoldertimeline|bookmarkcollectiontimeline|bookmarkcollectionstimeline)/.test(t)}catch{return false}}function ti(e,t,n){const r=Date.now(),o=typeof location<"u"?location.href:"",a=ag(o);if(zo(e)){const i=Zv(e);if(i)return {folderId:i,pageUrl:o,source:"request-url",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"request-url",pageRouteUrl:a==null?void 0:a.pageUrl};const s=Jv(t);if(s)return {folderId:s,pageUrl:o,source:"request-body",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"request-body",pageRouteUrl:a==null?void 0:a.pageUrl};if(a!=null&&a.folderId)return {folderId:a.folderId,pageUrl:a.pageUrl||o,source:"page-route",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"location",pageRouteUrl:a.pageUrl||o};const l=Vv(r);if(l!=null&&l.folderId&&al(o))return {folderId:l.folderId,pageUrl:l.pageUrl||o,source:l.source||"active-context-lock",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"active-context-lock",pageRouteUrl:l.pageUrl||o};const c=typeof location<"u"?location.href:o;if(jr!=null&&jr.folderId&&r-jr.capturedAt<=bi)return {folderId:jr.folderId,pageUrl:jr.pageUrl||c,source:jr.source||"active-context",capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:"active-context",pageRouteUrl:jr.pageUrl||c};const h=ol();if(h!=null&&h.folderId)return {folderId:h.folderId,pageUrl:h.pageUrl,source:h.source,capturedAt:r,requestId:n==null?void 0:n.requestId,routeSource:h.source,pageRouteUrl:h.pageUrl}}return Tl(jr,{method:(n==null?void 0:n.method)||"GET",requestId:n==null?void 0:n.requestId,hasBody:!!(n!=null&&n.body)})}function Tl(e,t){const r={folderId:null,pageUrl:typeof location<"u"?location.href:typeof document<"u"?document.URL:"",source:"fallback",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId};if(!e){const a=ol();return {folderId:(a==null?void 0:a.folderId)??null,pageUrl:(a==null?void 0:a.pageUrl)??r.pageUrl,source:(a==null?void 0:a.source)??r.source,requestId:t==null?void 0:t.requestId,routeSource:a==null?void 0:a.source,pageRouteUrl:a==null?void 0:a.pageUrl,capturedAt:Date.now()}}if(typeof e=="string"){const a=e.trim();if(!a)return r;if(/^\d+$/.test(a))return {folderId:a,pageUrl:r.pageUrl,source:"string-id",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId};const i=Ro(a);return {folderId:(i==null?void 0:i.folderId)??null,pageUrl:(i==null?void 0:i.pageUrl)??r.pageUrl,source:"raw-string",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId,routeSource:i!=null&&i.folderId?"string-id":"fallback",pageRouteUrl:i==null?void 0:i.pageUrl}}if(typeof e=="object"){const a=e,i=[a.folderUrl,a.pageUrl,a.url,a.location,a.currentUrl,a.pageUrlBase64].map(f=>f).filter(f=>typeof f=="string"&&f.length>0),s=Date.now(),l=i.map(f=>Ro(f)).find(f=>!!(f!=null&&f.folderId)),c=typeof a.folderId=="string"||typeof a.folderId=="number"?String(a.folderId):null,h=typeof a.pageUrl=="string"&&a.pageUrl.length>0?a.pageUrl:typeof a.url=="string"&&a.url.length>0?a.url:r.pageUrl;if(l!=null&&l.folderId)return {folderId:l.folderId,pageUrl:l.pageUrl,source:typeof a.source=="string"&&a.source.length>0?a.source:"object",capturedAt:typeof a.capturedAt=="number"?a.capturedAt:s,requestId:t==null?void 0:t.requestId,routeSource:typeof a.source=="string"&&a.source.length>0?a.source:"object",pageRouteUrl:h};if(c&&/^\d+$/.test(c))return {folderId:c,pageUrl:h,source:typeof a.source=="string"&&a.source.length>0?a.source:"object",capturedAt:typeof a.capturedAt=="number"?a.capturedAt:s,requestId:t==null?void 0:t.requestId,routeSource:typeof a.source=="string"&&a.source.length>0?a.source:"object",pageRouteUrl:h}}const o=ol();return {folderId:(o==null?void 0:o.folderId)??null,pageUrl:(o==null?void 0:o.pageUrl)??r.pageUrl,source:"fallback",capturedAt:Date.now(),requestId:t==null?void 0:t.requestId,routeSource:o==null?void 0:o.source,pageRouteUrl:o==null?void 0:o.pageUrl}}function ol(){const e=[],t=rk();t&&e.push(t);const n=ok();n&&e.push(n);const r=nk();r&&e.push(r);const o=ak();o&&e.push(o);const a=e.filter(g=>!!g.folderId).sort((g,_)=>_.confidence-g.confidence)[0];if(a)return {folderId:a.folderId,pageUrl:a.pageUrl,source:a.source,confidence:a.confidence};const i=[],s=typeof location<"u"?location.href:"",l=typeof document<"u"?document.URL:"",c=typeof document<"u"?document.querySelector('link[rel="canonical"]'):null,h=typeof document<"u"?document.querySelector('meta[property="og:url"]'):null;s&&i.push({source:"location",url:s}),l&&l!==s&&i.push({source:"document",url:l}),c!=null&&c.href&&i.push({source:"canonical",url:c.href}),h!=null&&h.content&&i.push({source:"og",url:h.content});for(const g of i){const _=Ro(g.url);if(_!=null&&_.folderId)return {..._,source:g.source,confidence:30}}const f=i[0];if(!f)return null;const m=f.url;return m?{folderId:null,pageUrl:m,source:f.source,confidence:14}:null}function al(e){try{return /\/i\/bookmarks(?:\/|$)/.test(new URL(e,"https://x.com").pathname)}catch{return false}}function _r(e){const t=Tl(e);jr=t,t.folderId?qv(t):al(t.pageUrl)||zv();}function vc(e,t,n){if(typeof n!="function")return false;const r=n,o=tg();if(o)try{return o(r,e,{defineAs:t}),!0}catch(a){return Ie.error(`Failed to define ${t} hook`,a),false}if(e!==globalThis)return Ie.error(`Failed to define ${t} hook`,new Error("exportFunction unavailable for cross-realm target")),false;try{return e[t]=r,!0}catch(a){return Ie.error(`Failed to define ${t} hook`,a),false}}function kc(e,t,n){if(!e||typeof e!="function")return;let r=e;if(!rl(e,t))return e;for(let o=0;o<10;o++){const a=r[n];if(!a||typeof a!="function")return;if(!rl(a,t))return a;r=a;}}function sk(e){return !(typeof e!="function"||rl(e,"__twe_is_hook_fetch_v1"))}function cg(e,t){if(!e||typeof e!="object"&&typeof e!="function")return null;try{const n=e[t];return typeof n=="string"?n:null}catch{return null}}function lk(e,t){const n=typeof(t==null?void 0:t.method)=="string"&&t.method?t.method:null;if(n)return n;try{if(typeof Request<"u"&&e instanceof Request)return e.method||"GET"}catch{}const r=cg(e,"method");return r&&r.length>0?r:"GET"}function ck(e){try{if(typeof e=="string")return e;if(typeof URL<"u"&&e instanceof URL)return e.toString();if(typeof Request<"u"&&e instanceof Request)return e.url||""}catch{}const t=cg(e,"url");if(t&&t.length>0)return t;try{return String(e??"")}catch{return ""}}function xc(e){return e?/\/graphql\/|\/i\/api\/|\/api\/1\.1\/|\/api\/2\//.test(e):false}function qr(e){let t=typeof e,n="";if(e===null)return {name:"null",message:"null",summary:"null: null"};if(typeof e>"u")return {name:"undefined",message:"undefined",summary:"undefined: undefined"};if(typeof e=="string")return {name:"Error",message:e,summary:`Error: ${e}`};try{const r=e;typeof r.name=="string"&&r.name.length>0&&(t=r.name),typeof r.message=="string"&&r.message.length>0&&(n=r.message);}catch{}if(!n)try{n=String(e);}catch{n="[inaccessible error object]";}return {name:t,message:n,summary:`${t}: ${n}`}}function uk(e){const t=qr(e);return /permission denied to access (property|object|then|apply)/i.test(t.summary)}function Yf(e){try{if(typeof e!="object"||e===null||e.__twe_mcp_hook_v1!==!0)return;const n=e;n.req&&typeof n.req=="object"&&(n.req=Ns(n.req)),e={...e,__twe_msg_revision_v1:so};const r=Rn.postMessage;r==null||r(e,"*");return}catch{}try{const n=globalThis.postMessage;n==null||n(e,"*");}catch{}}function ds(e,t,n,r){if(!e||typeof e!="object"&&typeof e!="function")return false;const o=e.addEventListener;if(typeof o!="function")return false;try{return o.call(e,t,n,r),!0}catch{return false}}class dk{constructor(){Ve(this,"extensions",new Map);Ve(this,"disabledExtensions",new Set);Ve(this,"debugEnabled",false);Ve(this,"hookStats",null);Ve(this,"hookRuntime",null);Ve(this,"recentResponseSigs",new Map);Ve(this,"lastStickyBookmarkContext",null);Ve(this,"runtimeControlPlane");Ve(this,"interceptorDispatcher",new av);Ve(this,"pageMessageHandler",null);Ve(this,"instanceId",`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);Ve(this,"__twe_extension_manager_signature_v1",Mv);Ve(this,"__twe_extension_manager_revision_v1",Rv);Ve(this,"__twe_extension_manager_started_at_v1",Date.now());Ve(this,"disposed",false);Ve(this,"endpointMetricLimit",40);Ve(this,"signal",new Fn(1));this.runtimeControlPlane=new vv({installPageMessageBridge:()=>this.installPageMessageBridge(),installBookmarkContextTracking:()=>this.installBookmarkContextTracking(),installHttpHooks:n=>this.installHttpHooks(n),installFetchHooks:n=>this.installFetchHooks(n),uninstallHooks:()=>this.uninstallHooks(),runHookSelfTest:()=>this.runHookSelfTest(),runFetchHookBootProbePass:()=>this.runFetchHookBootProbePass(),runHookRepairPass:()=>this.runHookRepairPass(),readHookStatsSnapshot:()=>this.readHookStatsSnapshot()}),this.disabledExtensions=new Set(ut.get("disabledExtensions",[])),ut.get("debug")&&(this.debugEnabled=true,Ie.info("Debug mode enabled")),Bv();let t=null;try{this.hookStats=yc(this.instanceId),this.hookRuntime=this.hookStats,this.syncRuntimeStats();}catch(n){t=Nv("ExtensionManager.constructor",this.instanceId,n),Ie.error("ExtensionManager constructor bootstrap error",n);}try{const n=Uv(this.hookStats,yc(this.instanceId));(!this.hookStats||this.hookStats.activeInstanceId!==this.instanceId)&&(this.hookStats=n),this.hookStats.activeInstanceId=this.instanceId,this.hookStats.rev=so,t&&(this.hookStats.repairCount=(this.hookStats.repairCount||0)+1),this.hookRuntime=this.hookStats,this.syncRuntimeStats();}catch{}(!this.hookRuntime||!this.hookStats)&&(this.hookStats=yc(this.instanceId),this.hookRuntime=this.hookStats,this.syncRuntimeStats()),this.runtimeControlPlane.initialize();}get runtimeModes(){return this.runtimeControlPlane.getRuntimeModes()}get hookDebugConfig(){return this.runtimeControlPlane.getHookDebugConfig()}isHookModeEnabled(t){return this.runtimeControlPlane.isHookModeEnabled(t)}refreshHookDebugConfig(){this.runtimeControlPlane.refreshHookDebugConfig();}emitHookDiag(t,n,r){this.runtimeControlPlane.emitHookDiag(t,n,r);}enableSafeMode(t,n){this.runtimeControlPlane.enableSafeMode(t,n);}applyRuntimeModesFromOptions(){this.runtimeControlPlane.applyRuntimeModesFromOptions();}getRuntimeModesSnapshot(){return this.runtimeControlPlane.getRuntimeModesSnapshot()}getHookStatsSnapshot(){return this.runtimeControlPlane.getHookStatsSnapshot()}dispose(){if(!this.disposed){this.disposed=true;try{this.getExtensions().forEach(t=>{try{t.enabled&&(t.enabled=!1,t.dispose());}catch{}});}catch{}if(this.pageMessageHandler){try{window.removeEventListener("message",this.pageMessageHandler,!1);}catch{}this.pageMessageHandler=null;}this.runtimeControlPlane.dispose();}}runHookSelfTest(){try{if(this.runtimeModes.safeMode||this.runtimeModes.hookMode==="off")return {ok:!0};const t=wi();if(this.isHookModeEnabled("xhr")){const n=t.XMLHttpRequest;if(!(n!=null&&n.prototype))return {ok:!1,error:"XMLHttpRequest.prototype unavailable"};if(typeof n.prototype.open!="function")return {ok:!1,error:"XMLHttpRequest.prototype.open unavailable"};if(typeof n.prototype.send!="function")return {ok:!1,error:"XMLHttpRequest.prototype.send unavailable"}}return this.isHookModeEnabled("fetch")&&typeof t.fetch!="function"?{ok:!1,error:"fetch unavailable"}:{ok:!0}}catch(t){return {ok:false,error:String(t)}}}syncRuntimeStats(){!this.hookStats||!this.hookRuntime||(this.hookRuntime.messagesTotal=this.hookStats.messagesTotal,this.hookRuntime.messagesLegacyShape=this.hookStats.messagesLegacyShape,this.hookRuntime.messagesMissingContext=this.hookStats.messagesMissingContext,this.hookRuntime.messagesRepairedAtBridge=this.hookStats.messagesRepairedAtBridge,this.hookRuntime.messagesMissingBody=this.hookStats.messagesMissingBody,this.hookRuntime.responsesProcessed=this.hookStats.responsesProcessed,this.hookRuntime.responsesSkippedDuplicate=this.hookStats.responsesSkippedDuplicate,this.hookRuntime.lastMessageAt=this.hookStats.lastMessageAt,this.hookRuntime.activeInstanceId=this.hookStats.activeInstanceId,this.hookRuntime.rev=this.hookStats.rev,this.hookRuntime.endpointStats=this.hookStats.endpointStats);}readHookStatsSnapshot(){return this.hookStats?{xhrMessages:Number(this.hookStats.xhrMessages||0),fetchMessages:Number(this.hookStats.fetchMessages||0),lastUrl:typeof this.hookStats.lastUrl=="string"?this.hookStats.lastUrl:"",lastAt:Number(this.hookStats.lastAt||0)}:null}getEndpointStats(t){if(!this.hookStats)return Gf();const n=this.hookStats.endpointStats[t];if(n)return n;if(Object.keys(this.hookStats.endpointStats).length>=this.endpointMetricLimit){const a=Object.keys(this.hookStats.endpointStats)[0];a&&delete this.hookStats.endpointStats[a];}const r=Gf();return this.hookStats.endpointStats[t]=r,r}uninstallHooks(){try{const t=Rn,n=t.XMLHttpRequest,r=n==null?void 0:n.prototype;if(r&&(typeof r[Br]=="function"&&(r.open=r[Br]),typeof r[Ur]=="function"&&(r.send=r[Ur]),delete r.__twe_is_hook_open_v1,delete r.__twe_is_hook_send_v1,delete r.__twe_is_hook_revision_v1),typeof t[pa]=="function"&&(t.fetch=t[pa]),typeof t.fetch=="object"&&t.fetch!==null){const o=t.fetch;delete o.__twe_is_hook_fetch_v1,delete o.__twe_is_hook_revision_v1;}}catch{}}applyBookmarkRouteCandidate(t){var l;const n=Date.now(),r=typeof location<"u"?location.href:"",o=al(r),a=t!=null&&t.pageUrl?al(t.pageUrl):o;if(!t){if(o&&((l=this.lastStickyBookmarkContext)!=null&&l.folderId)){const c=this.lastStickyBookmarkContext;if(n-c.capturedAt<=bi){_r({folderId:c.folderId,pageUrl:c.pageUrl||r,source:c.source,capturedAt:n});return}}this.lastStickyBookmarkContext=null,_r({folderId:null,pageUrl:r,source:"refresh",capturedAt:n});return}if(!a){this.lastStickyBookmarkContext=null,_r({folderId:null,pageUrl:t.pageUrl,source:t.source,capturedAt:n});return}if(t.folderId){const c={folderId:t.folderId,pageUrl:t.pageUrl,source:t.source,capturedAt:n};this.lastStickyBookmarkContext=c,_r(c);return}const i=this.lastStickyBookmarkContext,s=i&&!!i.folderId&&t.confidence<=Tv&&n-i.capturedAt<=bi;if(!t.folderId&&s){_r({folderId:i.folderId,pageUrl:t.pageUrl,source:i.source,capturedAt:n});return}if(!t.folderId&&o&&(i!=null&&i.folderId)&&n-i.capturedAt<=bi){_r({folderId:i.folderId,pageUrl:t.pageUrl,source:i.source,capturedAt:n});return}this.lastStickyBookmarkContext=null,_r({folderId:null,pageUrl:t.pageUrl,source:t.source,capturedAt:n});}updateBookmarkRouteContext(){try{const t=ol();this.applyBookmarkRouteCandidate(t??null);}catch{}}installBookmarkContextTracking(){if(this.runtimeModes.safeMode||this.runtimeModes.hookMode==="off"||(this.updateBookmarkRouteContext(),!Rn.history))return;const n=()=>this.updateBookmarkRouteContext(),r=o=>{this.applyBookmarkRouteCandidate(o);};if(!Rn.__twe_bookmark_context_listeners_v1){Rn.__twe_bookmark_context_listeners_v1=true;const o=[Rn,window,globalThis];for(const a of o)ds(a,"popstate",n),ds(a,"hashchange",n);}if(!Rn.__twe_bookmark_context_bookmark_click_v1&&(document!=null&&document.body)){const o=s=>{try{const l=s.target,c=ik(l);c&&r(c);}catch{}};Rn.__twe_bookmark_context_bookmark_click_v1=true;const a=[Rn,window,document,globalThis];let i=false;for(const s of a)i=ds(s,"click",o,{capture:true})||i;!i&&(document!=null&&document.body)&&ds(document.body,"click",o,{capture:true}),Rn.__twe_bookmark_context_bookmark_click_handler_v1=o;}if(Rn.__twe_bookmark_context_interval_v1||(Rn.__twe_bookmark_context_interval_v1=setInterval(()=>{try{this.updateBookmarkRouteContext();}catch{}},1200)),!Rn.__twe_bookmark_context_mutation_v1){const o=document,a=typeof MutationObserver<"u";if(o!=null&&o.body&&a){const i=new MutationObserver(()=>{this.updateBookmarkRouteContext();});i.observe(o.body,{subtree:true,childList:true,attributes:true,attributeFilter:["href","aria-selected","data-state","class"]}),Rn.__twe_bookmark_context_mutation_v1=i;}}}add(t){try{Ie.debug(`Register new extension: ${t.name}`);const n=new t(this),r=this.extensions.get(n.name);if(r&&r!==n)try{r.enabled&&r.dispose();}catch{}this.extensions.set(n.name,n);}catch(n){Ie.error(`Failed to register extension: ${t.name}`,n);}}start(){for(const t of this.extensions.values())this.disabledExtensions.has(t.name)?this.disable(t.name):this.enable(t.name);}enable(t){try{this.disabledExtensions.delete(t),ut.set("disabledExtensions",[...this.disabledExtensions]);const n=this.extensions.get(t);if(n.enabled)return;n.enabled=!0,n.setup(),Ie.debug(`Enabled extension: ${t}`),this.signal.value++;}catch(n){Ie.error(`Failed to enable extension: ${t}`,n);}}disable(t){try{this.disabledExtensions.add(t),ut.set("disabledExtensions",[...this.disabledExtensions]);const n=this.extensions.get(t);if(!n.enabled)return;n.enabled=!1,n.dispose(),Ie.debug(`Disabled extension: ${t}`),this.signal.value++;}catch(n){Ie.error(`Failed to disable extension: ${t}`,n);}}isDisposed(){return this.disposed}getExtensions(){return [...this.extensions.values()]}installPageMessageBridge(){this.runtimeModes.hookMode!=="off"&&(this.pageMessageHandler||(this.pageMessageHandler=t=>{var n,r,o;try{const a=t.origin||"";if(a&&!/^https:\/\/(x|twitter|mobile\.x)\.com$/.test(a))return;const i=t.data;if(!i||i[kv]!==!0)return;const s=Gv(i),l=s===null||s!==so,c=Kv(i),h=ig(c),f=i.res;if(!f)return;const m=c&&typeof c=="object"?c:null,g=typeof h.requestId=="string"&&h.requestId.trim().length?h.requestId:typeof(m==null?void 0:m.requestId)=="string"&&((n=m.requestId)!=null&&n.trim().length)?m.requestId:Ca(),_=typeof h.method=="string"&&h.method?h.method:typeof(m==null?void 0:m.method)=="string"?m.method:"GET",b=typeof h.url=="string"&&h.url.length?h.url:typeof(m==null?void 0:m.url)=="string"?m.url:"";if(!b)return;const C=typeof h.body=="string"?h.body:typeof(m==null?void 0:m.body)=="string"?m.body:void 0,v=m?m.bookmarkContext:void 0,T=m&&Object.prototype.hasOwnProperty.call(m,"requestContext")?m.requestContext:void 0,R=v!=null||T!=null||h.bookmarkContext!==void 0,P=typeof h.body=="string"||typeof(m==null?void 0:m.body)=="string",L=typeof h.requestId=="string"&&h.requestId.trim().length>0||typeof(m==null?void 0:m.requestId)=="string"&&(((r=m.requestId)==null?void 0:r.trim().length)||0)>0,D=Ns({method:_,url:b,body:C,bookmarkContext:h.bookmarkContext??v??T,requestId:g}),O=l||!R||!P||!L,I=zo(D.url)?Wv(D.url):null,x=I?this.getEndpointStats(I):null,F=Date.now(),U=typeof f.responseText=="string"?f.responseText:"";if(!this.hookStats)return;O&&this.hookStats.messagesRepairedAtBridge++,P||this.hookStats.messagesMissingBody++,l&&this.hookStats.messagesLegacyShape++,x&&(x.received+=1,x.lastAt=F,x.lastStatus=f.status??0,x.lastUrl=D.url),R||(this.hookStats.messagesLegacyShape++,x&&(x.legacyShape+=1)),!R||D.bookmarkContext===null?(this.hookStats.messagesMissingContext++,x&&(x.missingContext+=1),D.bookmarkContext=ti(D.url,D.body,{method:D.method,url:D.url,body:D.body,requestId:g})):D.bookmarkContext=Tl(D.bookmarkContext,{method:D.method,url:D.url,body:D.body,requestId:g,hasBody:!!D.body}),_r(D.bookmarkContext),jv({requestId:g,ts:Date.now(),method:D.method,url:D.url,hasBody:!!D.body,confidenceSource:typeof((o=D.bookmarkContext)==null?void 0:o.source)=="string"?D.bookmarkContext.source:"unknown",context:D.bookmarkContext,normalizedRoute:ag(D.url).pageUrl});const Ce=(D.method||"GET").toUpperCase();if(!zo(D.url)){const Z=Pv(Ce,D.url,f.status??0,U),ce=this.recentResponseSigs.get(Z);if(ce&&F-ce.at<rg){this.hookStats.responsesSkippedDuplicate++,x&&(x.skippedDuplicate+=1),this.syncRuntimeStats();return}this.recentResponseSigs.set(Z,{sig:Z,at:F}),Fv(this.recentResponseSigs);}this.hookStats.responsesProcessed++,x&&(x.processed+=1,x.newUniqueTweets+=Yv(U)),this.hookStats.messagesTotal++,this.hookStats.lastMessageAt=F,this.hookStats&&(this.hookStats.lastUrl=D.url,this.hookStats.lastAt=Date.now(),(D.method||"").toUpperCase()==="GET"?this.hookStats.xhrMessages++:this.hookStats.fetchMessages++,this.debugEnabled&&this.hookStats.loggedUrls<5&&(this.hookStats.loggedUrls++,Ie.debug("Hook saw request",{method:D.method,url:D.url,status:f.status})),this.syncRuntimeStats());const re={status:f.status,responseText:U};this.runInterceptors(D,re);}catch(a){Ie.debug("Failed to process hook message",a);}},window.addEventListener("message",this.pageMessageHandler,false)));}installHttpHooks(t=false){var a,i,s;if(!this.isHookModeEnabled("xhr"))return;this.refreshHookDebugConfig();const n=this.hookDebugConfig;this.emitHookDiag("xhr.install.begin",{force:t,...n}),n.disableXhrLoadListener&&this.emitHookDiag("xhr.load.listener.disabled",{},{force:true});let r=false,o;try{if(!((a=Rn.XMLHttpRequest)!=null&&a.prototype)||!((s=(i=Rn.XMLHttpRequest)==null?void 0:i.prototype)!=null&&s.open))throw new Error("XMLHttpRequest.prototype.open not available");const l=Rn.XMLHttpRequest.prototype,c=l.open,h=l.send;o=typeof l[Br]=="function"?l[Br]:c,!l[Br]&&typeof c=="function"&&(l[Br]=c),!l[Ur]&&typeof h=="function"&&(l[Ur]=h);const f=kc(h,"__twe_is_hook_send_v1",Ur),m=typeof f=="function"?f:typeof l[Ur]=="function"?l[Ur]:h;if(typeof m!="function")throw new Error("XMLHttpRequest.prototype.send not available");const g=!n.disableXhrSendWrap&&(t||!ma(h,"__twe_is_hook_send_v1"));if(n.disableXhrSendWrap)typeof l[Ur]=="function"&&(l.send=l[Ur]),r=!0,this.emitHookDiag("xhr.send.wrap.disabled",{},{force:!0});else if(g){const _=this.emitHookDiag.bind(this),b=this.enableSafeMode.bind(this),C=function(T){let R="",P="GET",L="";try{const D=this,O=_c(D,n);if(P=String(O.method||"GET"),L=O.requestId||Ca(),O.requestId=L,O.body=Wf(T)??"",R=String(O.url||""),R){const B={method:P,url:R,body:O.body,requestId:L};zo(R)?(O.bookmarkContext=ti(R,O.body,B),_r(O.bookmarkContext)):O.bookmarkContext=null;}wc(D,n,O);}catch{}try{n.forceCallNotApply?m.call(this,T):m.apply(this,[T]),_("xhr.send.basecall.ok",{method:P,url:R});}catch{try{const D=n.forceCallNotApply?m.apply(this,[T]):m.call(this,T);return _("xhr.send.basecall.recovered",{method:P,url:R},{force:!0}),D}catch(D){_("xhr.send.basecall.error",{method:P,url:R,requestId:L,errName:D instanceof Error?D.name:typeof D,errMsg:D instanceof Error?D.message:String(D)},{force:!0}),Ie.error("XHR send hook base invocation failed; enabling safe mode",{method:P,url:R,err:D});try{b("xhr-send-basecall-failed",D);}catch{}throw D}}};if(Ho(C,"__twe_is_hook_send_v1"),!vc(l,"send",C))throw new Error("Failed to define XMLHttpRequest.send hook safely");Ho(l.send,"__twe_is_hook_send_v1"),r=!0;}else r=!0;if(!t&&!n.disableXhrOpenWrap&&ma(c,"__twe_is_hook_open_v1")&&(n.disableXhrSendWrap||ma(h,"__twe_is_hook_send_v1")))r=!0;else {const _=kc(c,"__twe_is_hook_open_v1",Br),b=typeof _=="function"?_:typeof l[Br]=="function"?l[Br]:c;if(typeof b!="function")throw new Error("XMLHttpRequest.prototype.open base function unavailable");if(n.disableXhrOpenWrap)l.open=b,this.emitHookDiag("xhr.open.wrap.disabled",{},{force:!0}),r=!0;else {const C=this.emitHookDiag.bind(this),v=this.enableSafeMode.bind(this),T=function(...P){let L="",D="",O="";try{L=typeof P[0]=="string"?P[0]:String(P[0]??"");const B=P[1];if(D=typeof B=="string"?B:String(B??""),xc(D)){const I=this,x=_c(I,n);O=x.requestId||Ca(),x.requestId=O,x.method=L,x.url=D,x.body="",zo(D)?(x.bookmarkContext=ti(D,void 0,{method:L,url:D,requestId:x.requestId}),_r(x.bookmarkContext)):x.bookmarkContext=null,!n.disableXhrLoadListener&&!x.hooked&&(x.hooked=!0,this.addEventListener("load",function(){try{const F=this,U=_c(F,n),Ce=L||"GET",X=D,re=U.method||Ce,Z=U.url||X;if(!xc(Z))return;const ce=String(this.responseText??""),he=U.body,fe=U.requestId||Ca();U.requestId=fe;const me=zo(Z),z=U.bookmarkContext||(me?ti(Z,he,{method:re,url:Z,body:he,requestId:fe}):null);U.bookmarkContext||(U.bookmarkContext=z),wc(F,n,U),me&&z&&_r(z);const ue=Ns({method:re,url:Z,body:he||"",bookmarkContext:z??null,requestId:fe});Yf({__twe_mcp_hook_v1:!0,req:ue,res:{status:this.status??0,responseText:ce}});}catch{}})),wc(I,n,x);}}catch{}try{const B=n.forceCallNotApply?bc(b,this,P):b.apply(this,P);return C("xhr.open.basecall.ok",{method:L,url:D}),B}catch{try{const B=n.forceCallNotApply?b.apply(this,P):bc(b,this,P);return C("xhr.open.basecall.recovered",{method:L,url:D},{force:!0}),B}catch(B){C("xhr.open.basecall.error",{method:L,url:D,requestId:O,errName:B instanceof Error?B.name:typeof B,errMsg:B instanceof Error?B.message:String(B)},{force:!0}),Ie.error("XHR open hook base invocation failed; enabling safe mode",{method:L,url:D,err:B});try{v("xhr-open-basecall-failed",B);}catch{}throw B}}};if(Ho(T,"__twe_is_hook_open_v1"),!vc(l,"open",T))throw new Error("Failed to define XMLHttpRequest.open hook safely");r=!0,Ho(l.open,"__twe_is_hook_open_v1"),Ho(l.send,"__twe_is_hook_send_v1");}l[Br]=b,l[Ur]=m;}}catch(l){Ie.error("Failed to hook into XMLHttpRequest",l),this.enableSafeMode("xhr-hook-install-failed",l);}this.debugEnabled&&Ie.info(`Hooked into XMLHttpRequest (installed=${r})`),setTimeout(()=>{var l,c;try{const h=Av();((c=(l=Rn.XMLHttpRequest)==null?void 0:l.prototype)==null?void 0:c.open)!==(typeof o=="function"?o:void 0)?this.debugEnabled&&Ie.debug("XHR hook active",{unsafeWindow:h.hasUnsafeWindow,wrappedJSObject:h.hasWrappedJSObject,exportFunction:h.hasExportFunction}):Ie.error(`XHR hook not active (unsafeWindow=${h.hasUnsafeWindow}, wrappedJSObject=${h.hasWrappedJSObject}, exportFunction=${h.hasExportFunction}). Bookmark capture will not work.`);}catch(h){Ie.debug("XHR hook diagnostics failed",h);}},1e3);}installFetchHooks(t=false){if(!this.isHookModeEnabled("fetch"))return;this.refreshHookDebugConfig();const n=this.hookDebugConfig;this.emitHookDiag("fetch.install.begin",{force:t,...n});const r=wi(),o=r.fetch;if(typeof o!="function"){Ie.warn("Fetch API not found, skipping fetch hooks");return}const a=r,i=r.fetch;if(!t&&ma(i,"__twe_is_hook_fetch_v1")){Ie.debug("Fetch hook already installed");return}const s=a[pa],l=kc(i,"__twe_is_hook_fetch_v1",pa),c=[s,l,o].find(sk)??null;if(!c){Ie.error("Fetch API base function unavailable or unsafe; enabling safe mode"),this.enableSafeMode("fetch-hook-base-unavailable");return}const h=c;if(n.disableFetchWrap){r.fetch=h,this.emitHookDiag("fetch.wrap.disabled",{},{force:true});return}a[pa]=h;const f=this.emitHookDiag.bind(this),m=this.enableSafeMode.bind(this);let g=false,_=r;const b=(R,P,L=2)=>{try{return L<=1?h(R):h(R,P)}catch(D){return Promise.reject(D)}},C=(R,P,L,D,O=2)=>{const B=O<=1?[L]:[L,D];let I=null;for(const x of P)if(x){try{const F=bc(R,x,B);return _=x,F}catch(F){I=F;}if(!n.forceCallNotApply)try{const F=Reflect.apply(R,x,B);return _=x,F}catch(F){I=F;}}try{return O<=1?R(L):R(L,D)}catch(x){I=x;}throw I instanceof Error?I:new Error(`fetch invocation failed (${qr(I).summary})`)},v=function(R,P){const L=arguments.length<=1?1:2;let D="GET",O="",B,I="",x;try{D=lk(R,P);}catch{D=(P==null?void 0:P.method)??"GET";}try{O=ck(R);}catch{O="";}try{B=Wf(P==null?void 0:P.body);}catch{B=void 0;}try{I=Ca();}catch{I="";}f("fetch.wrapper.enter",{method:D,url:O,requestId:I});try{zo(O)?(x=ti(O,B,{method:D,url:O,body:B,requestId:I}),_r(x)):x=void 0;}catch(Ce){Ie.debug("fetch request context capture failed",{method:D,url:O,err:Ce});}if(!xc(O))return b(R,P,L);let U;try{const Ce=a[pa]??h;if(typeof Ce!="function"||rl(Ce,"__twe_is_hook_fetch_v1"))throw new Error("fetch base function unavailable");const X=[this,_,r];typeof window<"u"&&X.push(window),X.push(globalThis);const re=[],Z=new Set;for(const ce of X)!ce||Z.has(ce)||(Z.add(ce),re.push(ce));U=C(Ce,re,R,P,L);}catch(Ce){const X=qr(Ce);if(f("fetch.basecall.error",{method:D,url:O,requestId:I,errName:X.name,errMsg:X.message}),!g){g=true,Ie.error("Fetch hook base invocation failed; enabling safe mode",{method:D,url:O,err:X.summary});try{m("fetch-hook-invocation-failed",X.summary);}catch{}}return b(R,P,L).catch(re=>{const Z=qr(re);throw f("fetch.fallback.error",{method:D,url:O,requestId:I,errName:Z.name,errMsg:Z.message},{force:true}),re??X.summary})}try{U.then(Ce=>{try{f("fetch.basecall.ok",{method:D,url:O});const X=Ce.headers.get("content-type")??"";if(!(!X||X.includes("json")||X.startsWith("text/")))return;Ce.clone().text().then(Z=>{if(Z)try{const ce=Ns({method:D,url:O,body:B||"",bookmarkContext:x??null,requestId:I});Yf({__twe_mcp_hook_v1:!0,req:ce,res:{status:Ce.status,responseText:Z}});}catch{}}).catch(Z=>{const ce=qr(Z);Ie.debug("fetch clone.text() failed",{method:D,url:O,err:ce.summary});});}catch(X){const re=qr(X);Ie.debug("fetch response hook observer callback failed",{method:D,url:O,err:re.summary});}},Ce=>{const X=qr(Ce);if(f("fetch.basecall.error",{method:D,url:O,requestId:I,errName:X.name,errMsg:X.message}),!g){g=!0,Ie.error("Fetch hook base invocation failed; enabling safe mode",{method:D,url:O,err:X.summary});try{m("fetch-hook-invocation-failed",X.summary);}catch{}}}).catch(Ce=>{const X=qr(Ce);Ie.debug("fetch response hook observer promise failed",{method:D,url:O,err:X.summary});});}catch(Ce){const X=qr(Ce);Ie.debug("fetch response hook observer setup failed",{method:D,url:O,err:X.summary});}return U};Ho(v,"__twe_is_hook_fetch_v1");const T=vc(a,"fetch",v);if(!T){this.enableSafeMode("fetch-hook-define-failed");return}Ho(a.fetch,"__twe_is_hook_fetch_v1"),this.emitHookDiag("fetch.install.ok",{hasHookMarker:ma(a.fetch,"__twe_is_hook_fetch_v1")},{force:true}),T&&this.debugEnabled&&Ie.info("Hooked into fetch"),T&&this.startFetchHookBootProbe(1200);}runFetchHookBootProbePass(){if(this.runtimeModes.safeMode||!this.isHookModeEnabled("fetch"))return;const t=wi(),n=t.fetch;if(typeof n!="function"){this.enableSafeMode("fetch-hook-probe-missing-fetch");return}this.emitHookDiag("fetch.bootprobe.begin",{hasHookMarker:ma(n,"__twe_is_hook_fetch_v1")},{force:true}),(async()=>{const o=[t];typeof window<"u"&&o.push(window),o.push(globalThis);const a=typeof location<"u"&&location.origin?`${location.origin}/favicon.ico?__twe_fetch_probe=1`:"https://x.com/favicon.ico?__twe_fetch_probe=1";let i=null;try{await(await n(a)).text().catch(()=>""),this.debugEnabled&&Ie.debug("Fetch hook boot probe passed"),this.emitHookDiag("fetch.bootprobe.ok",{});return}catch(l){i=l;}for(const l of o)try{await(this.hookDebugConfig.forceCallNotApply?await n.call(l,a):await Reflect.apply(n,l,[a])).text().catch(()=>""),this.debugEnabled&&Ie.debug("Fetch hook boot probe passed"),this.emitHookDiag("fetch.bootprobe.ok",{});return}catch(c){i=c;}const s=qr(i);if(this.emitHookDiag("fetch.bootprobe.error",{errName:s.name,errMsg:s.message},{force:true}),uk(i)){Ie.warn("Fetch boot probe hit cross-realm permission error; keeping fetch hook active",s.summary);return}this.enableSafeMode("fetch-hook-probe-failed",i);})();}startFetchHookBootProbe(t=1200){this.runtimeControlPlane.startFetchHookBootProbe(t);}runHookRepairPass(){return this.hookStats&&(this.hookStats.repairCount+=1,this.syncRuntimeStats()),this.isHookModeEnabled("xhr")&&this.installHttpHooks(true),this.isHookModeEnabled("fetch")&&this.installFetchHooks(true),this.runHookSelfTest()}runInterceptors(t,n){this.interceptorDispatcher.dispatch(this.getExtensions(),t,n);}}var _t=(e=>(e.TWEET="tweet",e.USER="user",e.CUSTOM="custom",e.NONE="none",e))(_t||{});class wn{constructor(t){Ve(this,"name","");Ve(this,"enabled",true);Ve(this,"type","none");Ve(this,"manager");this.manager=t;}setup(){}dispose(){}intercept(){return null}render(){return null}}let ni=null;function il(){return ni&&!ni.isDisposed()||(ni=new dk),ni}const er=new Proxy({},{get(e,t,n){const r=il(),o=Reflect.get(r,t,n);return typeof o=="function"?o.bind(r):o},set(e,t,n,r){const o=il();return Reflect.set(o,t,n,r)}}),fk="cupcake",hk="dracula";function pk(e){const t=e.match(/rgba?\(([^)]+)\)/i),n=t==null?void 0:t[1];if(!n)return null;const r=n.split(",").slice(0,3).map(s=>Number.parseFloat(s.trim()));if(r.length!==3||r.some(s=>!Number.isFinite(s)))return null;const[o,a,i]=r;return o===void 0||a===void 0||i===void 0?null:[o,a,i]}function mk([e,t,n]){const[r,o,a]=[e,t,n].map(i=>{const s=Math.max(0,Math.min(255,i))/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)});return r===void 0||o===void 0||a===void 0?0:.2126*r+.7152*o+.0722*a}function gk(){const e=[document.documentElement,document.body].filter(Boolean);for(const t of e){const n=[t.getAttribute("data-theme"),t.getAttribute("data-color-mode"),t.getAttribute("color-mode"),t.className,t.getAttribute("style")].join(" ").toLowerCase();if(/\b(dark|dim|night|lights-out|black)\b/.test(n))return "dark";if(/\b(light|default|white)\b/.test(n))return "light"}return null}function yk(){const e=getComputedStyle(document.documentElement).colorScheme.toLowerCase();if(e.includes("dark"))return "dark";if(e.includes("light"))return "light";const t=document.querySelector("main"),n=[document.body,t,document.documentElement].filter(r=>!!r);for(const r of n){const o=pk(getComputedStyle(r).backgroundColor);if(o)return mk(o)<.35?"dark":"light"}return null}function Xf(){var e;return (e=globalThis.matchMedia)!=null&&e.call(globalThis,"(prefers-color-scheme: dark)").matches?"dark":"light"}function _k(){return typeof document>"u"?Xf():gk()??yk()??Xf()}function Qf(e){return e&&e!=="system"?e:_k()==="dark"?hk:fk}function wk(e){const t=rn(Qf(e));return it(()=>{var a,i;const n=()=>{t.value=Qf(e);};if(n(),e&&e!=="system")return;const r=(a=globalThis.matchMedia)==null?void 0:a.call(globalThis,"(prefers-color-scheme: dark)");(i=r==null?void 0:r.addEventListener)==null||i.call(r,"change",n);const o=typeof MutationObserver<"u"?new MutationObserver(n):null;return o&&typeof document<"u"&&(o.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-color-mode","color-mode"]}),document.body&&o.observe(document.body,{attributes:true,attributeFilter:["class","style","data-theme","data-color-mode","color-mode"]})),()=>{var s;(s=r==null?void 0:r.removeEventListener)==null||s.call(r,"change",n),o==null||o.disconnect();}},[e,t]),t}function bk(e){const t=rn(er.getExtensions()),n=rn(ut.get("theme")),r=wk(n.value),o=rn(ut.get("showControlPanel")),a=rn(null),i=rn(null),s=rn(null),l=()=>{o.value=!o.value,ut.set("showControlPanel",o.value);};return it(()=>{t.value=er.getExtensions(),n.value=ut.get("theme"),o.value=ut.get("showControlPanel"),er.signal.subscribe(()=>{t.value=er.getExtensions();}),ut.signal.subscribe(()=>{n.value=ut.get("theme");try{er.applyRuntimeModesFromOptions(),i.value=er.getRuntimeModesSnapshot();}catch{i.value=null;}});try{er.applyRuntimeModesFromOptions();}catch{}typeof nl=="function"&&nl(e,l);let c=null;const h=()=>{try{a.value=er.getHookStatsSnapshot();}catch{a.value=null;}try{i.value=er.getRuntimeModesSnapshot();}catch{i.value=null;}try{s.value=globalThis.__twe_raw_capture_stats_v1;}catch{s.value=null;}},f=()=>{const m=typeof document<"u"&&document.hidden?8e3:2e3;c=globalThis.setTimeout(()=>{h(),f();},m);};return h(),f(),Ie.debug("Workspace shell state effect executed"),()=>{c!==null&&globalThis.clearTimeout(c);}},[]),{extensions:t,currentTheme:n,resolvedTheme:r,showControlPanel:o,hookStats:a,runtimeModes:i,rawCaptureStats:s,toggleControlPanel:l}}function vk(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100","aria-hidden":"true",...e,children:d("path",{fill:"currentColor",d:"m82.7 88.4c1.8-2.2 4.1-5.4 4.1-9.9s-1.9-7.3-4.5-9.8c1.8-3.2 6.6-5.4 9.8-5.4 0.8 0 2.2-1 2.2-2.8 0-3.4-3.3-7.3-7.9-7.3-1.1 0-1.9-0.1-1.9-3.9 0-0.6 0.1-1.4 0.1-2.4 6 0 14.3-3.1 14.3-11.4 0-4.7-4.6-13.6-13.8-18.7l-0.1-0.1v-0.1c0.3-5.9-1.6-8.9-4-8.9-2.5 0-4.4 3-5 4.6-1.4-3-3.9-6.5-7.1-6.5-2.2 0-4.4 2.1-4.4 6.6 0 2.8 0.7 5.8 1.7 8.1-2.5 3.4-4.6 7.9-4.6 15.1 0 8.7-9.9 8.8-16.6 20.5-3.9 6.4-4 12.5-3.8 18.6-1.4-1.8-1.8-7.3-0.7-12.2 2.2-8.7 9.4-12.8 12-22.9 0.7-2.5 1-5.1 1-7.9 0-12.5-9.5-28.2-27.2-28.2-13.6 0-24.8 11.3-24.8 24.5 0 5.5 1.7 10.9 5 13.7 1 1.1 2.3 1.4 2.5 0 0.5-2.3 3-5.7 7.3-5.7 4 0 7.6 2.3 7.6 6.6 0 4.7-4.1 8.2-6.5 16.5-0.7 2.4-1.1 5-1.1 7.9 0 16.1 11.7 29.4 32.3 29.4h33c4.3 0 6.6-0.6 6.6-2.8 0-2.4-2.1-4.3-5.5-5.2zm1-59.5c1.2 0 2.2 1 2.2 2.2s-0.9 2.2-2.2 2.5c-1.2 0-2.3-1-2.4-2.4 0-1.2 1.1-2.3 2.4-2.3z"})})}function kk({currentTheme:e,onToggle:t}){return d("div",{onClick:t,"data-theme":e,class:"group w-12 h-12 fixed top-[60%] left-[-20px] cursor-pointer bg-transparent text-base-content",children:d("div",{class:"w-full h-full origin origin-[bottom_center] transition-all duration-200 group-hover:translate-x-[5px] group-hover:rotate-[20deg] opacity-50 group-hover:opacity-90",children:d(vk,{class:"h-full w-full"})})})}function na(e,t,n){const r=JSON.parse(e.responseText),o=t(r),a=xk(o),i=new Set,s=[];for(const l of a){const c=n(l);!c||i.has(c.rest_id)||(i.add(c.rest_id),s.push(c));}return s}function xk(e){var n,r,o,a;const t=[];for(const i of e){if(i.type==="TimelineAddEntries"){const l=i;for(const c of l.entries??[])Wo(c)&&t.push(c);continue}if(i.type==="TimelinePinEntry"){const c=i.entry;c&&Wo(c)&&t.push(c);continue}if(i.type==="TimelineAddToModule"){const l=i;for(const c of l.moduleItems??[]){const h=(n=c==null?void 0:c.item)==null?void 0:n.itemContent;h&&t.push({entryId:c.entryId??"",sortIndex:"0",content:{entryType:"TimelineTimelineItem",__typename:"TimelineTimelineItem",itemContent:h,clientEventInfo:((r=c==null?void 0:c.item)==null?void 0:r.clientEventInfo)??null}});}continue}const s=i;if(Array.isArray(s==null?void 0:s.entries)){for(const l of s.entries)l&&Wo(l)&&t.push(l);continue}if(s!=null&&s.entry&&Wo(s.entry)){t.push(s.entry);continue}if(Array.isArray(s==null?void 0:s.moduleItems)){for(const l of s.moduleItems??[]){const c=(o=l==null?void 0:l.item)==null?void 0:o.itemContent;c&&t.push({entryId:l.entryId??"",sortIndex:"0",content:{entryType:"TimelineTimelineItem",__typename:"TimelineTimelineItem",itemContent:c,clientEventInfo:((a=l==null?void 0:l.item)==null?void 0:a.clientEventInfo)??null}});}continue}}return t}function Hn(e){const t=e.tweet_results.result;return t?gd(t):(Ie.warn("TimelineTweet is empty. This could happen when the tweet's visibility is limited by Twitter.",e),null)}function Gr(e){const t=e.user_results.result;return !t||t.__typename!=="User"?(Ie.warn("TimelineUser is empty. This could happen when the user's account is suspended or deleted.",e),null):t}function Wo(e){return e.content.entryType==="TimelineTimelineItem"}function pd(e){return Wo(e)&&e.entryId.startsWith("tweet-")&&e.content.itemContent.__typename==="TimelineTweet"}function md(e){return Wo(e)&&e.entryId.startsWith("user-")&&e.content.itemContent.__typename==="TimelineUser"}function Po(e){return e.content.entryType==="TimelineTimelineModule"}function Sk(e){return Po(e)&&e.entryId.startsWith("conversationthread-")&&Array.isArray(e.content.items)}function Ck(e){return Po(e)&&e.entryId.startsWith("profile-conversation-")&&Array.isArray(e.content.items)}function Tk(e){return Po(e)&&e.entryId.startsWith("profile-grid-")&&Array.isArray(e.content.items)}function Mk(e){return Po(e)&&e.entryId.startsWith("search-grid-")&&Array.isArray(e.content.items)}function Rk(e){return Po(e)&&e.entryId.startsWith("list-search-")&&Array.isArray(e.content.items)}function Ik(e){return Po(e)&&e.entryId.startsWith("communities-grid-")&&Array.isArray(e.content.items)}function gd(e){var t,n;try{if(e.__typename==="Tweet")return Zf(e);if(e.__typename==="TweetWithVisibilityResults")return Zf(e.tweet);if(e.__typename==="TweetTombstone")return Ie.warn(`TweetTombstone received (Reason: ${(n=(t=e.tombstone)==null?void 0:t.text)==null?void 0:n.text})`,e),null;if(e.__typename==="TweetUnavailable")return Ie.warn("TweetUnavailable received (Reason: unknown)",e),null;Ie.debug(e),Ie.errorWithBanner("Unknown tweet type received");}catch(r){Ie.debug(e),Ie.errorWithBanner("Failed to extract tweet",r);}return null}function Va(e){var t;return (t=e.legacy.retweeted_status_result)!=null&&t.result?gd(e.legacy.retweeted_status_result.result):null}function yd(e){var t;return (t=e.quoted_status_result)!=null&&t.result?gd(e.quoted_status_result.result):null}function Ml(e){var n,r;const t=(r=(n=e.article)==null?void 0:n.article_results)==null?void 0:r.result;return t&&typeof t=="object"?t:null}function Ek(e){var r;const t=(r=e==null?void 0:e.content_state)==null?void 0:r.blocks;if(!Array.isArray(t))return [];const n=[];for(const o of t){const a=typeof(o==null?void 0:o.text)=="string"?o.text.trim():"";a&&n.push(a);}return n}function ug(e){const t=String(e||"").trim();return t?t.replace(/\?(?:format|name)=[^&]+(?:&name=[^&]+)?$/i,""):""}function xu(e){const t=String(e.url||"").trim();if(!t)return null;const n=Go(e.tweet),r=String(e.mediaId||`${e.idPrefix||"synthetic"}_${e.tweet.rest_id}`).trim(),o=String(e.mediaKey||`${e.idPrefix||"synthetic"}_${r}`).trim(),a=Number(e.width||0)||0,i=Number(e.height||0)||0;return {display_url:t,expanded_url:n,id_str:r||e.tweet.rest_id,indices:[0,0],media_url_https:t,type:"photo",url:t,sizes:{large:{h:i,w:a,resize:"fit"},medium:{h:i,w:a,resize:"fit"},small:{h:i,w:a,resize:"fit"},thumb:{h:i,w:a,resize:"fit"}},original_info:{height:i,width:a},media_results:{result:{media_key:o||`synthetic_${e.tweet.rest_id}`}},ext_alt_text:String(e.altText||"").trim()||void 0,media_key:o||`synthetic_${e.tweet.rest_id}`}}function dg(e,t){var a,i,s,l,c,h;if(!t)return [];const n=new Map,r=f=>{if(!f)return;const m=ug(f.media_url_https);!m||n.has(m)||n.set(m,f);};for(const f of t.media_entities??[])r(xu({tweet:e,url:((a=f==null?void 0:f.media_info)==null?void 0:a.original_img_url)||"",mediaId:(f==null?void 0:f.media_id)||(f==null?void 0:f.id)||(t==null?void 0:t.rest_id)||e.rest_id,mediaKey:(f==null?void 0:f.media_key)||null,width:((i=f==null?void 0:f.media_info)==null?void 0:i.original_img_width)||0,height:((s=f==null?void 0:f.media_info)==null?void 0:s.original_img_height)||0,altText:(t==null?void 0:t.title)||(t==null?void 0:t.preview_text)||null,idPrefix:"article"}));const o=t.cover_media;return r(xu({tweet:e,url:((l=o==null?void 0:o.media_info)==null?void 0:l.original_img_url)||"",mediaId:(o==null?void 0:o.media_id)||(t==null?void 0:t.rest_id)||e.rest_id,mediaKey:(o==null?void 0:o.media_key)||null,width:((c=o==null?void 0:o.media_info)==null?void 0:c.original_img_width)||0,height:((h=o==null?void 0:o.media_info)==null?void 0:h.original_img_height)||0,altText:(t==null?void 0:t.title)||(t==null?void 0:t.preview_text)||null,idPrefix:"article"})),Array.from(n.values())}function Ak(e){const t=[e.card,e.unified_card],n=new Map,r=a=>{if(!a)return;if(Array.isArray(a)){for(const s of a)r(s);return}if(typeof a!="object")return;const i=a;for(const[s,l]of Object.entries(i)){if(s==="url"&&typeof l=="string"&&/https:\/\/pbs\.twimg\.com\/(?:card_img|media)\//.test(l)){const c=ug(l);c&&!n.has(c)&&n.set(c,l);continue}r(l);}};for(const a of t)r(a);let o=0;return Array.from(n.values()).slice(0,12).map(a=>xu({tweet:e,url:a,mediaId:`${e.rest_id}_${o++}`,mediaKey:`card_${e.rest_id}_${o}`,altText:Il(e),idPrefix:"card"})).filter(a=>!!a)}function Qo(e){var r,o,a;const t=(r=e.legacy)==null?void 0:r.created_at;if(typeof t=="string"&&t.trim()){const i=+Na(t);if(Number.isFinite(i)&&i>0)return i}const n=Number(((a=(o=Ml(e))==null?void 0:o.metadata)==null?void 0:a.first_published_at_secs)||0);return Number.isFinite(n)&&n>0?n*1e3:Date.now()}function Rl(e){return e.core.user_results.result.core.screen_name}function lo(e){var a,i,s,l;const t=Va(e)??e;if((a=t.legacy.extended_entities)!=null&&a.media)return t.legacy.extended_entities.media;const n=((s=(i=t.legacy)==null?void 0:i.entities)==null?void 0:s.media)??[];if(n.length)return n;const r=dg(t,Ml(t));if(r.length)return r;if((Number(((l=t.twe_private_fields)==null?void 0:l.media_count)||0)||0)>0){const c=Ak(t);if(c.length)return c}return []}function Dk(e){return Va(e)?false:lo(e).length>0}function Pk(e){const t=lo(e),n=[];for(const r of t){const o=Fk(r);for(const a of o)n.some(i=>i.user_id===a.user_id)||n.push(a);}return n}function Il(e){var i,s;const t=(i=e.note_tweet)==null?void 0:i.note_tweet_results.result.text;if(t&&t.trim())return t;const n=(s=e.legacy)==null?void 0:s.full_text;if(n&&n.trim())return n;const r=Ml(e),o=[r==null?void 0:r.title,r==null?void 0:r.preview_text,...Ek(r)].map(l=>String(l||"").trim()).filter(Boolean);return o.filter((l,c)=>o.indexOf(l)===c).join(`
`)}function Zf(e){var t,n;if(!e.legacy){const r=Ml(e);if(!r||!((n=(t=e.core)==null?void 0:t.user_results)!=null&&n.result))return Ie.warn("Empty tweet received",e),null;const o=Qo(e),a=Il(e),i=dg(e,r),s=e.core.user_results.result.rest_id||String(e.core.user_results.result.id||"").split(":").pop()||"";e.legacy={bookmark_count:0,bookmarked:false,created_at:new Date(o).toUTCString(),conversation_id_str:e.rest_id,display_text_range:[0,a.length],entities:{media:i.length?i:void 0,user_mentions:[],urls:[],hashtags:[],symbols:[],timestamps:[]},extended_entities:i.length?{media:i}:void 0,favorite_count:0,favorited:false,full_text:a,is_quote_status:false,lang:"und",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:0,reply_count:0,retweet_count:0,retweeted:false,user_id_str:s,id_str:e.rest_id};}return e}function Jf(e,t){const n=t.media_key;return lo(e).findIndex(r=>r.media_key===n)}function Zo(e){var t;if(e.type==="video"||e.type==="animated_gif"){const n=((t=e.video_info)==null?void 0:t.variants)??[];let r=n[0];for(const o of n)o.bitrate&&o.bitrate>((r==null?void 0:r.bitrate)??0)&&(r=o);return (r==null?void 0:r.url)??e.media_url_https}return Ua(e.media_url_https,"orig")}function Fk(e){var t,n;return ((n=(t=e.features)==null?void 0:t.all)==null?void 0:n.tags)??[]}function Ua(e,t="medium"){if(!e)return "";try{const i=new URL(e);if(i.hostname==="pbs.twimg.com"){const s=i.searchParams.get("format"),l=i.pathname.match(/^(\/media\/.+)\.(\w+)$/);if(l){const[,c,h]=l;return i.pathname=c||i.pathname,i.search="",i.searchParams.set("format",h||s||"jpg"),i.searchParams.set("name",t),i.toString()}if(s||i.searchParams.has("name"))return i.searchParams.set("name",t),i.toString()}}catch{}const n=/^(https?:\/\/pbs\.twimg\.com\/media\/.+)\.(\w+)$/,r=e.match(n);if(!r){const i=e.includes("?")?"&":"?";return `${e}${i}name=${t}`}const[,o,a]=r;return `${o}?format=${a}&name=${t}`}function _d(e){return e.replace(/_normal\.(jpe?g|png|gif)$/,".$1")}function Su(e){const n=/format=(\w+)|\.(\w+)$|\.(\w+)\?.+$/.exec(e);return (n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??"jpg"}function Go(e){var n;const t=String(((n=e.legacy)==null?void 0:n.id_str)||e.rest_id||"").trim();return `https://twitter.com/${Rl(e)}/status/${t}`}function vi(e){return `https://twitter.com/${typeof e=="string"?e:e.core.screen_name}`}function Ok(e){return `https://twitter.com/${e.legacy.in_reply_to_screen_name}/status/${e.legacy.in_reply_to_status_id_str}`}function qi({title:e,description:t,children:n,onClick:r,active:o,indicatorColor:a="bg-secondary",panelClass:i,contentClass:s,buttonClass:l}){return d("section",{class:an("module-panel -ml-2 overflow-visible pl-2 transition-colors duration-150",i),children:[d("div",{class:an("h-12 flex items-center justify-start",s),children:[d("div",{class:"relative flex h-4 w-4 mr-3 shrink-0",children:[o&&d("span",{class:an("animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",a)}),d("span",{class:an("relative inline-flex rounded-full h-4 w-4",a)})]}),d("div",{class:"flex flex-col flex-grow",children:[d("p",{class:"text-base m-0 font-medium leading-none",children:e}),d("p",{class:"text-sm text-base-content leading-5 text-opacity-70 m-0",children:t})]}),d("button",{class:an("btn btn-sm p-0 w-9 h-9",l),onClick:r,children:d(cw,{})})]}),n]})}function sr({show:e,onClose:t,title:n,children:r,class:o,fullscreen:a}){return e?d("dialog",{class:an("modal modal-open z-[6000]",a&&"!p-0"),open:true,children:[d("div",{class:an("modal-box p-3 flex min-h-0 flex-col",a&&"h-screen w-screen max-h-screen max-w-none rounded-none border-0 p-0 shadow-none",o),children:[d("header",{class:an("flex items-center h-8 mb-1.5",a&&"mb-0 h-11 border-b border-base-300 px-3"),children:[d("div",{onClick:t,class:"w-8 h-8 mr-2 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:d(zs,{})}),d("h2",{class:"leading-none text-lg m-0 font-semibold tracking-[0.01em]",children:n})]}),d(_i,{children:r})]}),d("form",{method:"dialog",class:"modal-backdrop",children:d("div",{onClick:t})})]}):d("dialog",{class:"modal"})}function fg(e){const{options:t,selected:n,onChange:r}=e,[o,a]=Ne(""),i=t.filter(c=>n.includes(c.value)),s=Tt(()=>{const c=o.trim().toLowerCase();return (c?t.filter(f=>f.label.toLowerCase().includes(c)||String(f.value).toLowerCase().includes(c)):t).slice(0,250)},[o,t]),l=c=>{const h=c.target;h.checked?r([...new Set([...n,h.value])]):r(n.filter(f=>f!==h.value));};return d("div",{class:an("dropdown",e.class),children:[d("div",{tabIndex:0,class:"input input-bordered input-sm flex flex-row items-center space-x-1 cursor-pointer min-h-9",children:i.length?d("div",{class:"min-w-0 truncate text-xs font-medium",children:e.selectedSummary?e.selectedSummary(i.length):`${i.length} selected`}):d("span",{class:"text-xs opacity-60 select-none",children:e.placeholder||"Select..."})}),d("ul",{tabIndex:0,class:"dropdown-content menu menu-sm z-10 w-full rounded-box bg-base-100 p-2 shadow",children:[t.length>80?d("li",{class:"mb-1",children:d("input",{class:"input input-bordered input-xs w-full",value:o,placeholder:"Filter...",onInput:c=>a(c.target.value)})}):null,s.map(c=>d("li",{children:d("label",{class:"label cursor-pointer justify-start",children:[d("input",{type:"checkbox",class:"checkbox checkbox-accent checkbox-sm",value:c.value,checked:n.includes(c.value),onChange:l}),d("span",{class:"label-text ml-1",children:c.label})]})},c.value))]})]})}function hg({data:e,onClick:t}){return d("div",{class:"flex flex-row items-start space-x-1 w-max",children:[e.map(n=>{var r;return d("div",{class:"flex-shrink-0 block cursor-pointer relative w-12 h-12 rounded bg-base-300 overflow-hidden",onClick:()=>t(n),children:[d("img",{class:"w-full h-full object-cover",src:Ua(n.media_url_https,"thumb"),alt:n.ext_alt_text||"",title:n.ext_alt_text||"",loading:"lazy",decoding:"async"}),n.type!=="photo"&&d("div",{class:"absolute bottom-0.5 left-0.5 h-4 w-max px-0.5 text-xs text-white bg-black bg-opacity-30 leading-4 text-center rounded",children:n.type==="video"?Xm((r=n.video_info)==null?void 0:r.duration_millis):"GIF"}),n.type==="photo"&&n.ext_alt_text&&d("div",{class:"absolute bottom-0.5 left-0.5 h-4 w-max px-0.5 text-xs text-white bg-black bg-opacity-30 leading-4 text-center rounded",children:"ALT"})]},n.media_key??n.id_str)}),e.length?null:"N/A"]})}const Lk=(function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"})(),Nk=function(e){return "/"+e},eh={},Bk=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=i(n.map(c=>{if(c=Nk(c),c in eh)return;eh[c]=true;const h=c.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":Lk,h||(m.as="script"),m.crossOrigin="",m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),h)return new Promise((g,_)=>{m.addEventListener("load",g),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${c}`)));})}));}function a(i){const s=new Event("vite:preloadError",{cancelable:true});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})},Uk=4294967296;function th(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,"0")}async function sl(e){var r;const t=typeof e=="string"?new TextEncoder().encode(e):e;if((r=globalThis.crypto)!=null&&r.subtle){const o=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),a=await globalThis.crypto.subtle.digest("SHA-256",o);return [...new Uint8Array(a)].map(i=>i.toString(16).padStart(2,"0")).join("")}let n="";for(let o=0;o<t.length;o+=4096)n+=th(String.fromCharCode(...t.slice(o,o+4096)));return th(`${t.length}:${n}:${Uk}`)}async function pg(e){return `bundle_${(await sl(e)).slice(0,24)}`}async function mg(e,t,n){return `record_${(await sl(`${e}:${t}:${n}`)).slice(0,32)}`}const gg={includeViewerAccountId:false,includeSourceCaptureTimes:false,includeRawGraphQL:false,includePrivateNotes:false,includeMediaBlobs:false,visibility:"shared_safe"};function yg(e){return {visibility:e.visibility,includesViewerAccountId:e.includeViewerAccountId,includesSourceCaptureTimes:e.includeSourceCaptureTimes,includesRawGraphQL:e.includeRawGraphQL,includesPrivateNotes:e.includePrivateNotes,includesMediaBlobs:e.includeMediaBlobs,warnings:$k(e)}}function $k(e){const t=[];return e.includeViewerAccountId&&t.push("Includes the exporting account identifier."),e.includeSourceCaptureTimes&&t.push("Includes local capture/import timestamps."),e.includeRawGraphQL&&t.push("Includes raw API payloads that may contain unrelated account context."),e.includePrivateNotes&&t.push("Includes user-authored local notes or labels."),e.includeMediaBlobs&&t.push("Includes downloaded media files, increasing size and redistribution risk."),e.visibility==="public"&&t.length&&t.unshift("Public bundle includes fields that should be reviewed before sharing."),t}var Sn=Uint8Array,dr=Uint16Array,wd=Int32Array,El=new Sn([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]),Al=new Sn([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]),Cu=new Sn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_g=function(e,t){for(var n=new dr(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var o=new wd(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)o[a]=a-n[r]<<5|r;return {b:n,r:o}},wg=_g(El,2),bg=wg.b,Tu=wg.r;bg[28]=258,Tu[258]=28;var vg=_g(Al,0),Hk=vg.b,nh=vg.r,Mu=new dr(32768);for(var pn=0;pn<32768;++pn){var go=(pn&43690)>>1|(pn&21845)<<1;go=(go&52428)>>2|(go&13107)<<2,go=(go&61680)>>4|(go&3855)<<4,Mu[pn]=((go&65280)>>8|(go&255)<<8)>>1;}var Wr=(function(e,t,n){for(var r=e.length,o=0,a=new dr(t);o<r;++o)e[o]&&++a[e[o]-1];var i=new dr(t);for(o=1;o<t;++o)i[o]=i[o-1]+a[o-1]<<1;var s;if(n){s=new dr(1<<t);var l=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],h=t-e[o],f=i[e[o]-1]++<<h,m=f|(1<<h)-1;f<=m;++f)s[Mu[f]>>l]=c;}else for(s=new dr(r),o=0;o<r;++o)e[o]&&(s[o]=Mu[i[e[o]-1]++]>>15-e[o]);return s}),Io=new Sn(288);for(var pn=0;pn<144;++pn)Io[pn]=8;for(var pn=144;pn<256;++pn)Io[pn]=9;for(var pn=256;pn<280;++pn)Io[pn]=7;for(var pn=280;pn<288;++pn)Io[pn]=8;var Oi=new Sn(32);for(var pn=0;pn<32;++pn)Oi[pn]=5;var jk=Wr(Io,9,0),qk=Wr(Io,9,1),Vk=Wr(Oi,5,0),zk=Wr(Oi,5,1),Sc=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Cr=function(e,t,n){var r=t/8|0;return (e[r]|e[r+1]<<8)>>(t&7)&n},Cc=function(e,t){var n=t/8|0;return (e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},bd=function(e){return (e+7)/8|0},Vi=function(e,t,n){return (t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Sn(e.subarray(t,n))},Kk=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],tr=function(e,t,n){var r=new Error(t||Kk[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,tr),!n)throw r;return r},Gk=function(e,t,n,r){var o=e.length,a=r?r.length:0;if(!o||t.f&&!t.l)return n||new Sn(0);var i=!n,s=i||t.i!=2,l=t.i;i&&(n=new Sn(o*3));var c=function(_e){var ke=n.length;if(_e>ke){var Ze=new Sn(Math.max(ke*2,_e));Ze.set(n),n=Ze;}},h=t.f||0,f=t.p||0,m=t.b||0,g=t.l,_=t.d,b=t.m,C=t.n,v=o*8;do{if(!g){h=Cr(e,f,1);var T=Cr(e,f+1,3);if(f+=3,T)if(T==1)g=qk,_=zk,b=9,C=5;else if(T==2){var D=Cr(e,f,31)+257,O=Cr(e,f+10,15)+4,B=D+Cr(e,f+5,31)+1;f+=14;for(var I=new Sn(B),x=new Sn(19),F=0;F<O;++F)x[Cu[F]]=Cr(e,f+F*3,7);f+=O*3;for(var U=Sc(x),Ce=(1<<U)-1,X=Wr(x,U,1),F=0;F<B;){var re=X[Cr(e,f,Ce)];f+=re&15;var R=re>>4;if(R<16)I[F++]=R;else {var Z=0,ce=0;for(R==16?(ce=3+Cr(e,f,3),f+=2,Z=I[F-1]):R==17?(ce=3+Cr(e,f,7),f+=3):R==18&&(ce=11+Cr(e,f,127),f+=7);ce--;)I[F++]=Z;}}var he=I.subarray(0,D),fe=I.subarray(D);b=Sc(he),C=Sc(fe),g=Wr(he,b,1),_=Wr(fe,C,1);}else tr(1);else {var R=bd(f)+4,P=e[R-4]|e[R-3]<<8,L=R+P;if(L>o){l&&tr(0);break}s&&c(m+P),n.set(e.subarray(R,L),m),t.b=m+=P,t.p=f=L*8,t.f=h;continue}if(f>v){l&&tr(0);break}}s&&c(m+131072);for(var me=(1<<b)-1,z=(1<<C)-1,ue=f;;ue=f){var Z=g[Cc(e,f)&me],Ae=Z>>4;if(f+=Z&15,f>v){l&&tr(0);break}if(Z||tr(2),Ae<256)n[m++]=Ae;else if(Ae==256){ue=f,g=null;break}else {var ie=Ae-254;if(Ae>264){var F=Ae-257,Oe=El[F];ie=Cr(e,f,(1<<Oe)-1)+bg[F],f+=Oe;}var Le=_[Cc(e,f)&z],ee=Le>>4;Le||tr(3),f+=Le&15;var fe=Hk[ee];if(ee>3){var Oe=Al[ee];fe+=Cc(e,f)&(1<<Oe)-1,f+=Oe;}if(f>v){l&&tr(0);break}s&&c(m+131072);var ne=m+ie;if(m<fe){var V=a-fe,se=Math.min(fe,ne);for(V+m<0&&tr(3);m<se;++m)n[m]=r[V+m];}for(;m<ne;++m)n[m]=n[m-fe];}}t.l=g,t.p=ue,t.b=m,t.f=h,g&&(h=1,t.m=b,t.d=_,t.n=C);}while(!h);return m!=n.length&&i?Vi(n,0,m):n.subarray(0,m)},Jr=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8;},ri=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16;},Tc=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,a=n.slice();if(!o)return {t:xg,l:0};if(o==1){var i=new Sn(n[0].s+1);return i[n[0].s]=1,{t:i,l:1}}n.sort(function(L,D){return L.f-D.f}),n.push({s:-1,f:25001});var s=n[0],l=n[1],c=0,h=1,f=2;for(n[0]={s:-1,f:s.f+l.f,l:s,r:l};h!=o-1;)s=n[n[c].f<n[f].f?c++:f++],l=n[c!=h&&n[c].f<n[f].f?c++:f++],n[h++]={s:-1,f:s.f+l.f,l:s,r:l};for(var m=a[0].s,r=1;r<o;++r)a[r].s>m&&(m=a[r].s);var g=new dr(m+1),_=Ru(n[h-1],g,0);if(_>t){var r=0,b=0,C=_-t,v=1<<C;for(a.sort(function(D,O){return g[O.s]-g[D.s]||D.f-O.f});r<o;++r){var T=a[r].s;if(g[T]>t)b+=v-(1<<_-g[T]),g[T]=t;else break}for(b>>=C;b>0;){var R=a[r].s;g[R]<t?b-=1<<t-g[R]++-1:++r;}for(;r>=0&&b;--r){var P=a[r].s;g[P]==t&&(--g[P],++b);}_=t;}return {t:new Sn(g),l:_}},Ru=function(e,t,n){return e.s==-1?Math.max(Ru(e.l,t,n+1),Ru(e.r,t,n+1)):t[e.s]=n},rh=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new dr(++t),r=0,o=e[0],a=1,i=function(l){n[r++]=l;},s=1;s<=t;++s)if(e[s]==o&&s!=t)++a;else {if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0);}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0);}for(;a--;)i(o);a=1,o=e[s];}return {c:n.subarray(0,r),n:t}},oi=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},kg=function(e,t,n){var r=n.length,o=bd(t+2);e[o]=r&255,e[o+1]=r>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var a=0;a<r;++a)e[o+a+4]=n[a];return (o+4+r)*8},oh=function(e,t,n,r,o,a,i,s,l,c,h){Jr(t,h++,n),++o[256];for(var f=Tc(o,15),m=f.t,g=f.l,_=Tc(a,15),b=_.t,C=_.l,v=rh(m),T=v.c,R=v.n,P=rh(b),L=P.c,D=P.n,O=new dr(19),B=0;B<T.length;++B)++O[T[B]&31];for(var B=0;B<L.length;++B)++O[L[B]&31];for(var I=Tc(O,7),x=I.t,F=I.l,U=19;U>4&&!x[Cu[U-1]];--U);var Ce=c+5<<3,X=oi(o,Io)+oi(a,Oi)+i,re=oi(o,m)+oi(a,b)+i+14+3*U+oi(O,x)+2*O[16]+3*O[17]+7*O[18];if(l>=0&&Ce<=X&&Ce<=re)return kg(t,h,e.subarray(l,l+c));var Z,ce,he,fe;if(Jr(t,h,1+(re<X)),h+=2,re<X){Z=Wr(m,g,0),ce=m,he=Wr(b,C,0),fe=b;var me=Wr(x,F,0);Jr(t,h,R-257),Jr(t,h+5,D-1),Jr(t,h+10,U-4),h+=14;for(var B=0;B<U;++B)Jr(t,h+3*B,x[Cu[B]]);h+=3*U;for(var z=[T,L],ue=0;ue<2;++ue)for(var Ae=z[ue],B=0;B<Ae.length;++B){var ie=Ae[B]&31;Jr(t,h,me[ie]),h+=x[ie],ie>15&&(Jr(t,h,Ae[B]>>5&127),h+=Ae[B]>>12);}}else Z=jk,ce=Io,he=Vk,fe=Oi;for(var B=0;B<s;++B){var Oe=r[B];if(Oe>255){var ie=Oe>>18&31;ri(t,h,Z[ie+257]),h+=ce[ie+257],ie>7&&(Jr(t,h,Oe>>23&31),h+=El[ie]);var Le=Oe&31;ri(t,h,he[Le]),h+=fe[Le],Le>3&&(ri(t,h,Oe>>5&8191),h+=Al[Le]);}else ri(t,h,Z[Oe]),h+=ce[Oe];}return ri(t,h,Z[256]),h+ce[256]},Wk=new wd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xg=new Sn(0),Yk=function(e,t,n,r,o,a){var i=a.z||e.length,s=new Sn(r+i+5*(1+Math.ceil(i/7e3))+o),l=s.subarray(r,s.length-o),c=a.l,h=(a.r||0)&7;if(t){h&&(l[0]=a.r>>3);for(var f=Wk[t-1],m=f>>13,g=f&8191,_=(1<<n)-1,b=a.p||new dr(32768),C=a.h||new dr(_+1),v=Math.ceil(n/3),T=2*v,R=function(Je){return (e[Je]^e[Je+1]<<v^e[Je+2]<<T)&_},P=new wd(25e3),L=new dr(288),D=new dr(32),O=0,B=0,I=a.i||0,x=0,F=a.w||0,U=0;I+2<i;++I){var Ce=R(I),X=I&32767,re=C[Ce];if(b[X]=re,C[Ce]=X,F<=I){var Z=i-I;if((O>7e3||x>24576)&&(Z>423||!c)){h=oh(e,l,0,P,L,D,B,x,U,I-U,h),x=O=B=0,U=I;for(var ce=0;ce<286;++ce)L[ce]=0;for(var ce=0;ce<30;++ce)D[ce]=0;}var he=2,fe=0,me=g,z=X-re&32767;if(Z>2&&Ce==R(I-z))for(var ue=Math.min(m,Z)-1,Ae=Math.min(32767,I),ie=Math.min(258,Z);z<=Ae&&--me&&X!=re;){if(e[I+he]==e[I+he-z]){for(var Oe=0;Oe<ie&&e[I+Oe]==e[I+Oe-z];++Oe);if(Oe>he){if(he=Oe,fe=z,Oe>ue)break;for(var Le=Math.min(z,Oe-2),ee=0,ce=0;ce<Le;++ce){var ne=I-z+ce&32767,V=b[ne],se=ne-V&32767;se>ee&&(ee=se,re=ne);}}}X=re,re=b[X],z+=X-re&32767;}if(fe){P[x++]=268435456|Tu[he]<<18|nh[fe];var _e=Tu[he]&31,ke=nh[fe]&31;B+=El[_e]+Al[ke],++L[257+_e],++D[ke],F=I+he,++O;}else P[x++]=e[I],++L[e[I]];}}for(I=Math.max(I,F);I<i;++I)P[x++]=e[I],++L[e[I]];h=oh(e,l,c,P,L,D,B,x,U,I-U,h),c||(a.r=h&7|l[h/8|0]<<3,h-=7,a.h=C,a.p=b,a.i=I,a.w=F);}else {for(var I=a.w||0;I<i+c;I+=65535){var Ze=I+65535;Ze>=i&&(l[h/8|0]=c,Ze=i),h=kg(l,h+1,e.subarray(I,Ze));}a.i=i;}return Vi(s,0,r+bd(h)+o)},Xk=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n;}return e})(),Qk=function(){var e=-1;return {p:function(t){for(var n=e,r=0;r<t.length;++r)n=Xk[n&255^t[r]]^n>>>8;e=n;},d:function(){return ~e}}},Zk=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),i=new Sn(a.length+e.length);i.set(a),i.set(e,a.length),e=i,o.w=a.length;}return Yk(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,o)},Sg=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},zr=function(e,t){return e[t]|e[t+1]<<8},Mr=function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Mc=function(e,t){return Mr(e,t)+Mr(e,t+4)*4294967296},Vn=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8;};function Jk(e,t){return Zk(e,t||{},0,0)}function ex(e,t){return Gk(e,{i:2},t&&t.out,t&&t.dictionary)}var Cg=function(e,t,n,r){for(var o in e){var a=e[o],i=t+o,s=r;Array.isArray(a)&&(s=Sg(r,a[1]),a=a[0]),a instanceof Sn?n[i]=[a,s]:(n[i+="/"]=[new Sn(0),s],Cg(a,i,n,r));}},ah=typeof TextEncoder<"u"&&new TextEncoder,Iu=typeof TextDecoder<"u"&&new TextDecoder,tx=0;try{Iu.decode(xg,{stream:!0}),tx=1;}catch{}var nx=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return {s:t,r:Vi(e,n-1)};o?o==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):o&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r);}};function Eu(e,t){var n;if(ah)return ah.encode(e);for(var r=e.length,o=new Sn(e.length+(e.length>>1)),a=0,i=function(c){o[a++]=c;},n=0;n<r;++n){if(a+5>o.length){var s=new Sn(a+8+(r-n<<1));s.set(o),o=s;}var l=e.charCodeAt(n);l<128||t?i(l):l<2048?(i(192|l>>6),i(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++n)&1023,i(240|l>>18),i(128|l>>12&63),i(128|l>>6&63),i(128|l&63)):(i(224|l>>12),i(128|l>>6&63),i(128|l&63));}return Vi(o,0,a)}function Tg(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else {if(Iu)return Iu.decode(e);var o=nx(e),a=o.s,n=o.r;return n.length&&tr(8),a}}var rx=function(e,t){return t+30+zr(e,t+26)+zr(e,t+28)},ox=function(e,t,n){var r=zr(e,t+28),o=Tg(e.subarray(t+46,t+46+r),!(zr(e,t+8)&2048)),a=t+46+r,i=Mr(e,t+20),s=n&&i==4294967295?ax(e,a):[i,Mr(e,t+24),Mr(e,t+42)],l=s[0],c=s[1],h=s[2];return [zr(e,t+10),l,c,o,a+zr(e,t+30)+zr(e,t+32),h]},ax=function(e,t){for(;zr(e,t)!=1;t+=4+zr(e,t+2));return [Mc(e,t+12),Mc(e,t+4),Mc(e,t+20)]},Au=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&tr(9),t+=r+4;}return t},ih=function(e,t,n,r,o,a,i,s){var l=r.length,c=n.extra,h=s&&s.length,f=Au(c);Vn(e,t,i!=null?33639248:67324752),t+=4,i!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=o&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var m=new Date(n.mtime==null?Date.now():n.mtime),g=m.getFullYear()-1980;if((g<0||g>119)&&tr(10),Vn(e,t,g<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),t+=4,a!=-1&&(Vn(e,t,n.crc),Vn(e,t+4,a<0?-a-2:a),Vn(e,t+8,n.size)),Vn(e,t+12,l),Vn(e,t+14,f),t+=16,i!=null&&(Vn(e,t,h),Vn(e,t+6,n.attrs),Vn(e,t+10,i),t+=14),e.set(r,t),t+=l,f)for(var _ in c){var b=c[_],C=b.length;Vn(e,t,+_),Vn(e,t+2,C),e.set(b,t+4),t+=4+C;}return h&&(e.set(s,t),t+=h),t},ix=function(e,t,n,r,o){Vn(e,t,101010256),Vn(e,t+8,n),Vn(e,t+10,n),Vn(e,t+12,r),Vn(e,t+16,o);};function sx(e,t){t||(t={});var n={},r=[];Cg(e,"",n,t);var o=0,a=0;for(var i in n){var s=n[i],l=s[0],c=s[1],h=c.level==0?0:8,f=Eu(i),m=f.length,g=c.comment,_=g&&Eu(g),b=_&&_.length,C=Au(c.extra);m>65535&&tr(11);var v=h?Jk(l,c):l,T=v.length,R=Qk();R.p(l),r.push(Sg(c,{size:l.length,crc:R.d(),c:v,f,m:_,u:m!=i.length||_&&g.length!=b,o,compression:h})),o+=30+m+C+T,a+=76+2*(m+C)+(b||0)+T;}for(var P=new Sn(a+22),L=o,D=a-o,O=0;O<r.length;++O){var f=r[O];ih(P,f.o,f,f.f,f.u,f.c.length);var B=30+f.f.length+Au(f.extra);P.set(f.c,f.o+B),ih(P,o,f,f.f,f.u,f.c.length,f.o,f.m),o+=16+B+(f.m?f.m.length:0);}return ix(P,o,r.length,D,L),P}function lx(e,t){for(var n={},r=e.length-22;Mr(e,r)!=101010256;--r)(!r||e.length-r>65558)&&tr(13);var o=zr(e,r+8);if(!o)return {};var a=Mr(e,r+16),i=a==4294967295||o==65535;if(i){var s=Mr(e,r-12);i=Mr(e,s)==101075792,i&&(o=Mr(e,s+32),a=Mr(e,s+48));}for(var l=0;l<o;++l){var c=ox(e,a,i),h=c[0],f=c[1],m=c[2],g=c[3],_=c[4],b=c[5],C=rx(e,b);a=_,h?h==8?n[g]=ex(e.subarray(C,C+f),{out:new Sn(m)}):tr(14,"unknown compression type "+h):n[g]=Vi(e,C,C+f);}return n}const cx=1e4,ux=128*1024*1024,dx=512*1024*1024;function fx(e){return !!e&&typeof e=="object"&&typeof e.arrayBuffer=="function"}function ll(e){const t=new Uint8Array(e.byteLength);return t.set(e),t}async function hx(e){const t=await e.arrayBuffer();return ll(new Uint8Array(t))}function px(e){if(!e||typeof e!="object")return null;if(ArrayBuffer.isView(e)){const n=e;return ll(new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}const t=e;return typeof t.byteLength=="number"&&typeof t.slice=="function"?ll(new Uint8Array(e)):null}function Mg(e){const t=e.replace(/\\/g,"/").replace(/^\/+/,"");if(!t||t.includes("..")||t.startsWith("/"))throw new Error(`Unsafe bundle ZIP path: ${e}`);return t}function mx(e){const t={};for(const n of e){const r=Mg(n.path),o={level:n.level??6};t[r]=[typeof n.data=="string"?Eu(n.data):n.data,o];}return sx(t)}async function gx(e,t={}){const n=fx(e)?await hx(e):px(e);if(!n)throw new Error("Bundle ZIP input must be a File, Blob, ArrayBuffer, or Uint8Array.");const r=t.maxEntries??cx,o=t.maxEntryBytes??ux,a=t.maxTotalBytes??dx,i=lx(n),s=new Map;let l=0;for(const[c,h]of Object.entries(i)){if(s.size>=r)throw new Error(`Bundle ZIP exceeds ${r} entries.`);const f=Mg(c);if(h.byteLength>o)throw new Error(`Bundle ZIP entry exceeds limit: ${f}`);if(l+=h.byteLength,l>a)throw new Error(`Bundle ZIP exceeds ${a} bytes after decompression.`);s.set(f,ll(h));}return {entries:s,totalBytes:l}}function sh(e,t){const n=e.get(t);if(!n)throw new Error(`Missing bundle ZIP entry: ${t}`);return Tg(n)}function yx(e){return String(e||"bundle").trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"bundle"}function lh(e){if(typeof e=="string")try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function _x(e,t){const r=String((e&&typeof e=="object"?e:{}).__typename||t.__typename||"").toLowerCase();return r.includes("tweet")||t.full_text||t.media?"tweet":r.includes("user")||t.screen_name||t.profile_image_url?"user":"unknown"}function wx(e,t){const r=(e&&typeof e=="object"?e:{}).twe_private_fields,o=[r==null?void 0:r.created_at,r==null?void 0:r.updated_at,t.created_at,t.time,t.date];for(const a of o){const i=Number(a);if(Number.isFinite(i)&&i>0)return i;if(typeof a=="string"){const s=Date.parse(a);if(Number.isFinite(s))return s}}}async function bx(e,t,n){const r=_x(t.original,t.record),o=String(t.id||t.record.id||t.record.rest_id||""),a=await mg(e,r,o||JSON.stringify(t.record)),i=n.includeOriginalMetadata?{...t.record,metadata:t.original}:t.record;return {id:a,kind:r,sourceId:o||void 0,observedAt:wx(t.original,t.record),sensitivity:"low",data:i,mediaRefs:Array.isArray(t.record.media)?t.record.media.map((s,l)=>({id:`${a}:media:${l}`,type:s.type==="photo"||s.type==="video"||s.type==="animated_gif"?s.type:"unknown",url:lh(s.original),previewUrl:lh(s.thumbnail),altText:typeof s.ext_alt_text=="string"?s.ext_alt_text:void 0})):void 0}}function vx(){return {records:0,tweets:0,users:0,socialEdges:0,captures:0,mediaBlobs:0}}function kx(e,t){e.records+=1,t.kind==="tweet"&&(e.tweets+=1),t.kind==="user"&&(e.users+=1),t.kind==="social_edge"&&(e.socialEdges+=1),t.kind==="capture"&&(e.captures+=1),e.mediaBlobs+=0;}async function xx(e,t){const n=Date.now(),r=typeof performance<"u"?performance.now():Date.now(),o=Math.max(0,Math.floor(Number(t.totalRecords||0))),a=(P,L)=>{var D;(D=t.onProgress)==null||D.call(t,{phase:P,processedRecords:L,totalRecords:o||L,elapsedMs:(typeof performance<"u"?performance.now():Date.now())-r});},i=await pg(`${t.title}:${t.scope}:${t.queryText||""}:${n}:${o}`),s=vx(),l=[],c=[];let h=0;for await(const P of e){if(!P)continue;const L=await bx(i,P,t);kx(s,L),l.push(`${JSON.stringify(L)}
`);for(const D of L.mediaRefs||[])D.url&&c.push(D.url);h+=1,(h===1||h===o||h%100===0)&&a("envelope",h);}const f=l.join(""),m=yg(gg),g=[{path:"manifest.json",contentType:"application/json",role:"manifest"},{path:"records/records.jsonl",contentType:"application/x-ndjson",role:"records",bytes:new TextEncoder().encode(f).byteLength,sha256:await sl(f)}],_=c.join(`
`)+(c.length?`
`:"");c.length&&g.push({path:"media/media-urls.txt",contentType:"text/plain",role:"media",bytes:new TextEncoder().encode(_).byteLength,sha256:await sl(_)});const b={id:i,title:t.title,description:t.description,producer:{app:"twitter-web-exporter",appVersion:vr.version,schemaVersion:1,exportedAt:n},privacy:m,counts:s,files:g},C=g[0];C&&(g[0]={...C,bytes:new TextEncoder().encode(JSON.stringify(b,void 0,2)).byteLength}),a("manifest",h);const v=t.compressionLevel??1,T=[{path:"manifest.json",data:JSON.stringify(b,void 0,2),level:v},{path:"records/records.jsonl",data:f,level:v}];c.length&&T.push({path:"media/media-urls.txt",data:_,level:v}),a("zip",h);const R={filename:`twe-bundle-${yx(t.title)}-${n}.zip`,bytes:mx(T),manifest:b};return a("done",h),R}async function Sx(e,t){return xx(e,{...t,totalRecords:t.totalRecords??e.length})}async function Cx(e,t){const{filename:n,bytes:r}=await Sx(e,t),o=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),{saveFile:a}=await Bk(async()=>{const{saveFile:i}=await Promise.resolve().then(()=>Hx);return {saveFile:i}},void 0);return a(n,new Blob([o],{type:"application/zip"})),n}function fi(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function wr(e,t,n){e.push({path:t,message:n,severity:"error"});}function Tx(e){const t=[];if(!fi(e))return wr(t,"$","Manifest must be an object."),{ok:false,issues:t};const n=e;return (!n.id||typeof n.id!="string")&&wr(t,"$.id","Missing bundle id."),(!n.title||typeof n.title!="string")&&wr(t,"$.title","Missing title."),fi(n.producer)||wr(t,"$.producer","Missing producer block."),fi(n.privacy)||wr(t,"$.privacy","Missing privacy block."),fi(n.counts)||wr(t,"$.counts","Missing counts block."),Array.isArray(n.files)||wr(t,"$.files","Files must be an array."),{ok:!t.some(r=>r.severity==="error"),issues:t}}function Mx(e){const t=[];if(!fi(e))return wr(t,"$","Record envelope must be an object."),{ok:false,issues:t};const n=e;return (!n.id||typeof n.id!="string")&&wr(t,"$.id","Missing record id."),(!n.kind||typeof n.kind!="string")&&wr(t,"$.kind","Missing record kind."),(!n.sensitivity||typeof n.sensitivity!="string")&&wr(t,"$.sensitivity","Missing sensitivity."),"data"in n||wr(t,"$.data","Missing data payload."),{ok:!t.some(r=>r.severity==="error"),issues:t}}function Rg(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function Rx(e,t){const n=e.trim();if(!n)return null;try{return JSON.parse(n)}catch(r){throw new Error(`Invalid JSONL at records line ${t}: ${Rg(r)}`)}}function Ix(e){const t=[],n=e.data;for(const r of ["full_text","text","description","name","screen_name"]){const o=n==null?void 0:n[r];typeof o=="string"&&o.trim()&&t.push(o);}return t.length||t.push(JSON.stringify(e.data).slice(0,2e4)),t.join(`
`)}function Ex(e,t){return {id:e.id,title:e.title,description:e.description,status:"importing",visibility:e.privacy.visibility,importedAt:t,updatedAt:t,schemaVersion:e.producer.schemaVersion,appVersion:e.producer.appVersion,recordCount:e.counts.records,mediaBlobCount:e.counts.mediaBlobs,manifest:e}}async function Ig(e,t){var v,T,R;const n=Date.now(),{entries:r}=await gx(t),o=JSON.parse(sh(r,"manifest.json")),a=Tx(o);if(!a.ok)throw new Error(`Invalid bundle manifest: ${((v=a.issues[0])==null?void 0:v.message)??"unknown error"}`);const i=((T=o.files.find(P=>P.role==="records"))==null?void 0:T.path)??[...r.keys()].find(P=>P.endsWith(".jsonl"));if(!i)throw new Error("Bundle is missing a records JSONL file.");const s=`${o.id}:import:${n}`,l=sh(r,i),c={id:`${o.id}:all`,bundle_id:o.id,name:"All Records",kind:"mixed",record_count:0,created_at:n,updated_at:n},h=[],f=[],m=[];let g=0,_=0;const b=l.split(/\r?\n/);for(let P=0;P<b.length;P+=1){const L=Rx(b[P]??"",P+1);if(!L)continue;g+=1;const D=Mx(L);if(!D.ok){_+=1,m.push(`Skipped line ${P+1}: ${((R=D.issues[0])==null?void 0:R.message)??"invalid record"}`);continue}const O=`${o.id}:${L.id}`;h.push({id:O,bundle_id:o.id,kind:L.kind,source_id:L.sourceId,source_extension:L.sourceExtension,observed_at:L.observedAt,sensitivity:L.sensitivity,data:L.data,media_refs:L.mediaRefs,search_text:Ix(L),created_at:n,updated_at:n}),f.push({id:`${c.id}:${L.id}`,bundle_id:o.id,collection_id:c.id,record_id:O,kind:L.kind,source_id:L.sourceId,sort_time:L.observedAt,created_at:n});}c.record_count=f.length;const C={id:s,bundle_id:o.id,started_at:n,finished_at:Date.now(),status:"ok",records_seen:g,records_imported:h.length,records_skipped:_,warnings:m};try{await e.bundlePutImportBatch({bundle:Ex({...o,producer:{...o.producer,appVersion:o.producer.appVersion||vr.version}},n),collections:[c],items:f,snapshots:h,report:C}),await e.bundleMarkReady(o.id);}catch(P){throw await e.bundleMarkFailed(o.id,Rg(P)),P}return {bundleId:o.id,recordsSeen:g,recordsImported:h.length,recordsSkipped:_,warnings:m}}function Ax(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function Rr(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Eg(e){if(e.metadata&&Rr(e.metadata))return Eg(e.metadata);const t=String(e.__typename||"").toLowerCase();return t.includes("tweet")||e.full_text||e.media||e.bookmark_folder_id?"tweet":t.includes("user")||e.screen_name||e.profile_image_url?"user":"unknown"}function ch(e){if(typeof e=="string")try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function Ag(e,t){return e.metadata&&Rr(e.metadata)?Ag(e.metadata,t):String(e.rest_id||e.id||e.user_id||e.tweet_id||t)}function Dx(e){const t=Rr(e.metadata)?e.metadata:null,n=Rr(t==null?void 0:t.twe_private_fields)?t.twe_private_fields:Rr(e.twe_private_fields)?e.twe_private_fields:null,r=[n==null?void 0:n.created_at,n==null?void 0:n.updated_at,e.created_at,e.date,e.time];for(const o of r){const a=Number(o);if(Number.isFinite(a)&&a>0)return a;if(typeof o=="string"){const i=Date.parse(o);if(Number.isFinite(i))return i}}}function Px(e){return Array.isArray(e)?e.filter(Rr):Rr(e)?Array.isArray(e.records)?e.records.filter(Rr):Array.isArray(e.data)?e.data.filter(Rr):Array.isArray(e.rows)?e.rows.filter(Rr):[e]:[]}function Fx(e,t){const n=e.trim();if(!n)return [];if(t.endsWith(".jsonl")||n.includes(`
{`)){const r=[];for(const o of n.split(/\r?\n/)){const a=o.trim();if(!a)continue;const i=JSON.parse(a);Rr(i)&&r.push(i);}if(r.length)return r}return Px(JSON.parse(n))}async function Ox(e,t,n){const r=Eg(t),o=Ag(t,n),a=await mg(e,r,o);return {id:a,kind:r,sourceId:o,observedAt:Dx(t),sensitivity:"low",data:t,mediaRefs:Array.isArray(t.media)?t.media.map((i,s)=>({id:`${a}:media:${s}`,type:i.type==="photo"||i.type==="video"||i.type==="animated_gif"?i.type:"unknown",url:ch(i.original),previewUrl:ch(i.thumbnail),altText:typeof i.ext_alt_text=="string"?i.ext_alt_text:void 0})):void 0}}async function Dg(e,t){const n=Date.now(),r=await t.text(),o=Fx(r,t.name),a=await pg(`legacy:${t.name}:${t.size}:${n}`),i=await Promise.all(o.map((g,_)=>Ox(a,g,_))),s=yg({...gg,includeSourceCaptureTimes:true}),l={id:a,title:t.name.replace(/\.(json|jsonl)$/i,""),description:`Imported from legacy ${t.name}`,producer:{app:"twitter-web-exporter",appVersion:vr.version,schemaVersion:1,exportedAt:n},privacy:s,counts:{records:i.length,tweets:i.filter(g=>g.kind==="tweet").length,users:i.filter(g=>g.kind==="user").length,socialEdges:0,captures:0,mediaBlobs:0},files:[{path:t.name,contentType:t.name.endsWith(".jsonl")?"application/x-ndjson":"application/json",role:"records",bytes:t.size}]},c={id:`${a}:all`,bundle_id:a,name:"All Records",kind:"mixed",record_count:i.length,created_at:n,updated_at:n},h=i.map(g=>({id:`${a}:${g.id}`,bundle_id:a,kind:g.kind,source_id:g.sourceId,observed_at:g.observedAt,sensitivity:g.sensitivity,data:g.data,media_refs:g.mediaRefs,search_text:JSON.stringify(g.data).slice(0,2e4),created_at:n,updated_at:n})),f=h.map(g=>({id:`${c.id}:${g.id}`,bundle_id:a,collection_id:c.id,record_id:g.id,kind:g.kind,source_id:g.source_id,sort_time:g.observed_at,created_at:n})),m={id:`${a}:import:${n}`,bundle_id:a,started_at:n,finished_at:Date.now(),status:"ok",records_seen:o.length,records_imported:h.length,records_skipped:o.length-h.length,warnings:["Imported through legacy JSON/JSONL compatibility path."]};try{await e.bundlePutImportBatch({bundle:{id:a,title:l.title,description:l.description,status:"importing",visibility:l.privacy.visibility,importedAt:n,updatedAt:n,schemaVersion:l.producer.schemaVersion,appVersion:vr.version,recordCount:h.length,mediaBlobCount:0,manifest:l},collections:[c],items:f,snapshots:h,report:m}),await e.bundleMarkReady(a);}catch(g){throw await e.bundleMarkFailed(a,Ax(g)),g}return {bundleId:a,recordsSeen:o.length,recordsImported:h.length,recordsSkipped:o.length-h.length,warnings:m.warnings}}function Pg(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function uh(e){if(!Pg(e))return {};try{return JSON.parse(JSON.stringify(e))}catch{return {...e}}}function Lx(e){const t=uh(e),n=t.metadata;return Pg(n)?uh(n):t}function Mn(e,t){const n=e[t];return typeof n=="string"?n:""}function ar(e,t){const n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"){const r=Number(n);return Number.isFinite(r)?r:0}return 0}function Nx(e,t){if(e.legacy&&e.core)return e;const n=e,r=String(e.rest_id||t.source_id||t.id),o=Mn(n,"screen_name")||Mn(n,"author_screen_name"),a=Mn(n,"name")||Mn(n,"profile_name")||o,i=Mn(n,"profile_image_url"),s=Mn(n,"created_at")||(t.observed_at?new Date(t.observed_at).toUTCString():""),l=Mn(n,"full_text")||Mn(n,"text")||Mn(n,"content"),h=(Array.isArray(n.media)?n.media:[]).map((f,m)=>{const g=Mn(f,"original")||Mn(f,"url"),_=Mn(f,"thumbnail")||Mn(f,"previewUrl")||g;return {id_str:Mn(f,"id_str")||`${r}-media-${m}`,media_key:Mn(f,"media_key")||`${r}-media-${m}`,type:Mn(f,"type")||"photo",url:_,media_url_https:_||g,expanded_url:g,ext_alt_text:Mn(f,"ext_alt_text")||Mn(f,"altText"),original_info:{width:ar(f,"width")||void 0,height:ar(f,"height")||void 0},sizes:{large:{w:ar(f,"width")||1,h:ar(f,"height")||1,resize:"fit"}}}});return e.rest_id=r,e.legacy={id_str:r,full_text:l,created_at:s,favorite_count:ar(n,"favorite_count")||ar(n,"favorites"),retweet_count:ar(n,"retweet_count")||ar(n,"retweets"),reply_count:ar(n,"reply_count")||ar(n,"replies"),bookmark_count:ar(n,"bookmark_count")||ar(n,"bookmarks"),quote_count:ar(n,"quote_count")||ar(n,"quotes"),entities:{urls:[],media:h},extended_entities:{media:h}},e.core={user_results:{result:{rest_id:Mn(n,"user_id")||Mn(n,"author_id")||"",core:{screen_name:o,name:a},avatar:{image_url:i},legacy:{screen_name:o,name:a,profile_image_url_https:i}}}},e}function Fg(e){const t=Lx(e.data);return t.__twe_imported_bundle_id=e.bundle_id,t.__twe_imported_snapshot_id=e.id,t.__twe_imported_source_id=e.source_id,!t.rest_id&&e.source_id&&(t.rest_id=e.source_id),e.kind==="tweet"&&Nx(t,e),(!t.twe_private_fields||typeof t.twe_private_fields!="object")&&(t.twe_private_fields={created_at:e.observed_at||e.created_at,updated_at:e.updated_at}),t}function Bx(e,t){return e.filter(n=>!t||n.kind===t).map(n=>Fg(n))}const Ux="twe_stream_export_row_delay_ms_v1",To={JSON:"JSON",HTML:"HTML",CSV:"CSV"};function Li(e){return `"${e.replace(/"/g,'""').replace(/\n/g,"\\n").replace(/\r/g,"\\r")}"`}function Xo(e,t,n=false){const r=document.createElement("a");let o;t instanceof Blob?o=t:o=new Blob(n?[new Uint8Array([239,187,191]),t]:[t],{type:"text/plain;charset=utf-8"});const a=URL.createObjectURL(o);r.href=a,r.download=e,r.click(),URL.revokeObjectURL(a);}async function Og(e,t,n,r){try{let o="",a=!1;switch(Ie.info(`Exporting to ${t} file: ${n}`),t){case To.JSON:o=await Ng(e);break;case To.HTML:o=await Bg(e,r);break;case To.CSV:a=!0,o=await Ug(e);break}Xo(n,o,a);}catch(o){Ie.errorWithBanner("Failed to export file",o);}}function dh(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function fh(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function $x(){if(typeof localStorage>"u")return 0;try{const e=localStorage.getItem(Ux),t=Number(e||0);return Number.isFinite(t)&&t>0?Math.min(1e3,t):0}catch{return 0}}async function Rc(e){e&&await new Promise(t=>{globalThis.setTimeout(t,e);});}async function Lg(e,t,n,r,o={}){var a,i,s;try{Ie.info(`Streaming export to ${t} file: ${n}`);let l=0,c=[];const h=[],f=$x(),m=()=>{var _;l+=1,(_=o.onProgress)==null||_.call(o,l);};if(t===To.JSON){h.push(`[
`);let _=!0;for await(const b of e){if((a=o.signal)!=null&&a.aborted)return;h.push(_?"":`,
`),h.push(JSON.stringify(b,void 0," ").replace(/^/gm," ")),_=!1,m(),await Rc(f);}h.push(`
]
`),Xo(n,new Blob(h,{type:"application/json;charset=utf-8"}));return}if(t===To.CSV){let _=!1;for await(const b of e){if((i=o.signal)!=null&&i.aborted)return;_||(c=Object.keys(b),h.push(c.join(",")+`
`),_=!0),h.push(c.map(C=>{const v=b[C];return Li(typeof v=="object"?JSON.stringify(v):fh(v))}).join(",")+`
`),m(),await Rc(f);}Xo(n,new Blob([new Uint8Array([239,187,191]),...h],{type:"text/csv;charset=utf-8"}));return}h.push(`
<html>
<head>
<meta charset="utf-8">
<title>Exported Data ${new Date().toISOString()}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
<table class="table table-striped">
`);let g=!1;for await(const _ of e){if((s=o.signal)!=null&&s.aborted)return;if(!g){c=Object.keys(_),h.push("<thead><tr>");for(const b of c)h.push(`<th>${dh(r[b]??b)}</th>`);h.push("</tr></thead><tbody>"),g=!0;}h.push("<tr>");for(const b of c)h.push(`<td>${dh(fh(_[b]))}</td>`);h.push("</tr>"),m(),await Rc(f);}h.push(`
</tbody>
</table>
</body>
</html>
`),Xo(n,new Blob(h,{type:"text/html;charset=utf-8"}));}catch(l){Ie.errorWithBanner("Failed to stream export file",l);}}async function Ng(e){return JSON.stringify(e,void 0," ")}async function Bg(e,t){const n=document.createElement("table"),r=document.createElement("thead"),o=document.createElement("tbody"),a=Object.keys(e[0]??{}),i=document.createElement("tr");for(const s of a){const l=document.createElement("th");l.textContent=t[s]??s,i.appendChild(l);}r.appendChild(i),n.appendChild(r),n.className="table table-striped";for(const s of e){const l=document.createElement("tr");for(const c of a){const h=document.createElement("td"),f=s[c];if(c==="profile_image_url"||c==="profile_banner_url"){const m=document.createElement("img");m.src=f,m.width=50,h.innerHTML="",h.appendChild(m);}else if(c==="media"){if((f==null?void 0:f.length)>0)for(const m of f){const g=document.createElement("img");g.src=m.thumbnail,g.width=50,g.alt=m.ext_alt_text||"",g.title=m.ext_alt_text||"";const _=document.createElement("a");_.href=m.original,_.target="_blank",_.style.marginRight="0.5em",_.appendChild(g),h.appendChild(_);}}else if(c==="full_text"||c==="description"){const m=document.createElement("p");m.textContent=typeof f=="string"?f:JSON.stringify(f),m.style.whiteSpace="pre-wrap",m.style.maxWidth="640px",h.appendChild(m);}else if(c==="metadata"){const m=document.createElement("details"),g=document.createElement("summary");g.textContent="Expand",m.appendChild(g);const _=document.createElement("pre");_.textContent=JSON.stringify(f,void 0," "),m.appendChild(_),h.appendChild(m);}else if(c==="url"){const m=document.createElement("a");m.href=f,m.target="_blank",m.textContent=f,h.appendChild(m);}else h.textContent=typeof f=="string"?f:JSON.stringify(s[c]);l.appendChild(h);}o.appendChild(l);}return n.appendChild(o),`
<html>
<head>
<meta charset="utf-8">
<title>Exported Data ${new Date().toISOString()}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
${n.outerHTML}
</body>
</html>
`}async function Ug(e){const t=Object.keys(e[0]??{});let n=t.join(",")+`
`;for(const r of e){const o=t.map(a=>{const i=r[a];return typeof i=="string"?Li(i):typeof i=="object"?Li(JSON.stringify(i)):i});n+=o.join(","),n+=`
`;}return n}const Hx=Object.freeze(Object.defineProperty({__proto__:null,EXPORT_FORMAT:To,csvEscapeStr:Li,csvExporter:Ug,exportData:Og,exportDataFromAsyncRows:Lg,htmlExporter:Bg,jsonExporter:Ng,saveFile:Xo},Symbol.toStringTag,{value:"Module"}));var Vr=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0;function jx(e,t){return typeof t>"u"?t={autoBom:false}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ic(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Ni(r.response,t,n);},r.onerror=function(){console.error("could not download file");},r.send();}function hh(e){var t=new XMLHttpRequest;t.open("HEAD",e,false);try{t.send();}catch{}return t.status>=200&&t.status<=299}function fs(e){try{e.dispatchEvent(new MouseEvent("click"));}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),e.dispatchEvent(t);}}var ph=Vr.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Ni=Vr.saveAs||(typeof window!="object"||window!==Vr?function(){}:"download"in HTMLAnchorElement.prototype&&!ph?function(t,n,r){var o=Vr.URL||Vr.webkitURL,a=document.createElement("a");n=n||t.name||"download",a.download=n,a.rel="noopener",typeof t=="string"?(a.href=t,a.origin!==location.origin?hh(a.href)?Ic(t,n,r):fs(a,a.target="_blank"):fs(a)):(a.href=o.createObjectURL(t),setTimeout(function(){o.revokeObjectURL(a.href);},4e4),setTimeout(function(){fs(a);},0));}:"msSaveOrOpenBlob"in navigator?function(t,n,r){if(n=n||t.name||"download",typeof t=="string")if(hh(t))Ic(t,n,r);else {var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout(function(){fs(o);});}else navigator.msSaveOrOpenBlob(jx(t,r),n);}:function(t,n,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof t=="string")return Ic(t,n,r);var a=t.type==="application/octet-stream",i=/constructor/i.test(Vr.HTMLElement)||Vr.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&i||ph)&&typeof FileReader<"u"){var l=new FileReader;l.onloadend=function(){var f=l.result;f=s?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null;},l.readAsDataURL(t);}else {var c=Vr.URL||Vr.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h);},4e4);}});Vr.saveAs=Ni.saveAs=Ni;const qx=67324752,Vx=33639248,zx=101010256,$g=2048,Du=20;let Ec=null;function Kx(){if(Ec)return Ec;const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n>>>0;}return Ec=e,e}function Gx(e){const t=Kx();let n=4294967295;for(let r=0;r<e.length;r++){const o=e[r]??0;n=(t[(n^o)&255]??0)^n>>>8;}return (n^4294967295)>>>0}function Wx(e){const t=Math.floor(e.getSeconds()/2);return (e.getHours()<<11|e.getMinutes()<<5|t)&65535}function Yx(e){return (Math.max(1980,e.getFullYear())-1980<<9|e.getMonth()+1<<5|e.getDate())&65535}function Xx(e,t,n,r,o){const a=new Uint8Array(30+e.length),i=new DataView(a.buffer,a.byteOffset,a.byteLength);return i.setUint32(0,qx,true),i.setUint16(4,Du,true),i.setUint16(6,$g,true),i.setUint16(8,0,true),i.setUint16(10,r,true),i.setUint16(12,o,true),i.setUint32(14,t,true),i.setUint32(18,n,true),i.setUint32(22,n,true),i.setUint16(26,e.length,true),i.setUint16(28,0,true),a.set(e,30),a}function Qx(e,t,n,r,o,a){const i=new Uint8Array(46+e.length),s=new DataView(i.buffer,i.byteOffset,i.byteLength);return s.setUint32(0,Vx,true),s.setUint16(4,Du,true),s.setUint16(6,Du,true),s.setUint16(8,$g,true),s.setUint16(10,0,true),s.setUint16(12,r,true),s.setUint16(14,o,true),s.setUint32(16,t,true),s.setUint32(20,n,true),s.setUint32(24,n,true),s.setUint16(28,e.length,true),s.setUint16(30,0,true),s.setUint16(32,0,true),s.setUint16(34,0,true),s.setUint16(36,0,true),s.setUint32(38,0,true),s.setUint32(42,a,true),i.set(e,46),i}function Zx(e,t,n){const r=new Uint8Array(22),o=new DataView(r.buffer,r.byteOffset,r.byteLength);return o.setUint32(0,zx,true),o.setUint16(4,0,true),o.setUint16(6,0,true),o.setUint16(8,e,true),o.setUint16(10,e,true),o.setUint32(12,t,true),o.setUint32(16,n,true),o.setUint16(20,0,true),r}function hs(e){return Jx(e)}function Jx(e){const t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function Hg(e){return new Promise(t=>setTimeout(t,e))}function e0(){return new Promise(e=>{if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,0);})}function t0(e){return e.type==="video"||e.type==="animated_gif"||/\.mp4(?:[?#].*)?$/i.test(e.url)}function n0(e){try{return new URL(e).hostname}catch{return ""}}function r0(e){if(typeof e=="number")return {minDelayBetweenStartsMs:Math.max(0,e),globalConcurrency:1,perHostConcurrency:1,videoConcurrency:1,maxRetries:0};const t=e||{};return {minDelayBetweenStartsMs:Math.max(0,t.minDelayBetweenStartsMs??100),globalConcurrency:Math.max(1,Math.min(32,t.globalConcurrency??8)),perHostConcurrency:Math.max(1,Math.min(32,t.perHostConcurrency??8)),videoConcurrency:Math.max(1,Math.min(16,t.videoConcurrency??3)),maxRetries:Math.max(0,Math.min(8,t.maxRetries??3))}}function o0(e){const t=Math.min(3e4,750*2**Math.max(0,e-1)),n=.8+Math.random()*.4;return Math.round(t*n)}async function a0(e,t){let n=null;for(let r=0;r<=t;r+=1){try{const o=await fetch(e.url);if(o.ok)return await o.blob();{const a=new Error(`Failed to fetch ${e.url}: HTTP ${o.status}`);if(o.status===403||o.status===404)throw a;n=a;}}catch(o){n=o;const a=o instanceof Error?o.message:String(o);if(/HTTP (403|404)/.test(a))throw o}r<t&&await Hg(o0(r+1));}throw n instanceof Error?n:new Error(`Failed to fetch ${e.url}`)}async function i0(e,t,n,r){const o=r0(r),a=new Array(t.length),i=t.length;let s=0,l=0,c=0,h=0,f=0;const m=new Map,g=async C=>{const v=n0(C.url),T=t0(C);for(;;){const R=m.get(v)||0,P=Date.now()-c;if(h<o.globalConcurrency&&R<o.perHostConcurrency&&(!T||f<o.videoConcurrency)&&P>=o.minDelayBetweenStartsMs)return h+=1,T&&(f+=1),m.set(v,R+1),c=Date.now(),()=>{h-=1,T&&(f-=1);const L=m.get(v)||1;L<=1?m.delete(v):m.set(v,L-1);};await Hg(Math.max(25,Math.min(100,o.minDelayBetweenStartsMs-P)));}},_=async()=>{for(;s<t.length;){const C=s++,v=t[C];if(!v)continue;const T=await g(v),R=Date.now();try{Ie.debug(`Start downloading ${v.filename} from ${v.url}`),a[C]={filename:v.filename,blob:await a0(v,o.maxRetries)},l+=1,n==null||n(l,i,v),Ie.debug(`Finished downloading ${v.filename} in ${Date.now()-R}ms`);}finally{T();}}},b=Math.min(o.globalConcurrency,t.length||1);await Promise.all(Array.from({length:b},()=>_())),await vd(e,a.filter(C=>!!C),typeof r=="object"?r.onZipProgress:void 0);}async function vd(e,t,n){Ie.info(`Exporting to ZIP file: ${e}`);const r=new Date,o=Wx(r),a=Yx(r),i=[],s=[];let l=0,c=0;const h=new TextEncoder,f=t.length;for(const[_,b]of t.entries()){const{filename:C,blob:v}=b,T=h.encode(C),R=new Uint8Array(await v.arrayBuffer()),P=Gx(R),L=R.byteLength,D=l,O=Xx(T,P,L,o,a);i.push(hs(O),hs(R)),l+=O.byteLength+R.byteLength;const B=Qx(T,P,L,o,a,D);s.push(B),c+=B.byteLength,n==null||n(_+1,f,b),_%4===3&&await e0();}for(const _ of s)i.push(hs(_));const m=Zx(t.length,c,l);i.push(hs(m));const g=new Blob(i,{type:"application/zip"});return Ie.info("Zip stream closed."),Ni(g,e),g}var Bs={exports:{}},s0=Bs.exports,mh;function l0(){return mh||(mh=1,(function(e,t){(function(n,r){e.exports=r();})(s0,function(){var n=function(u,p){return (n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,w){y.__proto__=w;}||function(y,w){for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(y[S]=w[S]);})(u,p)},r=function(){return (r=Object.assign||function(u){for(var p,y=1,w=arguments.length;y<w;y++)for(var S in p=arguments[y])Object.prototype.hasOwnProperty.call(p,S)&&(u[S]=p[S]);return u}).apply(this,arguments)};function o(u,p,y){for(var w,S=0,E=p.length;S<E;S++)!w&&S in p||((w=w||Array.prototype.slice.call(p,0,S))[S]=p[S]);return u.concat(w||Array.prototype.slice.call(p))}var a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:vb,i=Object.keys,s=Array.isArray;function l(u,p){return typeof p!="object"||i(p).forEach(function(y){u[y]=p[y];}),u}typeof Promise>"u"||a.Promise||(a.Promise=Promise);var c=Object.getPrototypeOf,h={}.hasOwnProperty;function f(u,p){return h.call(u,p)}function m(u,p){typeof p=="function"&&(p=p(c(u))),(typeof Reflect>"u"?i:Reflect.ownKeys)(p).forEach(function(y){_(u,y,p[y]);});}var g=Object.defineProperty;function _(u,p,y,w){g(u,p,l(y&&f(y,"get")&&typeof y.get=="function"?{get:y.get,set:y.set,configurable:true}:{value:y,configurable:true,writable:true},w));}function b(u){return {from:function(p){return u.prototype=Object.create(p.prototype),_(u.prototype,"constructor",u),{extend:m.bind(null,u.prototype)}}}}var C=Object.getOwnPropertyDescriptor,v=[].slice;function T(u,p,y){return v.call(u,p,y)}function R(u,p){return p(u)}function P(u){if(!u)throw new Error("Assertion Failed")}function L(u){a.setImmediate?setImmediate(u):setTimeout(u,0);}function D(u,p){if(typeof p=="string"&&f(u,p))return u[p];if(!p)return u;if(typeof p!="string"){for(var y=[],w=0,S=p.length;w<S;++w){var E=D(u,p[w]);y.push(E);}return y}var N=p.indexOf(".");if(N!==-1){var $=u[p.substr(0,N)];return $==null?void 0:D($,p.substr(N+1))}}function O(u,p,y){if(u&&p!==void 0&&!("isFrozen"in Object&&Object.isFrozen(u)))if(typeof p!="string"&&"length"in p){P(typeof y!="string"&&"length"in y);for(var w=0,S=p.length;w<S;++w)O(u,p[w],y[w]);}else {var E,N,$=p.indexOf(".");$!==-1?(E=p.substr(0,$),(N=p.substr($+1))===""?y===void 0?s(u)&&!isNaN(parseInt(E))?u.splice(E,1):delete u[E]:u[E]=y:O($=!($=u[E])||!f(u,E)?u[E]={}:$,N,y)):y===void 0?s(u)&&!isNaN(parseInt(p))?u.splice(p,1):delete u[p]:u[p]=y;}}function B(u){var p,y={};for(p in u)f(u,p)&&(y[p]=u[p]);return y}var I=[].concat;function x(u){return I.apply([],u)}var ot="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(x([8,16,32,64].map(function(u){return ["Int","Uint","Float"].map(function(p){return p+u+"Array"})}))).filter(function(u){return a[u]}),F=new Set(ot.map(function(u){return a[u]})),U=null;function Ce(u){return U=new WeakMap,u=(function p(y){if(!y||typeof y!="object")return y;var w=U.get(y);if(w)return w;if(s(y)){w=[],U.set(y,w);for(var S=0,E=y.length;S<E;++S)w.push(p(y[S]));}else if(F.has(y.constructor))w=y;else {var N,$=c(y);for(N in w=$===Object.prototype?{}:Object.create($),U.set(y,w),y)f(y,N)&&(w[N]=p(y[N]));}return w})(u),U=null,u}var X={}.toString;function re(u){return X.call(u).slice(8,-1)}var Z=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ce=typeof Z=="symbol"?function(u){var p;return u!=null&&(p=u[Z])&&p.apply(u)}:function(){return null};function he(u,p){return p=u.indexOf(p),0<=p&&u.splice(p,1),0<=p}var fe={};function me(u){var p,y,w,S;if(arguments.length===1){if(s(u))return u.slice();if(this===fe&&typeof u=="string")return [u];if(S=ce(u)){for(y=[];!(w=S.next()).done;)y.push(w.value);return y}if(u==null)return [u];if(typeof(p=u.length)!="number")return [u];for(y=new Array(p);p--;)y[p]=u[p];return y}for(p=arguments.length,y=new Array(p);p--;)y[p]=arguments[p];return y}var z=typeof Symbol<"u"?function(u){return u[Symbol.toStringTag]==="AsyncFunction"}:function(){return false},gt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],yr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(gt),ue={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 Ae(u,p){this.name=u,this.message=p;}function ie(u,p){return u+". Errors: "+Object.keys(p).map(function(y){return p[y].toString()}).filter(function(y,w,S){return S.indexOf(y)===w}).join(`
`)}function Oe(u,p,y,w){this.failures=p,this.failedKeys=w,this.successCount=y,this.message=ie(u,p);}function Le(u,p){this.name="BulkError",this.failures=Object.keys(p).map(function(y){return p[y]}),this.failuresByPos=p,this.message=ie(u,this.failures);}b(Ae).from(Error).extend({toString:function(){return this.name+": "+this.message}}),b(Oe).from(Ae),b(Le).from(Ae);var ee=yr.reduce(function(u,p){return u[p]=p+"Error",u},{}),ne=Ae,V=yr.reduce(function(u,p){var y=p+"Error";function w(S,E){this.name=y,S?typeof S=="string"?(this.message="".concat(S).concat(E?`
`+E:""),this.inner=E||null):typeof S=="object"&&(this.message="".concat(S.name," ").concat(S.message),this.inner=S):(this.message=ue[p]||y,this.inner=null);}return b(w).from(ne),u[p]=w,u},{});V.Syntax=SyntaxError,V.Type=TypeError,V.Range=RangeError;var se=gt.reduce(function(u,p){return u[p+"Error"]=V[p],u},{}),_e=yr.reduce(function(u,p){return ["Syntax","Type","Range"].indexOf(p)===-1&&(u[p+"Error"]=V[p]),u},{});function ke(){}function Ze(u){return u}function Je(u,p){return u==null||u===Ze?p:function(y){return p(u(y))}}function Me(u,p){return function(){u.apply(this,arguments),p.apply(this,arguments);}}function bt(u,p){return u===ke?p:function(){var y=u.apply(this,arguments);y!==void 0&&(arguments[0]=y);var w=this.onsuccess,S=this.onerror;this.onsuccess=null,this.onerror=null;var E=p.apply(this,arguments);return w&&(this.onsuccess=this.onsuccess?Me(w,this.onsuccess):w),S&&(this.onerror=this.onerror?Me(S,this.onerror):S),E!==void 0?E:y}}function Nt(u,p){return u===ke?p:function(){u.apply(this,arguments);var y=this.onsuccess,w=this.onerror;this.onsuccess=this.onerror=null,p.apply(this,arguments),y&&(this.onsuccess=this.onsuccess?Me(y,this.onsuccess):y),w&&(this.onerror=this.onerror?Me(w,this.onerror):w);}}function Kt(u,p){return u===ke?p:function(y){var w=u.apply(this,arguments);l(y,w);var S=this.onsuccess,E=this.onerror;return this.onsuccess=null,this.onerror=null,y=p.apply(this,arguments),S&&(this.onsuccess=this.onsuccess?Me(S,this.onsuccess):S),E&&(this.onerror=this.onerror?Me(E,this.onerror):E),w===void 0?y===void 0?void 0:y:l(w,y)}}function qt(u,p){return u===ke?p:function(){return p.apply(this,arguments)!==false&&u.apply(this,arguments)}}function Mt(u,p){return u===ke?p:function(){var y=u.apply(this,arguments);if(y&&typeof y.then=="function"){for(var w=this,S=arguments.length,E=new Array(S);S--;)E[S]=arguments[S];return y.then(function(){return p.apply(w,E)})}return p.apply(this,arguments)}}_e.ModifyError=Oe,_e.DexieError=Ae,_e.BulkError=Le;var Ue=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Ye(u){Ue=u;}var wt={},Re=100,ot=typeof Promise>"u"?[]:(function(){var u=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return [u,c(u),u];var p=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return [p,c(p),u]})(),gt=ot[0],yr=ot[1],ot=ot[2],yr=yr&&yr.then,$e=gt&>.constructor,be=!!ot,ge=function(u,p){Ke.push([u,p]),k&&(queueMicrotask(Xe),k=false);},M=true,k=true,A=[],H=[],K=Ze,Te={id:"global",global:true,ref:0,unhandleds:[],onunhandled:ke,pgp:false,env:{},finalize:ke},le=Te,Ke=[],De=0,lt=[];function we(u){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=false;var p=this._PSD=le;if(typeof u!="function"){if(u!==wt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===false&&$t(this,this._value))}this._state=null,this._value=null,++p.ref,(function y(w,S){try{S(function(E){if(w._state===null){if(E===w)throw new TypeError("A promise cannot be resolved with itself.");var N=w._lib&&vt();E&&typeof E.then=="function"?y(w,function($,G){E instanceof we?E._then($,G):E.then($,G);}):(w._state=!0,w._value=E,Et(w)),N&&Qe();}},$t.bind(null,w));}catch(E){$t(w,E);}})(this,u);}var mt={get:function(){var u=le,p=Ee;function y(w,S){var E=this,N=!u.global&&(u!==le||p!==Ee),$=N&&!St(),G=new we(function(Y,te){Yt(E,new It(On(w,u,N,$),On(S,u,N,$),Y,te,u));});return this._consoleTask&&(G._consoleTask=this._consoleTask),G}return y.prototype=wt,y},set:function(u){_(this,"then",u&&u.prototype===wt?mt:{get:function(){return u},set:mt.set});}};function It(u,p,y,w,S){this.onFulfilled=typeof u=="function"?u:null,this.onRejected=typeof p=="function"?p:null,this.resolve=y,this.reject=w,this.psd=S;}function $t(u,p){var y,w;H.push(p),u._state===null&&(y=u._lib&&vt(),p=K(p),u._state=false,u._value=p,w=u,A.some(function(S){return S._value===w._value})||A.push(w),Et(u),y&&Qe());}function Et(u){var p=u._listeners;u._listeners=[];for(var y=0,w=p.length;y<w;++y)Yt(u,p[y]);var S=u._PSD;--S.ref||S.finalize(),De===0&&(++De,ge(function(){--De==0&&Fe();},[]));}function Yt(u,p){if(u._state!==null){var y=u._state?p.onFulfilled:p.onRejected;if(y===null)return (u._state?p.resolve:p.reject)(u._value);++p.psd.ref,++De,ge(j,[y,u,p]);}else u._listeners.push(p);}function j(u,p,y){try{var w,S=p._value;!p._state&&H.length&&(H=[]),w=Ue&&p._consoleTask?p._consoleTask.run(function(){return u(S)}):u(S),p._state||H.indexOf(S)!==-1||(function(E){for(var N=A.length;N;)if(A[--N]._value===E._value)return A.splice(N,1)})(p),y.resolve(w);}catch(E){y.reject(E);}finally{--De==0&&Fe(),--y.psd.ref||y.psd.finalize();}}function Xe(){Qt(Te,function(){vt()&&Qe();});}function vt(){var u=M;return k=M=false,u}function Qe(){var u,p,y;do for(;0<Ke.length;)for(u=Ke,Ke=[],y=u.length,p=0;p<y;++p){var w=u[p];w[0].apply(null,w[1]);}while(0<Ke.length);k=M=true;}function Fe(){var u=A;A=[],u.forEach(function(w){w._PSD.onunhandled.call(null,w._value,w);});for(var p=lt.slice(0),y=p.length;y;)p[--y]();}function ft(u){return new we(wt,false,u)}function He(u,p){var y=le;return function(){var w=vt(),S=le;try{return Ht(y,!0),u.apply(this,arguments)}catch(E){p&&p(E);}finally{Ht(S,false),w&&Qe();}}}m(we.prototype,{then:mt,_then:function(u,p){Yt(this,new It(null,null,u,p,le));},catch:function(u){if(arguments.length===1)return this.then(null,u);var p=u,y=arguments[1];return typeof p=="function"?this.then(null,function(w){return (w instanceof p?y:ft)(w)}):this.then(null,function(w){return (w&&w.name===p?y:ft)(w)})},finally:function(u){return this.then(function(p){return we.resolve(u()).then(function(){return p})},function(p){return we.resolve(u()).then(function(){return ft(p)})})},timeout:function(u,p){var y=this;return u<1/0?new we(function(w,S){var E=setTimeout(function(){return S(new V.Timeout(p))},u);y.then(w,S).finally(clearTimeout.bind(null,E));}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&_(we.prototype,Symbol.toStringTag,"Dexie.Promise"),Te.env=Zt(),m(we,{all:function(){var u=me.apply(null,arguments).map(st);return new we(function(p,y){u.length===0&&p([]);var w=u.length;u.forEach(function(S,E){return we.resolve(S).then(function(N){u[E]=N,--w||p(u);},y)});})},resolve:function(u){return u instanceof we?u:u&&typeof u.then=="function"?new we(function(p,y){u.then(p,y);}):new we(wt,true,u)},reject:ft,race:function(){var u=me.apply(null,arguments).map(st);return new we(function(p,y){u.map(function(w){return we.resolve(w).then(p,y)});})},PSD:{get:function(){return le},set:function(u){return le=u}},totalEchoes:{get:function(){return Ee}},newPSD:tt,usePSD:Qt,scheduler:{get:function(){return ge},set:function(u){ge=u;}},rejectionMapper:{get:function(){return K},set:function(u){K=u;}},follow:function(u,p){return new we(function(y,w){return tt(function(S,E){var N=le;N.unhandleds=[],N.onunhandled=E,N.finalize=Me(function(){var $,G=this;$=function(){G.unhandleds.length===0?S():E(G.unhandleds[0]);},lt.push(function Y(){$(),lt.splice(lt.indexOf(Y),1);}),++De,ge(function(){--De==0&&Fe();},[]);},N.finalize),u();},p,y,w)})}}),$e&&($e.allSettled&&_(we,"allSettled",function(){var u=me.apply(null,arguments).map(st);return new we(function(p){u.length===0&&p([]);var y=u.length,w=new Array(y);u.forEach(function(S,E){return we.resolve(S).then(function(N){return w[E]={status:"fulfilled",value:N}},function(N){return w[E]={status:"rejected",reason:N}}).then(function(){return --y||p(w)})});})}),$e.any&&typeof AggregateError<"u"&&_(we,"any",function(){var u=me.apply(null,arguments).map(st);return new we(function(p,y){u.length===0&&y(new AggregateError([]));var w=u.length,S=new Array(w);u.forEach(function(E,N){return we.resolve(E).then(function($){return p($)},function($){S[N]=$,--w||y(new AggregateError(S));})});})}),$e.withResolvers&&(we.withResolvers=$e.withResolvers));var Pe={awaits:0,echoes:0,id:0},At=0,mn=[],Se=0,Ee=0,xt=0;function tt(u,p,y,w){var S=le,E=Object.create(S);return E.parent=S,E.ref=0,E.global=false,E.id=++xt,Te.env,E.env=be?{Promise:we,PromiseProp:{value:we,configurable:true,writable:true},all:we.all,race:we.race,allSettled:we.allSettled,any:we.any,resolve:we.resolve,reject:we.reject}:{},p&&l(E,p),++S.ref,E.finalize=function(){--this.parent.ref||this.parent.finalize();},w=Qt(E,u,y,w),E.ref===0&&E.finalize(),w}function Rt(){return Pe.id||(Pe.id=++At),++Pe.awaits,Pe.echoes+=Re,Pe.id}function St(){return !!Pe.awaits&&(--Pe.awaits==0&&(Pe.id=0),Pe.echoes=Pe.awaits*Re,true)}function st(u){return Pe.echoes&&u&&u.constructor===$e?(Rt(),u.then(function(p){return St(),p},function(p){return St(),Bt(p)})):u}function yt(){var u=mn[mn.length-1];mn.pop(),Ht(u,false);}function Ht(u,p){var y,w=le;(p?!Pe.echoes||Se++&&u===le:!Se||--Se&&u===le)||queueMicrotask(p?(function(S){++Ee,Pe.echoes&&--Pe.echoes!=0||(Pe.echoes=Pe.awaits=Pe.id=0),mn.push(le),Ht(S,true);}).bind(null,u):yt),u!==le&&(le=u,w===Te&&(Te.env=Zt()),be&&(y=Te.env.Promise,p=u.env,(w.global||u.global)&&(Object.defineProperty(a,"Promise",p.PromiseProp),y.all=p.all,y.race=p.race,y.resolve=p.resolve,y.reject=p.reject,p.allSettled&&(y.allSettled=p.allSettled),p.any&&(y.any=p.any))));}function Zt(){var u=a.Promise;return be?{Promise:u,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:u.all,race:u.race,allSettled:u.allSettled,any:u.any,resolve:u.resolve,reject:u.reject}:{}}function Qt(u,p,y,w,S){var E=le;try{return Ht(u,!0),p(y,w,S)}finally{Ht(E,false);}}function On(u,p,y,w){return typeof u!="function"?u:function(){var S=le;y&&Rt(),Ht(p,true);try{return u.apply(this,arguments)}finally{Ht(S,false),w&&queueMicrotask(St);}}}function fn(u){Promise===$e&&Pe.echoes===0?Se===0?u():enqueueNativeMicroTask(u):setTimeout(u,0);}(""+yr).indexOf("[native code]")===-1&&(Rt=St=ke);var Bt=we.reject,vn="",tn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Dt="String expected.",Pt=[],Ln="__dbnames",lr="readonly",rr="readwrite";function gn(u,p){return u?p?function(){return u.apply(this,arguments)&&p.apply(this,arguments)}:u:p}var uo={type:3,lower:-1/0,lowerOpen:false,upper:[[]],upperOpen:false};function Nn(u){return typeof u!="string"||/\./.test(u)?function(p){return p}:function(p){return p[u]===void 0&&u in p&&delete(p=Ce(p))[u],p}}function Ka(){throw V.Type()}function zt(u,p){try{var y=Ga(u),w=Ga(p);if(y!==w)return y==="Array"?1:w==="Array"?-1:y==="binary"?1:w==="binary"?-1:y==="string"?1:w==="string"?-1:y==="Date"?1:w!=="Date"?NaN:-1;switch(y){case "number":case "Date":case "string":return p<u?1:u<p?-1:0;case "binary":return (function(S,E){for(var N=S.length,$=E.length,G=N<$?N:$,Y=0;Y<G;++Y)if(S[Y]!==E[Y])return S[Y]<E[Y]?-1:1;return N===$?0:N<$?-1:1})(Pr(u),Pr(p));case "Array":return (function(S,E){for(var N=S.length,$=E.length,G=N<$?N:$,Y=0;Y<G;++Y){var te=zt(S[Y],E[Y]);if(te!==0)return te}return N===$?0:N<$?-1:1})(u,p)}}catch{}return NaN}function Ga(u){var p=typeof u;return p!="object"?p:ArrayBuffer.isView(u)?"binary":(u=re(u),u==="ArrayBuffer"?"binary":u)}function Pr(u){return u instanceof Uint8Array?u:ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)}var fo=(sn.prototype._trans=function(u,p,y){var w=this._tx||le.trans,S=this.name,E=Ue&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(u==="readonly"?"read":"write"," ").concat(this.name));function N(Y,te,q){if(!q.schema[S])throw new V.NotFound("Table "+S+" not part of transaction");return p(q.idbtrans,q)}var $=vt();try{var G=w&&w.db._novip===this.db._novip?w===le.trans?w._promise(u,N,y):tt(function(){return w._promise(u,N,y)},{trans:w,transless:le.transless||le}):(function Y(te,q,ae,W){if(te.idbdb&&(te._state.openComplete||le.letThrough||te._vip)){var J=te._createTransaction(q,ae,te._dbSchema);try{J.create(),te._state.PR1398_maxLoop=3;}catch(oe){return oe.name===ee.InvalidState&&te.isOpen()&&0<--te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),te.close({disableAutoOpen:!1}),te.open().then(function(){return Y(te,q,ae,W)})):Bt(oe)}return J._promise(q,function(oe,Q){return tt(function(){return le.trans=J,W(oe,Q,J)})}).then(function(oe){if(q==="readwrite")try{J.idbtrans.commit();}catch{}return q==="readonly"?oe:J._completion.then(function(){return oe})})}if(te._state.openComplete)return Bt(new V.DatabaseClosed(te._state.dbOpenError));if(!te._state.isBeingOpened){if(!te._state.autoOpen)return Bt(new V.DatabaseClosed);te.open().catch(ke);}return te._state.dbReadyPromise.then(function(){return Y(te,q,ae,W)})})(this.db,u,[this.name],N);return E&&(G._consoleTask=E,G=G.catch(function(Y){return console.trace(Y),Bt(Y)})),G}finally{$&&Qe();}},sn.prototype.get=function(u,p){var y=this;return u&&u.constructor===Object?this.where(u).first(p):u==null?Bt(new V.Type("Invalid argument to Table.get()")):this._trans("readonly",function(w){return y.core.get({trans:w,key:u}).then(function(S){return y.hook.reading.fire(S)})}).then(p)},sn.prototype.where=function(u){if(typeof u=="string")return new this.db.WhereClause(this,u);if(s(u))return new this.db.WhereClause(this,"[".concat(u.join("+"),"]"));var p=i(u);if(p.length===1)return this.where(p[0]).equals(u[p[0]]);var y=this.schema.indexes.concat(this.schema.primKey).filter(function($){if($.compound&&p.every(function(Y){return 0<=$.keyPath.indexOf(Y)})){for(var G=0;G<p.length;++G)if(p.indexOf($.keyPath[G])===-1)return false;return true}return false}).sort(function($,G){return $.keyPath.length-G.keyPath.length})[0];if(y&&this.db._maxKey!==vn){var E=y.keyPath.slice(0,p.length);return this.where(E).equals(E.map(function(G){return u[G]}))}!y&&Ue&&console.warn("The query ".concat(JSON.stringify(u)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(p.join("+"),"]"));var w=this.schema.idxByName;function S($,G){return zt($,G)===0}var N=p.reduce(function(q,G){var Y=q[0],te=q[1],q=w[G],ae=u[G];return [Y||q,Y||!q?gn(te,q&&q.multi?function(W){return W=D(W,G),s(W)&&W.some(function(J){return S(ae,J)})}:function(W){return S(ae,D(W,G))}):te]},[null,null]),E=N[0],N=N[1];return E?this.where(E.name).equals(u[E.keyPath]).filter(N):y?this.filter(N):this.where(p).equals("")},sn.prototype.filter=function(u){return this.toCollection().and(u)},sn.prototype.count=function(u){return this.toCollection().count(u)},sn.prototype.offset=function(u){return this.toCollection().offset(u)},sn.prototype.limit=function(u){return this.toCollection().limit(u)},sn.prototype.each=function(u){return this.toCollection().each(u)},sn.prototype.toArray=function(u){return this.toCollection().toArray(u)},sn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},sn.prototype.orderBy=function(u){return new this.db.Collection(new this.db.WhereClause(this,s(u)?"[".concat(u.join("+"),"]"):u))},sn.prototype.reverse=function(){return this.toCollection().reverse()},sn.prototype.mapToClass=function(u){var p,y=this.db,w=this.name;function S(){return p!==null&&p.apply(this,arguments)||this}(this.schema.mappedClass=u).prototype instanceof Ka&&((function(G,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function te(){this.constructor=G;}n(G,Y),G.prototype=Y===null?Object.create(Y):(te.prototype=Y.prototype,new te);})(S,p=u),Object.defineProperty(S.prototype,"db",{get:function(){return y},enumerable:false,configurable:true}),S.prototype.table=function(){return w},u=S);for(var E=new Set,N=u.prototype;N;N=c(N))Object.getOwnPropertyNames(N).forEach(function(G){return E.add(G)});function $(G){if(!G)return G;var Y,te=Object.create(u.prototype);for(Y in G)if(!E.has(Y))try{te[Y]=G[Y];}catch{}return te}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=$,this.hook("reading",$),u},sn.prototype.defineClass=function(){return this.mapToClass(function(u){l(this,u);})},sn.prototype.add=function(u,p){var y=this,w=this.schema.primKey,S=w.auto,E=w.keyPath,N=u;return E&&S&&(N=Nn(E)(u)),this._trans("readwrite",function($){return y.core.mutate({trans:$,type:"add",keys:p!=null?[p]:null,values:[N]})}).then(function($){return $.numFailures?we.reject($.failures[0]):$.lastResult}).then(function($){if(E)try{O(u,E,$);}catch{}return $})},sn.prototype.update=function(u,p){return typeof u!="object"||s(u)?this.where(":id").equals(u).modify(p):(u=D(u,this.schema.primKey.keyPath),u===void 0?Bt(new V.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(u).modify(p))},sn.prototype.put=function(u,p){var y=this,w=this.schema.primKey,S=w.auto,E=w.keyPath,N=u;return E&&S&&(N=Nn(E)(u)),this._trans("readwrite",function($){return y.core.mutate({trans:$,type:"put",values:[N],keys:p!=null?[p]:null})}).then(function($){return $.numFailures?we.reject($.failures[0]):$.lastResult}).then(function($){if(E)try{O(u,E,$);}catch{}return $})},sn.prototype.delete=function(u){var p=this;return this._trans("readwrite",function(y){return p.core.mutate({trans:y,type:"delete",keys:[u]})}).then(function(y){return y.numFailures?we.reject(y.failures[0]):void 0})},sn.prototype.clear=function(){var u=this;return this._trans("readwrite",function(p){return u.core.mutate({trans:p,type:"deleteRange",range:uo})}).then(function(p){return p.numFailures?we.reject(p.failures[0]):void 0})},sn.prototype.bulkGet=function(u){var p=this;return this._trans("readonly",function(y){return p.core.getMany({keys:u,trans:y}).then(function(w){return w.map(function(S){return p.hook.reading.fire(S)})})})},sn.prototype.bulkAdd=function(u,p,y){var w=this,S=Array.isArray(p)?p:void 0,E=(y=y||(S?void 0:p))?y.allKeys:void 0;return this._trans("readwrite",function(N){var Y=w.schema.primKey,$=Y.auto,Y=Y.keyPath;if(Y&&S)throw new V.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(S&&S.length!==u.length)throw new V.InvalidArgument("Arguments objects and keys must have the same length");var G=u.length,Y=Y&&$?u.map(Nn(Y)):u;return w.core.mutate({trans:N,type:"add",keys:S,values:Y,wantResults:E}).then(function(J){var q=J.numFailures,ae=J.results,W=J.lastResult,J=J.failures;if(q===0)return E?ae:W;throw new Le("".concat(w.name,".bulkAdd(): ").concat(q," of ").concat(G," operations failed"),J)})})},sn.prototype.bulkPut=function(u,p,y){var w=this,S=Array.isArray(p)?p:void 0,E=(y=y||(S?void 0:p))?y.allKeys:void 0;return this._trans("readwrite",function(N){var Y=w.schema.primKey,$=Y.auto,Y=Y.keyPath;if(Y&&S)throw new V.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(S&&S.length!==u.length)throw new V.InvalidArgument("Arguments objects and keys must have the same length");var G=u.length,Y=Y&&$?u.map(Nn(Y)):u;return w.core.mutate({trans:N,type:"put",keys:S,values:Y,wantResults:E}).then(function(J){var q=J.numFailures,ae=J.results,W=J.lastResult,J=J.failures;if(q===0)return E?ae:W;throw new Le("".concat(w.name,".bulkPut(): ").concat(q," of ").concat(G," operations failed"),J)})})},sn.prototype.bulkUpdate=function(u){var p=this,y=this.core,w=u.map(function(N){return N.key}),S=u.map(function(N){return N.changes}),E=[];return this._trans("readwrite",function(N){return y.getMany({trans:N,keys:w,cache:"clone"}).then(function($){var G=[],Y=[];u.forEach(function(q,ae){var W=q.key,J=q.changes,oe=$[ae];if(oe){for(var Q=0,de=Object.keys(J);Q<de.length;Q++){var pe=de[Q],ye=J[pe];if(pe===p.schema.primKey.keyPath){if(zt(ye,W)!==0)throw new V.Constraint("Cannot update primary key in bulkUpdate()")}else O(oe,pe,ye);}E.push(ae),G.push(W),Y.push(oe);}});var te=G.length;return y.mutate({trans:N,type:"put",keys:G,values:Y,updates:{keys:w,changeSpecs:S}}).then(function(q){var ae=q.numFailures,W=q.failures;if(ae===0)return te;for(var J=0,oe=Object.keys(W);J<oe.length;J++){var Q,de=oe[J],pe=E[Number(de)];pe!=null&&(Q=W[de],delete W[de],W[pe]=Q);}throw new Le("".concat(p.name,".bulkUpdate(): ").concat(ae," of ").concat(te," operations failed"),W)})})})},sn.prototype.bulkDelete=function(u){var p=this,y=u.length;return this._trans("readwrite",function(w){return p.core.mutate({trans:w,type:"delete",keys:u})}).then(function(N){var S=N.numFailures,E=N.lastResult,N=N.failures;if(S===0)return E;throw new Le("".concat(p.name,".bulkDelete(): ").concat(S," of ").concat(y," operations failed"),N)})},sn);function sn(){}function Xr(u){function p(N,$){if($){for(var G=arguments.length,Y=new Array(G-1);--G;)Y[G-1]=arguments[G];return y[N].subscribe.apply(null,Y),u}if(typeof N=="string")return y[N]}var y={};p.addEventType=E;for(var w=1,S=arguments.length;w<S;++w)E(arguments[w]);return p;function E(N,$,G){if(typeof N!="object"){var Y;$=$||qt;var te={subscribers:[],fire:G=G||ke,subscribe:function(q){te.subscribers.indexOf(q)===-1&&(te.subscribers.push(q),te.fire=$(te.fire,q));},unsubscribe:function(q){te.subscribers=te.subscribers.filter(function(ae){return ae!==q}),te.fire=te.subscribers.reduce($,G);}};return y[N]=p[N]=te}i(Y=N).forEach(function(q){var ae=Y[q];if(s(ae))E(q,Y[q][0],Y[q][1]);else {if(ae!=="asap")throw new V.InvalidArgument("Invalid event config");var W=E(q,Ze,function(){for(var J=arguments.length,oe=new Array(J);J--;)oe[J]=arguments[J];W.subscribers.forEach(function(Q){L(function(){Q.apply(null,oe);});});});}});}}function pr(u,p){return b(p).from({prototype:u}),p}function Fr(u,p){return !(u.filter||u.algorithm||u.or)&&(p?u.justLimit:!u.replayFilter)}function Wa(u,p){u.filter=gn(u.filter,p);}function ia(u,p,y){var w=u.replayFilter;u.replayFilter=w?function(){return gn(w(),p())}:p,u.justLimit=y&&!w;}function Oo(u,p){if(u.isPrimKey)return p.primaryKey;var y=p.getIndexByKeyPath(u.index);if(!y)throw new V.Schema("KeyPath "+u.index+" on object store "+p.name+" is not indexed");return y}function Gi(u,p,y){var w=Oo(u,p.schema);return p.openCursor({trans:y,values:!u.keysOnly,reverse:u.dir==="prev",unique:!!u.unique,query:{index:w,range:u.range}})}function sa(u,p,y,w){var S=u.replayFilter?gn(u.filter,u.replayFilter()):u.filter;if(u.or){var E={},N=function($,G,Y){var te,q;S&&!S(G,Y,function(ae){return G.stop(ae)},function(ae){return G.fail(ae)})||((q=""+(te=G.primaryKey))=="[object ArrayBuffer]"&&(q=""+new Uint8Array(te)),f(E,q)||(E[q]=true,p($,G,Y)));};return Promise.all([u.or._iterate(N,y),Or(Gi(u,w,y),u.algorithm,N,!u.keysOnly&&u.valueMapper)])}return Or(Gi(u,w,y),gn(u.algorithm,S),p,!u.keysOnly&&u.valueMapper)}function Or(u,p,y,w){var S=He(w?function(E,N,$){return y(w(E),N,$)}:y);return u.then(function(E){if(E)return E.start(function(){var N=function(){return E.continue()};p&&!p(E,function($){return N=$},function($){E.stop($),N=ke;},function($){E.fail($),N=ke;})||S(E.value,E,function($){return N=$}),N();})})}var hn=(Ya.prototype.execute=function(u){var p=this["@@propmod"];if(p.add!==void 0){var y=p.add;if(s(y))return o(o([],s(u)?u:[],true),y).sort();if(typeof y=="number")return (Number(u)||0)+y;if(typeof y=="bigint")try{return BigInt(u)+y}catch{return BigInt(0)+y}throw new TypeError("Invalid term ".concat(y))}if(p.remove!==void 0){var w=p.remove;if(s(w))return s(u)?u.filter(function(S){return !w.includes(S)}).sort():[];if(typeof w=="number")return Number(u)-w;if(typeof w=="bigint")try{return BigInt(u)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return y=(y=p.replacePrefix)===null||y===void 0?void 0:y[0],y&&typeof u=="string"&&u.startsWith(y)?p.replacePrefix[1]+u.substring(y.length):u},Ya);function Ya(u){this["@@propmod"]=u;}var ql=(Xt.prototype._read=function(u,p){var y=this._ctx;return y.error?y.table._trans(null,Bt.bind(null,y.error)):y.table._trans("readonly",u).then(p)},Xt.prototype._write=function(u){var p=this._ctx;return p.error?p.table._trans(null,Bt.bind(null,p.error)):p.table._trans("readwrite",u,"locked")},Xt.prototype._addAlgorithm=function(u){var p=this._ctx;p.algorithm=gn(p.algorithm,u);},Xt.prototype._iterate=function(u,p){return sa(this._ctx,u,p,this._ctx.table.core)},Xt.prototype.clone=function(u){var p=Object.create(this.constructor.prototype),y=Object.create(this._ctx);return u&&l(y,u),p._ctx=y,p},Xt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Xt.prototype.each=function(u){var p=this._ctx;return this._read(function(y){return sa(p,u,y,p.table.core)})},Xt.prototype.count=function(u){var p=this;return this._read(function(y){var w=p._ctx,S=w.table.core;if(Fr(w,true))return S.count({trans:y,query:{index:Oo(w,S.schema),range:w.range}}).then(function(N){return Math.min(N,w.limit)});var E=0;return sa(w,function(){return ++E,false},y,S).then(function(){return E})}).then(u)},Xt.prototype.sortBy=function(u,p){var y=u.split(".").reverse(),w=y[0],S=y.length-1;function E(G,Y){return Y?E(G[y[Y]],Y-1):G[w]}var N=this._ctx.dir==="next"?1:-1;function $(G,Y){return zt(E(G,S),E(Y,S))*N}return this.toArray(function(G){return G.sort($)}).then(p)},Xt.prototype.toArray=function(u){var p=this;return this._read(function(y){var w=p._ctx;if(w.dir==="next"&&Fr(w,true)&&0<w.limit){var S=w.valueMapper,E=Oo(w,w.table.core.schema);return w.table.core.query({trans:y,limit:w.limit,values:true,query:{index:E,range:w.range}}).then(function($){return $=$.result,S?$.map(S):$})}var N=[];return sa(w,function($){return N.push($)},y,w.table.core).then(function(){return N})},u)},Xt.prototype.offset=function(u){var p=this._ctx;return u<=0||(p.offset+=u,Fr(p)?ia(p,function(){var y=u;return function(w,S){return y===0||(y===1?--y:S(function(){w.advance(y),y=0;}),false)}}):ia(p,function(){var y=u;return function(){return --y<0}})),this},Xt.prototype.limit=function(u){return this._ctx.limit=Math.min(this._ctx.limit,u),ia(this._ctx,function(){var p=u;return function(y,w,S){return --p<=0&&w(S),0<=p}},true),this},Xt.prototype.until=function(u,p){return Wa(this._ctx,function(y,w,S){return !u(y.value)||(w(S),p)}),this},Xt.prototype.first=function(u){return this.limit(1).toArray(function(p){return p[0]}).then(u)},Xt.prototype.last=function(u){return this.reverse().first(u)},Xt.prototype.filter=function(u){var p;return Wa(this._ctx,function(y){return u(y.value)}),(p=this._ctx).isMatch=gn(p.isMatch,u),this},Xt.prototype.and=function(u){return this.filter(u)},Xt.prototype.or=function(u){return new this.db.WhereClause(this._ctx.table,u,this)},Xt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Xt.prototype.desc=function(){return this.reverse()},Xt.prototype.eachKey=function(u){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(y,w){u(w.key,w);})},Xt.prototype.eachUniqueKey=function(u){return this._ctx.unique="unique",this.eachKey(u)},Xt.prototype.eachPrimaryKey=function(u){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(y,w){u(w.primaryKey,w);})},Xt.prototype.keys=function(u){var p=this._ctx;p.keysOnly=!p.isMatch;var y=[];return this.each(function(w,S){y.push(S.key);}).then(function(){return y}).then(u)},Xt.prototype.primaryKeys=function(u){var p=this._ctx;if(p.dir==="next"&&Fr(p,true)&&0<p.limit)return this._read(function(w){var S=Oo(p,p.table.core.schema);return p.table.core.query({trans:w,values:false,limit:p.limit,query:{index:S,range:p.range}})}).then(function(w){return w.result}).then(u);p.keysOnly=!p.isMatch;var y=[];return this.each(function(w,S){y.push(S.primaryKey);}).then(function(){return y}).then(u)},Xt.prototype.uniqueKeys=function(u){return this._ctx.unique="unique",this.keys(u)},Xt.prototype.firstKey=function(u){return this.limit(1).keys(function(p){return p[0]}).then(u)},Xt.prototype.lastKey=function(u){return this.reverse().firstKey(u)},Xt.prototype.distinct=function(){var u=this._ctx,u=u.index&&u.table.schema.idxByName[u.index];if(!u||!u.multi)return this;var p={};return Wa(this._ctx,function(S){var w=S.primaryKey.toString(),S=f(p,w);return p[w]=true,!S}),this},Xt.prototype.modify=function(u){var p=this,y=this._ctx;return this._write(function(w){var S,E,N;N=typeof u=="function"?u:(S=i(u),E=S.length,function(Q){for(var de=false,pe=0;pe<E;++pe){var ye=S[pe],xe=u[ye],je=D(Q,ye);xe instanceof hn?(O(Q,ye,xe.execute(je)),de=true):je!==xe&&(O(Q,ye,xe),de=true);}return de});var $=y.table.core,q=$.schema.primaryKey,G=q.outbound,Y=q.extractKey,te=200,q=p.db._options.modifyChunkSize;q&&(te=typeof q=="object"?q[$.name]||q["*"]||200:q);function ae(Q,ye){var pe=ye.failures,ye=ye.numFailures;J+=Q-ye;for(var xe=0,je=i(pe);xe<je.length;xe++){var nt=je[xe];W.push(pe[nt]);}}var W=[],J=0,oe=[];return p.clone().primaryKeys().then(function(Q){function de(ye){var xe=Math.min(te,Q.length-ye);return $.getMany({trans:w,keys:Q.slice(ye,ye+xe),cache:"immutable"}).then(function(je){for(var nt=[],qe=[],Ge=G?[]:null,at=[],et=0;et<xe;++et){var ht=je[et],Vt={value:Ce(ht),primKey:Q[ye+et]};N.call(Vt,Vt.value,Vt)!==false&&(Vt.value==null?at.push(Q[ye+et]):G||zt(Y(ht),Y(Vt.value))===0?(qe.push(Vt.value),G&&Ge.push(Q[ye+et])):(at.push(Q[ye+et]),nt.push(Vt.value)));}return Promise.resolve(0<nt.length&&$.mutate({trans:w,type:"add",values:nt}).then(function(Gt){for(var Wt in Gt.failures)at.splice(parseInt(Wt),1);ae(nt.length,Gt);})).then(function(){return (0<qe.length||pe&&typeof u=="object")&&$.mutate({trans:w,type:"put",keys:Ge,values:qe,criteria:pe,changeSpec:typeof u!="function"&&u,isAdditionalChunk:0<ye}).then(function(Gt){return ae(qe.length,Gt)})}).then(function(){return (0<at.length||pe&&u===mr)&&$.mutate({trans:w,type:"delete",keys:at,criteria:pe,isAdditionalChunk:0<ye}).then(function(Gt){return ae(at.length,Gt)})}).then(function(){return Q.length>ye+xe&&de(ye+te)})})}var pe=Fr(y)&&y.limit===1/0&&(typeof u!="function"||u===mr)&&{index:y.index,range:y.range};return de(0).then(function(){if(0<W.length)throw new Oe("Error modifying one or more objects",W,J,oe);return Q.length})})})},Xt.prototype.delete=function(){var u=this._ctx,p=u.range;return Fr(u)&&(u.isPrimKey||p.type===3)?this._write(function(y){var w=u.table.core.schema.primaryKey,S=p;return u.table.core.count({trans:y,query:{index:w,range:S}}).then(function(E){return u.table.core.mutate({trans:y,type:"deleteRange",range:S}).then(function(N){var $=N.failures;if(N.lastResult,N.results,N=N.numFailures,N)throw new Oe("Could not delete some values",Object.keys($).map(function(G){return $[G]}),E-N);return E-N})})}):this.modify(mr)},Xt);function Xt(){}var mr=function(u,p){return p.value=null};function Vl(u,p){return u<p?-1:u===p?0:1}function Wi(u,p){return p<u?-1:u===p?0:1}function Bn(u,p,y){return u=u instanceof ve?new u.Collection(u):u,u._ctx.error=new(y||TypeError)(p),u}function Qr(u){return new u.Collection(u,function(){return ca("")}).limit(0)}function la(u,p,y,w){var S,E,N,$,G,Y,te,q=y.length;if(!y.every(function(J){return typeof J=="string"}))return Bn(u,Dt);function ae(J){S=J==="next"?function(Q){return Q.toUpperCase()}:function(Q){return Q.toLowerCase()},E=J==="next"?function(Q){return Q.toLowerCase()}:function(Q){return Q.toUpperCase()},N=J==="next"?Vl:Wi;var oe=y.map(function(Q){return {lower:E(Q),upper:S(Q)}}).sort(function(Q,de){return N(Q.lower,de.lower)});$=oe.map(function(Q){return Q.upper}),G=oe.map(function(Q){return Q.lower}),te=(Y=J)==="next"?"":w;}ae("next"),u=new u.Collection(u,function(){return Lr($[0],G[q-1]+w)}),u._ondirectionchange=function(J){ae(J);};var W=0;return u._addAlgorithm(function(J,oe,Q){var de=J.key;if(typeof de!="string")return false;var pe=E(de);if(p(pe,G,W))return true;for(var ye=null,xe=W;xe<q;++xe){var je=(function(nt,qe,Ge,at,et,ht){for(var Vt=Math.min(nt.length,at.length),Gt=-1,Wt=0;Wt<Vt;++Wt){var cr=qe[Wt];if(cr!==at[Wt])return et(nt[Wt],Ge[Wt])<0?nt.substr(0,Wt)+Ge[Wt]+Ge.substr(Wt+1):et(nt[Wt],at[Wt])<0?nt.substr(0,Wt)+at[Wt]+Ge.substr(Wt+1):0<=Gt?nt.substr(0,Gt)+qe[Gt]+Ge.substr(Gt+1):null;et(nt[Wt],cr)<0&&(Gt=Wt);}return Vt<at.length&&ht==="next"?nt+Ge.substr(nt.length):Vt<nt.length&&ht==="prev"?nt.substr(0,Ge.length):Gt<0?null:nt.substr(0,Gt)+at[Gt]+Ge.substr(Gt+1)})(de,pe,$[xe],G[xe],N,Y);je===null&&ye===null?W=xe+1:(ye===null||0<N(ye,je))&&(ye=je);}return oe(ye!==null?function(){J.continue(ye+te);}:Q),false}),u}function Lr(u,p,y,w){return {type:2,lower:u,upper:p,lowerOpen:y,upperOpen:w}}function ca(u){return {type:1,lower:u,upper:u}}var ve=(Object.defineProperty(rt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:false,configurable:true}),rt.prototype.between=function(u,p,y,w){y=y!==false,w=w===true;try{return 0<this._cmp(u,p)||this._cmp(u,p)===0&&(y||w)&&(!y||!w)?Qr(this):new this.Collection(this,function(){return Lr(u,p,!y,!w)})}catch{return Bn(this,tn)}},rt.prototype.equals=function(u){return u==null?Bn(this,tn):new this.Collection(this,function(){return ca(u)})},rt.prototype.above=function(u){return u==null?Bn(this,tn):new this.Collection(this,function(){return Lr(u,void 0,true)})},rt.prototype.aboveOrEqual=function(u){return u==null?Bn(this,tn):new this.Collection(this,function(){return Lr(u,void 0,false)})},rt.prototype.below=function(u){return u==null?Bn(this,tn):new this.Collection(this,function(){return Lr(void 0,u,false,true)})},rt.prototype.belowOrEqual=function(u){return u==null?Bn(this,tn):new this.Collection(this,function(){return Lr(void 0,u)})},rt.prototype.startsWith=function(u){return typeof u!="string"?Bn(this,Dt):this.between(u,u+vn,true,true)},rt.prototype.startsWithIgnoreCase=function(u){return u===""?this.startsWith(u):la(this,function(p,y){return p.indexOf(y[0])===0},[u],vn)},rt.prototype.equalsIgnoreCase=function(u){return la(this,function(p,y){return p===y[0]},[u],"")},rt.prototype.anyOfIgnoreCase=function(){var u=me.apply(fe,arguments);return u.length===0?Qr(this):la(this,function(p,y){return y.indexOf(p)!==-1},u,"")},rt.prototype.startsWithAnyOfIgnoreCase=function(){var u=me.apply(fe,arguments);return u.length===0?Qr(this):la(this,function(p,y){return y.some(function(w){return p.indexOf(w)===0})},u,vn)},rt.prototype.anyOf=function(){var u=this,p=me.apply(fe,arguments),y=this._cmp;try{p.sort(y);}catch{return Bn(this,tn)}if(p.length===0)return Qr(this);var w=new this.Collection(this,function(){return Lr(p[0],p[p.length-1])});w._ondirectionchange=function(E){y=E==="next"?u._ascending:u._descending,p.sort(y);};var S=0;return w._addAlgorithm(function(E,N,$){for(var G=E.key;0<y(G,p[S]);)if(++S===p.length)return N($),false;return y(G,p[S])===0||(N(function(){E.continue(p[S]);}),false)}),w},rt.prototype.notEqual=function(u){return this.inAnyRange([[-1/0,u],[u,this.db._maxKey]],{includeLowers:false,includeUppers:false})},rt.prototype.noneOf=function(){var u=me.apply(fe,arguments);if(u.length===0)return new this.Collection(this);try{u.sort(this._ascending);}catch{return Bn(this,tn)}var p=u.reduce(function(y,w){return y?y.concat([[y[y.length-1][1],w]]):[[-1/0,w]]},null);return p.push([u[u.length-1],this.db._maxKey]),this.inAnyRange(p,{includeLowers:false,includeUppers:false})},rt.prototype.inAnyRange=function(de,p){var y=this,w=this._cmp,S=this._ascending,E=this._descending,N=this._min,$=this._max;if(de.length===0)return Qr(this);if(!de.every(function(pe){return pe[0]!==void 0&&pe[1]!==void 0&&S(pe[0],pe[1])<=0}))return Bn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",V.InvalidArgument);var G=!p||p.includeLowers!==false,Y=p&&p.includeUppers===true,te,q=S;function ae(pe,ye){return q(pe[0],ye[0])}try{(te=de.reduce(function(pe,ye){for(var xe=0,je=pe.length;xe<je;++xe){var nt=pe[xe];if(w(ye[0],nt[1])<0&&0<w(ye[1],nt[0])){nt[0]=N(nt[0],ye[0]),nt[1]=$(nt[1],ye[1]);break}}return xe===je&&pe.push(ye),pe},[])).sort(ae);}catch{return Bn(this,tn)}var W=0,J=Y?function(pe){return 0<S(pe,te[W][1])}:function(pe){return 0<=S(pe,te[W][1])},oe=G?function(pe){return 0<E(pe,te[W][0])}:function(pe){return 0<=E(pe,te[W][0])},Q=J,de=new this.Collection(this,function(){return Lr(te[0][0],te[te.length-1][1],!G,!Y)});return de._ondirectionchange=function(pe){q=pe==="next"?(Q=J,S):(Q=oe,E),te.sort(ae);},de._addAlgorithm(function(pe,ye,xe){for(var je,nt=pe.key;Q(nt);)if(++W===te.length)return ye(xe),false;return !J(je=nt)&&!oe(je)||(y._cmp(nt,te[W][1])===0||y._cmp(nt,te[W][0])===0||ye(function(){q===S?pe.continue(te[W][0]):pe.continue(te[W][1]);}),false)}),de},rt.prototype.startsWithAnyOf=function(){var u=me.apply(fe,arguments);return u.every(function(p){return typeof p=="string"})?u.length===0?Qr(this):this.inAnyRange(u.map(function(p){return [p,p+vn]})):Bn(this,"startsWithAnyOf() only works with strings")},rt);function rt(){}function Ct(u){return He(function(p){return Kn(p),u(p.target.error),false})}function Kn(u){u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault();}var gr="storagemutated",Lo="x-storagemutated-1",Un=Xr(null,gr),Nr=(or.prototype._lock=function(){return P(!le.global),++this._reculock,this._reculock!==1||le.global||(le.lockOwnerFor=this),this},or.prototype._unlock=function(){if(P(!le.global),--this._reculock==0)for(le.global||(le.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var u=this._blockedFuncs.shift();try{Qt(u[1],u[0]);}catch{}}return this},or.prototype._locked=function(){return this._reculock&&le.lockOwnerFor!==this},or.prototype.create=function(u){var p=this;if(!this.mode)return this;var y=this.db.idbdb,w=this.db._state.dbOpenError;if(P(!this.idbtrans),!u&&!y)switch(w&&w.name){case "DatabaseClosedError":throw new V.DatabaseClosed(w);case "MissingAPIError":throw new V.MissingAPI(w.message,w);default:throw new V.OpenFailed(w)}if(!this.active)throw new V.TransactionInactive;return P(this._completion._state===null),(u=this.idbtrans=u||(this.db.core||y).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=He(function(S){Kn(S),p._reject(u.error);}),u.onabort=He(function(S){Kn(S),p.active&&p._reject(new V.Abort(u.error)),p.active=false,p.on("abort").fire(S);}),u.oncomplete=He(function(){p.active=false,p._resolve(),"mutatedParts"in u&&Un.storagemutated.fire(u.mutatedParts);}),this},or.prototype._promise=function(u,p,y){var w=this;if(u==="readwrite"&&this.mode!=="readwrite")return Bt(new V.ReadOnly("Transaction is readonly"));if(!this.active)return Bt(new V.TransactionInactive);if(this._locked())return new we(function(E,N){w._blockedFuncs.push([function(){w._promise(u,p,y).then(E,N);},le]);});if(y)return tt(function(){var E=new we(function(N,$){w._lock();var G=p(N,$,w);G&&G.then&&G.then(N,$);});return E.finally(function(){return w._unlock()}),E._lib=true,E});var S=new we(function(E,N){var $=p(E,N,w);$&&$.then&&$.then(E,N);});return S._lib=true,S},or.prototype._root=function(){return this.parent?this.parent._root():this},or.prototype.waitFor=function(u){var p,y=this._root(),w=we.resolve(u);y._waitingFor?y._waitingFor=y._waitingFor.then(function(){return w}):(y._waitingFor=w,y._waitingQueue=[],p=y.idbtrans.objectStore(y.storeNames[0]),(function E(){for(++y._spinCount;y._waitingQueue.length;)y._waitingQueue.shift()();y._waitingFor&&(p.get(-1/0).onsuccess=E);})());var S=y._waitingFor;return new we(function(E,N){w.then(function($){return y._waitingQueue.push(He(E.bind(null,$)))},function($){return y._waitingQueue.push(He(N.bind(null,$)))}).finally(function(){y._waitingFor===S&&(y._waitingFor=null);});})},or.prototype.abort=function(){this.active&&(this.active=false,this.idbtrans&&this.idbtrans.abort(),this._reject(new V.Abort));},or.prototype.table=function(u){var p=this._memoizedTables||(this._memoizedTables={});if(f(p,u))return p[u];var y=this.schema[u];if(!y)throw new V.NotFound("Table "+u+" not part of transaction");return y=new this.db.Table(u,y,this),y.core=this.db.core.table(u),p[u]=y},or);function or(){}function No(u,p,y,w,S,E,N){return {name:u,keyPath:p,unique:y,multi:w,auto:S,compound:E,src:(y&&!N?"&":"")+(w?"*":"")+(S?"++":"")+zd(p)}}function zd(u){return typeof u=="string"?u:u?"["+[].join.call(u,"+")+"]":""}function zl(u,p,y){return {name:u,primKey:p,indexes:y,mappedClass:null,idxByName:(w=function(S){return [S.name,S]},y.reduce(function(S,E,N){return N=w(E,N),N&&(S[N[0]]=N[1]),S},{}))};var w;}var Xa=function(u){try{return u.only([[]]),Xa=function(){return [[]]},[[]]}catch{return Xa=function(){return vn},vn}};function Kl(u){return u==null?function(){}:typeof u=="string"?(p=u).split(".").length===1?function(y){return y[p]}:function(y){return D(y,p)}:function(y){return D(y,u)};var p;}function Kd(u){return [].slice.call(u)}var N_=0;function Qa(u){return u==null?":id":typeof u=="string"?u:"[".concat(u.join("+"),"]")}function B_(u,p,G){function w(Q){if(Q.type===3)return null;if(Q.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var W=Q.lower,J=Q.upper,oe=Q.lowerOpen,Q=Q.upperOpen;return W===void 0?J===void 0?null:p.upperBound(J,!!Q):J===void 0?p.lowerBound(W,!!oe):p.bound(W,J,!!oe,!!Q)}function S(ae){var W,J=ae.name;return {name:J,schema:ae,mutate:function(oe){var Q=oe.trans,de=oe.type,pe=oe.keys,ye=oe.values,xe=oe.range;return new Promise(function(je,nt){je=He(je);var qe=Q.objectStore(J),Ge=qe.keyPath==null,at=de==="put"||de==="add";if(!at&&de!=="delete"&&de!=="deleteRange")throw new Error("Invalid operation type: "+de);var et,ht=(pe||ye||{length:1}).length;if(pe&&ye&&pe.length!==ye.length)throw new Error("Given keys array must have same length as given values array.");if(ht===0)return je({numFailures:0,failures:{},results:[],lastResult:void 0});function Vt(Zn){++cr,Kn(Zn);}var Gt=[],Wt=[],cr=0;if(de==="deleteRange"){if(xe.type===4)return je({numFailures:cr,failures:Wt,results:[],lastResult:void 0});xe.type===3?Gt.push(et=qe.clear()):Gt.push(et=qe.delete(w(xe)));}else {var Ge=at?Ge?[ye,pe]:[ye,null]:[pe,null],jt=Ge[0],Wn=Ge[1];if(at)for(var Yn=0;Yn<ht;++Yn)Gt.push(et=Wn&&Wn[Yn]!==void 0?qe[de](jt[Yn],Wn[Yn]):qe[de](jt[Yn])),et.onerror=Vt;else for(Yn=0;Yn<ht;++Yn)Gt.push(et=qe[de](jt[Yn])),et.onerror=Vt;}function ss(Zn){Zn=Zn.target.result,Gt.forEach(function($o,uc){return $o.error!=null&&(Wt[uc]=$o.error)}),je({numFailures:cr,failures:Wt,results:de==="delete"?pe:Gt.map(function($o){return $o.result}),lastResult:Zn});}et.onerror=function(Zn){Vt(Zn),ss(Zn);},et.onsuccess=ss;})},getMany:function(oe){var Q=oe.trans,de=oe.keys;return new Promise(function(pe,ye){pe=He(pe);for(var xe,je=Q.objectStore(J),nt=de.length,qe=new Array(nt),Ge=0,at=0,et=function(Gt){Gt=Gt.target,qe[Gt._pos]=Gt.result,++at===Ge&&pe(qe);},ht=Ct(ye),Vt=0;Vt<nt;++Vt)de[Vt]!=null&&((xe=je.get(de[Vt]))._pos=Vt,xe.onsuccess=et,xe.onerror=ht,++Ge);Ge===0&&pe(qe);})},get:function(oe){var Q=oe.trans,de=oe.key;return new Promise(function(pe,ye){pe=He(pe);var xe=Q.objectStore(J).get(de);xe.onsuccess=function(je){return pe(je.target.result)},xe.onerror=Ct(ye);})},query:(W=Y,function(oe){return new Promise(function(Q,de){Q=He(Q);var pe,ye,xe,Ge=oe.trans,je=oe.values,nt=oe.limit,et=oe.query,qe=nt===1/0?void 0:nt,at=et.index,et=et.range,Ge=Ge.objectStore(J),at=at.isPrimaryKey?Ge:Ge.index(at.name),et=w(et);if(nt===0)return Q({result:[]});W?((qe=je?at.getAll(et,qe):at.getAllKeys(et,qe)).onsuccess=function(ht){return Q({result:ht.target.result})},qe.onerror=Ct(de)):(pe=0,ye=!je&&"openKeyCursor"in at?at.openKeyCursor(et):at.openCursor(et),xe=[],ye.onsuccess=function(ht){var Vt=ye.result;return Vt?(xe.push(je?Vt.value:Vt.primaryKey),++pe===nt?Q({result:xe}):void Vt.continue()):Q({result:xe})},ye.onerror=Ct(de));})}),openCursor:function(oe){var Q=oe.trans,de=oe.values,pe=oe.query,ye=oe.reverse,xe=oe.unique;return new Promise(function(je,nt){je=He(je);var at=pe.index,qe=pe.range,Ge=Q.objectStore(J),Ge=at.isPrimaryKey?Ge:Ge.index(at.name),at=ye?xe?"prevunique":"prev":xe?"nextunique":"next",et=!de&&"openKeyCursor"in Ge?Ge.openKeyCursor(w(qe),at):Ge.openCursor(w(qe),at);et.onerror=Ct(nt),et.onsuccess=He(function(ht){var Vt,Gt,Wt,cr,jt=et.result;jt?(jt.___id=++N_,jt.done=false,Vt=jt.continue.bind(jt),Gt=(Gt=jt.continuePrimaryKey)&&Gt.bind(jt),Wt=jt.advance.bind(jt),cr=function(){throw new Error("Cursor not stopped")},jt.trans=Q,jt.stop=jt.continue=jt.continuePrimaryKey=jt.advance=function(){throw new Error("Cursor not started")},jt.fail=He(nt),jt.next=function(){var Wn=this,Yn=1;return this.start(function(){return Yn--?Wn.continue():Wn.stop()}).then(function(){return Wn})},jt.start=function(Wn){function Yn(){if(et.result)try{Wn();}catch(Zn){jt.fail(Zn);}else jt.done=true,jt.start=function(){throw new Error("Cursor behind last entry")},jt.stop();}var ss=new Promise(function(Zn,$o){Zn=He(Zn),et.onerror=Ct($o),jt.fail=$o,jt.stop=function(uc){jt.stop=jt.continue=jt.continuePrimaryKey=jt.advance=cr,Zn(uc);};});return et.onsuccess=He(function(Zn){et.onsuccess=Yn,Yn();}),jt.continue=Vt,jt.continuePrimaryKey=Gt,jt.advance=Wt,Yn(),ss},je(jt)):je(null);},nt);})},count:function(oe){var Q=oe.query,de=oe.trans,pe=Q.index,ye=Q.range;return new Promise(function(xe,je){var nt=de.objectStore(J),qe=pe.isPrimaryKey?nt:nt.index(pe.name),nt=w(ye),qe=nt?qe.count(nt):qe.count();qe.onsuccess=He(function(Ge){return xe(Ge.target.result)}),qe.onerror=Ct(je);})}}}var E,N,$,te=(N=G,$=Kd((E=u).objectStoreNames),{schema:{name:E.name,tables:$.map(function(ae){return N.objectStore(ae)}).map(function(ae){var W=ae.keyPath,Q=ae.autoIncrement,J=s(W),oe={},Q={name:ae.name,primaryKey:{name:null,isPrimaryKey:true,outbound:W==null,compound:J,keyPath:W,autoIncrement:Q,unique:true,extractKey:Kl(W)},indexes:Kd(ae.indexNames).map(function(de){return ae.index(de)}).map(function(xe){var pe=xe.name,ye=xe.unique,je=xe.multiEntry,xe=xe.keyPath,je={name:pe,compound:s(xe),keyPath:xe,unique:ye,multiEntry:je,extractKey:Kl(xe)};return oe[Qa(xe)]=je}),getIndexByKeyPath:function(de){return oe[Qa(de)]}};return oe[":id"]=Q.primaryKey,W!=null&&(oe[Qa(W)]=Q.primaryKey),Q})},hasGetAll:0<$.length&&"getAll"in N.objectStore($[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),G=te.schema,Y=te.hasGetAll,te=G.tables.map(S),q={};return te.forEach(function(ae){return q[ae.name]=ae}),{stack:"dbcore",transaction:u.transaction.bind(u),table:function(ae){if(!q[ae])throw new Error("Table '".concat(ae,"' not found"));return q[ae]},MIN_KEY:-1/0,MAX_KEY:Xa(p),schema:G}}function U_(u,p,y,w){var S=y.IDBKeyRange;return y.indexedDB,{dbcore:(w=B_(p,S,w),u.dbcore.reduce(function(E,N){return N=N.create,r(r({},E),N(E))},w))}}function Yi(u,w){var y=w.db,w=U_(u._middlewares,y,u._deps,w);u.core=w.dbcore,u.tables.forEach(function(S){var E=S.name;u.core.schema.tables.some(function(N){return N.name===E})&&(S.core=u.core.table(E),u[E]instanceof u.Table&&(u[E].core=S.core));});}function Xi(u,p,y,w){y.forEach(function(S){var E=w[S];p.forEach(function(N){var $=(function G(Y,te){return C(Y,te)||(Y=c(Y))&&G(Y,te)})(N,S);(!$||"value"in $&&$.value===void 0)&&(N===u.Transaction.prototype||N instanceof u.Transaction?_(N,S,{get:function(){return this.table(S)},set:function(G){g(this,S,{value:G,writable:true,configurable:true,enumerable:true});}}):N[S]=new u.Table(S,E));});});}function Gl(u,p){p.forEach(function(y){for(var w in y)y[w]instanceof u.Table&&delete y[w];});}function $_(u,p){return u._cfg.version-p._cfg.version}function H_(u,p,y,w){var S=u._dbSchema;y.objectStoreNames.contains("$meta")&&!S.$meta&&(S.$meta=zl("$meta",Wd("")[0],[]),u._storeNames.push("$meta"));var E=u._createTransaction("readwrite",u._storeNames,S);E.create(y),E._completion.catch(w);var N=E._reject.bind(E),$=le.transless||le;tt(function(){return le.trans=E,le.transless=$,p!==0?(Yi(u,y),Y=p,((G=E).storeNames.includes("$meta")?G.table("$meta").get("version").then(function(te){return te??Y}):we.resolve(Y)).then(function(te){return ae=te,W=E,J=y,oe=[],te=(q=u)._versions,Q=q._dbSchema=Zi(0,q.idbdb,J),(te=te.filter(function(de){return de._cfg.version>=ae})).length!==0?(te.forEach(function(de){oe.push(function(){var pe=Q,ye=de._cfg.dbschema;Ji(q,pe,J),Ji(q,ye,J),Q=q._dbSchema=ye;var xe=Wl(pe,ye);xe.add.forEach(function(at){Yl(J,at[0],at[1].primKey,at[1].indexes);}),xe.change.forEach(function(at){if(at.recreate)throw new V.Upgrade("Not yet support for changing primary key");var et=J.objectStore(at.name);at.add.forEach(function(ht){return Qi(et,ht)}),at.change.forEach(function(ht){et.deleteIndex(ht.name),Qi(et,ht);}),at.del.forEach(function(ht){return et.deleteIndex(ht)});});var je=de._cfg.contentUpgrade;if(je&&de._cfg.version>ae){Yi(q,J),W._memoizedTables={};var nt=B(ye);xe.del.forEach(function(at){nt[at]=pe[at];}),Gl(q,[q.Transaction.prototype]),Xi(q,[q.Transaction.prototype],i(nt),nt),W.schema=nt;var qe,Ge=z(je);return Ge&&Rt(),xe=we.follow(function(){var at;(qe=je(W))&&Ge&&(at=St.bind(null,null),qe.then(at,at));}),qe&&typeof qe.then=="function"?we.resolve(qe):xe.then(function(){return qe})}}),oe.push(function(pe){var ye,xe,je=de._cfg.dbschema;ye=je,xe=pe,[].slice.call(xe.db.objectStoreNames).forEach(function(nt){return ye[nt]==null&&xe.db.deleteObjectStore(nt)}),Gl(q,[q.Transaction.prototype]),Xi(q,[q.Transaction.prototype],q._storeNames,q._dbSchema),W.schema=q._dbSchema;}),oe.push(function(pe){q.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(q.idbdb.version/10)===de._cfg.version?(q.idbdb.deleteObjectStore("$meta"),delete q._dbSchema.$meta,q._storeNames=q._storeNames.filter(function(ye){return ye!=="$meta"})):pe.objectStore("$meta").put(de._cfg.version,"version"));});}),(function de(){return oe.length?we.resolve(oe.shift()(W.idbtrans)).then(de):we.resolve()})().then(function(){Gd(Q,J);})):we.resolve();var q,ae,W,J,oe,Q;}).catch(N)):(i(S).forEach(function(te){Yl(y,te,S[te].primKey,S[te].indexes);}),Yi(u,y),void we.follow(function(){return u.on.populate.fire(E)}).catch(N));var G,Y;});}function j_(u,p){Gd(u._dbSchema,p),p.db.version%10!=0||p.objectStoreNames.contains("$meta")||p.db.createObjectStore("$meta").add(Math.ceil(p.db.version/10-1),"version");var y=Zi(0,u.idbdb,p);Ji(u,u._dbSchema,p);for(var w=0,S=Wl(y,u._dbSchema).change;w<S.length;w++){var E=(function(N){if(N.change.length||N.recreate)return console.warn("Unable to patch indexes of table ".concat(N.name," because it has changes on the type of index or primary key.")),{value:void 0};var $=p.objectStore(N.name);N.add.forEach(function(G){Ue&&console.debug("Dexie upgrade patch: Creating missing index ".concat(N.name,".").concat(G.src)),Qi($,G);});})(S[w]);if(typeof E=="object")return E.value}}function Wl(u,p){var y,w={del:[],add:[],change:[]};for(y in u)p[y]||w.del.push(y);for(y in p){var S=u[y],E=p[y];if(S){var N={name:y,def:E,recreate:false,del:[],add:[],change:[]};if(""+(S.primKey.keyPath||"")!=""+(E.primKey.keyPath||"")||S.primKey.auto!==E.primKey.auto)N.recreate=true,w.change.push(N);else {var $=S.idxByName,G=E.idxByName,Y=void 0;for(Y in $)G[Y]||N.del.push(Y);for(Y in G){var te=$[Y],q=G[Y];te?te.src!==q.src&&N.change.push(q):N.add.push(q);}(0<N.del.length||0<N.add.length||0<N.change.length)&&w.change.push(N);}}else w.add.push([y,E]);}return w}function Yl(u,p,y,w){var S=u.db.createObjectStore(p,y.keyPath?{keyPath:y.keyPath,autoIncrement:y.auto}:{autoIncrement:y.auto});return w.forEach(function(E){return Qi(S,E)}),S}function Gd(u,p){i(u).forEach(function(y){p.db.objectStoreNames.contains(y)||(Ue&&console.debug("Dexie: Creating missing table",y),Yl(p,y,u[y].primKey,u[y].indexes));});}function Qi(u,p){u.createIndex(p.name,p.keyPath,{unique:p.unique,multiEntry:p.multi});}function Zi(u,p,y){var w={};return T(p.objectStoreNames,0).forEach(function(S){for(var E=y.objectStore(S),N=No(zd(Y=E.keyPath),Y||"",true,false,!!E.autoIncrement,Y&&typeof Y!="string",true),$=[],G=0;G<E.indexNames.length;++G){var te=E.index(E.indexNames[G]),Y=te.keyPath,te=No(te.name,Y,!!te.unique,!!te.multiEntry,false,Y&&typeof Y!="string",false);$.push(te);}w[S]=zl(S,N,$);}),w}function Ji(u,p,y){for(var w=y.db.objectStoreNames,S=0;S<w.length;++S){var E=w[S],N=y.objectStore(E);u._hasGetAll="getAll"in N;for(var $=0;$<N.indexNames.length;++$){var G=N.indexNames[$],Y=N.index(G).keyPath,te=typeof Y=="string"?Y:"["+T(Y).join("+")+"]";!p[E]||(Y=p[E].idxByName[te])&&(Y.name=G,delete p[E].idxByName[te],p[E].idxByName[G]=Y);}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(u._hasGetAll=false);}function Wd(u){return u.split(",").map(function(p,y){var w=(p=p.trim()).replace(/([&*]|\+\+)/g,""),S=/^\[/.test(w)?w.match(/^\[(.*)\]$/)[1].split("+"):w;return No(w,S||null,/\&/.test(p),/\*/.test(p),/\+\+/.test(p),s(S),y===0)})}var q_=(es.prototype._parseStoresSpec=function(u,p){i(u).forEach(function(y){if(u[y]!==null){var w=Wd(u[y]),S=w.shift();if(S.unique=true,S.multi)throw new V.Schema("Primary key cannot be multi-valued");w.forEach(function(E){if(E.auto)throw new V.Schema("Only primary key can be marked as autoIncrement (++)");if(!E.keyPath)throw new V.Schema("Index must have a name and cannot be an empty string")}),p[y]=zl(y,S,w);}});},es.prototype.stores=function(y){var p=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,y):y;var y=p._versions,w={},S={};return y.forEach(function(E){l(w,E._cfg.storesSource),S=E._cfg.dbschema={},E._parseStoresSpec(w,S);}),p._dbSchema=S,Gl(p,[p._allTables,p,p.Transaction.prototype]),Xi(p,[p._allTables,p,p.Transaction.prototype,this._cfg.tables],i(S),S),p._storeNames=i(S),this},es.prototype.upgrade=function(u){return this._cfg.contentUpgrade=Mt(this._cfg.contentUpgrade||ke,u),this},es);function es(){}function Xl(u,p){var y=u._dbNamesDB;return y||(y=u._dbNamesDB=new Zr(Ln,{addons:[],indexedDB:u,IDBKeyRange:p})).version(1).stores({dbnames:"name"}),y.table("dbnames")}function Ql(u){return u&&typeof u.databases=="function"}function Zl(u){return tt(function(){return le.letThrough=true,u()})}function Jl(u){return !("from"in u)}var Gn=function(u,p){if(!this){var y=new Gn;return u&&"d"in u&&l(y,u),y}l(this,arguments.length?{d:1,from:u,to:1<arguments.length?p:u}:{d:0});};function Za(u,p,y){var w=zt(p,y);if(!isNaN(w)){if(0<w)throw RangeError();if(Jl(u))return l(u,{from:p,to:y,d:1});var S=u.l,w=u.r;if(zt(y,u.from)<0)return S?Za(S,p,y):u.l={from:p,to:y,d:1,l:null,r:null},Xd(u);if(0<zt(p,u.to))return w?Za(w,p,y):u.r={from:p,to:y,d:1,l:null,r:null},Xd(u);zt(p,u.from)<0&&(u.from=p,u.l=null,u.d=w?w.d+1:1),0<zt(y,u.to)&&(u.to=y,u.r=null,u.d=u.l?u.l.d+1:1),y=!u.r,S&&!u.l&&Ja(u,S),w&&y&&Ja(u,w);}}function Ja(u,p){Jl(p)||(function y(w,G){var E=G.from,N=G.to,$=G.l,G=G.r;Za(w,E,N),$&&y(w,$),G&&y(w,G);})(u,p);}function Yd(u,p){var y=ts(p),w=y.next();if(w.done)return false;for(var S=w.value,E=ts(u),N=E.next(S.from),$=N.value;!w.done&&!N.done;){if(zt($.from,S.to)<=0&&0<=zt($.to,S.from))return true;zt(S.from,$.from)<0?S=(w=y.next($.from)).value:$=(N=E.next(S.from)).value;}return false}function ts(u){var p=Jl(u)?null:{s:0,n:u};return {next:function(y){for(var w=0<arguments.length;p;)switch(p.s){case 0:if(p.s=1,w)for(;p.n.l&&zt(y,p.n.from)<0;)p={up:p,n:p.n.l,s:1};else for(;p.n.l;)p={up:p,n:p.n.l,s:1};case 1:if(p.s=2,!w||zt(y,p.n.to)<=0)return {value:p.n,done:false};case 2:if(p.n.r){p.s=3,p={up:p,n:p.n.r,s:0};continue}case 3:p=p.up;}return {done:true}}}}function Xd(u){var p,y,w=(((p=u.r)===null||p===void 0?void 0:p.d)||0)-(((y=u.l)===null||y===void 0?void 0:y.d)||0),S=1<w?"r":w<-1?"l":"";S&&(p=S=="r"?"l":"r",y=r({},u),w=u[S],u.from=w.from,u.to=w.to,u[S]=w[S],y[S]=w[p],(u[p]=y).d=Qd(y)),u.d=Qd(u);}function Qd(y){var p=y.r,y=y.l;return (p?y?Math.max(p.d,y.d):p.d:y?y.d:0)+1}function ns(u,p){return i(p).forEach(function(y){u[y]?Ja(u[y],p[y]):u[y]=(function w(S){var E,N,$={};for(E in S)f(S,E)&&(N=S[E],$[E]=!N||typeof N!="object"||F.has(N.constructor)?N:w(N));return $})(p[y]);}),u}function ec(u,p){return u.all||p.all||Object.keys(u).some(function(y){return p[y]&&Yd(p[y],u[y])})}m(Gn.prototype,((yr={add:function(u){return Ja(this,u),this},addKey:function(u){return Za(this,u,u),this},addKeys:function(u){var p=this;return u.forEach(function(y){return Za(p,y,y)}),this},hasKey:function(u){var p=ts(this).next(u).value;return p&&zt(p.from,u)<=0&&0<=zt(p.to,u)}})[Z]=function(){return ts(this)},yr));var Bo={},tc={},nc=false;function rs(u){ns(tc,u),nc||(nc=true,setTimeout(function(){nc=false,rc(tc,!(tc={}));},0));}function rc(u,p){p===void 0&&(p=false);var y=new Set;if(u.all)for(var w=0,S=Object.values(Bo);w<S.length;w++)Zd(N=S[w],u,y,p);else for(var E in u){var N,$=/^idb\:\/\/(.*)\/(.*)\//.exec(E);$&&(E=$[1],$=$[2],(N=Bo["idb://".concat(E,"/").concat($)])&&Zd(N,u,y,p));}y.forEach(function(G){return G()});}function Zd(u,p,y,w){for(var S=[],E=0,N=Object.entries(u.queries.query);E<N.length;E++){for(var $=N[E],G=$[0],Y=[],te=0,q=$[1];te<q.length;te++){var ae=q[te];ec(p,ae.obsSet)?ae.subscribers.forEach(function(Q){return y.add(Q)}):w&&Y.push(ae);}w&&S.push([G,Y]);}if(w)for(var W=0,J=S;W<J.length;W++){var oe=J[W],G=oe[0],Y=oe[1];u.queries.query[G]=Y;}}function V_(u){var p=u._state,y=u._deps.indexedDB;if(p.isBeingOpened||u.idbdb)return p.dbReadyPromise.then(function(){return p.dbOpenError?Bt(p.dbOpenError):u});p.isBeingOpened=true,p.dbOpenError=null,p.openComplete=false;var w=p.openCanceller,S=Math.round(10*u.verno),E=false;function N(){if(p.openCanceller!==w)throw new V.DatabaseClosed("db.open() was cancelled")}function $(){return new we(function(ae,W){if(N(),!y)throw new V.MissingAPI;var J=u.name,oe=p.autoSchema||!S?y.open(J):y.open(J,S);if(!oe)throw new V.MissingAPI;oe.onerror=Ct(W),oe.onblocked=He(u._fireOnBlocked),oe.onupgradeneeded=He(function(Q){var de;te=oe.transaction,p.autoSchema&&!u._options.allowEmptyDB?(oe.onerror=Kn,te.abort(),oe.result.close(),(de=y.deleteDatabase(J)).onsuccess=de.onerror=He(function(){W(new V.NoSuchDatabase("Database ".concat(J," doesnt exist")));})):(te.onerror=Ct(W),Q=Q.oldVersion>Math.pow(2,62)?0:Q.oldVersion,q=Q<1,u.idbdb=oe.result,E&&j_(u,te),H_(u,Q/10,te,W));},W),oe.onsuccess=He(function(){te=null;var Q,de,pe,ye,xe,je=u.idbdb=oe.result,nt=T(je.objectStoreNames);if(0<nt.length)try{var qe=je.transaction((ye=nt).length===1?ye[0]:ye,"readonly");if(p.autoSchema)de=je,pe=qe,(Q=u).verno=de.version/10,pe=Q._dbSchema=Zi(0,de,pe),Q._storeNames=T(de.objectStoreNames,0),Xi(Q,[Q._allTables],i(pe),pe);else if(Ji(u,u._dbSchema,qe),((xe=Wl(Zi(0,(xe=u).idbdb,qe),xe._dbSchema)).add.length||xe.change.some(function(Ge){return Ge.add.length||Ge.change.length}))&&!E)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),je.close(),S=je.version+1,E=!0,ae($());Yi(u,qe);}catch{}Pt.push(u),je.onversionchange=He(function(Ge){p.vcFired=true,u.on("versionchange").fire(Ge);}),je.onclose=He(function(Ge){u.on("close").fire(Ge);}),q&&(xe=u._deps,qe=J,je=xe.indexedDB,xe=xe.IDBKeyRange,Ql(je)||qe===Ln||Xl(je,xe).put({name:qe}).catch(ke)),ae();},W);}).catch(function(ae){switch(ae==null?void 0:ae.name){case "UnknownError":if(0<p.PR1398_maxLoop)return p.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),$();break;case "VersionError":if(0<S)return S=0,$()}return we.reject(ae)})}var G,Y=p.dbReadyResolve,te=null,q=false;return we.race([w,(typeof navigator>"u"?we.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ae){function W(){return indexedDB.databases().finally(ae)}G=setInterval(W,100),W();}).finally(function(){return clearInterval(G)}):Promise.resolve()).then($)]).then(function(){return N(),p.onReadyBeingFired=[],we.resolve(Zl(function(){return u.on.ready.fire(u.vip)})).then(function ae(){if(0<p.onReadyBeingFired.length){var W=p.onReadyBeingFired.reduce(Mt,ke);return p.onReadyBeingFired=[],we.resolve(Zl(function(){return W(u.vip)})).then(ae)}})}).finally(function(){p.openCanceller===w&&(p.onReadyBeingFired=null,p.isBeingOpened=false);}).catch(function(ae){p.dbOpenError=ae;try{te&&te.abort();}catch{}return w===p.openCanceller&&u._close(),Bt(ae)}).finally(function(){p.openComplete=true,Y();}).then(function(){var ae;return q&&(ae={},u.tables.forEach(function(W){W.schema.indexes.forEach(function(J){J.name&&(ae["idb://".concat(u.name,"/").concat(W.name,"/").concat(J.name)]=new Gn(-1/0,[[[]]]));}),ae["idb://".concat(u.name,"/").concat(W.name,"/")]=ae["idb://".concat(u.name,"/").concat(W.name,"/:dels")]=new Gn(-1/0,[[[]]]);}),Un(gr).fire(ae),rc(ae,true)),u})}function oc(u){function p(E){return u.next(E)}var y=S(p),w=S(function(E){return u.throw(E)});function S(E){return function(G){var $=E(G),G=$.value;return $.done?G:G&&typeof G.then=="function"?G.then(y,w):s(G)?Promise.all(G).then(y,w):y(G)}}return S(p)()}function os(u,p,y){for(var w=s(u)?u.slice():[u],S=0;S<y;++S)w.push(p);return w}var z_={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(u){return r(r({},u),{table:function(p){var y=u.table(p),w=y.schema,S={},E=[];function N(q,ae,W){var J=Qa(q),oe=S[J]=S[J]||[],Q=q==null?0:typeof q=="string"?1:q.length,de=0<ae,de=r(r({},W),{name:de?"".concat(J,"(virtual-from:").concat(W.name,")"):W.name,lowLevelIndex:W,isVirtual:de,keyTail:ae,keyLength:Q,extractKey:Kl(q),unique:!de&&W.unique});return oe.push(de),de.isPrimaryKey||E.push(de),1<Q&&N(Q===2?q[0]:q.slice(0,Q-1),ae+1,W),oe.sort(function(pe,ye){return pe.keyTail-ye.keyTail}),de}p=N(w.primaryKey.keyPath,0,w.primaryKey),S[":id"]=[p];for(var $=0,G=w.indexes;$<G.length;$++){var Y=G[$];N(Y.keyPath,0,Y);}function te(q){var ae,W=q.query.index;return W.isVirtual?r(r({},q),{query:{index:W.lowLevelIndex,range:(ae=q.query.range,W=W.keyTail,{type:ae.type===1?2:ae.type,lower:os(ae.lower,ae.lowerOpen?u.MAX_KEY:u.MIN_KEY,W),lowerOpen:true,upper:os(ae.upper,ae.upperOpen?u.MIN_KEY:u.MAX_KEY,W),upperOpen:true})}}):q}return r(r({},y),{schema:r(r({},w),{primaryKey:p,indexes:E,getIndexByKeyPath:function(q){return (q=S[Qa(q)])&&q[0]}}),count:function(q){return y.count(te(q))},query:function(q){return y.query(te(q))},openCursor:function(q){var ae=q.query.index,W=ae.keyTail,J=ae.isVirtual,oe=ae.keyLength;return J?y.openCursor(te(q)).then(function(de){return de&&Q(de)}):y.openCursor(q);function Q(de){return Object.create(de,{continue:{value:function(pe){pe!=null?de.continue(os(pe,q.reverse?u.MAX_KEY:u.MIN_KEY,W)):q.unique?de.continue(de.key.slice(0,oe).concat(q.reverse?u.MIN_KEY:u.MAX_KEY,W)):de.continue();}},continuePrimaryKey:{value:function(pe,ye){de.continuePrimaryKey(os(pe,u.MAX_KEY,W),ye);}},primaryKey:{get:function(){return de.primaryKey}},key:{get:function(){var pe=de.key;return oe===1?pe[0]:pe.slice(0,oe)}},value:{get:function(){return de.value}}})}}})}})}};function ac(u,p,y,w){return y=y||{},w=w||"",i(u).forEach(function(S){var E,N,$;f(p,S)?(E=u[S],N=p[S],typeof E=="object"&&typeof N=="object"&&E&&N?($=re(E))!==re(N)?y[w+S]=p[S]:$==="Object"?ac(E,N,y,w+S+"."):E!==N&&(y[w+S]=p[S]):E!==N&&(y[w+S]=p[S])):y[w+S]=void 0;}),i(p).forEach(function(S){f(u,S)||(y[w+S]=p[S]);}),y}function ic(u,p){return p.type==="delete"?p.keys:p.keys||p.values.map(u.extractKey)}var K_={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(u){return r(r({},u),{table:function(p){var y=u.table(p),w=y.schema.primaryKey;return r(r({},y),{mutate:function(S){var E=le.trans,N=E.table(p).hook,$=N.deleting,G=N.creating,Y=N.updating;switch(S.type){case "add":if(G.fire===ke)break;return E._promise("readwrite",function(){return te(S)},true);case "put":if(G.fire===ke&&Y.fire===ke)break;return E._promise("readwrite",function(){return te(S)},true);case "delete":if($.fire===ke)break;return E._promise("readwrite",function(){return te(S)},true);case "deleteRange":if($.fire===ke)break;return E._promise("readwrite",function(){return (function q(ae,W,J){return y.query({trans:ae,values:false,query:{index:w,range:W},limit:J}).then(function(oe){var Q=oe.result;return te({type:"delete",keys:Q,trans:ae}).then(function(de){return 0<de.numFailures?Promise.reject(de.failures[0]):Q.length<J?{failures:[],numFailures:0,lastResult:void 0}:q(ae,r(r({},W),{lower:Q[Q.length-1],lowerOpen:true}),J)})})})(S.trans,S.range,1e4)},true)}return y.mutate(S);function te(q){var ae,W,J,oe=le.trans,Q=q.keys||ic(w,q);if(!Q)throw new Error("Keys missing");return (q=q.type==="add"||q.type==="put"?r(r({},q),{keys:Q}):r({},q)).type!=="delete"&&(q.values=o([],q.values)),q.keys&&(q.keys=o([],q.keys)),ae=y,J=Q,((W=q).type==="add"?Promise.resolve([]):ae.getMany({trans:W.trans,keys:J,cache:"immutable"})).then(function(de){var pe=Q.map(function(ye,xe){var je,nt,qe,Ge=de[xe],at={onerror:null,onsuccess:null};return q.type==="delete"?$.fire.call(at,ye,Ge,oe):q.type==="add"||Ge===void 0?(je=G.fire.call(at,ye,q.values[xe],oe),ye==null&&je!=null&&(q.keys[xe]=ye=je,w.outbound||O(q.values[xe],w.keyPath,ye))):(je=ac(Ge,q.values[xe]),(nt=Y.fire.call(at,je,ye,Ge,oe))&&(qe=q.values[xe],Object.keys(nt).forEach(function(et){f(qe,et)?qe[et]=nt[et]:O(qe,et,nt[et]);}))),at});return y.mutate(q).then(function(ye){for(var xe=ye.failures,je=ye.results,nt=ye.numFailures,ye=ye.lastResult,qe=0;qe<Q.length;++qe){var Ge=(je||Q)[qe],at=pe[qe];Ge==null?at.onerror&&at.onerror(xe[qe]):at.onsuccess&&at.onsuccess(q.type==="put"&&de[qe]?q.values[qe]:Ge);}return {failures:xe,results:je,numFailures:nt,lastResult:ye}}).catch(function(ye){return pe.forEach(function(xe){return xe.onerror&&xe.onerror(ye)}),Promise.reject(ye)})})}}})}})}};function Jd(u,p,y){try{if(!p||p.keys.length<u.length)return null;for(var w=[],S=0,E=0;S<p.keys.length&&E<u.length;++S)zt(p.keys[S],u[E])===0&&(w.push(y?Ce(p.values[S]):p.values[S]),++E);return w.length===u.length?w:null}catch{return null}}var G_={stack:"dbcore",level:-1,create:function(u){return {table:function(p){var y=u.table(p);return r(r({},y),{getMany:function(w){if(!w.cache)return y.getMany(w);var S=Jd(w.keys,w.trans._cache,w.cache==="clone");return S?we.resolve(S):y.getMany(w).then(function(E){return w.trans._cache={keys:w.keys,values:w.cache==="clone"?Ce(E):E},E})},mutate:function(w){return w.type!=="add"&&(w.trans._cache=null),y.mutate(w)}})}}}};function ef(u,p){return u.trans.mode==="readonly"&&!!u.subscr&&!u.trans.explicit&&u.trans.db._options.cache!=="disabled"&&!p.schema.primaryKey.outbound}function tf(u,p){switch(u){case "query":return p.values&&!p.unique;case "get":case "getMany":case "count":case "openCursor":return false}}var W_={stack:"dbcore",level:0,name:"Observability",create:function(u){var p=u.schema.name,y=new Gn(u.MIN_KEY,u.MAX_KEY);return r(r({},u),{transaction:function(w,S,E){if(le.subscr&&S!=="readonly")throw new V.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(le.querier));return u.transaction(w,S,E)},table:function(w){var S=u.table(w),E=S.schema,N=E.primaryKey,q=E.indexes,$=N.extractKey,G=N.outbound,Y=N.autoIncrement&&q.filter(function(W){return W.compound&&W.keyPath.includes(N.keyPath)}),te=r(r({},S),{mutate:function(W){function J(et){return et="idb://".concat(p,"/").concat(w,"/").concat(et),ye[et]||(ye[et]=new Gn)}var oe,Q,de,pe=W.trans,ye=W.mutatedParts||(W.mutatedParts={}),xe=J(""),je=J(":dels"),nt=W.type,at=W.type==="deleteRange"?[W.range]:W.type==="delete"?[W.keys]:W.values.length<50?[ic(N,W).filter(function(et){return et}),W.values]:[],qe=at[0],Ge=at[1],at=W.trans._cache;return s(qe)?(xe.addKeys(qe),(at=nt==="delete"||qe.length===Ge.length?Jd(qe,at):null)||je.addKeys(qe),(at||Ge)&&(oe=J,Q=at,de=Ge,E.indexes.forEach(function(et){var ht=oe(et.name||"");function Vt(Wt){return Wt!=null?et.extractKey(Wt):null}function Gt(Wt){return et.multiEntry&&s(Wt)?Wt.forEach(function(cr){return ht.addKey(cr)}):ht.addKey(Wt)}(Q||de).forEach(function(Wt,Wn){var jt=Q&&Vt(Q[Wn]),Wn=de&&Vt(de[Wn]);zt(jt,Wn)!==0&&(jt!=null&&Gt(jt),Wn!=null&&Gt(Wn));});}))):qe?(Ge={from:(Ge=qe.lower)!==null&&Ge!==void 0?Ge:u.MIN_KEY,to:(Ge=qe.upper)!==null&&Ge!==void 0?Ge:u.MAX_KEY},je.add(Ge),xe.add(Ge)):(xe.add(y),je.add(y),E.indexes.forEach(function(et){return J(et.name).add(y)})),S.mutate(W).then(function(et){return !qe||W.type!=="add"&&W.type!=="put"||(xe.addKeys(et.results),Y&&Y.forEach(function(ht){for(var Vt=W.values.map(function(jt){return ht.extractKey(jt)}),Gt=ht.keyPath.findIndex(function(jt){return jt===N.keyPath}),Wt=0,cr=et.results.length;Wt<cr;++Wt)Vt[Wt][Gt]=et.results[Wt];J(ht.name).addKeys(Vt);})),pe.mutatedParts=ns(pe.mutatedParts||{},ye),et})}}),q=function(J){var oe=J.query,J=oe.index,oe=oe.range;return [J,new Gn((J=oe.lower)!==null&&J!==void 0?J:u.MIN_KEY,(oe=oe.upper)!==null&&oe!==void 0?oe:u.MAX_KEY)]},ae={get:function(W){return [N,new Gn(W.key)]},getMany:function(W){return [N,new Gn().addKeys(W.keys)]},count:q,query:q,openCursor:q};return i(ae).forEach(function(W){te[W]=function(J){var oe=le.subscr,Q=!!oe,de=ef(le,S)&&tf(W,J)?J.obsSet={}:oe;if(Q){var pe=function(Ge){return Ge="idb://".concat(p,"/").concat(w,"/").concat(Ge),de[Ge]||(de[Ge]=new Gn)},ye=pe(""),xe=pe(":dels"),oe=ae[W](J),Q=oe[0],oe=oe[1];if((W==="query"&&Q.isPrimaryKey&&!J.values?xe:pe(Q.name||"")).add(oe),!Q.isPrimaryKey){if(W!=="count"){var je=W==="query"&&G&&J.values&&S.query(r(r({},J),{values:false}));return S[W].apply(this,arguments).then(function(Ge){if(W==="query"){if(G&&J.values)return je.then(function(Vt){return Vt=Vt.result,ye.addKeys(Vt),Ge});var at=J.values?Ge.result.map($):Ge.result;(J.values?ye:xe).addKeys(at);}else if(W==="openCursor"){var et=Ge,ht=J.values;return et&&Object.create(et,{key:{get:function(){return xe.addKey(et.primaryKey),et.key}},primaryKey:{get:function(){var Vt=et.primaryKey;return xe.addKey(Vt),Vt}},value:{get:function(){return ht&&ye.addKey(et.primaryKey),et.value}}})}return Ge})}xe.add(y);}}return S[W].apply(this,arguments)};}),te}})}};function nf(u,p,y){if(y.numFailures===0)return p;if(p.type==="deleteRange")return null;var w=p.keys?p.keys.length:"values"in p&&p.values?p.values.length:1;return y.numFailures===w?null:(p=r({},p),s(p.keys)&&(p.keys=p.keys.filter(function(S,E){return !(E in y.failures)})),"values"in p&&s(p.values)&&(p.values=p.values.filter(function(S,E){return !(E in y.failures)})),p)}function sc(u,p){return y=u,((w=p).lower===void 0||(w.lowerOpen?0<zt(y,w.lower):0<=zt(y,w.lower)))&&(u=u,(p=p).upper===void 0||(p.upperOpen?zt(u,p.upper)<0:zt(u,p.upper)<=0));var y,w;}function rf(u,p,ae,w,S,E){if(!ae||ae.length===0)return u;var N=p.query.index,$=N.multiEntry,G=p.query.range,Y=w.schema.primaryKey.extractKey,te=N.extractKey,q=(N.lowLevelIndex||N).extractKey,ae=ae.reduce(function(W,J){var oe=W,Q=[];if(J.type==="add"||J.type==="put")for(var de=new Gn,pe=J.values.length-1;0<=pe;--pe){var ye,xe=J.values[pe],je=Y(xe);de.hasKey(je)||(ye=te(xe),($&&s(ye)?ye.some(function(et){return sc(et,G)}):sc(ye,G))&&(de.addKey(je),Q.push(xe)));}switch(J.type){case "add":var nt=new Gn().addKeys(p.values?W.map(function(ht){return Y(ht)}):W),oe=W.concat(p.values?Q.filter(function(ht){return ht=Y(ht),!nt.hasKey(ht)&&(nt.addKey(ht),true)}):Q.map(function(ht){return Y(ht)}).filter(function(ht){return !nt.hasKey(ht)&&(nt.addKey(ht),true)}));break;case "put":var qe=new Gn().addKeys(J.values.map(function(ht){return Y(ht)}));oe=W.filter(function(ht){return !qe.hasKey(p.values?Y(ht):ht)}).concat(p.values?Q:Q.map(function(ht){return Y(ht)}));break;case "delete":var Ge=new Gn().addKeys(J.keys);oe=W.filter(function(ht){return !Ge.hasKey(p.values?Y(ht):ht)});break;case "deleteRange":var at=J.range;oe=W.filter(function(ht){return !sc(Y(ht),at)});}return oe},u);return ae===u?u:(ae.sort(function(W,J){return zt(q(W),q(J))||zt(Y(W),Y(J))}),p.limit&&p.limit<1/0&&(ae.length>p.limit?ae.length=p.limit:u.length===p.limit&&ae.length<p.limit&&(S.dirty=true)),E?Object.freeze(ae):ae)}function of(u,p){return zt(u.lower,p.lower)===0&&zt(u.upper,p.upper)===0&&!!u.lowerOpen==!!p.lowerOpen&&!!u.upperOpen==!!p.upperOpen}function Y_(u,p){return (function(y,w,S,E){if(y===void 0)return w!==void 0?-1:0;if(w===void 0)return 1;if((w=zt(y,w))===0){if(S&&E)return 0;if(S)return 1;if(E)return -1}return w})(u.lower,p.lower,u.lowerOpen,p.lowerOpen)<=0&&0<=(function(y,w,S,E){if(y===void 0)return w!==void 0?1:0;if(w===void 0)return -1;if((w=zt(y,w))===0){if(S&&E)return 0;if(S)return -1;if(E)return 1}return w})(u.upper,p.upper,u.upperOpen,p.upperOpen)}function X_(u,p,y,w){u.subscribers.add(y),w.addEventListener("abort",function(){var S,E;u.subscribers.delete(y),u.subscribers.size===0&&(S=u,E=p,setTimeout(function(){S.subscribers.size===0&&he(E,S);},3e3));});}var Q_={stack:"dbcore",level:0,name:"Cache",create:function(u){var p=u.schema.name;return r(r({},u),{transaction:function(y,w,S){var E,N,$=u.transaction(y,w,S);return w==="readwrite"&&(N=(E=new AbortController).signal,S=function(G){return function(){if(E.abort(),w==="readwrite"){for(var Y=new Set,te=0,q=y;te<q.length;te++){var ae=q[te],W=Bo["idb://".concat(p,"/").concat(ae)];if(W){var J=u.table(ae),oe=W.optimisticOps.filter(function(ht){return ht.trans===$});if($._explicit&&G&&$.mutatedParts)for(var Q=0,de=Object.values(W.queries.query);Q<de.length;Q++)for(var pe=0,ye=(nt=de[Q]).slice();pe<ye.length;pe++)ec((qe=ye[pe]).obsSet,$.mutatedParts)&&(he(nt,qe),qe.subscribers.forEach(function(ht){return Y.add(ht)}));else if(0<oe.length){W.optimisticOps=W.optimisticOps.filter(function(ht){return ht.trans!==$});for(var xe=0,je=Object.values(W.queries.query);xe<je.length;xe++)for(var nt,qe,Ge,at=0,et=(nt=je[xe]).slice();at<et.length;at++)(qe=et[at]).res!=null&&$.mutatedParts&&(G&&!qe.dirty?(Ge=Object.isFrozen(qe.res),Ge=rf(qe.res,qe.req,oe,J,qe,Ge),qe.dirty?(he(nt,qe),qe.subscribers.forEach(function(ht){return Y.add(ht)})):Ge!==qe.res&&(qe.res=Ge,qe.promise=we.resolve({result:Ge}))):(qe.dirty&&he(nt,qe),qe.subscribers.forEach(function(ht){return Y.add(ht)})));}}}Y.forEach(function(ht){return ht()});}}},$.addEventListener("abort",S(false),{signal:N}),$.addEventListener("error",S(false),{signal:N}),$.addEventListener("complete",S(true),{signal:N})),$},table:function(y){var w=u.table(y),S=w.schema.primaryKey;return r(r({},w),{mutate:function(E){var N=le.trans;if(S.outbound||N.db._options.cache==="disabled"||N.explicit||N.idbtrans.mode!=="readwrite")return w.mutate(E);var $=Bo["idb://".concat(p,"/").concat(y)];return $?(N=w.mutate(E),E.type!=="add"&&E.type!=="put"||!(50<=E.values.length||ic(S,E).some(function(G){return G==null}))?($.optimisticOps.push(E),E.mutatedParts&&rs(E.mutatedParts),N.then(function(G){0<G.numFailures&&(he($.optimisticOps,E),(G=nf(0,E,G))&&$.optimisticOps.push(G),E.mutatedParts&&rs(E.mutatedParts));}),N.catch(function(){he($.optimisticOps,E),E.mutatedParts&&rs(E.mutatedParts);})):N.then(function(G){var Y=nf(0,r(r({},E),{values:E.values.map(function(te,q){var ae;return G.failures[q]?te:(te=(ae=S.keyPath)!==null&&ae!==void 0&&ae.includes(".")?Ce(te):r({},te),O(te,S.keyPath,G.results[q]),te)})}),G);$.optimisticOps.push(Y),queueMicrotask(function(){return E.mutatedParts&&rs(E.mutatedParts)});}),N):w.mutate(E)},query:function(E){if(!ef(le,w)||!tf("query",E))return w.query(E);var N=((Y=le.trans)===null||Y===void 0?void 0:Y.db._options.cache)==="immutable",q=le,$=q.requery,G=q.signal,Y=(function(J,oe,Q,de){var pe=Bo["idb://".concat(J,"/").concat(oe)];if(!pe)return [];if(!(oe=pe.queries[Q]))return [null,false,pe,null];var ye=oe[(de.query?de.query.index.name:null)||""];if(!ye)return [null,false,pe,null];switch(Q){case "query":var xe=ye.find(function(je){return je.req.limit===de.limit&&je.req.values===de.values&&of(je.req.query.range,de.query.range)});return xe?[xe,true,pe,ye]:[ye.find(function(je){return ("limit"in je.req?je.req.limit:1/0)>=de.limit&&(!de.values||je.req.values)&&Y_(je.req.query.range,de.query.range)}),false,pe,ye];case "count":return xe=ye.find(function(je){return of(je.req.query.range,de.query.range)}),[xe,!!xe,pe,ye]}})(p,y,"query",E),te=Y[0],q=Y[1],ae=Y[2],W=Y[3];return te&&q?te.obsSet=E.obsSet:(q=w.query(E).then(function(J){var oe=J.result;if(te&&(te.res=oe),N){for(var Q=0,de=oe.length;Q<de;++Q)Object.freeze(oe[Q]);Object.freeze(oe);}else J.result=Ce(oe);return J}).catch(function(J){return W&&te&&he(W,te),Promise.reject(J)}),te={obsSet:E.obsSet,promise:q,subscribers:new Set,type:"query",req:E,dirty:false},W?W.push(te):(W=[te],(ae=ae||(Bo["idb://".concat(p,"/").concat(y)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[E.query.index.name||""]=W)),X_(te,W,$,G),te.promise.then(function(J){return {result:rf(J.result,E,ae==null?void 0:ae.optimisticOps,w,te,N)}})}})}})}};function as(u,p){return new Proxy(u,{get:function(y,w,S){return w==="db"?p:Reflect.get(y,w,S)}})}var Zr=(Cn.prototype.version=function(u){if(isNaN(u)||u<.1)throw new V.Type("Given version is not a positive number");if(u=Math.round(10*u)/10,this.idbdb||this._state.isBeingOpened)throw new V.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,u);var p=this._versions,y=p.filter(function(w){return w._cfg.version===u})[0];return y||(y=new this.Version(u),p.push(y),p.sort($_),y.stores({}),this._state.autoSchema=false,y)},Cn.prototype._whenReady=function(u){var p=this;return this.idbdb&&(this._state.openComplete||le.letThrough||this._vip)?u():new we(function(y,w){if(p._state.openComplete)return w(new V.DatabaseClosed(p._state.dbOpenError));if(!p._state.isBeingOpened){if(!p._state.autoOpen)return void w(new V.DatabaseClosed);p.open().catch(ke);}p._state.dbReadyPromise.then(y,w);}).then(u)},Cn.prototype.use=function(u){var p=u.stack,y=u.create,w=u.level,S=u.name;return S&&this.unuse({stack:p,name:S}),u=this._middlewares[p]||(this._middlewares[p]=[]),u.push({stack:p,create:y,level:w??10,name:S}),u.sort(function(E,N){return E.level-N.level}),this},Cn.prototype.unuse=function(u){var p=u.stack,y=u.name,w=u.create;return p&&this._middlewares[p]&&(this._middlewares[p]=this._middlewares[p].filter(function(S){return w?S.create!==w:!!y&&S.name!==y})),this},Cn.prototype.open=function(){var u=this;return Qt(Te,function(){return V_(u)})},Cn.prototype._close=function(){var u=this._state,p=Pt.indexOf(this);if(0<=p&&Pt.splice(p,1),this.idbdb){try{this.idbdb.close();}catch{}this.idbdb=null;}u.isBeingOpened||(u.dbReadyPromise=new we(function(y){u.dbReadyResolve=y;}),u.openCanceller=new we(function(y,w){u.cancelOpen=w;}));},Cn.prototype.close=function(y){var p=(y===void 0?{disableAutoOpen:true}:y).disableAutoOpen,y=this._state;p?(y.isBeingOpened&&y.cancelOpen(new V.DatabaseClosed),this._close(),y.autoOpen=false,y.dbOpenError=new V.DatabaseClosed):(this._close(),y.autoOpen=this._options.autoOpen||y.isBeingOpened,y.openComplete=false,y.dbOpenError=null);},Cn.prototype.delete=function(u){var p=this;u===void 0&&(u={disableAutoOpen:true});var y=0<arguments.length&&typeof arguments[0]!="object",w=this._state;return new we(function(S,E){function N(){p.close(u);var $=p._deps.indexedDB.deleteDatabase(p.name);$.onsuccess=He(function(){var G,Y,te;G=p._deps,Y=p.name,te=G.indexedDB,G=G.IDBKeyRange,Ql(te)||Y===Ln||Xl(te,G).delete(Y).catch(ke),S();}),$.onerror=Ct(E),$.onblocked=p._fireOnBlocked;}if(y)throw new V.InvalidArgument("Invalid closeOptions argument to db.delete()");w.isBeingOpened?w.dbReadyPromise.then(N):N();})},Cn.prototype.backendDB=function(){return this.idbdb},Cn.prototype.isOpen=function(){return this.idbdb!==null},Cn.prototype.hasBeenClosed=function(){var u=this._state.dbOpenError;return u&&u.name==="DatabaseClosed"},Cn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Cn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Cn.prototype,"tables",{get:function(){var u=this;return i(this._allTables).map(function(p){return u._allTables[p]})},enumerable:false,configurable:true}),Cn.prototype.transaction=function(){var u=(function(p,y,w){var S=arguments.length;if(S<2)throw new V.InvalidArgument("Too few arguments");for(var E=new Array(S-1);--S;)E[S-1]=arguments[S];return w=E.pop(),[p,x(E),w]}).apply(this,arguments);return this._transaction.apply(this,u)},Cn.prototype._transaction=function(u,p,y){var w=this,S=le.trans;S&&S.db===this&&u.indexOf("!")===-1||(S=null);var E,N,$=u.indexOf("?")!==-1;u=u.replace("!","").replace("?","");try{if(N=p.map(function(Y){if(Y=Y instanceof w.Table?Y.name:Y,typeof Y!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return Y}),u=="r"||u===lr)E=lr;else {if(u!="rw"&&u!=rr)throw new V.InvalidArgument("Invalid transaction mode: "+u);E=rr;}if(S){if(S.mode===lr&&E===rr){if(!$)throw new V.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");S=null;}S&&N.forEach(function(Y){if(S&&S.storeNames.indexOf(Y)===-1){if(!$)throw new V.SubTransaction("Table "+Y+" not included in parent transaction.");S=null;}}),$&&S&&!S.active&&(S=null);}}catch(Y){return S?S._promise(null,function(te,q){q(Y);}):Bt(Y)}var G=(function Y(te,q,ae,W,J){return we.resolve().then(function(){var oe=le.transless||le,Q=te._createTransaction(q,ae,te._dbSchema,W);if(Q.explicit=true,oe={trans:Q,transless:oe},W)Q.idbtrans=W.idbtrans;else try{Q.create(),Q.idbtrans._explicit=!0,te._state.PR1398_maxLoop=3;}catch(ye){return ye.name===ee.InvalidState&&te.isOpen()&&0<--te._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),te.close({disableAutoOpen:false}),te.open().then(function(){return Y(te,q,ae,null,J)})):Bt(ye)}var de,pe=z(J);return pe&&Rt(),oe=we.follow(function(){var ye;(de=J.call(Q,Q))&&(pe?(ye=St.bind(null,null),de.then(ye,ye)):typeof de.next=="function"&&typeof de.throw=="function"&&(de=oc(de)));},oe),(de&&typeof de.then=="function"?we.resolve(de).then(function(ye){return Q.active?ye:Bt(new V.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):oe.then(function(){return de})).then(function(ye){return W&&Q._resolve(),Q._completion.then(function(){return ye})}).catch(function(ye){return Q._reject(ye),Bt(ye)})})}).bind(null,this,E,N,S,y);return S?S._promise(E,G,"lock"):le.trans?Qt(le.transless,function(){return w._whenReady(G)}):this._whenReady(G)},Cn.prototype.table=function(u){if(!f(this._allTables,u))throw new V.InvalidTable("Table ".concat(u," does not exist"));return this._allTables[u]},Cn);function Cn(u,p){var y=this;this._middlewares={},this.verno=0;var w=Cn.dependencies;this._options=p=r({addons:Cn.addons,autoOpen:true,indexedDB:w.indexedDB,IDBKeyRange:w.IDBKeyRange,cache:"cloned"},p),this._deps={indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange},w=p.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var S,E,N,$,G,Y={dbOpenError:null,isBeingOpened:false,onReadyBeingFired:null,openComplete:false,dbReadyResolve:ke,dbReadyPromise:null,cancelOpen:ke,openCanceller:null,autoSchema:true,PR1398_maxLoop:3,autoOpen:p.autoOpen};Y.dbReadyPromise=new we(function(q){Y.dbReadyResolve=q;}),Y.openCanceller=new we(function(q,ae){Y.cancelOpen=ae;}),this._state=Y,this.name=u,this.on=Xr(this,"populate","blocked","versionchange","close",{ready:[Mt,ke]}),this.on.ready.subscribe=R(this.on.ready.subscribe,function(q){return function(ae,W){Cn.vip(function(){var J,oe=y._state;oe.openComplete?(oe.dbOpenError||we.resolve().then(ae),W&&q(ae)):oe.onReadyBeingFired?(oe.onReadyBeingFired.push(ae),W&&q(ae)):(q(ae),J=y,W||q(function Q(){J.on.ready.unsubscribe(ae),J.on.ready.unsubscribe(Q);}));});}}),this.Collection=(S=this,pr(ql.prototype,function(de,Q){this.db=S;var W=uo,J=null;if(Q)try{W=Q();}catch(pe){J=pe;}var oe=de._ctx,Q=oe.table,de=Q.hook.reading.fire;this._ctx={table:Q,index:oe.index,isPrimKey:!oe.index||Q.schema.primKey.keyPath&&oe.index===Q.schema.primKey.name,range:W,keysOnly:false,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:true,isMatch:null,offset:0,limit:1/0,error:J,or:oe.or,valueMapper:de!==Ze?de:null};})),this.Table=(E=this,pr(fo.prototype,function(q,ae,W){this.db=E,this._tx=W,this.name=q,this.schema=ae,this.hook=E._allTables[q]?E._allTables[q].hook:Xr(null,{creating:[bt,ke],reading:[Je,Ze],updating:[Kt,ke],deleting:[Nt,ke]});})),this.Transaction=(N=this,pr(Nr.prototype,function(q,ae,W,J,oe){var Q=this;this.db=N,this.mode=q,this.storeNames=ae,this.schema=W,this.chromeTransactionDurability=J,this.idbtrans=null,this.on=Xr(this,"complete","error","abort"),this.parent=oe||null,this.active=true,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new we(function(de,pe){Q._resolve=de,Q._reject=pe;}),this._completion.then(function(){Q.active=false,Q.on.complete.fire();},function(de){var pe=Q.active;return Q.active=false,Q.on.error.fire(de),Q.parent?Q.parent._reject(de):pe&&Q.idbtrans&&Q.idbtrans.abort(),Bt(de)});})),this.Version=($=this,pr(q_.prototype,function(q){this.db=$,this._cfg={version:q,storesSource:null,dbschema:{},tables:{},contentUpgrade:null};})),this.WhereClause=(G=this,pr(ve.prototype,function(q,ae,W){if(this.db=G,this._ctx={table:q,index:ae===":id"?null:ae,or:W},this._cmp=this._ascending=zt,this._descending=function(J,oe){return zt(oe,J)},this._max=function(J,oe){return 0<zt(J,oe)?J:oe},this._min=function(J,oe){return zt(J,oe)<0?J:oe},this._IDBKeyRange=G._deps.IDBKeyRange,!this._IDBKeyRange)throw new V.MissingAPI})),this.on("versionchange",function(q){0<q.newVersion?console.warn("Another connection wants to upgrade database '".concat(y.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(y.name,"'. Closing db now to resume the delete request.")),y.close({disableAutoOpen:false});}),this.on("blocked",function(q){!q.newVersion||q.newVersion<q.oldVersion?console.warn("Dexie.delete('".concat(y.name,"') was blocked")):console.warn("Upgrade '".concat(y.name,"' blocked by other connection holding version ").concat(q.oldVersion/10));}),this._maxKey=Xa(p.IDBKeyRange),this._createTransaction=function(q,ae,W,J){return new y.Transaction(q,ae,W,y._options.chromeTransactionDurability,J)},this._fireOnBlocked=function(q){y.on("blocked").fire(q),Pt.filter(function(ae){return ae.name===y.name&&ae!==y&&!ae._state.vcFired}).map(function(ae){return ae.on("versionchange").fire(q)});},this.use(G_),this.use(Q_),this.use(W_),this.use(z_),this.use(K_);var te=new Proxy(this,{get:function(q,ae,W){if(ae==="_vip")return true;if(ae==="table")return function(oe){return as(y.table(oe),te)};var J=Reflect.get(q,ae,W);return J instanceof fo?as(J,te):ae==="tables"?J.map(function(oe){return as(oe,te)}):ae==="_createTransaction"?function(){return as(J.apply(this,arguments),te)}:J}});this.vip=te,w.forEach(function(q){return q(y)});}var is,yr=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Z_=(lc.prototype.subscribe=function(u,p,y){return this._subscribe(u&&typeof u!="function"?u:{next:u,error:p,complete:y})},lc.prototype[yr]=function(){return this},lc);function lc(u){this._subscribe=u;}try{is={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange};}catch{is={indexedDB:null,IDBKeyRange:null};}function af(u){var p,y=false,w=new Z_(function(S){var E=z(u),N,$=false,G={},Y={},te={get closed(){return $},unsubscribe:function(){$||($=true,N&&N.abort(),q&&Un.storagemutated.unsubscribe(W));}};S.start&&S.start(te);var q=false,ae=function(){return fn(J)},W=function(oe){ns(G,oe),ec(Y,G)&&ae();},J=function(){var oe,Q,de;!$&&is.indexedDB&&(G={},oe={},N&&N.abort(),N=new AbortController,de=(function(pe){var ye=vt();try{E&&Rt();var xe=tt(u,pe);return xe=E?xe.finally(St):xe}finally{ye&&Qe();}})(Q={subscr:oe,signal:N.signal,requery:ae,querier:u,trans:null}),Promise.resolve(de).then(function(pe){y=true,p=pe,$||Q.signal.aborted||(G={},(function(ye){for(var xe in ye)if(f(ye,xe))return;return 1})(Y=oe)||q||(Un(gr,W),q=true),fn(function(){return !$&&S.next&&S.next(pe)}));},function(pe){y=false,["DatabaseClosedError","AbortError"].includes(pe==null?void 0:pe.name)||$||fn(function(){$||S.error&&S.error(pe);});}));};return setTimeout(ae,0),te});return w.hasValue=function(){return y},w.getValue=function(){return p},w}var Uo=Zr;function cc(u){var p=ho;try{ho=!0,Un.storagemutated.fire(u),rc(u,!0);}finally{ho=p;}}m(Uo,r(r({},_e),{delete:function(u){return new Uo(u,{addons:[]}).delete()},exists:function(u){return new Uo(u,{addons:[]}).open().then(function(p){return p.close(),true}).catch("NoSuchDatabaseError",function(){return false})},getDatabaseNames:function(u){try{return p=Uo.dependencies,y=p.indexedDB,p=p.IDBKeyRange,(Ql(y)?Promise.resolve(y.databases()).then(function(w){return w.map(function(S){return S.name}).filter(function(S){return S!==Ln})}):Xl(y,p).toCollection().primaryKeys()).then(u)}catch{return Bt(new V.MissingAPI)}var p,y;},defineClass:function(){return function(u){l(this,u);}},ignoreTransaction:function(u){return le.trans?Qt(le.transless,u):u()},vip:Zl,async:function(u){return function(){try{var p=oc(u.apply(this,arguments));return p&&typeof p.then=="function"?p:we.resolve(p)}catch(y){return Bt(y)}}},spawn:function(u,p,y){try{var w=oc(u.apply(y,p||[]));return w&&typeof w.then=="function"?w:we.resolve(w)}catch(S){return Bt(S)}},currentTransaction:{get:function(){return le.trans||null}},waitFor:function(u,p){return p=we.resolve(typeof u=="function"?Uo.ignoreTransaction(u):u).timeout(p||6e4),le.trans?le.trans.waitFor(p):p},Promise:we,debug:{get:function(){return Ue},set:function(u){Ye(u);}},derive:b,extend:l,props:m,override:R,Events:Xr,on:Un,liveQuery:af,extendObservabilitySet:ns,getByKeyPath:D,setByKeyPath:O,delByKeyPath:function(u,p){typeof p=="string"?O(u,p,void 0):"length"in p&&[].map.call(p,function(y){O(u,y,void 0);});},shallowClone:B,deepClone:Ce,getObjectDiff:ac,cmp:zt,asap:L,minKey:-1/0,addons:[],connections:Pt,errnames:ee,dependencies:is,cache:Bo,semVer:"4.0.11",version:"4.0.11".split(".").map(function(u){return parseInt(u)}).reduce(function(u,p,y){return u+p/Math.pow(10,2*y)})})),Uo.maxKey=Xa(Uo.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Un(gr,function(u){ho||(u=new CustomEvent(Lo,{detail:u}),ho=true,dispatchEvent(u),ho=false);}),addEventListener(Lo,function(u){u=u.detail,ho||cc(u);}));var ua,ho=false,sf=function(){};return typeof BroadcastChannel<"u"&&((sf=function(){(ua=new BroadcastChannel(Lo)).onmessage=function(u){return u.data&&cc(u.data)};})(),typeof ua.unref=="function"&&ua.unref(),Un(gr,function(u){ho||ua.postMessage(u);})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(u){if(!Zr.disableBfCache&&u.persisted){Ue&&console.debug("Dexie: handling persisted pagehide"),ua!=null&&ua.close();for(var p=0,y=Pt;p<y.length;p++)y[p].close({disableAutoOpen:false});}}),addEventListener("pageshow",function(u){!Zr.disableBfCache&&u.persisted&&(Ue&&console.debug("Dexie: handling persisted pageshow"),sf(),cc({all:new Gn(-1/0,[[]])}));})),we.rejectionMapper=function(u,p){return !u||u instanceof Ae||u instanceof TypeError||u instanceof SyntaxError||!u.name||!se[u.name]?u:(p=new se[u.name](p||u.message,u),"stack"in u&&_(p,"stack",{get:function(){return this.inner.stack}}),p)},Ye(Ue),r(Zr,Object.freeze({__proto__:null,Dexie:Zr,liveQuery:af,Entity:Ka,cmp:zt,PropModification:hn,replacePrefix:function(u,p){return new hn({replacePrefix:[u,p]})},add:function(u){return new hn({add:u})},remove:function(u){return new hn({remove:u})},default:Zr,RangeSet:Gn,mergeRanges:Ja,rangesOverlap:Yd}),{default:Zr}),Zr});})(Bs)),Bs.exports}var c0=l0();const Pu=zm(c0),gh=Symbol.for("Dexie"),An=globalThis[gh]||(globalThis[gh]=Pu);if(Pu.semVer!==An.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Pu.semVer} and ${An.semVer}`);const{liveQuery:u0,mergeRanges:jE,rangesOverlap:qE,RangeSet:VE,cmp:zE,Entity:KE,PropModification:GE,replacePrefix:WE,add:YE,remove:XE}=An;var yh={};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var cl=function(){return cl=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);}return t},cl.apply(this,arguments)};function Eo(e,t,n,r){function o(a){return a instanceof n?a:new n(function(i){i(a);})}return new(n||(n=Promise))(function(a,i){function s(h){try{c(r.next(h));}catch(f){i(f);}}function l(h){try{c(r.throw(h));}catch(f){i(f);}}function c(h){h.done?a(h.value):o(h.value).then(s,l);}c((r=r.apply(e,[])).next());})}function Er(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(h){return l([c,h])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n);}catch(h){c=[6,h],o=0;}finally{r=a=0;}if(c[0]&5)throw c[1];return {value:c[0]?c[1]:void 0,done:true}}}function d0(e){var t=[e.schema.primKey].concat(e.schema.indexes);return t.map(function(n){return n.src}).join(",")}function f0(e){for(var t={},n=0,r=e.tables;n<r.length;n++){var o=r[n];t[o.name]=o.schema;}return t}function jg(e,t){return new Promise(function(n,r){var o=new FileReader;o.onabort=function(a){return r(new Error("file read aborted"))},o.onerror=function(a){return r(a.target.error)},o.onload=function(a){return n(a.target.result)},t==="binary"?o.readAsArrayBuffer(e):o.readAsText(e);})}function qg(e,t){if(typeof FileReaderSync>"u")throw new Error("FileReaderSync missing. Reading blobs synchronously requires code to run from within a web worker. Use TSON.encapsulateAsync() to do it from the main thread.");var n=new FileReaderSync,r=t==="binary"?n.readAsArrayBuffer(e):n.readAsText(e);return r}var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kd(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Dl=kd(function(e,t){(function(n,r){e.exports=r();})(Fu,(function(){function n(ee){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(ne){return typeof ne}:n=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},n(ee)}function r(ee,ne,V,se,_e,ke,Ze){try{var Je=ee[ke](Ze),Me=Je.value;}catch(bt){V(bt);return}Je.done?ne(Me):Promise.resolve(Me).then(se,_e);}function o(ee){return function(){var ne=this,V=arguments;return new Promise(function(se,_e){var ke=ee.apply(ne,V);function Ze(Me){r(ke,se,_e,Ze,Je,"next",Me);}function Je(Me){r(ke,se,_e,Ze,Je,"throw",Me);}Ze(void 0);})}}function a(ee,ne){if(!(ee instanceof ne))throw new TypeError("Cannot call a class as a function")}function i(ee,ne){for(var V=0;V<ne.length;V++){var se=ne[V];se.enumerable=se.enumerable||false,se.configurable=true,"value"in se&&(se.writable=true),Object.defineProperty(ee,se.key,se);}}function s(ee,ne,V){return ne&&i(ee.prototype,ne),ee}function l(ee,ne,V){return ne in ee?Object.defineProperty(ee,ne,{value:V,enumerable:true,configurable:true,writable:true}):ee[ne]=V,ee}function c(ee,ne){var V=Object.keys(ee);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(ee);ne&&(se=se.filter(function(_e){return Object.getOwnPropertyDescriptor(ee,_e).enumerable})),V.push.apply(V,se);}return V}function h(ee){for(var ne=1;ne<arguments.length;ne++){var V=arguments[ne]!=null?arguments[ne]:{};ne%2?c(Object(V),true).forEach(function(se){l(ee,se,V[se]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(ee,Object.getOwnPropertyDescriptors(V)):c(Object(V)).forEach(function(se){Object.defineProperty(ee,se,Object.getOwnPropertyDescriptor(V,se));});}return ee}function f(ee,ne){return _(ee)||C(ee,ne)||T()}function m(ee){return g(ee)||b(ee)||v()}function g(ee){if(Array.isArray(ee)){for(var ne=0,V=new Array(ee.length);ne<ee.length;ne++)V[ne]=ee[ne];return V}}function _(ee){if(Array.isArray(ee))return ee}function b(ee){if(Symbol.iterator in Object(ee)||Object.prototype.toString.call(ee)==="[object Arguments]")return Array.from(ee)}function C(ee,ne){if(Symbol.iterator in Object(ee)||Object.prototype.toString.call(ee)==="[object Arguments]"){var V=[],se=true,_e=false,ke=void 0;try{for(var Ze=ee[Symbol.iterator](),Je;!(se=(Je=Ze.next()).done)&&(V.push(Je.value),!(ne&&V.length===ne));se=!0);}catch(Me){_e=true,ke=Me;}finally{try{!se&&Ze.return!=null&&Ze.return();}finally{if(_e)throw ke}}return V}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var R=function ee(ne){a(this,ee),this.p=new Promise(ne);};R.__typeson__type__="TypesonPromise",typeof Symbol<"u"&&(R.prototype[Symbol.toStringTag]="TypesonPromise"),R.prototype.then=function(ee,ne){var V=this;return new R(function(se,_e){V.p.then(function(ke){se(ee?ee(ke):ke);}).catch(function(ke){return ne?ne(ke):Promise.reject(ke)}).then(se,_e);})},R.prototype.catch=function(ee){return this.then(null,ee)},R.resolve=function(ee){return new R(function(ne){ne(ee);})},R.reject=function(ee){return new R(function(ne,V){V(ee);})},["all","race"].forEach(function(ee){R[ee]=function(ne){return new R(function(V,se){Promise[ee](ne.map(function(_e){return _e&&_e.constructor&&_e.constructor.__typeson__type__==="TypesonPromise"?_e.p:_e})).then(V,se);})};});var P={},L=P.toString,D={}.hasOwnProperty,O=Object.getPrototypeOf,B=D.toString;function I(ee,ne){return X(ee)&&typeof ee.then=="function"&&(!ne||typeof ee.catch=="function")}function x(ee){return L.call(ee).slice(8,-1)}function F(ee,ne){if(!ee||n(ee)!=="object")return false;var V=O(ee);if(!V)return ne===null;var se=D.call(V,"constructor")&&V.constructor;return typeof se!="function"?ne===null:ne===se||ne!==null&&B.call(se)===B.call(ne)||typeof ne=="function"&&typeof se.__typeson__type__=="string"&&se.__typeson__type__===ne.__typeson__type__}function U(ee){if(!ee||x(ee)!=="Object")return false;var ne=O(ee);return ne?F(ee,Object):true}function Ce(ee){if(!ee||x(ee)!=="Object")return false;var ne=O(ee);return ne?F(ee,Object)||Ce(ne):true}function X(ee){return ee&&n(ee)==="object"}function re(ee){return ee.replace(/~/g,"~0").replace(/\./g,"~1")}function Z(ee){return ee.replace(/~1/g,".").replace(/~0/g,"~")}function ce(ee,ne){if(ne==="")return ee;var V=ne.indexOf(".");if(V>-1){var se=ee[Z(ne.slice(0,V))];return se===void 0?void 0:ce(se,ne.slice(V+1))}return ee[Z(ne)]}function he(ee,ne,V){if(ne==="")return V;var se=ne.indexOf(".");if(se>-1){var _e=ee[Z(ne.slice(0,se))];return he(_e,ne.slice(se+1),V)}return ee[Z(ne)]=V,ee}function fe(ee){return ee===null?"null":Array.isArray(ee)?"array":n(ee)}var me=Object.keys,z=Array.isArray,ue={}.hasOwnProperty,Ae=["type","replaced","iterateIn","iterateUnsetNumeric"];function ie(ee,ne){if(ee.keypath==="")return -1;var V=ee.keypath.match(/\./g)||0,se=ne.keypath.match(/\./g)||0;return V&&(V=V.length),se&&(se=se.length),V>se?-1:V<se?1:ee.keypath<ne.keypath?-1:ee.keypath>ne.keypath}var Oe=(function(){function ee(ne){a(this,ee),this.options=ne,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={};}return s(ee,[{key:"stringify",value:function(V,se,_e,ke){ke=h({},this.options,{},ke,{stringification:true});var Ze=this.encapsulate(V,null,ke);return z(Ze)?JSON.stringify(Ze[0],se,_e):Ze.then(function(Je){return JSON.stringify(Je,se,_e)})}},{key:"stringifySync",value:function(V,se,_e,ke){return this.stringify(V,se,_e,h({throwOnBadSyncType:true},ke,{sync:true}))}},{key:"stringifyAsync",value:function(V,se,_e,ke){return this.stringify(V,se,_e,h({throwOnBadSyncType:true},ke,{sync:false}))}},{key:"parse",value:function(V,se,_e){return _e=h({},this.options,{},_e,{parse:true}),this.revive(JSON.parse(V,se),_e)}},{key:"parseSync",value:function(V,se,_e){return this.parse(V,se,h({throwOnBadSyncType:true},_e,{sync:true}))}},{key:"parseAsync",value:function(V,se,_e){return this.parse(V,se,h({throwOnBadSyncType:true},_e,{sync:false}))}},{key:"specialTypeNames",value:function(V,se){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _e.returnTypeNames=true,this.encapsulate(V,se,_e)}},{key:"rootTypeName",value:function(V,se){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _e.iterateNone=true,this.encapsulate(V,se,_e)}},{key:"encapsulate",value:function(V,se,_e){_e=h({sync:true},this.options,{},_e);var ke=_e,Ze=ke.sync,Je=this,Me={},bt=[],Nt=[],Kt=[],qt="cyclic"in _e?_e.cyclic:true,Mt=_e,Ue=Mt.encapsulateObserver,Ye=$e("",V,qt,se||{},Kt);function wt(ge){var M=Object.values(Me);if(_e.iterateNone)return M.length?M[0]:ee.getJSONType(ge);if(M.length){if(_e.returnTypeNames)return m(new Set(M));!ge||!U(ge)||ue.call(ge,"$types")?ge={$:ge,$types:{$:Me}}:ge.$types=Me;}else X(ge)&&ue.call(ge,"$types")&&(ge={$:ge,$types:true});return _e.returnTypeNames?false:ge}function Re(ge,M){return gt.apply(this,arguments)}function gt(){return gt=o(regeneratorRuntime.mark(function ge(M,k){var A;return regeneratorRuntime.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Promise.all(k.map(function(Te){return Te[1].p}));case 2:return A=K.sent,K.next=5,Promise.all(A.map((function(){var Te=o(regeneratorRuntime.mark(function le(Ke){var De,lt,we,mt,It,$t,Et,Yt,j,Xe,vt,Qe,Fe,ft;return regeneratorRuntime.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(De=[],lt=k.splice(0,1),we=f(lt,1),mt=we[0],It=f(mt,7),$t=It[0],Et=It[2],Yt=It[3],j=It[4],Xe=It[5],vt=It[6],Qe=$e($t,Ke,Et,Yt,De,true,vt),Fe=F(Qe,R),!($t&&Fe)){Pe.next=11;break}return Pe.next=8,Qe.p;case 8:return ft=Pe.sent,j[Xe]=ft,Pe.abrupt("return",Re(M,De));case 11:return $t?j[Xe]=Qe:Fe?M=Qe.p:M=Qe,Pe.abrupt("return",Re(M,De));case 13:case "end":return Pe.stop()}},le)}));return function(le){return Te.apply(this,arguments)}})()));case 5:return K.abrupt("return",M);case 6:case "end":return K.stop()}},ge)})),gt.apply(this,arguments)}function ot(ge,M,k){Object.assign(ge,M);var A=Ae.map(function(H){var K=ge[H];return delete ge[H],K});k(),Ae.forEach(function(H,K){ge[H]=A[K];});}function $e(ge,M,k,A,H,K,Te){var le,Ke={},De=n(M),lt=Ue?function(Fe){var ft=Te||A.type||ee.getJSONType(M);Ue(Object.assign(Fe||Ke,{keypath:ge,value:M,cyclic:k,stateObj:A,promisesData:H,resolvingTypesonPromise:K,awaitingTypesonPromise:F(M,R)},{type:ft}));}:null;if(["string","boolean","number","undefined"].includes(De))return M===void 0||De==="number"&&(isNaN(M)||M===-1/0||M===1/0)?(A.replaced?le=M:le=be(ge,M,A,H,false,K,lt),le!==M&&(Ke={replaced:le})):le=M,lt&<(),le;if(M===null)return lt&<(),M;if(k&&!A.iterateIn&&!A.iterateUnsetNumeric&&M&&n(M)==="object"){var we=bt.indexOf(M);if(we<0)k===true&&(bt.push(M),Nt.push(ge));else return Me[ge]="#",lt&<({cyclicKeypath:Nt[we]}),"#"+Nt[we]}var mt=U(M),It=z(M),$t=(mt||It)&&(!Je.plainObjectReplacers.length||A.replaced)||A.iterateIn?M:be(ge,M,A,H,mt||It,null,lt),Et;if($t!==M?(le=$t,Ke={replaced:$t}):ge===""&&F(M,R)?(H.push([ge,M,k,A,void 0,void 0,A.type]),le=M):It&&A.iterateIn!=="object"||A.iterateIn==="array"?(Et=new Array(M.length),Ke={clone:Et}):!["function","symbol"].includes(n(M))&&!("toJSON"in M)&&!F(M,R)&&!F(M,Promise)&&!F(M,ArrayBuffer)||mt||A.iterateIn==="object"?(Et={},A.addLength&&(Et.length=M.length),Ke={clone:Et}):le=M,lt&<(),_e.iterateNone)return Et||le;if(!Et)return le;if(A.iterateIn){var Yt=function(ft){var He={ownKeys:ue.call(M,ft)};ot(A,He,function(){var Pe=ge+(ge?".":"")+re(ft),At=$e(Pe,M[ft],!!k,A,H,K);F(At,R)?H.push([Pe,At,!!k,A,Et,ft,A.type]):At!==void 0&&(Et[ft]=At);});};for(var j in M)Yt(j);lt&<({endIterateIn:true,end:true});}else me(M).forEach(function(Fe){var ft=ge+(ge?".":"")+re(Fe),He={ownKeys:true};ot(A,He,function(){var Pe=$e(ft,M[Fe],!!k,A,H,K);F(Pe,R)?H.push([ft,Pe,!!k,A,Et,Fe,A.type]):Pe!==void 0&&(Et[Fe]=Pe);});}),lt&<({endIterateOwn:true,end:true});if(A.iterateUnsetNumeric){for(var Xe=M.length,vt=function(ft){if(!(ft in M)){var He=ge+(ge?".":"")+ft,Pe={ownKeys:false};ot(A,Pe,function(){var At=$e(He,void 0,!!k,A,H,K);F(At,R)?H.push([He,At,!!k,A,Et,ft,A.type]):At!==void 0&&(Et[ft]=At);});}},Qe=0;Qe<Xe;Qe++)vt(Qe);lt&<({endIterateUnsetNumeric:true,end:true});}return Et}function be(ge,M,k,A,H,K,Te){for(var le=H?Je.plainObjectReplacers:Je.nonplainObjectReplacers,Ke=le.length;Ke--;){var De=le[Ke];if(De.test(M,k)){var lt=De.type;if(Je.revivers[lt]){var we=Me[ge];Me[ge]=we?[lt].concat(we):lt;}if(Object.assign(k,{type:lt,replaced:true}),(Ze||!De.replaceAsync)&&!De.replace)return Te&&Te({typeDetected:true}),$e(ge,M,qt&&"readonly",k,A,K,lt);Te&&Te({replacing:true});var mt=Ze||!De.replaceAsync?"replace":"replaceAsync";return $e(ge,De[mt](M,k),qt&&"readonly",k,A,K,lt)}}return M}return Kt.length?Ze&&_e.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(Re(Ye,Kt)).then(wt):!Ze&&_e.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():_e.stringification&&Ze?[wt(Ye)]:Ze?wt(Ye):Promise.resolve(wt(Ye))}},{key:"encapsulateSync",value:function(V,se,_e){return this.encapsulate(V,se,h({throwOnBadSyncType:true},_e,{sync:true}))}},{key:"encapsulateAsync",value:function(V,se,_e){return this.encapsulate(V,se,h({throwOnBadSyncType:true},_e,{sync:false}))}},{key:"revive",value:function(V,se){var _e=V&&V.$types;if(!_e)return V;if(_e===true)return V.$;se=h({sync:true},this.options,{},se);var ke=se,Ze=ke.sync,Je=[],Me={},bt=true;_e.$&&U(_e.$)&&(V=V.$,_e=_e.$,bt=false);var Nt=this;function Kt(gt,ot){var $e=Nt.revivers[gt]||[],be=f($e,1),ge=be[0];if(!ge)throw new Error("Unregistered type: "+gt);return Ze&&!("revive"in ge)?ot:ge[Ze&&ge.revive?"revive":!Ze&&ge.reviveAsync?"reviveAsync":"revive"](ot,Me)}function qt(){var gt=[];if(Object.entries(_e).forEach(function(ot){var $e=f(ot,2),be=$e[0],ge=$e[1];ge!=="#"&&[].concat(ge).forEach(function(M){var k=Nt.revivers[M]||[null,{}],A=f(k,2),H=A[1].plain;H&&(gt.push({keypath:be,type:M}),delete _e[be]);});}),!!gt.length)return gt.sort(ie).reduce(function ot($e,be){var ge=be.keypath,M=be.type;if(I($e))return $e.then(function(H){return ot(H,{keypath:ge,type:M})});var k=ce(V,ge);if(k=Kt(M,k),F(k,R))return k.then(function(H){var K=he(V,ge,H);K===H&&(V=K);});var A=he(V,ge,k);A===k&&(V=A);},void 0)}var Mt=[];function Ue(gt,ot,$e,be,ge){if(!(bt&>==="$types")){var M=_e[gt],k=z(ot);if(k||U(ot)){var A=k?new Array(ot.length):{};for(me(ot).forEach(function(we){var mt=Ue(gt+(gt?".":"")+re(we),ot[we],$e||A,A,we),It=function(Et){return F(Et,Le)?A[we]=void 0:Et!==void 0&&(A[we]=Et),Et};F(mt,R)?Mt.push(mt.then(function($t){return It($t)})):It(mt);}),ot=A;Je.length;){var H=f(Je[0],4),K=H[0],Te=H[1],le=H[2],Ke=H[3],De=ce(K,Te);if(De!==void 0)le[Ke]=De;else break;Je.splice(0,1);}}if(!M)return ot;if(M==="#"){var lt=ce($e,ot.slice(1));return lt===void 0&&Je.push([$e,ot.slice(1),be,ge]),lt}return [].concat(M).reduce(function we(mt,It){return F(mt,R)?mt.then(function($t){return we($t,It)}):Kt(It,mt)},ot)}}function Ye(gt){return F(gt,Le)?void 0:gt}var wt=qt(),Re;return F(wt,R)?Re=wt.then(function(){return V}):(Re=Ue("",V,null),Mt.length&&(Re=R.resolve(Re).then(function(gt){return R.all([gt].concat(Mt))}).then(function(gt){var ot=f(gt,1),$e=ot[0];return $e}))),I(Re)?Ze&&se.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():F(Re,R)?Re.p.then(Ye):Re:!Ze&&se.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():Ze?Ye(Re):Promise.resolve(Ye(Re))}},{key:"reviveSync",value:function(V,se){return this.revive(V,h({throwOnBadSyncType:true},se,{sync:true}))}},{key:"reviveAsync",value:function(V,se){return this.revive(V,h({throwOnBadSyncType:true},se,{sync:false}))}},{key:"register",value:function(V,se){return se=se||{},[].concat(V).forEach(function _e(ke){var Ze=this;if(z(ke))return ke.map(function(Je){return _e.call(Ze,Je)});ke&&me(ke).forEach(function(Je){if(Je==="#")throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(ee.JSON_TYPES.includes(Je))throw new TypeError("Plain JSON object types are reserved as type names");var Me=ke[Je],bt=Me&&Me.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,Nt=bt.filter(function($e){return $e.type===Je});if(Nt.length&&(bt.splice(bt.indexOf(Nt[0]),1),delete this.revivers[Je],delete this.types[Je]),typeof Me=="function"){var Kt=Me;Me={test:function(be){return be&&be.constructor===Kt},replace:function(be){return h({},be)},revive:function(be){return Object.assign(Object.create(Kt.prototype),be)}};}else if(z(Me)){var qt=Me,Mt=f(qt,3),Ue=Mt[0],Ye=Mt[1],wt=Mt[2];Me={test:Ue,replace:Ye,revive:wt};}if(!(!Me||!Me.test)){var Re={type:Je,test:Me.test.bind(Me)};Me.replace&&(Re.replace=Me.replace.bind(Me)),Me.replaceAsync&&(Re.replaceAsync=Me.replaceAsync.bind(Me));var gt=typeof se.fallback=="number"?se.fallback:se.fallback?0:1/0;if(Me.testPlainObjects?this.plainObjectReplacers.splice(gt,0,Re):this.nonplainObjectReplacers.splice(gt,0,Re),Me.revive||Me.reviveAsync){var ot={};Me.revive&&(ot.revive=Me.revive.bind(Me)),Me.reviveAsync&&(ot.reviveAsync=Me.reviveAsync.bind(Me)),this.revivers[Je]=[ot,{plain:Me.testPlainObjects}];}this.types[Je]=Me;}},this);},this),this}}]),ee})(),Le=function ee(){a(this,ee);};return Le.__typeson__type__="TypesonUndefined",Oe.Undefined=Le,Oe.Promise=R,Oe.isThenable=I,Oe.toStringTag=x,Oe.hasConstructorOf=F,Oe.isObject=X,Oe.isPlainObject=U,Oe.isUserObject=Ce,Oe.escapeKeyPathComponent=re,Oe.unescapeKeyPathComponent=Z,Oe.getByKeyPath=ce,Oe.getJSONType=fe,Oe.JSON_TYPES=["null","boolean","number","string","array","object"],Oe}));}),h0=kd(function(e,t){(function(n,r){e.exports=r();})(Fu,(function(){function n(M){return (n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(M)}function r(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function o(M,k){for(var A=0;A<k.length;A++){var H=k[A];H.enumerable=H.enumerable||false,H.configurable=true,"value"in H&&(H.writable=true),Object.defineProperty(M,H.key,H);}}function a(M,k,A){return k in M?Object.defineProperty(M,k,{value:A,enumerable:true,configurable:true,writable:true}):M[k]=A,M}function i(M,k){var A=Object.keys(M);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(M);k&&(H=H.filter((function(K){return Object.getOwnPropertyDescriptor(M,K).enumerable}))),A.push.apply(A,H);}return A}function s(M){return (function(A){if(Array.isArray(A))return l(A)})(M)||(function(A){if(typeof Symbol<"u"&&Symbol.iterator in Object(A))return Array.from(A)})(M)||(function(A,H){if(A){if(typeof A=="string")return l(A,H);var K=Object.prototype.toString.call(A).slice(8,-1);if(K==="Object"&&A.constructor&&(K=A.constructor.name),K==="Map"||K==="Set")return Array.from(A);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return l(A,H)}})(M)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function l(M,k){(k==null||k>M.length)&&(k=M.length);for(var A=0,H=new Array(k);A<k;A++)H[A]=M[A];return H}function c(M){return (c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(M)}function h(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function f(M,k){for(var A=0;A<k.length;A++){var H=k[A];H.enumerable=H.enumerable||false,H.configurable=true,"value"in H&&(H.writable=true),Object.defineProperty(M,H.key,H);}}function m(M,k,A){return k in M?Object.defineProperty(M,k,{value:A,enumerable:true,configurable:true,writable:true}):M[k]=A,M}function g(M,k){var A=Object.keys(M);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(M);k&&(H=H.filter((function(K){return Object.getOwnPropertyDescriptor(M,K).enumerable}))),A.push.apply(A,H);}return A}function _(M){for(var k=1;k<arguments.length;k++){var A=arguments[k]!=null?arguments[k]:{};k%2?g(Object(A),true).forEach((function(H){m(M,H,A[H]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(A)):g(Object(A)).forEach((function(H){Object.defineProperty(M,H,Object.getOwnPropertyDescriptor(A,H));}));}return M}function b(M,k){return (function(H){if(Array.isArray(H))return H})(M)||(function(H,K){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(H)))){var Te=[],le=true,Ke=false,De=void 0;try{for(var lt,we=H[Symbol.iterator]();!(le=(lt=we.next()).done)&&(Te.push(lt.value),!K||Te.length!==K);le=!0);}catch(mt){Ke=true,De=mt;}finally{try{le||we.return==null||we.return();}finally{if(Ke)throw De}}return Te}})(M,k)||v(M,k)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function C(M){return (function(A){if(Array.isArray(A))return T(A)})(M)||(function(A){if(typeof Symbol<"u"&&Symbol.iterator in Object(A))return Array.from(A)})(M)||v(M)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function v(M,k){if(M){if(typeof M=="string")return T(M,k);var A=Object.prototype.toString.call(M).slice(8,-1);return A==="Object"&&M.constructor&&(A=M.constructor.name),A==="Map"||A==="Set"?Array.from(M):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?T(M,k):void 0}}function T(M,k){(k==null||k>M.length)&&(k=M.length);for(var A=0,H=new Array(k);A<k;A++)H[A]=M[A];return H}var R=function M(k){h(this,M),this.p=new Promise(k);};R.__typeson__type__="TypesonPromise",typeof Symbol<"u"&&(R.prototype[Symbol.toStringTag]="TypesonPromise"),R.prototype.then=function(M,k){var A=this;return new R((function(H,K){A.p.then((function(Te){H(M?M(Te):Te);})).catch((function(Te){return k?k(Te):Promise.reject(Te)})).then(H,K);}))},R.prototype.catch=function(M){return this.then(null,M)},R.resolve=function(M){return new R((function(k){k(M);}))},R.reject=function(M){return new R((function(k,A){A(M);}))},["all","race"].forEach((function(M){R[M]=function(k){return new R((function(A,H){Promise[M](k.map((function(K){return K&&K.constructor&&K.constructor.__typeson__type__==="TypesonPromise"?K.p:K}))).then(A,H);}))};}));var P={}.toString,L={}.hasOwnProperty,D=Object.getPrototypeOf,O=L.toString;function B(M,k){return U(M)&&typeof M.then=="function"&&(!k||typeof M.catch=="function")}function I(M){return P.call(M).slice(8,-1)}function x(M,k){if(!M||c(M)!=="object")return false;var A=D(M);if(!A)return k===null;var H=L.call(A,"constructor")&&A.constructor;return typeof H!="function"?k===null:k===H||k!==null&&O.call(H)===O.call(k)||typeof k=="function"&&typeof H.__typeson__type__=="string"&&H.__typeson__type__===k.__typeson__type__}function F(M){return !(!M||I(M)!=="Object")&&(!D(M)||x(M,Object))}function U(M){return M&&c(M)==="object"}function Ce(M){return M.replace(/~/g,"~0").replace(/\./g,"~1")}function X(M){return M.replace(/~1/g,".").replace(/~0/g,"~")}function re(M,k){if(k==="")return M;var A=k.indexOf(".");if(A>-1){var H=M[X(k.slice(0,A))];return H===void 0?void 0:re(H,k.slice(A+1))}return M[X(k)]}function Z(M,k,A){if(k==="")return A;var H=k.indexOf(".");return H>-1?Z(M[X(k.slice(0,H))],k.slice(H+1),A):(M[X(k)]=A,M)}function ce(M,k,A){return A?k?k(M):M:(M&&M.then||(M=Promise.resolve(M)),k?M.then(k):M)}var he=Object.keys,fe=Array.isArray,me={}.hasOwnProperty,z=["type","replaced","iterateIn","iterateUnsetNumeric"];function ue(M){return function(){for(var k=[],A=0;A<arguments.length;A++)k[A]=arguments[A];try{return Promise.resolve(M.apply(this,k))}catch(H){return Promise.reject(H)}}}function Ae(M,k){if(M.keypath==="")return -1;var A=M.keypath.match(/\./g)||0,H=k.keypath.match(/\./g)||0;return A&&(A=A.length),H&&(H=H.length),A>H?-1:A<H?1:M.keypath<k.keypath?-1:M.keypath>k.keypath}var ie=(function(){function M(k){h(this,M),this.options=k,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={};}return (function(A,H,K){return H&&f(A.prototype,H),A})(M,[{key:"stringify",value:function(A,H,K,Te){Te=_(_(_({},this.options),Te),{},{stringification:true});var le=this.encapsulate(A,null,Te);return fe(le)?JSON.stringify(le[0],H,K):le.then((function(Ke){return JSON.stringify(Ke,H,K)}))}},{key:"stringifySync",value:function(A,H,K,Te){return this.stringify(A,H,K,_(_({throwOnBadSyncType:true},Te),{},{sync:true}))}},{key:"stringifyAsync",value:function(A,H,K,Te){return this.stringify(A,H,K,_(_({throwOnBadSyncType:true},Te),{},{sync:false}))}},{key:"parse",value:function(A,H,K){return K=_(_(_({},this.options),K),{},{parse:true}),this.revive(JSON.parse(A,H),K)}},{key:"parseSync",value:function(A,H,K){return this.parse(A,H,_(_({throwOnBadSyncType:true},K),{},{sync:true}))}},{key:"parseAsync",value:function(A,H,K){return this.parse(A,H,_(_({throwOnBadSyncType:true},K),{},{sync:false}))}},{key:"specialTypeNames",value:function(A,H){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return K.returnTypeNames=true,this.encapsulate(A,H,K)}},{key:"rootTypeName",value:function(A,H){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return K.iterateNone=true,this.encapsulate(A,H,K)}},{key:"encapsulate",value:function(A,H,K){var Te=ue((function(Qe,Fe){return ce(Promise.all(Fe.map((function(ft){return ft[1].p}))),(function(ft){return ce(Promise.all(ft.map(ue((function(He){var Pe=false,At=[],mn=b(Fe.splice(0,1),1),Se=b(mn[0],7),Ee=Se[0],xt=Se[2],tt=Se[3],Rt=Se[4],St=Se[5],st=Se[6],yt=Xe(Ee,He,xt,tt,At,true,st),Ht=x(yt,R);return (function(Qt,On){var fn=Qt();return fn&&fn.then?fn.then(On):On(fn)})((function(){if(Ee&&Ht)return ce(yt.p,(function(Zt){return Rt[St]=Zt,Pe=true,Te(Qe,At)}))}),(function(Zt){return Pe?Zt:(Ee?Rt[St]=yt:Qe=Ht?yt.p:yt,Te(Qe,At))}))})))),(function(){return Qe}))}))})),le=(K=_(_({sync:true},this.options),K)).sync,Ke=this,De={},lt=[],we=[],mt=[],It=!("cyclic"in K)||K.cyclic,$t=K.encapsulateObserver,Et=Xe("",A,It,H||{},mt);function Yt(Qe){var Fe=Object.values(De);if(K.iterateNone)return Fe.length?Fe[0]:M.getJSONType(Qe);if(Fe.length){if(K.returnTypeNames)return C(new Set(Fe));Qe&&F(Qe)&&!me.call(Qe,"$types")?Qe.$types=De:Qe={$:Qe,$types:{$:De}};}else U(Qe)&&me.call(Qe,"$types")&&(Qe={$:Qe,$types:true});return !K.returnTypeNames&&Qe}function j(Qe,Fe,ft){Object.assign(Qe,Fe);var He=z.map((function(Pe){var At=Qe[Pe];return delete Qe[Pe],At}));ft(),z.forEach((function(Pe,At){Qe[Pe]=He[At];}));}function Xe(Qe,Fe,ft,He,Pe,At,mn){var Se,Ee={},xt=c(Fe),tt=$t?function(vn){var tn=mn||He.type||M.getJSONType(Fe);$t(Object.assign(vn||Ee,{keypath:Qe,value:Fe,cyclic:ft,stateObj:He,promisesData:Pe,resolvingTypesonPromise:At,awaitingTypesonPromise:x(Fe,R)},{type:tn}));}:null;if(["string","boolean","number","undefined"].includes(xt))return Fe===void 0||Number.isNaN(Fe)||Fe===Number.NEGATIVE_INFINITY||Fe===Number.POSITIVE_INFINITY?(Se=He.replaced?Fe:vt(Qe,Fe,He,Pe,false,At,tt))!==Fe&&(Ee={replaced:Se}):Se=Fe,tt&&tt(),Se;if(Fe===null)return tt&&tt(),Fe;if(ft&&!He.iterateIn&&!He.iterateUnsetNumeric&&Fe&&c(Fe)==="object"){var Rt=lt.indexOf(Fe);if(!(Rt<0))return De[Qe]="#",tt&&tt({cyclicKeypath:we[Rt]}),"#"+we[Rt];ft===true&&(lt.push(Fe),we.push(Qe));}var St,st=F(Fe),yt=fe(Fe),Ht=(st||yt)&&(!Ke.plainObjectReplacers.length||He.replaced)||He.iterateIn?Fe:vt(Qe,Fe,He,Pe,st||yt,null,tt);if(Ht!==Fe?(Se=Ht,Ee={replaced:Ht}):Qe===""&&x(Fe,R)?(Pe.push([Qe,Fe,ft,He,void 0,void 0,He.type]),Se=Fe):yt&&He.iterateIn!=="object"||He.iterateIn==="array"?(St=new Array(Fe.length),Ee={clone:St}):(["function","symbol"].includes(c(Fe))||"toJSON"in Fe||x(Fe,R)||x(Fe,Promise)||x(Fe,ArrayBuffer))&&!st&&He.iterateIn!=="object"?Se=Fe:(St={},He.addLength&&(St.length=Fe.length),Ee={clone:St}),tt&&tt(),K.iterateNone)return St||Se;if(!St)return Se;if(He.iterateIn){var Zt=function(tn){var Dt={ownKeys:me.call(Fe,tn)};j(He,Dt,(function(){var Pt=Qe+(Qe?".":"")+Ce(tn),Ln=Xe(Pt,Fe[tn],!!ft,He,Pe,At);x(Ln,R)?Pe.push([Pt,Ln,!!ft,He,St,tn,He.type]):Ln!==void 0&&(St[tn]=Ln);}));};for(var Qt in Fe)Zt(Qt);tt&&tt({endIterateIn:true,end:true});}else he(Fe).forEach((function(vn){var tn=Qe+(Qe?".":"")+Ce(vn);j(He,{ownKeys:true},(function(){var Dt=Xe(tn,Fe[vn],!!ft,He,Pe,At);x(Dt,R)?Pe.push([tn,Dt,!!ft,He,St,vn,He.type]):Dt!==void 0&&(St[vn]=Dt);}));})),tt&&tt({endIterateOwn:true,end:true});if(He.iterateUnsetNumeric){for(var On=Fe.length,fn=function(tn){if(!(tn in Fe)){var Dt=Qe+(Qe?".":"")+tn;j(He,{ownKeys:false},(function(){var Pt=Xe(Dt,void 0,!!ft,He,Pe,At);x(Pt,R)?Pe.push([Dt,Pt,!!ft,He,St,tn,He.type]):Pt!==void 0&&(St[tn]=Pt);}));}},Bt=0;Bt<On;Bt++)fn(Bt);tt&&tt({endIterateUnsetNumeric:true,end:true});}return St}function vt(Qe,Fe,ft,He,Pe,At,mn){for(var Se=Pe?Ke.plainObjectReplacers:Ke.nonplainObjectReplacers,Ee=Se.length;Ee--;){var xt=Se[Ee];if(xt.test(Fe,ft)){var tt=xt.type;if(Ke.revivers[tt]){var Rt=De[Qe];De[Qe]=Rt?[tt].concat(Rt):tt;}return Object.assign(ft,{type:tt,replaced:true}),!le&&xt.replaceAsync||xt.replace?(mn&&mn({replacing:true}),Xe(Qe,xt[le||!xt.replaceAsync?"replace":"replaceAsync"](Fe,ft),It&&"readonly",ft,He,At,tt)):(mn&&mn({typeDetected:true}),Xe(Qe,Fe,It&&"readonly",ft,He,At,tt))}}return Fe}return mt.length?le&&K.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(Te(Et,mt)).then(Yt):!le&&K.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():K.stringification&&le?[Yt(Et)]:le?Yt(Et):Promise.resolve(Yt(Et))}},{key:"encapsulateSync",value:function(A,H,K){return this.encapsulate(A,H,_(_({throwOnBadSyncType:true},K),{},{sync:true}))}},{key:"encapsulateAsync",value:function(A,H,K){return this.encapsulate(A,H,_(_({throwOnBadSyncType:true},K),{},{sync:false}))}},{key:"revive",value:function(A,H){var K=A&&A.$types;if(!K)return A;if(K===true)return A.$;var Te=(H=_(_({sync:true},this.options),H)).sync,le=[],Ke={},De=true;K.$&&F(K.$)&&(A=A.$,K=K.$,De=false);var lt=this;function we(Yt,j){var Xe=b(lt.revivers[Yt]||[],1)[0];if(!Xe)throw new Error("Unregistered type: "+Yt);return Te&&!("revive"in Xe)?j:Xe[Te&&Xe.revive?"revive":!Te&&Xe.reviveAsync?"reviveAsync":"revive"](j,Ke)}var mt=[];function It(Yt){return x(Yt,Oe)?void 0:Yt}var $t,Et=(function(){var j=[];if(Object.entries(K).forEach((function(Xe){var vt=b(Xe,2),Qe=vt[0],Fe=vt[1];Fe!=="#"&&[].concat(Fe).forEach((function(ft){b(lt.revivers[ft]||[null,{}],2)[1].plain&&(j.push({keypath:Qe,type:ft}),delete K[Qe]);}));})),j.length)return j.sort(Ae).reduce((function Xe(vt,Qe){var Fe=Qe.keypath,ft=Qe.type;if(B(vt))return vt.then((function(At){return Xe(At,{keypath:Fe,type:ft})}));var He=re(A,Fe);if(x(He=we(ft,He),R))return He.then((function(At){var mn=Z(A,Fe,At);mn===At&&(A=mn);}));var Pe=Z(A,Fe,He);Pe===He&&(A=Pe);}),void 0)})();return x(Et,R)?$t=Et.then((function(){return A})):($t=(function Yt(j,Xe,vt,Qe,Fe){if(!De||j!=="$types"){var ft=K[j],He=fe(Xe);if(He||F(Xe)){var Pe=He?new Array(Xe.length):{};for(he(Xe).forEach((function(St){var st=Yt(j+(j?".":"")+Ce(St),Xe[St],vt||Pe,Pe,St),yt=function(Zt){return x(Zt,Oe)?Pe[St]=void 0:Zt!==void 0&&(Pe[St]=Zt),Zt};x(st,R)?mt.push(st.then((function(Ht){return yt(Ht)}))):yt(st);})),Xe=Pe;le.length;){var At=b(le[0],4),mn=At[0],Se=At[1],Ee=At[2],xt=At[3],tt=re(mn,Se);if(tt===void 0)break;Ee[xt]=tt,le.splice(0,1);}}if(!ft)return Xe;if(ft==="#"){var Rt=re(vt,Xe.slice(1));return Rt===void 0&&le.push([vt,Xe.slice(1),Qe,Fe]),Rt}return [].concat(ft).reduce((function St(st,yt){return x(st,R)?st.then((function(Ht){return St(Ht,yt)})):we(yt,st)}),Xe)}})("",A,null),mt.length&&($t=R.resolve($t).then((function(Yt){return R.all([Yt].concat(mt))})).then((function(Yt){return b(Yt,1)[0]})))),B($t)?Te&&H.throwOnBadSyncType?(function(){throw new TypeError("Sync method requested but async result obtained")})():x($t,R)?$t.p.then(It):$t:!Te&&H.throwOnBadSyncType?(function(){throw new TypeError("Async method requested but sync result obtained")})():Te?It($t):Promise.resolve(It($t))}},{key:"reviveSync",value:function(A,H){return this.revive(A,_(_({throwOnBadSyncType:true},H),{},{sync:true}))}},{key:"reviveAsync",value:function(A,H){return this.revive(A,_(_({throwOnBadSyncType:true},H),{},{sync:false}))}},{key:"register",value:function(A,H){return H=H||{},[].concat(A).forEach((function K(Te){var le=this;if(fe(Te))return Te.map((function(Ke){return K.call(le,Ke)}));Te&&he(Te).forEach((function(Ke){if(Ke==="#")throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(M.JSON_TYPES.includes(Ke))throw new TypeError("Plain JSON object types are reserved as type names");var De=Te[Ke],lt=De&&De.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,we=lt.filter((function(j){return j.type===Ke}));if(we.length&&(lt.splice(lt.indexOf(we[0]),1),delete this.revivers[Ke],delete this.types[Ke]),typeof De=="function"){var mt=De;De={test:function(Xe){return Xe&&Xe.constructor===mt},replace:function(Xe){return _({},Xe)},revive:function(Xe){return Object.assign(Object.create(mt.prototype),Xe)}};}else if(fe(De)){var It=b(De,3);De={test:It[0],replace:It[1],revive:It[2]};}if(De&&De.test){var $t={type:Ke,test:De.test.bind(De)};De.replace&&($t.replace=De.replace.bind(De)),De.replaceAsync&&($t.replaceAsync=De.replaceAsync.bind(De));var Et=typeof H.fallback=="number"?H.fallback:H.fallback?0:Number.POSITIVE_INFINITY;if(De.testPlainObjects?this.plainObjectReplacers.splice(Et,0,$t):this.nonplainObjectReplacers.splice(Et,0,$t),De.revive||De.reviveAsync){var Yt={};De.revive&&(Yt.revive=De.revive.bind(De)),De.reviveAsync&&(Yt.reviveAsync=De.reviveAsync.bind(De)),this.revivers[Ke]=[Yt,{plain:De.testPlainObjects}];}this.types[Ke]=De;}}),this);}),this),this}}]),M})(),Oe=function M(){h(this,M);};Oe.__typeson__type__="TypesonUndefined",ie.Undefined=Oe,ie.Promise=R,ie.isThenable=B,ie.toStringTag=I,ie.hasConstructorOf=x,ie.isObject=U,ie.isPlainObject=F,ie.isUserObject=function M(k){if(!k||I(k)!=="Object")return false;var A=D(k);return !A||x(k,Object)||M(A)},ie.escapeKeyPathComponent=Ce,ie.unescapeKeyPathComponent=X,ie.getByKeyPath=re,ie.getJSONType=function(k){return k===null?"null":Array.isArray(k)?"array":c(k)},ie.JSON_TYPES=["null","boolean","number","string","array","object"];for(var Le={userObject:{test:function(k,A){return ie.isUserObject(k)},replace:function(k){return (function(H){for(var K=1;K<arguments.length;K++){var Te=arguments[K]!=null?arguments[K]:{};K%2?i(Object(Te),true).forEach((function(le){a(H,le,Te[le]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(Te)):i(Object(Te)).forEach((function(le){Object.defineProperty(H,le,Object.getOwnPropertyDescriptor(Te,le));}));}return H})({},k)},revive:function(k){return k}}},ee=[{arrayNonindexKeys:{testPlainObjects:true,test:function(k,A){return !!Array.isArray(k)&&(Object.keys(k).some((function(H){return String(Number.parseInt(H))!==H}))&&(A.iterateIn="object",A.addLength=true),true)},replace:function(k,A){return A.iterateUnsetNumeric=true,k},revive:function(k){if(Array.isArray(k))return k;var A=[];return Object.keys(k).forEach((function(H){var K=k[H];A[H]=K;})),A}}},{sparseUndefined:{test:function(k,A){return k===void 0&&A.ownKeys===false},replace:function(k){return 0},revive:function(k){}}}],ne={undef:{test:function(k,A){return k===void 0&&(A.ownKeys||!("ownKeys"in A))},replace:function(k){return 0},revive:function(k){return new ie.Undefined}}},V={StringObject:{test:function(k){return ie.toStringTag(k)==="String"&&n(k)==="object"},replace:function(k){return String(k)},revive:function(k){return new String(k)}},BooleanObject:{test:function(k){return ie.toStringTag(k)==="Boolean"&&n(k)==="object"},replace:function(k){return !!k},revive:function(k){return new Boolean(k)}},NumberObject:{test:function(k){return ie.toStringTag(k)==="Number"&&n(k)==="object"},replace:function(k){return Number(k)},revive:function(k){return new Number(k)}}},se=[{nan:{test:function(k){return Number.isNaN(k)},replace:function(k){return "NaN"},revive:function(k){return Number.NaN}}},{infinity:{test:function(k){return k===Number.POSITIVE_INFINITY},replace:function(k){return "Infinity"},revive:function(k){return Number.POSITIVE_INFINITY}}},{negativeInfinity:{test:function(k){return k===Number.NEGATIVE_INFINITY},replace:function(k){return "-Infinity"},revive:function(k){return Number.NEGATIVE_INFINITY}}}],_e={date:{test:function(k){return ie.toStringTag(k)==="Date"},replace:function(k){var A=k.getTime();return Number.isNaN(A)?"NaN":A},revive:function(k){return k==="NaN"?new Date(Number.NaN):new Date(k)}}},ke={regexp:{test:function(k){return ie.toStringTag(k)==="RegExp"},replace:function(k){return {source:k.source,flags:(k.global?"g":"")+(k.ignoreCase?"i":"")+(k.multiline?"m":"")+(k.sticky?"y":"")+(k.unicode?"u":"")}},revive:function(k){var A=k.source,H=k.flags;return new RegExp(A,H)}}},Ze={map:{test:function(k){return ie.toStringTag(k)==="Map"},replace:function(k){return s(k.entries())},revive:function(k){return new Map(k)}}},Je={set:{test:function(k){return ie.toStringTag(k)==="Set"},replace:function(k){return s(k.values())},revive:function(k){return new Set(k)}}},Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bt=new Uint8Array(256),Nt=0;Nt<Me.length;Nt++)bt[Me.charCodeAt(Nt)]=Nt;var Kt=function(k,A,H){H==null&&(H=k.byteLength);for(var K=new Uint8Array(k,0,H),Te=K.length,le="",Ke=0;Ke<Te;Ke+=3)le+=Me[K[Ke]>>2],le+=Me[(3&K[Ke])<<4|K[Ke+1]>>4],le+=Me[(15&K[Ke+1])<<2|K[Ke+2]>>6],le+=Me[63&K[Ke+2]];return Te%3==2?le=le.slice(0,-1)+"=":Te%3==1&&(le=le.slice(0,-2)+"=="),le},qt=function(k){var A,H,K,Te,le=k.length,Ke=.75*k.length,De=0;k[k.length-1]==="="&&(Ke--,k[k.length-2]==="="&&Ke--);for(var lt=new ArrayBuffer(Ke),we=new Uint8Array(lt),mt=0;mt<le;mt+=4)A=bt[k.charCodeAt(mt)],H=bt[k.charCodeAt(mt+1)],K=bt[k.charCodeAt(mt+2)],Te=bt[k.charCodeAt(mt+3)],we[De++]=A<<2|H>>4,we[De++]=(15&H)<<4|K>>2,we[De++]=(3&K)<<6|63&Te;return lt},Mt={arraybuffer:{test:function(k){return ie.toStringTag(k)==="ArrayBuffer"},replace:function(k,A){A.buffers||(A.buffers=[]);var H=A.buffers.indexOf(k);return H>-1?{index:H}:(A.buffers.push(k),Kt(k))},revive:function(k,A){if(A.buffers||(A.buffers=[]),n(k)==="object")return A.buffers[k.index];var H=qt(k);return A.buffers.push(H),H}}},Ue=typeof self>"u"?Fu:self,Ye={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach((function(M){var k=M,A=Ue[k];A&&(Ye[M.toLowerCase()]={test:function(K){return ie.toStringTag(K)===k},replace:function(K,Te){var le=K.buffer,Ke=K.byteOffset,De=K.length;Te.buffers||(Te.buffers=[]);var lt=Te.buffers.indexOf(le);return lt>-1?{index:lt,byteOffset:Ke,length:De}:(Te.buffers.push(le),{encoded:Kt(le),byteOffset:Ke,length:De})},revive:function(K,Te){Te.buffers||(Te.buffers=[]);var le,Ke=K.byteOffset,De=K.length,lt=K.encoded,we=K.index;return "index"in K?le=Te.buffers[we]:(le=qt(lt),Te.buffers.push(le)),new A(le,Ke,De)}});}));var wt={dataview:{test:function(k){return ie.toStringTag(k)==="DataView"},replace:function(k,A){var H=k.buffer,K=k.byteOffset,Te=k.byteLength;A.buffers||(A.buffers=[]);var le=A.buffers.indexOf(H);return le>-1?{index:le,byteOffset:K,byteLength:Te}:(A.buffers.push(H),{encoded:Kt(H),byteOffset:K,byteLength:Te})},revive:function(k,A){A.buffers||(A.buffers=[]);var H,K=k.byteOffset,Te=k.byteLength,le=k.encoded,Ke=k.index;return "index"in k?H=A.buffers[Ke]:(H=qt(le),A.buffers.push(H)),new DataView(H,K,Te)}}},Re={IntlCollator:{test:function(k){return ie.hasConstructorOf(k,Intl.Collator)},replace:function(k){return k.resolvedOptions()},revive:function(k){return new Intl.Collator(k.locale,k)}},IntlDateTimeFormat:{test:function(k){return ie.hasConstructorOf(k,Intl.DateTimeFormat)},replace:function(k){return k.resolvedOptions()},revive:function(k){return new Intl.DateTimeFormat(k.locale,k)}},IntlNumberFormat:{test:function(k){return ie.hasConstructorOf(k,Intl.NumberFormat)},replace:function(k){return k.resolvedOptions()},revive:function(k){return new Intl.NumberFormat(k.locale,k)}}};function gt(M){for(var k=new Uint8Array(M.length),A=0;A<M.length;A++)k[A]=M.charCodeAt(A);return k.buffer}var ot={file:{test:function(k){return ie.toStringTag(k)==="File"},replace:function(k){var A=new XMLHttpRequest;if(A.overrideMimeType("text/plain; charset=x-user-defined"),A.open("GET",URL.createObjectURL(k),false),A.send(),A.status!==200&&A.status!==0)throw new Error("Bad File access: "+A.status);return {type:k.type,stringContents:A.responseText,name:k.name,lastModified:k.lastModified}},revive:function(k){var A=k.name,H=k.type,K=k.stringContents,Te=k.lastModified;return new File([gt(K)],A,{type:H,lastModified:Te})},replaceAsync:function(k){return new ie.Promise((function(A,H){var K=new FileReader;K.addEventListener("load",(function(){A({type:k.type,stringContents:K.result,name:k.name,lastModified:k.lastModified});})),K.addEventListener("error",(function(){H(K.error);})),K.readAsBinaryString(k);}))}}},$e={bigint:{test:function(k){return typeof k=="bigint"},replace:function(k){return String(k)},revive:function(k){return BigInt(k)}}},be={bigintObject:{test:function(k){return n(k)==="object"&&ie.hasConstructorOf(k,BigInt)},replace:function(k){return String(k)},revive:function(k){return new Object(BigInt(k))}}},ge={cryptokey:{test:function(k){return ie.toStringTag(k)==="CryptoKey"&&k.extractable},replaceAsync:function(k){return new ie.Promise((function(A,H){crypto.subtle.exportKey("jwk",k).catch((function(K){H(K);})).then((function(K){A({jwk:K,algorithm:k.algorithm,usages:k.usages});}));}))},revive:function(k){var A=k.jwk,H=k.algorithm,K=k.usages;return crypto.subtle.importKey("jwk",A,H,true,K)}}};return [Le,ne,ee,V,se,_e,ke,{imagedata:{test:function(k){return ie.toStringTag(k)==="ImageData"},replace:function(k){return {array:s(k.data),width:k.width,height:k.height}},revive:function(k){return new ImageData(new Uint8ClampedArray(k.array),k.width,k.height)}}},{imagebitmap:{test:function(k){return ie.toStringTag(k)==="ImageBitmap"||k&&k.dataset&&k.dataset.toStringTag==="ImageBitmap"},replace:function(k){var A=document.createElement("canvas");return A.getContext("2d").drawImage(k,0,0),A.toDataURL()},revive:function(k){var A=document.createElement("canvas"),H=A.getContext("2d"),K=document.createElement("img");return K.addEventListener("load",(function(){H.drawImage(K,0,0);})),K.src=k,A},reviveAsync:function(k){var A=document.createElement("canvas"),H=A.getContext("2d"),K=document.createElement("img");return K.addEventListener("load",(function(){H.drawImage(K,0,0);})),K.src=k,createImageBitmap(A)}}},ot,{file:ot.file,filelist:{test:function(k){return ie.toStringTag(k)==="FileList"},replace:function(k){for(var A=[],H=0;H<k.length;H++)A[H]=k.item(H);return A},revive:function(k){return new((function(){function A(){r(this,A),this._files=arguments[0],this.length=this._files.length;}return (function(K,Te,le){return Te&&o(K.prototype,Te),K})(A,[{key:"item",value:function(K){return this._files[K]}},{key:Symbol.toStringTag,get:function(){return "FileList"}}]),A})())(k)}}},{blob:{test:function(k){return ie.toStringTag(k)==="Blob"},replace:function(k){var A=new XMLHttpRequest;if(A.overrideMimeType("text/plain; charset=x-user-defined"),A.open("GET",URL.createObjectURL(k),false),A.send(),A.status!==200&&A.status!==0)throw new Error("Bad Blob access: "+A.status);return {type:k.type,stringContents:A.responseText}},revive:function(k){var A=k.type,H=k.stringContents;return new Blob([gt(H)],{type:A})},replaceAsync:function(k){return new ie.Promise((function(A,H){var K=new FileReader;K.addEventListener("load",(function(){A({type:k.type,stringContents:K.result});})),K.addEventListener("error",(function(){H(K.error);})),K.readAsBinaryString(k);}))}}}].concat(typeof Map=="function"?Ze:[],typeof Set=="function"?Je:[],typeof ArrayBuffer=="function"?Mt:[],typeof Uint8Array=="function"?Ye:[],typeof DataView=="function"?wt:[],typeof Intl<"u"?Re:[],typeof crypto<"u"?ge:[],typeof BigInt<"u"?[$e,be]:[])}));}),Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hi=new Uint8Array(256);for(var ps=0;ps<Ra.length;ps++)hi[Ra.codePointAt(ps)]=ps;var Ou=function(t,n,r){r==null&&(r=t.byteLength);for(var o=new Uint8Array(t,0,r),a=o.length,i="",s=0;s<a;s+=3)i+=Ra[o[s]>>2],i+=Ra[(o[s]&3)<<4|o[s+1]>>4],i+=Ra[(o[s+1]&15)<<2|o[s+2]>>6],i+=Ra[o[s+2]&63];return a%3===2?i=i.slice(0,-1)+"=":a%3===1&&(i=i.slice(0,-2)+"=="),i},Vg=function(t){var n=t.length,r=t.length*.75,o=0,a,i,s,l;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);for(var c=new ArrayBuffer(r),h=new Uint8Array(c),f=0;f<n;f+=4)a=hi[t.codePointAt(f)],i=hi[t.codePointAt(f+1)],s=hi[t.codePointAt(f+2)],l=hi[t.codePointAt(f+3)],h[o++]=a<<2|i>>4,h[o++]=(i&15)<<4|s>>2,h[o++]=(s&3)<<6|l&63;return c},p0=typeof self>"u"?global:self,zg={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(e){var t=e,n=p0[t];n&&(zg[e.toLowerCase()+"2"]={test:function(r){return Dl.toStringTag(r)===t},replace:function(r){var o=r.buffer,a=r.byteOffset,i=r.length;return {buffer:o,byteOffset:a,length:i}},revive:function(r){var o=r.buffer,a=r.byteOffset,i=r.length;return new n(o,a,i)}});});var m0={arraybuffer:{test:function(e){return Dl.toStringTag(e)==="ArrayBuffer"},replace:function(e){return Ou(e,0,e.byteLength)},revive:function(e){var t=Vg(e);return t}}},br=new Dl().register(h0),g0="FileReaderSync"in self,ul=[],Us=0;br.register([m0,zg,{blob2:{test:function(e){return Dl.toStringTag(e)==="Blob"},replace:function(e){if(e.isClosed)throw new Error("The Blob is closed");if(g0){var t=qg(e,"binary"),n=Ou(t,0,t.byteLength);return {type:e.type,data:n}}else {ul.push(e);var r={type:e.type,data:{start:Us,end:Us+e.size}};return Us+=e.size,r}},finalize:function(e,t){e.data=Ou(t,0,t.byteLength);},revive:function(e){var t=e.type,n=e.data;return new Blob([Vg(n)],{type:t})}}}]);br.mustFinalize=function(){return ul.length>0};br.finalize=function(e){return Eo(void 0,void 0,void 0,function(){var t,n,r,o,a,i,s,l,c,h,f,m;return Er(this,function(g){switch(g.label){case 0:return [4,jg(new Blob(ul),"binary")];case 1:if(t=g.sent(),e){for(n=0,r=e;n<r.length;n++)if(o=r[n],o.$types){a=o.$types,i=a.$,i&&(a=a.$);for(s in a)l=a[s],c=br.types[l],c&&c.finalize&&(h=An.getByKeyPath(o,i?"$."+s:s),c.finalize(h,t.slice((f=h.data)===null||f===void 0?void 0:f.start,(m=h.data)===null||m===void 0?void 0:m.end)));}}return ul=[],Us=0,[2]}})})};var y0=2e3;function Kg(e,t){return Eo(this,void 0,void 0,function(){function n(){return Eo(this,void 0,void 0,function(){var f,m,g,_,b,C,v,T,R,P;return Er(this,function(L){switch(L.label){case 0:return [4,Promise.all(o.map(function(D){return D.count()}))];case 1:f=L.sent(),f.forEach(function(D,O){return i[O].rowCount=D}),h.totalRows=f.reduce(function(D,O){return D+O}),m=JSON.stringify(l,void 0,s?2:void 0),g=m.lastIndexOf("]"),_=m.substring(0,g),a.push(_),b=t.filter,C=t.transform,v=function(D){var O,B,I,x,F,U,Ce,X,re,Z,ce,he;return Er(this,function(fe){switch(fe.label){case 0:O=e.table(D),B=O.schema.primKey,I=!!B.keyPath,x=t.numRowsPerChunk||y0,F=I?{tableName:O.name,inbound:true,rows:[]}:{tableName:O.name,inbound:false,rows:[]},U=JSON.stringify(F,void 0,s?2:void 0),s&&(U=U.split(`
`).join(`
`)),Ce=U.lastIndexOf("]"),a.push(U.substring(0,Ce)),X=null,re=0,Z=true,ce=function(){var me,z,ue,Ae,ie,ne,Oe,Le,ee,ne;return Er(this,function(V){switch(V.label){case 0:return c&&An.ignoreTransaction(function(){return c(h)}),me=X==null?O.limit(x):O.where(":id").above(X).limit(x),[4,me.toArray()];case 1:return z=V.sent(),z.length===0?[2,"break"]:(X!=null&&re>0&&(a.push(","),s&&a.push(`
`)),Z=z.length===x,I?(ue=b?z.filter(function(se){return b(D,se)}):z,Ae=C?ue.map(function(se){return C(D,se).value}):ue,ie=Ae.map(function(se){return br.encapsulate(se)}),br.mustFinalize()?[4,An.waitFor(br.finalize(ie))]:[3,3]):[3,4]);case 2:V.sent(),V.label=3;case 3:return ne=JSON.stringify(ie,void 0,s?2:void 0),s&&(ne=ne.split(`
`).join(`
`)),a.push(new Blob([ne.substring(1,ne.length-1)])),re=Ae.length,X=z.length>0?An.getByKeyPath(z[z.length-1],B.keyPath):null,[3,8];case 4:return [4,me.primaryKeys()];case 5:return Oe=V.sent(),Le=Oe.map(function(se,_e){return [se,z[_e]]}),b&&(Le=Le.filter(function(se){var _e=se[0],ke=se[1];return b(D,ke,_e)})),C&&(Le=Le.map(function(se){var _e=se[0],ke=se[1],Ze=C(D,ke,_e);return [Ze.key,Ze.value]})),ee=Le.map(function(se){return br.encapsulate(se)}),br.mustFinalize()?[4,An.waitFor(br.finalize(ee))]:[3,7];case 6:V.sent(),V.label=7;case 7:ne=JSON.stringify(ee,void 0,s?2:void 0),s&&(ne=ne.split(`
`).join(`
`)),a.push(new Blob([ne.substring(1,ne.length-1)])),re=Le.length,X=Oe.length>0?Oe[Oe.length-1]:null,V.label=8;case 8:return h.completedRows+=z.length,[2]}})},fe.label=1;case 1:return Z?[5,ce()]:[3,3];case 2:return he=fe.sent(),he==="break"?[3,3]:[3,1];case 3:return a.push(U.substr(Ce)),h.completedTables+=1,h.completedTables<h.totalTables&&a.push(","),[2]}})},T=0,R=i,L.label=2;case 2:return T<R.length?(P=R[T].name,[5,v(P)]):[3,5];case 3:L.sent(),L.label=4;case 4:return T++,[3,2];case 5:return a.push(m.substr(g)),h.done=true,c&&An.ignoreTransaction(function(){return c(h)}),[2]}})})}var r,o,a,i,s,l,c,h;return Er(this,function(f){switch(f.label){case 0:t=t||{},r=t.skipTables?t.skipTables:[],o=e.tables.filter(function(m){return !r.includes(m.name)}),a=[],i=o.map(function(m){return {name:m.name,schema:d0(m),rowCount:0}}),s=t.prettyJson,l={formatName:"dexie",formatVersion:1,data:{databaseName:e.name,databaseVersion:e.verno,tables:i,data:[]}},c=t.progressCallback,h={done:false,completedRows:0,completedTables:0,totalRows:NaN,totalTables:i.length},f.label=1;case 1:return f.trys.push([1,,6,7]),t.noTransaction?[4,n()]:[3,3];case 2:return f.sent(),[3,5];case 3:return [4,e.transaction("r",e.tables,n)];case 4:f.sent(),f.label=5;case 5:return [3,7];case 6:return br.finalize(),[7];case 7:return [2,new Blob(a,{type:"text/json"})]}})})}var _0=1,w0={Stream:function(){}},b0=kd(function(e,t){(function(n){var r=typeof process=="object"&&yh?yh:self;n.parser=function(I){return new g(I)},n.CParser=g,n.CStream=b,n.createStream=_,n.MAX_BUFFER_LENGTH=10*1024*1024,n.DEBUG=r.CDEBUG==="debug",n.INFO=r.CDEBUG==="debug"||r.CDEBUG==="info",n.EVENTS=["value","string","key","openobject","closeobject","openarray","closearray","error","end","ready"];var o={textNode:void 0,numberNode:""},a=n.EVENTS.filter(function(I){return I!=="error"&&I!=="end"}),i=0,s;n.STATE={BEGIN:i++,VALUE:i++,OPEN_OBJECT:i++,CLOSE_OBJECT:i++,OPEN_ARRAY:i++,CLOSE_ARRAY:i++,TEXT_ESCAPE:i++,STRING:i++,BACKSLASH:i++,END:i++,OPEN_KEY:i++,CLOSE_KEY:i++,TRUE:i++,TRUE2:i++,TRUE3:i++,FALSE:i++,FALSE2:i++,FALSE3:i++,FALSE4:i++,NULL:i++,NULL2:i++,NULL3:i++,NUMBER_DECIMAL_POINT:i++,NUMBER_DIGIT:i++};for(var l in n.STATE)n.STATE[n.STATE[l]]=l;i=n.STATE;const c={tab:9,lineFeed:10,carriageReturn:13,space:32,doubleQuote:34,plus:43,comma:44,minus:45,period:46,_0:48,_9:57,colon:58,E:69,openBracket:91,backslash:92,closeBracket:93,a:97,b:98,e:101,f:102,l:108,n:110,r:114,s:115,t:116,u:117,openBrace:123,closeBrace:125};Object.create||(Object.create=function(I){function x(){this.__proto__=I;}return x.prototype=I,new x}),Object.getPrototypeOf||(Object.getPrototypeOf=function(I){return I.__proto__}),Object.keys||(Object.keys=function(I){var x=[];for(var F in I)I.hasOwnProperty(F)&&x.push(F);return x});function h(I){var x=Math.max(n.MAX_BUFFER_LENGTH,10),F=0;for(var U in o){var Ce=I[U]===void 0?0:I[U].length;if(Ce>x)switch(U){case "text":closeText(I);break;default:L(I,"Max buffer length exceeded: "+U);}F=Math.max(F,Ce);}I.bufferCheckPosition=n.MAX_BUFFER_LENGTH-F+I.position;}function f(I){for(var x in o)I[x]=o[x];}var m=/[\\"\n]/g;function g(I){if(!(this instanceof g))return new g(I);var x=this;f(x),x.bufferCheckPosition=n.MAX_BUFFER_LENGTH,x.q=x.c=x.p="",x.opt=I||{},x.closed=x.closedRoot=x.sawRoot=false,x.tag=x.error=null,x.state=i.BEGIN,x.stack=new Array,x.position=x.column=0,x.line=1,x.slashed=false,x.unicodeI=0,x.unicodeS=null,x.depth=0,C(x,"onready");}g.prototype={end:function(){D(this);},write:B,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{s=w0.Stream;}catch{s=function(){};}function _(I){return new b(I)}function b(I){if(!(this instanceof b))return new b(I);this._parser=new g(I),this.writable=true,this.readable=true,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var x=this;s.apply(x),this._parser.onend=function(){x.emit("end");},this._parser.onerror=function(F){x.emit("error",F),x._parser.error=null;},a.forEach(function(F){Object.defineProperty(x,"on"+F,{get:function(){return x._parser["on"+F]},set:function(U){if(!U)return x.removeAllListeners(F),x._parser["on"+F]=U,U;x.on(F,U);},enumerable:true,configurable:false});});}b.prototype=Object.create(s.prototype,{constructor:{value:b}}),b.prototype.write=function(I){I=new Buffer(I);for(var x=0;x<I.length;x++){var F=I[x];if(this.bytes_remaining>0){for(var U=0;U<this.bytes_remaining;U++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+U]=I[U];this.string=this.temp_buffs[this.bytes_in_sequence].toString(),this.bytes_in_sequence=this.bytes_remaining=0,x=x+U-1,this._parser.write(this.string),this.emit("data",this.string);continue}if(this.bytes_remaining===0&&F>=128)if(F>=194&&F<=223&&(this.bytes_in_sequence=2),F>=224&&F<=239&&(this.bytes_in_sequence=3),F>=240&&F<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+x>I.length){for(var Ce=0;Ce<=I.length-1-x;Ce++)this.temp_buffs[this.bytes_in_sequence][Ce]=I[x+Ce];return this.bytes_remaining=x+this.bytes_in_sequence-I.length,true}else {this.string=I.slice(x,x+this.bytes_in_sequence).toString(),x=x+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string);continue}for(var X=x;X<I.length&&!(I[X]>=128);X++);this.string=I.slice(x,X).toString(),this._parser.write(this.string),this.emit("data",this.string),x=X-1;}},b.prototype.end=function(I){return I&&I.length&&this._parser.write(I.toString()),this._parser.end(),true},b.prototype.on=function(I,x){var F=this;return !F._parser["on"+I]&&a.indexOf(I)!==-1&&(F._parser["on"+I]=function(){var U=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);U.splice(0,0,I),F.emit.apply(F,U);}),s.prototype.on.call(F,I,x)},b.prototype.destroy=function(){f(this._parser),this.emit("close");};function C(I,x,F){n.INFO&&console.log("-- emit",x,F),I[x]&&I[x](F);}function v(I,x,F){T(I),C(I,x,F);}function T(I,x){I.textNode=P(I.opt,I.textNode),I.textNode!==void 0&&C(I,x||"onvalue",I.textNode),I.textNode=void 0;}function R(I){I.numberNode&&C(I,"onvalue",parseFloat(I.numberNode)),I.numberNode="";}function P(I,x){return x===void 0||(I.trim&&(x=x.trim()),I.normalize&&(x=x.replace(/\s+/g," "))),x}function L(I,x){return T(I),x+=`
Line: `+I.line+`
Column: `+I.column+`
Char: `+I.c,x=new Error(x),I.error=x,C(I,"onerror",x),I}function D(I){return (I.state!==i.VALUE||I.depth!==0)&&L(I,"Unexpected end"),T(I),I.c="",I.closed=true,C(I,"onend"),g.call(I,I.opt),I}function O(I){return I===c.carriageReturn||I===c.lineFeed||I===c.space||I===c.tab}function B(I){var x=this;if(this.error)throw this.error;if(x.closed)return L(x,"Cannot write after close. Assign an onready handler.");if(I===null)return D(x);var F=0,U=I.charCodeAt(0),Ce=x.p;for(n.DEBUG&&console.log("write -> ["+I+"]");U&&(Ce=U,x.c=U=I.charCodeAt(F++),Ce!==U?x.p=Ce:Ce=x.p,!!U);)switch(n.DEBUG&&console.log(F,U,n.STATE[x.state]),x.position++,U===c.lineFeed?(x.line++,x.column=0):x.column++,x.state){case i.BEGIN:U===c.openBrace?x.state=i.OPEN_OBJECT:U===c.openBracket?x.state=i.OPEN_ARRAY:O(U)||L(x,"Non-whitespace before {[.");continue;case i.OPEN_KEY:case i.OPEN_OBJECT:if(O(U))continue;if(x.state===i.OPEN_KEY)x.stack.push(i.CLOSE_KEY);else if(U===c.closeBrace){C(x,"onopenobject"),this.depth++,C(x,"oncloseobject"),this.depth--,x.state=x.stack.pop()||i.VALUE;continue}else x.stack.push(i.CLOSE_OBJECT);U===c.doubleQuote?x.state=i.STRING:L(x,'Malformed object key should start with "');continue;case i.CLOSE_KEY:case i.CLOSE_OBJECT:if(O(U))continue;x.state,i.CLOSE_KEY,U===c.colon?(x.state===i.CLOSE_OBJECT?(x.stack.push(i.CLOSE_OBJECT),T(x,"onopenobject"),this.depth++):T(x,"onkey"),x.state=i.VALUE):U===c.closeBrace?(v(x,"oncloseobject"),this.depth--,x.state=x.stack.pop()||i.VALUE):U===c.comma?(x.state===i.CLOSE_OBJECT&&x.stack.push(i.CLOSE_OBJECT),T(x),x.state=i.OPEN_KEY):L(x,"Bad object");continue;case i.OPEN_ARRAY:case i.VALUE:if(O(U))continue;if(x.state===i.OPEN_ARRAY)if(C(x,"onopenarray"),this.depth++,x.state=i.VALUE,U===c.closeBracket){C(x,"onclosearray"),this.depth--,x.state=x.stack.pop()||i.VALUE;continue}else x.stack.push(i.CLOSE_ARRAY);U===c.doubleQuote?x.state=i.STRING:U===c.openBrace?x.state=i.OPEN_OBJECT:U===c.openBracket?x.state=i.OPEN_ARRAY:U===c.t?x.state=i.TRUE:U===c.f?x.state=i.FALSE:U===c.n?x.state=i.NULL:U===c.minus?x.numberNode+="-":c._0<=U&&U<=c._9?(x.numberNode+=String.fromCharCode(U),x.state=i.NUMBER_DIGIT):L(x,"Bad value");continue;case i.CLOSE_ARRAY:if(U===c.comma)x.stack.push(i.CLOSE_ARRAY),T(x,"onvalue"),x.state=i.VALUE;else if(U===c.closeBracket)v(x,"onclosearray"),this.depth--,x.state=x.stack.pop()||i.VALUE;else {if(O(U))continue;L(x,"Bad array");}continue;case i.STRING:x.textNode===void 0&&(x.textNode="");var X=F-1,re=x.slashed,Z=x.unicodeI;e:for(;;){for(n.DEBUG&&console.log(F,U,n.STATE[x.state],re);Z>0;)if(x.unicodeS+=String.fromCharCode(U),U=I.charCodeAt(F++),x.position++,Z===4?(x.textNode+=String.fromCharCode(parseInt(x.unicodeS,16)),Z=0,X=F-1):Z++,!U)break e;if(U===c.doubleQuote&&!re){x.state=x.stack.pop()||i.VALUE,x.textNode+=I.substring(X,F-1),x.position+=F-1-X;break}if(U===c.backslash&&!re&&(re=true,x.textNode+=I.substring(X,F-1),x.position+=F-1-X,U=I.charCodeAt(F++),x.position++,!U))break;if(re){if(re=false,U===c.n?x.textNode+=`
`:U===c.r?x.textNode+="\r":U===c.t?x.textNode+=" ":U===c.f?x.textNode+="\f":U===c.b?x.textNode+="\b":U===c.u?(Z=1,x.unicodeS=""):x.textNode+=String.fromCharCode(U),U=I.charCodeAt(F++),x.position++,X=F-1,U)continue;break}m.lastIndex=F;var ce=m.exec(I);if(ce===null){F=I.length+1,x.textNode+=I.substring(X,F-1),x.position+=F-1-X;break}if(F=ce.index+1,U=I.charCodeAt(ce.index),!U){x.textNode+=I.substring(X,F-1),x.position+=F-1-X;break}}x.slashed=re,x.unicodeI=Z;continue;case i.TRUE:U===c.r?x.state=i.TRUE2:L(x,"Invalid true started with t"+U);continue;case i.TRUE2:U===c.u?x.state=i.TRUE3:L(x,"Invalid true started with tr"+U);continue;case i.TRUE3:U===c.e?(C(x,"onvalue",true),x.state=x.stack.pop()||i.VALUE):L(x,"Invalid true started with tru"+U);continue;case i.FALSE:U===c.a?x.state=i.FALSE2:L(x,"Invalid false started with f"+U);continue;case i.FALSE2:U===c.l?x.state=i.FALSE3:L(x,"Invalid false started with fa"+U);continue;case i.FALSE3:U===c.s?x.state=i.FALSE4:L(x,"Invalid false started with fal"+U);continue;case i.FALSE4:U===c.e?(C(x,"onvalue",false),x.state=x.stack.pop()||i.VALUE):L(x,"Invalid false started with fals"+U);continue;case i.NULL:U===c.u?x.state=i.NULL2:L(x,"Invalid null started with n"+U);continue;case i.NULL2:U===c.l?x.state=i.NULL3:L(x,"Invalid null started with nu"+U);continue;case i.NULL3:U===c.l?(C(x,"onvalue",null),x.state=x.stack.pop()||i.VALUE):L(x,"Invalid null started with nul"+U);continue;case i.NUMBER_DECIMAL_POINT:U===c.period?(x.numberNode+=".",x.state=i.NUMBER_DIGIT):L(x,"Leading zero not followed by .");continue;case i.NUMBER_DIGIT:c._0<=U&&U<=c._9?x.numberNode+=String.fromCharCode(U):U===c.period?(x.numberNode.indexOf(".")!==-1&&L(x,"Invalid number has two dots"),x.numberNode+="."):U===c.e||U===c.E?((x.numberNode.indexOf("e")!==-1||x.numberNode.indexOf("E")!==-1)&&L(x,"Invalid number has two exponential"),x.numberNode+="e"):U===c.plus||U===c.minus?(Ce===c.e||Ce===c.E||L(x,"Invalid symbol in number"),x.numberNode+=String.fromCharCode(U)):(R(x),F--,x.state=x.stack.pop()||i.VALUE);continue;default:L(x,"Unknown state: "+x.state);}return x.position>=x.bufferCheckPosition&&h(x),x}})(t);});function v0(e){var t=0,n=k0(),r={pullAsync:function(o){return Eo(this,void 0,void 0,function(){var a,i,s;return Er(this,function(l){switch(l.label){case 0:return a=e.slice(t,t+o),t+=o,[4,jg(a,"text")];case 1:return i=l.sent(),s=n.write(i),r.result=s||{},[2,s]}})})},pullSync:function(o){var a=e.slice(t,t+o);t+=o;var i=qg(a,"text"),s=n.write(i);return r.result=s||{},s},done:function(){return n.done()},eof:function(){return t>=e.size},result:{}};return r}function k0(e){var t=b0.parser(),n=0,r,o=[],a,i,s=false,l=false;return t.onopenobject=function(c){var h={};h.incomplete=true,r||(r=h),a&&(o.push([i,a,l]),l?a.push(h):a[i]=h),a=h,i=c,l=false,++n;},t.onkey=function(c){return i=c},t.onvalue=function(c){return l?a.push(c):a[i]=c},t.oncloseobject=function(){var c;delete a.incomplete,i=null,--n===0?s=true:(c=o.pop(),i=c[0],a=c[1],l=c[2]);},t.onopenarray=function(){var c=[];c.incomplete=true,r||(r=c),a&&(o.push([i,a,l]),l?a.push(c):a[i]=c),a=c,l=true,i=null,++n;},t.onclosearray=function(){var c;delete a.incomplete,i=null,--n===0?s=true:(c=o.pop(),i=c[0],a=c[1],l=c[2]);},{write:function(c){return t.write(c),r},done:function(){return s}}}var Gg=1024;function x0(e,t){return Eo(this,void 0,void 0,function(){var n,r,o,a;return Er(this,function(i){switch(i.label){case 0:return t=t||{},n=t.chunkSizeBytes||Gg*1024,[4,Wg(e,n)];case 1:return r=i.sent(),o=r.result.data,a=new An(t.name!==void 0?t.name:o.databaseName),a.version(o.databaseVersion).stores(f0(o)),[4,xd(a,r,t.name!==void 0?cl(cl({},t),{acceptNameDiff:true}):t)];case 2:return i.sent(),[2,a]}})})}function xd(e,t,n){return Eo(this,void 0,void 0,function(){function r(){return Eo(this,void 0,void 0,function(){var b,C,v,T,R;return Er(this,function(P){switch(P.label){case 0:b=function(L){var D,O,B,I,x,F,U,Ce,X,re,Z,ce,he;return Er(this,function(fe){switch(fe.label){case 0:if(c.includes(L.tableName))return [2,"continue"];if(!L.rows)return [2,"break"];if(!L.rows.incomplete&&L.rows.length===0)return [2,"continue"];if(h&&An.ignoreTransaction(function(){return h(f)}),D=L.tableName,O=e.table(D),B=l.tables.filter(function(me){return me.name===D})[0].schema,!O){if(n.acceptMissingTables)return [2,"continue"];throw new Error("Exported table ".concat(L.tableName," is missing in installed database"))}if(!n.acceptChangedPrimaryKey&&B.split(",")[0]!=O.schema.primKey.src)throw new Error("Primary key differs for table ".concat(L.tableName,". "));for(I=L.rows,x=[],F=0;F<I.length&&(U=I[F],!U.incomplete);F++)x.push(br.revive(U));return Ce=n.filter,X=n.transform,re=Ce?L.inbound?x.filter(function(me){return Ce(D,me)}):x.filter(function(me){var z=me[0],ue=me[1];return Ce(D,ue,z)}):x,X&&(re=re.map(L.inbound?function(me){return X(D,me).value}:function(me){var z=me[0],ue=me[1],Ae=X(D,ue,z);return [Ae.key,Ae.value]})),Z=L.inbound?[void 0,re]:[re.map(function(me){return me[0]}),x.map(function(me){return me[1]})],ce=Z[0],he=Z[1],n.overwriteValues?[4,O.bulkPut(he,ce)]:[3,2];case 1:return fe.sent(),[3,4];case 2:return [4,O.bulkAdd(he,ce)];case 3:fe.sent(),fe.label=4;case 4:return f.completedRows+=x.length,x.incomplete||(f.completedTables+=1),I.splice(0,x.length),[2]}})},C=0,v=l.data,P.label=1;case 1:return C<v.length?(T=v[C],[5,b(T)]):[3,4];case 2:if(R=P.sent(),R==="break")return [3,4];P.label=3;case 3:return C++,[3,1];case 4:for(;l.data.length>0&&l.data[0].rows&&!l.data[0].rows.incomplete;)l.data.splice(0,1);return !a.done()&&!a.eof()?s?(a.pullSync(o),[3,7]):[3,5]:[3,8];case 5:return [4,An.waitFor(a.pullAsync(o))];case 6:P.sent(),P.label=7;case 7:return [3,9];case 8:return [3,10];case 9:return [3,0];case 10:return [2]}})})}var o,a,i,s,l,c,h,f,m,g,_;return Er(this,function(b){switch(b.label){case 0:return n=n||{},o=n.chunkSizeBytes||Gg*1024,[4,Wg(t,o)];case 1:if(a=b.sent(),i=a.result,s="FileReaderSync"in self,l=i.data,c=n.skipTables?n.skipTables:[],!n.acceptNameDiff&&e.name!==l.databaseName)throw new Error("Name differs. Current database name is ".concat(e.name," but export is ").concat(l.databaseName));if(!n.acceptVersionDiff&&e.verno!==l.databaseVersion)throw new Error("Database version differs. Current database is in version ".concat(e.verno," but export is ").concat(l.databaseVersion));if(h=n.progressCallback,f={done:false,completedRows:0,completedTables:0,totalRows:l.tables.reduce(function(C,v){return C+v.rowCount},0),totalTables:l.tables.length},h&&An.ignoreTransaction(function(){return h(f)}),!n.clearTablesBeforeImport)return [3,5];m=0,g=e.tables,b.label=2;case 2:return m<g.length?(_=g[m],c.includes(_.name)?[3,4]:[4,_.clear()]):[3,5];case 3:b.sent(),b.label=4;case 4:return m++,[3,2];case 5:return n.noTransaction?[4,r()]:[3,7];case 6:return b.sent(),[3,9];case 7:return [4,e.transaction("rw",e.tables,r)];case 8:b.sent(),b.label=9;case 9:return f.done=true,h&&An.ignoreTransaction(function(){return h(f)}),[2]}})})}function Wg(e,t){return Eo(this,void 0,void 0,function(){var n,r;return Er(this,function(o){switch(o.label){case 0:n="slice"in e?v0(e):e,o.label=1;case 1:return n.eof()?[3,3]:[4,n.pullAsync(t)];case 2:return o.sent(),n.result.data&&n.result.data.data?[3,3]:[3,1];case 3:if(r=n.result,!r||r.formatName!="dexie")throw new Error("Given file is not a dexie export");if(r.formatVersion>_0)throw new Error("Format version ".concat(r.formatVersion," not supported"));if(!r.data)throw new Error("No data in export file");if(!r.data.databaseName)throw new Error("Missing databaseName in export file");if(!r.data.databaseVersion)throw new Error("Missing databaseVersion in export file");if(!r.data.tables)throw new Error("Missing tables in export file");return [2,n]}})})}An.prototype.export=function(e){return Kg(this,e)};An.prototype.import=function(e,t){return xd(this,e,t)};An.import=function(e,t){return x0(e,t)};async function S0(e){Ie.info("Running migration_20250609: Migrating legacy user data format");let t=0;await e.table("users").toCollection().modify(r=>{r.core&&r.avatar||(ms(r),Ie.debug(`Migrated user: ${r.rest_id}`),r.twe_private_fields.migrated_at=Date.now(),t++);});let n=0;await e.table("tweets").toCollection().modify(r=>{var s,l,c,h,f,m;const o=(l=(s=r.core)==null?void 0:s.user_results)==null?void 0:l.result;if(o&&o.core&&o.avatar)return;ms(o),Ie.debug(`Migrated tweet user: ${r.rest_id} `);const a=Va(r);(h=(c=a==null?void 0:a.core)==null?void 0:c.user_results)!=null&&h.result&&(ms(a.core.user_results.result),Ie.debug(`Migrated retweeted user: ${a.rest_id}`));const i=yd(r);(m=(f=i==null?void 0:i.core)==null?void 0:f.user_results)!=null&&m.result&&(ms(i.core.user_results.result),Ie.debug(`Migrated quoted user: ${i.rest_id}`)),r.twe_private_fields.migrated_at=Date.now(),n++;}),Ie.info(`Migration completed: ${t} users and ${n} tweets updated.`);}function ms(e){const t=e;if(!(t!=null&&t.legacy)){Ie.debug("migrateFromLegacyUser",e),Ie.warn(`User ${e==null?void 0:e.rest_id} has no legacy data to migrate.`);return}e.core??(e.core={created_at:t.legacy.created_at,name:t.legacy.name,screen_name:t.legacy.screen_name}),e.avatar??(e.avatar={image_url:t.legacy.profile_image_url_https}),e.verification??(e.verification={verified:t.legacy.verified,verified_type:t.legacy.verified_type}),e.relationship_perspectives??(e.relationship_perspectives={following:t.legacy.following,followed_by:t.legacy.followed_by}),e.dm_permissions??(e.dm_permissions={can_dm:t.legacy.can_dm}),e.privacy??(e.privacy={protected:t.legacy.protected}),e.location??(e.location={location:t.legacy.location});}function C0(e){const t=Array.from(new Set(e.map(a=>a.relation_type))).sort(),n=Array.from(new Set(e.map(a=>a.subject_user_id))).sort(),r=Array.from(new Set(e.map(a=>String(a.subject_screen_name||"").trim()).filter(Boolean))).sort(),o=Math.max(...e.map(a=>Number(a.observed_at)||0),0);return {relation_types:t,subject_user_ids:n,subject_screen_names:r,last_observed_at:o,edge_count:e.length}}function T0(e,t){if(!e.length||!t.length)return e;const n=new Map;for(const r of t){const o=String(r.related_user_id||"").trim();if(!o)continue;const a=n.get(o);a?a.push(r):n.set(o,[r]);}return e.map(r=>{const o=n.get(String(r.rest_id||"").trim());return o!=null&&o.length?{...r,twe_relationship_fields:C0(o)}:r})}const Ac="__twe_perf_events_v1",_h="__twe_perf_summary_v1",M0="twe:perf-event-v1",wh=1e3;let bh=false;function Yg(){return globalThis}function R0(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`perf-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function Xg(){const e=Yg();return Array.isArray(e[Ac])||(e[Ac]=[]),e[Ac]}function Pl(){const e=Yg(),t=e[_h];if(!t||typeof t!="object"){const r={buckets:{},counters:{},workers:{}};return e[_h]=r,r}const n=t;return n.buckets||(n.buckets={}),n.counters||(n.counters={}),n.workers||(n.workers={}),n}function I0(e,t){return `${e}:${t}`}function vh(e,t){var o;if(!e.length)return 0;const n=[...e].sort((a,i)=>a-i),r=Math.min(n.length-1,Math.max(0,Math.ceil(n.length*t)-1));return Number(((o=n[r])==null?void 0:o.toFixed(2))||0)}function E0(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e))if(r!==void 0){if(typeof r=="string"){t[n]=r.length>160?`${r.slice(0,160)}...`:r;continue}t[n]=r;}return t}function Be(e){const t={schema:"twe.perf.event.v1",id:R0(),name:e.name,kind:e.kind,atMs:Date.now(),durationMs:Number.isFinite(e.durationMs)?Number(e.durationMs):void 0,value:Number.isFinite(e.value)?Number(e.value):void 0,tags:E0(e.tags)},n=Xg();n.push(t),n.length>wh&&n.splice(0,n.length-wh);const r=Pl();if(r.counters[`${t.kind}:${t.name}:count`]=(r.counters[`${t.kind}:${t.name}:count`]||0)+1,typeof t.value=="number"&&(r.counters[`${t.kind}:${t.name}:value`]=t.value),typeof t.durationMs=="number"){const o=I0(t.kind,t.name),a=r.buckets[o]||{count:0,totalMs:0,maxMs:0,values:[]};a.count+=1,a.totalMs+=t.durationMs,a.maxMs=Math.max(a.maxMs,t.durationMs),a.values.push(t.durationMs),a.values.length>300&&a.values.splice(0,a.values.length-300),r.buckets[o]=a;}if(typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(M0,{detail:t}));}catch{}return t}function ko(e,t=1){const n=Pl();n.counters[e]=(n.counters[e]||0)+t;}function Da(e,t){const n=Pl();e==="search"?n.workers.searchWorkerAvailable=t:n.workers.exportWorkerAvailable=t,Be({kind:"worker",name:`${e}-availability`,value:t?1:0});}function A0(){const e=[...Xg()],t=Pl(),n={};for(const[r,o]of Object.entries(t.buckets))n[r]={count:o.count,p50Ms:vh(o.values,.5),p95Ms:vh(o.values,.95),maxMs:Number(o.maxMs.toFixed(2)),avgMs:o.count?Number((o.totalMs/o.count).toFixed(2)):0};return {schema:"twe.perf.diagnostics.v1",generatedAtMs:Date.now(),eventsBuffered:e.length,buckets:n,counters:{...t.counters},workers:{...t.workers},recent:e.slice(-100)}}function ze(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function D0(){if(!bh){bh=true;try{const e=globalThis.PerformanceObserver;if(!e)return;const t=e.supportedEntryTypes;if(Array.isArray(t)&&!t.includes("longtask"))return;new e(r=>{for(const o of r.getEntries())Be({kind:"longtask",name:"main-thread-longtask",durationMs:o.duration,tags:{entryType:o.entryType}});}).observe({entryTypes:["longtask"]});}catch{}}}function P0(){try{const e=globalThis.unsafeWindow;if(e&&typeof e=="object")return e}catch{}try{if(typeof window<"u")return window}catch{}return globalThis}const Qg="__twe_db_mutation_v1",F0="twe-db-mutation-v1",Zg=Ha(0),kh=new Map;let xh=false,ki=null;function Jg(e){let t=kh.get(e);return t||(t=Ha(0),kh.set(e,t)),t}function ey(e){if(e){Jg(e).value+=1;return}Zg.value+=1;}function O0(e){if(!e||typeof e!="object")return null;const t=e;return {extension:typeof t.extension=="string"?t.extension:void 0,operation:typeof t.operation=="string"?t.operation:void 0}}function Sh(e){const t=O0(e);t&&ey(t==null?void 0:t.extension);}function ty(){if(!(xh||typeof window>"u")&&(xh=true,window.addEventListener("storage",e=>{if(!(e.key!==Qg||!e.newValue))try{const t=JSON.parse(e.newValue);Sh(t);}catch{}}),typeof BroadcastChannel<"u"))try{ki=new BroadcastChannel(F0),ki.onmessage=e=>{Sh(e.data);};}catch{ki=null;}}function In(e={}){ty();const t={extension:e.extension,operation:e.operation,at:Date.now(),nonce:Math.random().toString(36).slice(2)};if(ey(t.extension),ki)try{ki.postMessage(t);}catch{}try{typeof localStorage<"u"&&localStorage.setItem(Qg,JSON.stringify(t));}catch{}Mb({ts:t.at||Date.now(),extension:e.extension,operation:e.operation,count:typeof e.count=="number"?e.count:void 0,keys:Array.isArray(e.keys)?e.keys.slice(0,20):void 0});}function co(e){ty();const t=Zg.value;return e?t+Jg(e).value:t}const Ch="twitter-web-exporter",L0=10,gs="__twe_capture_counts_v1",ys="__twe_capture_counts_v2",Dc="__twe_active_db_name_v1",ga="__twe_capture_index_revisions_v1",ya="__twe_folder_source_index_revisions_v1",Th="twe:capture-count-updated-v1",Pc=500,Jn=256,jo=256,N0=1e3,B0=1500,yo=0,$r=Number.MAX_SAFE_INTEGER,_o="",wo="",U0=["__bookmark_folder_id","__bookmark_folder_name","__bookmark_folder_name_source","__bookmark_folder_url"];function Fc(e,t){if(e.length<=t)return [e];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function nn(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function _n(e){return typeof e=="string"?e.trim():typeof e=="number"&&Number.isFinite(e)?String(e):""}function _a(e){return e===_t.USER?"user":e===_t.TWEET?"tweet":""}function Mh(e){if(e)return {createdAt:Number(e.created_at)||0,captureId:e.id}}function bo(e){if(e)return {observedAtMs:Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,documentId:e.id}}function $0(e){return e.folder_id&&e.folder_name?"api-name":e.folder_id?"id-only":"none"}function _s(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Math.abs(t).toString(36)}function wa(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].join(" ")}function H0(e,t){if(!e||typeof e!="object")return t;const n={...t},r=e;for(const o of U0){const a=r[o],i=t[o];if(i===void 0&&a!==void 0){n[o]=a;continue}if(i===null&&a!==void 0&&a!==null){n[o]=a;continue}if(o==="__bookmark_folder_name_source"){const s=String(i||""),l=String(a||"");s==="id-only"&&l==="api"&&(n[o]=l);}}return n}class j0{constructor(){Ve(this,"db");Ve(this,"ready");Ve(this,"writeQueue",Promise.resolve());Ve(this,"captureIndexBuilds",new Map);Ve(this,"captureIndexRevisionFallback",new Map);var r;let t="unknown";try{t=((r=P0().__META_DATA__)==null?void 0:r.userId)??"unknown";}catch{t="unknown";}const n=ut.get("dedicatedDbForAccounts")?`_${t}`:"";Ie.debug(`Using database: ${Ch}${n} for userId: ${t}`),this.db=new An(`${Ch}${n}`),this.publishActiveDatabaseName(),this.ready=this.init();}async whenReady(){await this.ready;}enqueueWrite(t,n){const r=this.writeQueue.then(n,n);return this.writeQueue=r.then(()=>{},()=>{}),r.catch(o=>{throw this.logError(o,t),o})}tweets(){return this.db.table("tweets")}users(){return this.db.table("users")}captures(){return this.db.table("captures")}captureIndexPages(){return this.db.table("capture_index_pages")}folderSourceIndexPages(){return this.db.table("folder_source_index_pages")}socialEdges(){return this.db.table("social_edges")}importedBundles(){return this.db.table("imported_bundles")}importedBundleCollections(){return this.db.table("imported_bundle_collections")}importedBundleItems(){return this.db.table("imported_bundle_items")}importedEntitySnapshots(){return this.db.table("imported_entity_snapshots")}importedBundleImportReports(){return this.db.table("imported_bundle_import_reports")}searchDocuments(){return this.db.table("search_documents")}normalizeFolderSourceIds(t){return [...new Set(t.map(n=>String(n||"").trim()).filter(Boolean))].sort()}folderSourceIndexRevisionId(t){return [this.db.name,t].join("|")}folderSourceHash(t){return _s(t)}folderSourceIndexPageId(t){return [this.folderSourceHash(t.sourceKey),Math.max(0,Math.floor(t.sourceCount)),Math.max(0,Math.floor(t.sourceRevision)),Math.max(0,Math.floor(t.pageStart))].join("|")}readFolderSourceIndexRevisionMap(){const t=r=>{if(!r||typeof r!="object")return null;const o=r[ya];if(!o||typeof o!="object")return null;const a={};for(const[i,s]of Object.entries(o)){const l=Number(s);Number.isFinite(l)&&l>=0&&(a[i]=Math.floor(l));}return a};let n={};try{n={...n,...t(globalThis)??{}};}catch{}try{typeof window<"u"&&(n={...n,...t(window)??{}});}catch{}try{if(typeof localStorage<"u"){const r=localStorage.getItem(ya);r&&(n={...n,...t({[ya]:JSON.parse(r)})??{}});}}catch{}return n}writeFolderSourceIndexRevisionMap(t){try{const n={};for(const[r,o]of Object.entries(t)){const a=Number(o);Number.isFinite(a)&&a>=0&&(n[r]=Math.floor(a));}globalThis[ya]=n,typeof window<"u"&&(window[ya]=n),typeof localStorage<"u"&&localStorage.setItem(ya,JSON.stringify(n));}catch{}}bumpFolderSourceIndexRevision(t){const n=this.folderSourceIndexRevisionId(t),r=this.readFolderSourceIndexRevisionMap(),o=Math.max(0,Math.floor(Number(r[n])||0))+1;return r[n]=o,this.writeFolderSourceIndexRevisionMap(r),o}readFolderSourceIndexRevision(t){const n=this.folderSourceIndexRevisionId(t),r=this.readFolderSourceIndexRevisionMap();return Math.max(0,Math.floor(Number(r[n])||0))}async deleteFolderSourceIndexPages(t){if(!t){await this.folderSourceIndexPages().clear().catch(n=>this.logError(n,"deleteFolderSourceIndexPages:clear"));return}await this.folderSourceIndexPages().where("extension_name").equals(t).delete().catch(n=>this.logError(n,"deleteFolderSourceIndexPages:extension"));}async invalidateFolderSourceIndexPages(t){if(t){this.bumpFolderSourceIndexRevision(t),await this.deleteFolderSourceIndexPages(t);return}const n=this.readFolderSourceIndexRevisionMap(),r=`${this.db.name}|`;for(const o of Object.keys(n).filter(a=>a.startsWith(r)))n[o]=Math.max(0,Math.floor(Number(n[o])||0))+1;this.writeFolderSourceIndexRevisionMap(n),await this.deleteFolderSourceIndexPages();}searchDocumentExtensionNames(t){return [...new Set(t.map(n=>String(n.extension_name||"").trim()).filter(Boolean))]}async invalidateFolderSourceIndexPagesForExtensions(t){const n=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(n.length)for(const r of n)await this.invalidateFolderSourceIndexPages(r);}async extPutFolderSourceIndexPages(t){const n=this.normalizeFolderSourceIds(t.folderIds),r=n.join(`
`),o=Math.max(0,Math.floor(Number(t.sourceCount)||0)),a=Math.max(0,Math.floor(Number(t.sourceRevision)||0)),i=Date.now(),s=t.pages.map(l=>{const c=Math.max(0,Math.floor(Number(l.pageStart)||0));return {id:this.folderSourceIndexPageId({sourceKey:t.sourceKey,sourceCount:o,sourceRevision:a,pageStart:c}),source_hash:this.folderSourceHash(t.sourceKey),source_key:t.sourceKey,extension_name:t.extensionName,entity_type:t.entityType,folder_ids_key:r,source_count:o,source_revision:a,page_start:c,page_size:jo,row_ids:this.normalizeDataKeys(l.rowIds),cursor_after:l.cursorAfter,built_at_ms:i}});await this.enqueueWrite("extPutFolderSourceIndexPages",async()=>{await this.db.transaction("rw",this.folderSourceIndexPages(),async()=>{await this.folderSourceIndexPages().where("source_hash").equals(this.folderSourceHash(t.sourceKey)).filter(l=>l.source_key===t.sourceKey).delete(),s.length&&await this.bulkPutInChunks(this.folderSourceIndexPages(),s);});}),Be({kind:"db",name:"folder-source-index-pages-put",value:s.length,tags:{extName:t.extensionName,entityType:t.entityType,folderCount:n.length,sourceCount:o,sourceRevision:a}});}async extGetFolderSourceIndexedPage(t){var R;const n=ze(),r=Math.max(0,Math.floor(Number(t.sourceCount)||0));if(!r)return null;const o=Math.max(0,Math.floor(Number(t.offset)||0)),a=Math.max(1,Math.min(1e3,Number(t.limit)||100)),i=this.readFolderSourceIndexRevision(t.extensionName),s=Math.floor(o/jo)*jo,l=Math.max(o,o+a-1),c=Math.floor(l/jo)*jo,h=[];for(let P=s;P<=c;P+=jo)h.push(P);const f=h.map(P=>this.folderSourceIndexPageId({sourceKey:t.sourceKey,sourceCount:r,sourceRevision:i,pageStart:P})),m=await this.folderSourceIndexPages().bulkGet(f).catch(this.logError);if(!m||m.some(P=>!P))return Be({kind:"db",name:"folder-source-index-page-miss",durationMs:ze()-n,value:0,tags:{extName:t.extensionName,entityType:t.entityType,offset:o,limit:a,sourceCount:r,sourceRevision:i}}),null;const g=this.normalizeFolderSourceIds(t.folderIds).join(`
`),_=m;if(_.some(P=>P.source_key!==t.sourceKey||P.extension_name!==t.extensionName||P.entity_type!==t.entityType||P.folder_ids_key!==g||P.source_count!==r||P.source_revision!==i||P.page_size!==jo))return Be({kind:"db",name:"folder-source-index-page-stale",durationMs:ze()-n,value:0,tags:{extName:t.extensionName,entityType:t.entityType,offset:o,limit:a,sourceCount:r,sourceRevision:i}}),null;const b=_.sort((P,L)=>P.page_start-L.page_start),C=b.flatMap(P=>P.row_ids),v=o-s,T=C.slice(v,v+a);return Be({kind:"db",name:"folder-source-index-page",durationMs:ze()-n,value:T.length,tags:{extName:t.extensionName,entityType:t.entityType,folderCount:t.folderIds.length,offset:o,limit:a,sourceCount:r,sourceRevision:i,pages:f.length}}),{rowIds:T,cursorAfter:v+T.length===C.length?(R=b[b.length-1])==null?void 0:R.cursor_after:void 0}}async extGetCaptures(t){return this.captures().where("extension").equals(t).toArray().catch(this.logError)}async extGetCaptureCount(t,n){const r=ze(),o=await(n?this.captures().where("[extension+type]").equals([t,n]).count().catch(this.logError):this.captures().where("extension").equals(t).count().catch(this.logError))??0;return Be({kind:"db",name:"capture-count",durationMs:ze()-r,value:o,tags:{extName:t,type:n}}),o}async extGetCaptureDataKeys(t){const n=await this.extGetCaptures(t);return n?this.normalizeDataKeys(n.map(r=>r.data_key)):[]}async extGetCapturePage(t,n={}){const r=ze(),o=Math.max(0,Number(n.offset)||0),a=Math.max(1,Math.min(1e3,Number(n.limit)||100));let i=n.type?this.captures().where("[extension+type+created_at]").between([t,n.type,An.minKey],[t,n.type,An.maxKey]):this.captures().where("extension").equals(t);n.order!=="oldest"&&(i=i.reverse());let s=await i.offset(o).limit(a).toArray().catch(this.logError);s||(s=[]),n.type&&!s.every(c=>c.type===n.type)&&(s=s.filter(c=>c.type===n.type));const l=s.slice(0,a);return Be({kind:"db",name:"capture-page",durationMs:ze()-r,value:l.length,tags:{extName:t,type:n.type,offset:o,limit:a}}),l}async extGetCaptureIdsPage(t,n={}){const r=await this.extGetCapturePage(t,n);return this.normalizeDataKeys(r.map(o=>o.data_key))}captureIndexPageId(t){return [t.extName,t.type,t.order,Math.max(0,Math.floor(t.sourceCount)),Math.max(0,Math.floor(t.pageStart))].join("|")}captureIndexRevisionId(t,n){return [this.db.name,t,n].join("|")}readCaptureIndexRevisionMap(){const t=r=>{if(!r||typeof r!="object")return null;const o=r[ga];if(!o||typeof o!="object")return null;const a={};for(const[i,s]of Object.entries(o)){const l=Number(s);Number.isFinite(l)&&l>=0&&(a[i]=Math.floor(l));}return a};let n={};try{n={...n,...t(globalThis)??{}};}catch{}try{typeof window<"u"&&(n={...n,...t(window)??{}});}catch{}try{if(typeof localStorage<"u"){const r=localStorage.getItem(ga);r&&(n={...n,...t({[ga]:JSON.parse(r)})??{}});}}catch{}for(const[r,o]of this.captureIndexRevisionFallback)n[r]=Math.max(Number(n[r])||0,o);return n}writeCaptureIndexRevisionMap(t){try{const n={};for(const[r,o]of Object.entries(t)){const a=Number(o);Number.isFinite(a)&&a>=0&&(n[r]=Math.floor(a),this.captureIndexRevisionFallback.set(r,Math.floor(a)));}globalThis[ga]=n,typeof window<"u"&&(window[ga]=n),typeof localStorage<"u"&&localStorage.setItem(ga,JSON.stringify(n));}catch{}}readCaptureIndexRevision(t,n){const r=this.captureIndexRevisionId(t,n),o=this.readCaptureIndexRevisionMap(),a=Math.max(0,Math.floor(Number(o[r])||0));return this.captureIndexRevisionFallback.has(r)||this.captureIndexRevisionFallback.set(r,a),a}bumpCaptureIndexRevision(t,n){const r=this.captureIndexRevisionId(t,n),o=this.readCaptureIndexRevisionMap(),a=Math.max(0,Math.floor(Number(o[r])||0))+1;return o[r]=a,this.writeCaptureIndexRevisionMap(o),a}bumpAllCaptureIndexRevisions(){const t=this.readCaptureIndexRevisionMap(),n=`${this.db.name}|`;for(const r of new Set([...Object.keys(t).filter(o=>o.startsWith(n)),...[...this.captureIndexRevisionFallback.keys()].filter(o=>o.startsWith(n))]))t[r]=Math.max(0,Math.floor(Number(t[r])||0))+1;this.writeCaptureIndexRevisionMap(t);}async deleteCaptureIndexPagesForScope(t,n,r){await this.captureIndexPages().where("extension").equals(t).filter(o=>!(n&&o.type!==n||r&&o.order!==r)).delete().catch(o=>this.logError(o,"deleteCaptureIndexPagesForScope"));}async invalidateCaptureIndexPages(t,n,r={}){if(!t)return;const o=r.deletePages??true;if(n){this.bumpCaptureIndexRevision(t,n),o&&await this.deleteCaptureIndexPagesForScope(t,n);return}const a=await this.captureIndexPages().where("extension").equals(t).toArray().catch(this.logError)??[],i=new Set(a.map(s=>String(s.type||"")).filter(Boolean));if(!i.size){const s=`${this.db.name}|${t}|`;for(const l of Object.keys(this.readCaptureIndexRevisionMap()))if(l.startsWith(s)){const c=l.slice(s.length);c&&i.add(c);}}for(const s of i)this.bumpCaptureIndexRevision(t,s);o&&await this.deleteCaptureIndexPagesForScope(t);}async invalidateCaptureIndexPagesForRows(t){const n=new Map;for(const r of t){const o=String((r==null?void 0:r.extension)||"").trim(),a=String((r==null?void 0:r.type)||"").trim();if(!o||!a)continue;const i=n.get(o)??new Set;i.add(a),n.set(o,i);}for(const[r,o]of n)for(const a of o)await this.invalidateCaptureIndexPages(r,a);}async extPutCaptureIndexPagesFromOrderedCaptures(t,n,r,o,a="newest"){if(!r.length)return;const i=Math.max(0,Math.floor(Number(o)||0)),s=ze(),l=Date.now(),c=this.readCaptureIndexRevision(t,n),h=[];for(let f=0;f<r.length;f+=Jn){const m=r.slice(f,f+Jn);h.push({id:this.captureIndexPageId({extName:t,type:n,order:a,sourceCount:i,pageStart:f}),extension:t,type:n,order:a,source_count:i,source_revision:c,page_start:f,page_size:Jn,data_keys:this.normalizeDataKeys(m.map(g=>g.data_key)),built_at_ms:l});}await this.enqueueWrite("extPutCaptureIndexPagesFromOrderedCaptures",async()=>{await this.db.transaction("rw",this.captureIndexPages(),async()=>{await this.deleteCaptureIndexPagesForScope(t,n,a),await this.bulkPutInChunks(this.captureIndexPages(),h);});}),Be({kind:"db",name:"capture-index-pages-put",durationMs:ze()-s,value:h.length,tags:{extName:t,type:n,order:a,sourceCount:i,sourceRevision:c}});}scheduleCaptureIndexPageBuild(t,n){const r=Math.max(0,Math.floor(Number(n.sourceCount)||0));if(r<N0)return;const o=n.order??"newest",a=[this.db.name,t,n.type,o,r].join("|");if(this.captureIndexBuilds.has(a))return;const i=new Promise((s,l)=>{globalThis.setTimeout(()=>{this.extBuildCaptureIndexPages(t,{type:n.type,order:o,sourceCount:r}).then(s,l);},B0);}).finally(()=>{this.captureIndexBuilds.delete(a);});this.captureIndexBuilds.set(a,i),i.catch(s=>{this.logError(s,"scheduleCaptureIndexPageBuild");});}async extBuildCaptureIndexPages(t,n){const r=ze(),o=n.order??"newest",a=typeof n.sourceCount=="number"&&Number.isFinite(n.sourceCount)?Math.max(0,Math.floor(n.sourceCount)):Math.max(0,Math.floor(Number(await this.extGetCaptureCount(t,n.type))||0));if(!a)return false;const i=this.readCaptureIndexRevision(t,n.type),s=Date.now(),l=[];let c=0,h,f=[];for(;;){const _=await this.extGetCaptureCursorPage(t,{type:n.type,after:h,limit:1e3,order:o});for(f.push(...this.normalizeDataKeys(_.captures.map(b=>b.data_key)));f.length>=Jn;){const b=f.slice(0,Jn);f=f.slice(Jn),l.push({id:this.captureIndexPageId({extName:t,type:n.type,order:o,sourceCount:a,pageStart:c}),extension:t,type:n.type,order:o,source_count:a,source_revision:i,page_start:c,page_size:Jn,data_keys:b,built_at_ms:s}),c+=Jn;}if(!_.hasAfter||!_.cursorAfter||!_.captures.length)break;h=_.cursorAfter;}f.length&&l.push({id:this.captureIndexPageId({extName:t,type:n.type,order:o,sourceCount:a,pageStart:c}),extension:t,type:n.type,order:o,source_count:a,source_revision:i,page_start:c,page_size:Jn,data_keys:f,built_at_ms:s});const m=Math.max(0,Math.floor(Number(await this.extGetCaptureCount(t,n.type))||0)),g=this.readCaptureIndexRevision(t,n.type);return m!==a||g!==i?(Be({kind:"db",name:"capture-index-build-stale",durationMs:ze()-r,value:l.length,tags:{extName:t,type:n.type,order:o,expectedCount:a,currentCount:m,sourceRevision:i,currentRevision:g}}),false):(await this.enqueueWrite("extBuildCaptureIndexPages",async()=>{this.readCaptureIndexRevision(t,n.type)===i&&await this.db.transaction("rw",this.captureIndexPages(),async()=>{await this.deleteCaptureIndexPagesForScope(t,n.type,o),await this.bulkPutInChunks(this.captureIndexPages(),l);});}),Be({kind:"db",name:"capture-index-build",durationMs:ze()-r,value:l.length,tags:{extName:t,type:n.type,order:o,sourceCount:a,sourceRevision:i}}),true)}async extGetCaptureIdsIndexedPage(t,n){const r=ze(),o=Math.max(0,Math.floor(Number(n.sourceCount)||0));if(!o)return null;const a=Math.max(0,Math.floor(Number(n.offset)||0)),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=n.order??"newest",l=Math.floor(a/Jn)*Jn,c=Math.max(a,a+i-1),h=Math.floor(c/Jn)*Jn,f=[];for(let R=l;R<=h;R+=Jn)f.push(R);const m=f.map(R=>this.captureIndexPageId({extName:t,type:n.type,order:s,sourceCount:o,pageStart:R})),g=await this.captureIndexPages().bulkGet(m).catch(this.logError);if(!g||g.some(R=>!R))return this.scheduleCaptureIndexPageBuild(t,{type:n.type,order:s,sourceCount:o}),Be({kind:"db",name:"capture-index-page-miss",durationMs:ze()-r,value:0,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o}}),null;const _=this.readCaptureIndexRevision(t,n.type),b=g;if(b.some(R=>R.source_revision!==_||R.source_count!==o||R.page_size!==Jn))return this.scheduleCaptureIndexPageBuild(t,{type:n.type,order:s,sourceCount:o}),Be({kind:"db",name:"capture-index-page-stale",durationMs:ze()-r,value:0,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o,sourceRevision:_}}),null;const C=b.sort((R,P)=>R.page_start-P.page_start).flatMap(R=>R.data_keys),v=a-l,T=C.slice(v,v+i);return Be({kind:"db",name:"capture-index-page",durationMs:ze()-r,value:T.length,tags:{extName:t,type:n.type,offset:a,limit:i,order:s,sourceCount:o,sourceRevision:_,pages:m.length}}),T}async extGetCaptureCursorPage(t,n){const r=ze(),o=Math.max(1,Math.min(1e3,Number(n.limit)||100)),a=n.order??"newest",i=[t,n.type,yo,_o],s=[t,n.type,$r,wo];let l=i,c=s,h=true,f=true;const m=n.after??n.before;if(m){const T=[t,n.type,m.createdAt,m.captureId];n.before?a==="newest"?(l=T,h=false):(c=T,f=false):a==="newest"?(c=T,f=false):(l=T,h=false);}let g=this.captures().where("[extension+type+created_at+id]").between(l,c,h,f);a==="newest"&&(g=g.reverse());const _=await g.limit(o+1).toArray().catch(this.logError)??[],b=_.slice(0,o),C=_.length>o,v={captures:b,cursorBefore:Mh(b[0]),cursorAfter:Mh(b[b.length-1]),hasBefore:!!(n.after||n.before),hasAfter:C};return Be({kind:"db",name:"capture-cursor-page",durationMs:ze()-r,value:b.length,tags:{extName:t,type:n.type,limit:o,order:a,hasAfter:v.hasAfter,cursorCreatedAt:m==null?void 0:m.createdAt}}),v}async extGetCaptureIdsCursorPage(t,n){const r=await this.extGetCaptureCursorPage(t,n);return {...r,ids:this.normalizeDataKeys(r.captures.map(o=>o.data_key))}}async extGetTweetsByIds(t){const n=ze(),r=this.normalizeDataKeys(t);return r.length?this.tweets().bulkGet(r).then(o=>{const a=o.filter(i=>!!i&&this.filterEmptyData(i));return Be({kind:"db",name:"tweets-by-ids",durationMs:ze()-n,value:a.length,tags:{requested:r.length}}),a}).catch(this.logError):[]}async extGetUsersByIds(t){const n=ze(),r=this.normalizeDataKeys(t);return r.length?this.users().bulkGet(r).then(o=>{const a=o.filter(i=>!!i&&this.filterEmptyData(i));return Be({kind:"db",name:"users-by-ids",durationMs:ze()-n,value:a.length,tags:{requested:r.length}}),a}).catch(this.logError):[]}async extGetCapturedTweets(t,n){const r=n??await this.extGetCaptures(t);return r?this.extGetTweetsByIds(r.map(o=>o.data_key)):[]}async extGetCapturedUsers(t,n){const r=n??await this.extGetCaptures(t);if(!r)return [];const o=await this.extGetUsersByIds(r.map(a=>a.data_key))??[];return this.enrichUsersWithRelationshipContext(t,o)}async extGetSocialEdges(t){return this.socialEdges().where("extension").equals(t).toArray().catch(this.logError)}async extGetSearchDocuments(t,n){const r=ze(),o=_a(n),i=(n&&o?await this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]).toArray().catch(this.logError):await this.searchDocuments().where("extension_name").equals(t).toArray().catch(this.logError))??[];return Be({kind:"db",name:"search-documents",durationMs:ze()-r,value:i.length,tags:{extName:t,type:n}}),i}async extGetSearchDocumentPage(t,n={}){const r=ze(),o=n.entityType??_a(n.type),a=Math.max(0,Math.floor(Number(n.offset)||0)),i=Math.max(1,Math.min(5e3,Number(n.limit)||1e3)),l=await(o?this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]):this.searchDocuments().where("extension_name").equals(t)).offset(a).limit(i+1).toArray().catch(this.logError)??[],c=l.slice(0,i),h={documents:c,cursorBefore:bo(c[0]),cursorAfter:bo(c[c.length-1]),hasBefore:a>0,hasAfter:l.length>i};return Be({kind:"db",name:"search-document-page",durationMs:ze()-r,value:c.length,tags:{extName:t,type:n.type,entityType:o,offset:a,limit:i,hasAfter:h.hasAfter}}),h}async extGetSearchDocumentCount(t,n={}){const r=ze(),o=n.entityType??_a(n.type),a=String(n.folderId||"").trim(),i=String(n.sourceKey||"").trim();let s=0;return o&&a&&!i?s=await this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between([t,o,a,yo,_o],[t,o,a,$r,wo],true,true).count().catch(this.logError)??0:i&&o?s=await this.searchDocuments().where("[source_key+entity_type]").equals([i,o]).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0:o?s=await this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0:s=await this.searchDocuments().where("extension_name").equals(t).filter(l=>!a||l.folder_id===a).count().catch(this.logError)??0,Be({kind:"db",name:"search-document-count",durationMs:ze()-r,value:s,tags:{extName:t,type:n.type,entityType:o,folderId:a,sourceKey:i}}),s}async extGetSearchDocumentFolderFacets(t,n={}){const r=ze(),o=n.entityType??_a(n.type),a={"api-name":0,"id-only":0,none:0},i=new Map;let s=0;await(o?this.searchDocuments().where("[extension_name+entity_type]").equals([t,o]):this.searchDocuments().where("extension_name").equals(t)).each(h=>{s+=1;const f=$0(h);a[f]+=1;const m=String(h.folder_id||"").trim();if(!m)return;const g=String(h.folder_name||"").trim(),_=i.get(m);if(_){_.count+=1,g&&_.status!=="api-name"&&(_.label=g,_.status="api-name");return}i.set(m,{folderId:m,label:g||`Folder ${m}`,count:1,status:f});}).catch(this.logError);const c=[...i.values()].sort((h,f)=>f.count!==h.count?f.count-h.count:h.label.localeCompare(f.label));return Be({kind:"db",name:"search-document-folder-facets",durationMs:ze()-r,value:c.length,tags:{extName:t,type:n.type,entityType:o,totalDocuments:s}}),{totalDocuments:s,statusCounts:a,facets:c}}async extGetSearchDocumentFolderCursorPage(t,n){const r=ze(),o=n.entityType??_a(n.type),a=String(n.folderId||"").trim(),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=n.order??"newest";if(!o||!a)return {documents:[],hasBefore:false,hasAfter:false};const l=[t,o,a,yo,_o],c=[t,o,a,$r,wo];let h=l,f=c,m=true,g=true;const _=n.after??n.before;if(_){const R=[t,o,a,_.observedAtMs,_.documentId];n.before?s==="newest"?(h=R,m=false):(f=R,g=false):s==="newest"?(f=R,g=false):(h=R,m=false);}let b=this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between(h,f,m,g);s==="newest"&&(b=b.reverse());const C=await b.limit(i+1).toArray().catch(this.logError)??[],v=C.slice(0,i),T={documents:v,cursorBefore:bo(v[0]),cursorAfter:bo(v[v.length-1]),hasBefore:!!(n.after||n.before),hasAfter:C.length>i};return Be({kind:"db",name:"search-document-folder-cursor-page",durationMs:ze()-r,value:v.length,tags:{extName:t,type:n.type,entityType:o,folderId:a,limit:i,order:s,hasAfter:T.hasAfter}}),T}async extGetSearchDocumentFolderPage(t,n){const r=ze(),o=n.entityType??_a(n.type),a=String(n.folderId||"").trim(),i=Math.max(0,Math.floor(Number(n.offset)||0)),s=Math.max(1,Math.min(1e3,Number(n.limit)||100)),l=n.order??"newest";if(!o||!a)return {documents:[],hasBefore:false,hasAfter:false};const c=[t,o,a,yo,_o],h=[t,o,a,$r,wo];let f=this.searchDocuments().where("[extension_name+entity_type+folder_id+observed_at_ms+id]").between(c,h,true,true);l==="newest"&&(f=f.reverse());const m=await f.offset(i).limit(s+1).toArray().catch(this.logError)??[],g=m.slice(0,s),_={documents:g,cursorBefore:bo(g[0]),cursorAfter:bo(g[g.length-1]),hasBefore:i>0,hasAfter:m.length>s};return Be({kind:"db",name:"search-document-folder-page",durationMs:ze()-r,value:g.length,tags:{extName:t,type:n.type,entityType:o,folderId:a,offset:i,limit:s,order:l,hasAfter:_.hasAfter}}),_}searchDocumentHasMedia(t){var n,r;return !!((n=t.flags_json)!=null&&n.has_media||Number(((r=t.numeric_json)==null?void 0:r.media_count)||0)>0||Number(t.media_flag||0)>0)}async getSearchDocumentMediaScanRows(t,n,r,o){const a=await this.searchDocuments().where("[extension_name+entity_type]").equals([t,n]).filter(i=>r.size&&!r.has(String(i.folder_id||"").trim())?false:this.searchDocumentHasMedia(i)).toArray().catch(this.logError)??[];return a.sort((i,s)=>{const l=Number(i.observed_at_ms||0),c=Number(s.observed_at_ms||0);return l!==c?o==="newest"?c-l:l-c:o==="newest"?String(s.id).localeCompare(String(i.id)):String(i.id).localeCompare(String(s.id))}),a}async repairSearchDocumentMediaIndexes(t){const n=t.filter(r=>{var o,a;return this.searchDocumentHasMedia(r)&&(Number(r.media_flag||0)!==1||Number(((o=r.numeric_json)==null?void 0:o.media_count)||0)<=0||((a=r.flags_json)==null?void 0:a.has_media)!==true)}).map(r=>{var o;return {...r,media_flag:1,flags_json:{...r.flags_json??{},has_media:true},numeric_json:{...r.numeric_json??{},media_count:Math.max(1,Number(((o=r.numeric_json)==null?void 0:o.media_count)||0))}}});n.length&&await this.upsertSearchDocuments(n);}async extGetSearchDocumentMediaCount(t,n={}){const r=ze(),o=n.entityType??"tweet",a=new Set((n.folderIds??[]).map(g=>g.trim()).filter(Boolean)),i=await this.searchDocuments().where("[extension_name+entity_type+media_flag+observed_at_ms+id]").between([t,o,1,yo,_o],[t,o,1,$r,wo],true,true).filter(g=>!a.size||a.has(String(g.folder_id||"").trim())).count().catch(this.logError)??0,s=await this.searchDocuments().where("[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]").between([t,o,1,yo,_o],[t,o,$r,$r,wo],true,true).filter(g=>!a.size||a.has(String(g.folder_id||"").trim())).count().catch(this.logError)??0,l=await this.getSearchDocumentMediaScanRows(t,o,a,"newest"),c=l.length,h=Math.max(i,s);c>h&&await this.repairSearchDocumentMediaIndexes(l);const f=c>h?"legacy_flags_scan":i?"media_flag":s?"numeric_json":"none",m=Math.max(h,c);return Be({kind:"db",name:"search-document-media-count",durationMs:ze()-r,value:m,tags:{extName:t,entityType:o,folderIds:[...a].join(","),fallbackMode:f}}),m}async extGetSearchDocumentMediaCursorPage(t,n={}){const r=ze(),o=n.entityType??"tweet",a=new Set((n.folderIds??[]).map(D=>D.trim()).filter(Boolean)),i=Math.max(1,Math.min(1e3,Number(n.limit)||100)),s=Math.max(0,Math.floor(Number(n.offset)||0)),l=n.order??"newest",c=[t,o,1,yo,_o],h=[t,o,1,$r,wo];let f=c,m=h,g=true,_=true;const b=n.after??n.before;if(b){const D=[t,o,1,b.observedAtMs,b.documentId];n.before?l==="newest"?(f=D,g=false):(m=D,_=false):l==="newest"?(m=D,_=false):(f=D,g=false);}let C=this.searchDocuments().where("[extension_name+entity_type+media_flag+observed_at_ms+id]").between(f,m,g,_).filter(D=>!a.size||a.has(String(D.folder_id||"").trim()));l==="newest"&&(C=C.reverse());let v=false,T=await C.offset(b?0:s).limit(i+1).toArray().catch(this.logError)??[];if(!T.length&&!b){v=true;const D=[t,o,1,yo,_o],O=[t,o,$r,$r,wo];let B=this.searchDocuments().where("[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]").between(D,O,true,true).filter(I=>!a.size||a.has(String(I.folder_id||"").trim()));l==="newest"&&(B=B.reverse()),T=await B.offset(s).limit(i+1).toArray().catch(this.logError)??[];}const R=v?"numeric_json":"media_flag",P=T.slice(0,i),L={documents:P,cursorBefore:bo(P[0]),cursorAfter:bo(P[P.length-1]),hasBefore:!!(n.after||n.before||s>0),hasAfter:T.length>i};return Be({kind:"db",name:"search-document-media-cursor-page",durationMs:ze()-r,value:P.length,tags:{extName:t,entityType:o,folderIds:[...a].join(","),offset:b?0:s,limit:i,order:l,hasAfter:L.hasAfter,fallback:v,fallbackMode:R}}),L}async searchDocumentsForSource(t,n){const r=await this.searchDocuments().where("source_key").equals(t).toArray().catch(this.logError);return r?n?r.filter(o=>o.entity_type===n):r:[]}async bundleList(){return this.importedBundles().orderBy("updatedAt").reverse().toArray().catch(this.logError)}async bundleGet(t){return this.importedBundles().get(t).catch(this.logError)}async bundleGetCollections(t){return this.importedBundleCollections().where("bundle_id").equals(t).toArray().catch(this.logError)}async bundleGetItems(t,n=5e3){return this.importedBundleItems().where("bundle_id").equals(t).limit(n).toArray().catch(this.logError)}async bundleGetSnapshots(t,n=5e3){return this.importedEntitySnapshots().where("bundle_id").equals(t).limit(n).toArray().catch(this.logError)}async bundleGetSnapshotCount(t,n){return n?this.importedEntitySnapshots().where("[bundle_id+kind]").equals([t,n]).count().catch(this.logError):this.importedEntitySnapshots().where("bundle_id").equals(t).count().catch(this.logError)}async bundleGetSnapshotPage(t,n={}){const r=Math.max(0,Number(n.offset||0)),o=Math.max(1,Number(n.limit||5e3));return ((n.kind?await this.importedEntitySnapshots().where("[bundle_id+kind]").equals([t,n.kind]).toArray().catch(this.logError):await this.importedEntitySnapshots().where("bundle_id").equals(t).toArray().catch(this.logError))??[]).sort((i,s)=>{const l=Number(i.observed_at||i.created_at||i.updated_at||0),c=Number(s.observed_at||s.created_at||s.updated_at||0);return l!==c?n.order==="oldest"?l-c:c-l:s.id.localeCompare(i.id)}).slice(r,r+o)}async bundleGetSnapshotsByIds(t){const n=this.normalizeDataKeys(t);return n.length?this.importedEntitySnapshots().bulkGet(n).then(r=>r.filter(o=>!!o)).catch(this.logError):[]}async bundleSearchSnapshots(t,n,r=5e3){const o=n.trim().toLowerCase(),a=this.importedEntitySnapshots().where("bundle_id").equals(t);return o?a.filter(i=>String(i.search_text||"").toLowerCase().includes(o)).limit(r).toArray().catch(this.logError):a.limit(r).toArray().catch(this.logError)}async extAddTweets(t,n){const r=this.normalizeRowsByRestId(n);r.length&&await this.enqueueWrite("extAddTweets",async()=>{const o=Date.now(),a=r.map(s=>({id:`${t}-${s.rest_id}`,extension:t,type:_t.TWEET,data_key:s.rest_id,created_at:o})),i=this.buildTweetSearchDocuments(t,r);await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{await this.putMergedTweets(r),await this.bulkPutInChunks(this.captures(),a),await this.bulkPutInChunks(this.searchDocuments(),i);}),await this.invalidateCaptureIndexPages(t,_t.TWEET),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extAddTweets",count:r.length,keys:r.map(s=>s.rest_id)}),this.publishCaptureCountSnapshot(t);});}async extAddUsers(t,n){const r=this.normalizeRowsByRestId(n);r.length&&await this.enqueueWrite("extAddUsers",async()=>{const o=Date.now(),a=r.map(s=>({id:`${t}-${s.rest_id}`,extension:t,type:_t.USER,data_key:s.rest_id,created_at:o})),i=this.buildUserSearchDocuments(t,r);await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{await this.putUsers(r),await this.bulkPutInChunks(this.captures(),a),await this.bulkPutInChunks(this.searchDocuments(),i);}),await this.invalidateCaptureIndexPages(t,_t.USER),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extAddUsers",count:r.length,keys:r.map(s=>s.rest_id)}),this.publishCaptureCountSnapshot(t);});}async extAddCustomCaptures(t,n){if(!n.length)return;const r=[];for(const o of n){const a=String(o.id||"").trim(),i=String(o.data_key||"").trim();!a||!i||r.push({id:`${t}-${a}`,extension:t,type:_t.CUSTOM,data_key:i,created_at:Number(o.created_at)||Date.now()});}r.length&&await this.enqueueWrite("extAddCustomCaptures",async()=>{await this.db.transaction("rw",this.captures(),async()=>{await this.bulkPutInChunks(this.captures(),r);}),await this.invalidateCaptureIndexPages(t,_t.CUSTOM),In({extension:t,operation:"extAddCustomCaptures",count:r.length,keys:r.map(o=>o.data_key)}),this.publishCaptureCountSnapshot(t);});}async extAddSocialEdges(t,n){const r=n.map(o=>({...o,extension:t,observed_at:Number(o.observed_at)||Date.now()})).filter(o=>o.subject_user_id&&o.related_user_id&&o.relation_type&&o.id);r.length&&await this.enqueueWrite("extAddSocialEdges",async()=>{await this.db.transaction("rw",this.socialEdges(),async()=>{await this.bulkPutInChunks(this.socialEdges(),r);}),In({extension:t,operation:"extAddSocialEdges",count:r.length,keys:r.map(o=>o.id)});});}async extAddTweetCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&await this.enqueueWrite("extAddTweetCaptureIds",async()=>{await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{const a=[];for(const i of Fc(o,Pc))a.push(...await this.tweets().where("rest_id").anyOf(i).toArray());r&&a.length&&await this.bulkPutInChunks(this.tweets(),a.map(i=>r(i))),await this.bulkPutInChunks(this.captures(),o.map(i=>({id:`${t}-${i}`,extension:t,type:_t.TWEET,data_key:i,created_at:Date.now()}))),await this.bulkPutInChunks(this.searchDocuments(),this.buildTweetSearchDocuments(t,a));}),await this.invalidateCaptureIndexPages(t,_t.TWEET),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extAddTweetCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t);});}async extBackfillTweetCapturesFromAllTweets(t){if(await this.extGetCaptureCount(t))return;const r=await this.tweets().toCollection().primaryKeys().then(o=>o.map(a=>String(a||"")).filter(Boolean)).catch(this.logError);r!=null&&r.length&&await this.extAddTweetCaptureIds(t,r);}async extRemoveTweetCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.tweets(),this.captures(),this.searchDocuments(),async()=>{if(r){const a=await this.tweets().where("rest_id").anyOf(o).toArray();a.length&&await this.tweets().bulkPut(a.map(i=>r(i)));}await this.captures().bulkDelete(o.map(a=>`${t}-${a}`)),await this.searchDocuments().bulkDelete(o.map(a=>`live:${t}:tweet:${a}`));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,_t.TWEET),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extRemoveTweetCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async extAddUserCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{let a=[];r?(a=await this.users().where("rest_id").anyOf(o).toArray(),a.length&&await this.users().bulkPut(a.map(i=>r(i)))):a=await this.users().where("rest_id").anyOf(o).toArray(),await this.captures().bulkPut(o.map(i=>({id:`${t}-${i}`,extension:t,type:_t.USER,data_key:i,created_at:Date.now()}))),await this.searchDocuments().bulkPut(this.buildUserSearchDocuments(t,a));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,_t.USER),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extAddUserCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async extRemoveUserCaptureIds(t,n,r){const o=this.normalizeDataKeys(n);o.length&&(await this.db.transaction("rw",this.users(),this.captures(),this.searchDocuments(),async()=>{if(r){const a=await this.users().where("rest_id").anyOf(o).toArray();a.length&&await this.users().bulkPut(a.map(i=>r(i)));}await this.captures().bulkDelete(o.map(a=>`${t}-${a}`)),await this.searchDocuments().bulkDelete(o.map(a=>`live:${t}:user:${a}`));}).catch(this.logError),await this.invalidateCaptureIndexPages(t,_t.USER),await this.invalidateFolderSourceIndexPages(t),In({extension:t,operation:"extRemoveUserCaptureIds",count:o.length,keys:o}),this.publishCaptureCountSnapshot(t));}async bundlePutImportBatch(t){var o;const n=Date.now(),r={...t.bundle,updatedAt:n};await this.db.transaction("rw",[this.importedBundles(),this.importedBundleCollections(),this.importedBundleItems(),this.importedEntitySnapshots(),this.importedBundleImportReports(),this.searchDocuments()],async()=>{var a,i,s;await this.importedBundles().put(r),(a=t.collections)!=null&&a.length&&await this.importedBundleCollections().bulkPut(t.collections),(i=t.items)!=null&&i.length&&await this.importedBundleItems().bulkPut(t.items),(s=t.snapshots)!=null&&s.length&&(await this.importedEntitySnapshots().bulkPut(t.snapshots),await this.searchDocuments().bulkPut(this.buildImportedSnapshotSearchDocuments(r.id,t.snapshots))),t.report&&await this.importedBundleImportReports().put(t.report);}).catch(this.logError),await this.invalidateFolderSourceIndexPages(),In({operation:"bundlePutImportBatch",count:((o=t.snapshots)==null?void 0:o.length)??0,keys:[r.id]});}async bundleMarkReady(t){await this.importedBundles().update(t,{status:"ready",updatedAt:Date.now()}).catch(this.logError),In({operation:"bundleMarkReady",keys:[t]});}async bundleMarkFailed(t,n){await this.importedBundles().update(t,{status:"failed",error:n,updatedAt:Date.now()}).catch(this.logError),In({operation:"bundleMarkFailed",keys:[t]});}async extClearCaptures(t){const n=await this.extGetCaptures(t);if(!n)return;const r=await this.db.transaction("rw",this.captures(),this.searchDocuments(),async()=>{const o=await this.captures().bulkDelete(n.map(i=>i.id)),a=n.map(i=>i.type===_t.TWEET?`live:${t}:tweet:${i.data_key}`:i.type===_t.USER?`live:${t}:user:${i.data_key}`:"").filter(Boolean);return a.length&&await this.searchDocuments().bulkDelete(a),o}).catch(this.logError);return In({extension:t,operation:"extClearCaptures",count:n.length,keys:n.map(o=>o.data_key)}),await this.invalidateCaptureIndexPages(t),await this.invalidateFolderSourceIndexPages(t),this.publishCaptureCountSnapshot(t),r}async extBackfillRecentBookmarkFolderName(t,n,r,o={}){if(!t||!n||!r)return {candidates:0,inspected:0,updated:0};const a=Math.max(1,Math.min(1e3,Number(o.candidateLimit)||250)),i=Math.max(100,Math.min(5e3,Number(o.recentCaptureScanLimit)||1800)),s=new Set;for(const h of o.candidateTweetIds||[]){if(typeof h!="string")continue;const f=h.trim();if(f&&(s.add(f),s.size>=a))break}if(s.size<a){const h=await this.captures().orderBy("created_at").reverse().limit(i).toArray().catch(this.logError);for(const f of h||[]){if((f==null?void 0:f.extension)!==t||(f==null?void 0:f.type)!==_t.TWEET)continue;const m=String((f==null?void 0:f.data_key)||"").trim();if(!(!m||s.has(m))&&(s.add(m),s.size>=a))break}}if(!s.size)return {candidates:0,inspected:0,updated:0};const l=[...s],c=await this.db.transaction("rw",this.tweets(),this.searchDocuments(),async()=>{const h=await this.tweets().where("rest_id").anyOf(l).toArray(),f=[];for(const m of h){const g=m;if(String(g.__bookmark_folder_id||"")!==n)continue;const _=String(g.__bookmark_folder_name||""),b=String(g.__bookmark_folder_name_source||"");_===r&&b==="api"||f.push({...m,__bookmark_folder_name:r,__bookmark_folder_name_source:"api"});}return f.length&&(await this.tweets().bulkPut(f),await this.searchDocuments().bulkPut(this.buildTweetSearchDocuments(t,f)),In({extension:t,operation:"bookmarkFolderNameBackfill"})),{candidates:l.length,inspected:h.length,updated:f.length}}).catch(h=>(this.logError(h),{candidates:l.length,inspected:0,updated:0}));return c.updated>0&&await this.invalidateFolderSourceIndexPages(t),c}async export(){return Kg(this.db).catch(this.logError)}async import(t,n={}){const r=await xd(this.db,t,{acceptMissingTables:true,acceptVersionDiff:true,progressCallback:n.progressCallback}).catch(o=>{throw this.logError(o,"import"),o});return this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptureIndexPages(),await this.invalidateFolderSourceIndexPages(),In({operation:"import"}),this.publishCaptureCountSnapshotForAllKnownExtensions(),r}async clear(){this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptures(),await this.deleteAllCaptureIndexPages(),await this.deleteAllSocialEdges(),await this.deleteAllSearchDocuments(),await this.invalidateFolderSourceIndexPages(),await this.deleteAllTweets(),await this.deleteAllUsers(),In({operation:"clear"}),this.publishCaptureCountSnapshotForAllKnownExtensions(),Ie.info("Database cleared");}async count(){try{return {tweets:await this.tweets().count(),users:await this.users().count(),captures:await this.captures().count(),social_edges:await this.socialEdges().count(),imported_bundles:await this.importedBundles().count(),imported_entity_snapshots:await this.importedEntitySnapshots().count(),search_documents:await this.searchDocuments().count(),folder_source_index_pages:await this.folderSourceIndexPages().count()}}catch(t){return this.logError(t),null}}async publishKnownCaptureCountSnapshot(t,n){await this.writeCaptureCountSnapshot(t,Math.max(0,Math.floor(Number(n)||0)));}async publishCaptureCountSnapshot(t){try{const n=Number(await this.extGetCaptureCount(t)||0);await this.writeCaptureCountSnapshot(t,n);}catch{}}async writeCaptureCountSnapshot(t,n){try{const r=this.db.name,o=Date.now(),a=globalThis,i=a[gs],s=i&&typeof i=="object"?{...i}:{};s[t]=n;const l=a[ys],c=l&&typeof l=="object"?{...l}:{};c[t]={count:n,dbName:r,updatedAt:o},a[gs]=s,a[ys]=c,typeof window<"u"&&(window[gs]=s,window[ys]=c);try{typeof localStorage<"u"&&(localStorage.setItem(gs,JSON.stringify(s)),localStorage.setItem(ys,JSON.stringify(c)));}catch{}try{if(typeof window<"u"&&typeof window.dispatchEvent=="function"){const h={extension:t,count:n,dbName:r,updatedAt:o};try{window.dispatchEvent(new CustomEvent(Th,{detail:h}));}catch{window.dispatchEvent(new Event(Th));}}}catch{}}catch{}}publishCaptureCountSnapshotForAllKnownExtensions(){this.captures().toArray().then(t=>{const n=new Set;for(const r of t)r!=null&&r.extension&&n.add(String(r.extension));return Promise.all([...n].map(r=>this.publishCaptureCountSnapshot(r)))}).catch(()=>{});}publishActiveDatabaseName(){try{const t=this.db.name,n=globalThis;n[Dc]=t,typeof window<"u"&&(window[Dc]=t),typeof localStorage<"u"&&localStorage.setItem(Dc,t);}catch{}}buildTweetSearchDocuments(t,n){const r=Date.now(),o=[];for(const a of n){const i=a,s=String(a.rest_id||nn(i,"legacy.id_str")||"").trim();if(!s)continue;const l=_n(nn(i,"article.article_results.result.title")),c=_n(nn(i,"article.article_results.result.preview_text")),h=wa([_n(nn(i,"note_tweet.note_tweet_results.result.text")),l,c,_n(nn(i,"legacy.full_text")),_n(nn(i,"legacy.text"))]),f=wa([_n(nn(i,"quoted_status_result.result.note_tweet.note_tweet_results.result.text")),_n(nn(i,"quoted_status_result.result.legacy.full_text")),_n(nn(i,"quoted_status_result.result.legacy.text"))]),m=_n(nn(i,"core.user_results.result.core.screen_name")||nn(i,"core.screen_name")).toLowerCase(),g=_n(nn(i,"core.user_results.result.rest_id")||nn(i,"author_id")),_=_n(nn(i,"__bookmark_folder_id")),b=_n(nn(i,"__bookmark_folder_name")),C=Qo(a),v=wa([h,m,_,b]),T=wa([_n(nn(i,"legacy.lang")),_n(nn(i,"card.name")),_n(nn(i,"card.card_platform.card_name"))]),R=lo(a).length,P=R>0,L=_s([v,f,T].join(`
`));o.push({id:`live:${t}:tweet:${s}`,source_key:`live:${t}`,source_kind:"live",entity_type:"tweet",entity_id:s,extension_name:t,updated_at_ms:r,created_at_ms:C||void 0,observed_at_ms:r,primary_text:v,quoted_text:f||void 0,auxiliary_text:T||void 0,author_screen_name:m||void 0,author_id:g||void 0,folder_id:_||void 0,folder_name:b||void 0,media_flag:P?1:0,route_type:_n(nn(i,"__route_type"))||void 0,lang:_n(nn(i,"legacy.lang"))||void 0,flags_json:{has_media:P},exact_json:{author:m?[m,`@${m}`]:[],folder:[_,b].filter(Boolean)},numeric_json:{favorite_count:Number(nn(i,"legacy.favorite_count")||0),retweet_count:Number(nn(i,"legacy.retweet_count")||0),reply_count:Number(nn(i,"legacy.reply_count")||0),bookmark_count:Number(nn(i,"legacy.bookmark_count")||0),media_count:R},raw_ref_table:"tweets",raw_ref_key:s,doc_hash:L});}return o}buildUserSearchDocuments(t,n){var a;const r=Date.now(),o=[];for(const i of n){const s=i,l=String(i.rest_id||"").trim();if(!l)continue;const c=_n(nn(s,"core.screen_name")).toLowerCase(),h=_n(nn(s,"core.name")),f=_n(nn(s,"legacy.description")),m=wa([c,h,f]);o.push({id:`live:${t}:user:${l}`,source_key:`live:${t}`,source_kind:"live",entity_type:"user",entity_id:l,extension_name:t,updated_at_ms:r,created_at_ms:Number(((a=i.twe_private_fields)==null?void 0:a.created_at)||0)||void 0,observed_at_ms:r,primary_text:m,author_screen_name:c||void 0,author_id:l,flags_json:{is_blue_verified:!!nn(s,"is_blue_verified")},exact_json:{author:c?[c,`@${c}`]:[]},raw_ref_table:"users",raw_ref_key:l,doc_hash:_s(m)});}return o}buildImportedSnapshotSearchDocuments(t,n){const r=Date.now();return n.map(o=>{const a=o.data,i=o.kind==="tweet"||o.kind==="user"?Fg(o):a,s=String(o.source_id||o.id).trim(),l=_n(o.search_text)||wa([JSON.stringify(a)]),c=_n(nn(i,"__bookmark_folder_id")),h=_n(nn(i,"__bookmark_folder_name")),f=Number(nn(i,"twe_private_fields.media_count")||0);return {id:`bundle:${t}:${o.kind}:${o.id}`,source_key:`bundle:${t}`,source_kind:"bundle",entity_type:o.kind==="user"?"user":o.kind==="tweet"?"tweet":"bundle_item",entity_id:s,bundle_id:t,bundle_item_id:o.id,extension_name:o.source_extension,updated_at_ms:r,created_at_ms:o.created_at,observed_at_ms:o.observed_at,primary_text:l,folder_id:c||void 0,folder_name:h||void 0,media_flag:f>0?1:0,exact_json:{folder:[c,h].filter(Boolean)},numeric_json:{media_count:f},raw_ref_table:"imported_entity_snapshots",raw_ref_key:o.id,doc_hash:_s(l)}})}async upsertSearchDocuments(t){if(!t.length)return;const n=ze(),r=this.searchDocumentExtensionNames(t);return this.enqueueWrite("upsertSearchDocuments",async()=>{const o=await this.db.transaction("rw",this.searchDocuments(),async()=>{await this.bulkPutInChunks(this.searchDocuments(),t);});return await this.invalidateFolderSourceIndexPagesForExtensions(r),Be({kind:"db",name:"search-documents-upsert",durationMs:ze()-n,value:t.length}),o})}async putSyntheticSeedRows(t){const n=t.users??[],r=t.tweets??[],o=t.captures??[],a=t.searchDocuments??[],i=n.length+r.length+o.length+a.length;if(!i)return;const s=ze(),l=this.searchDocumentExtensionNames(a);return this.enqueueWrite("putSyntheticSeedRows",async()=>{const c=await this.db.transaction("rw",this.users(),this.tweets(),this.captures(),this.searchDocuments(),async()=>{n.length&&await this.bulkPutInChunks(this.users(),n),r.length&&await this.bulkPutInChunks(this.tweets(),r),o.length&&await this.bulkPutInChunks(this.captures(),o),a.length&&await this.bulkPutInChunks(this.searchDocuments(),a);});return o.length&&await this.invalidateCaptureIndexPagesForRows(o),await this.invalidateFolderSourceIndexPagesForExtensions(l),Be({kind:"db",name:"synthetic-seed-bulk-put",durationMs:ze()-s,value:i,tags:{users:n.length,tweets:r.length,captures:o.length,searchDocuments:a.length}}),c})}async extBackfillSearchDocuments(t,n,r=640){const o=ze();if(!(n===_t.USER?"user":n===_t.TWEET?"tweet":null))return {processed:0,documents:0};let i=0,s=0,l=0;for(;;){const c=await this.extGetCapturePage(t,{type:n,offset:i,limit:r,order:"newest"});if(!c.length)break;const h=new Map(c.map(f=>[f.data_key,Number(f.created_at)||Date.now()]));if(n===_t.USER){const f=await this.extGetCapturedUsers(t,c)??[],m=this.buildUserSearchDocuments(t,f);m.forEach(g=>{g.observed_at_ms=h.get(g.raw_ref_key)||g.observed_at_ms;}),await this.upsertSearchDocuments(m),l+=m.length;}else {const f=await this.extGetCapturedTweets(t,c)??[],m=this.buildTweetSearchDocuments(t,f);m.forEach(g=>{g.observed_at_ms=h.get(g.raw_ref_key)||g.observed_at_ms;}),await this.upsertSearchDocuments(m),l+=m.length;}if(s+=c.length,i+=c.length,c.length<r)break}return Be({kind:"db",name:"search-documents-backfill",durationMs:ze()-o,value:l,tags:{extName:t,type:n,processed:s}}),In({extension:t,operation:"searchDocumentsBackfill"}),{processed:s,documents:l}}async putMergedTweets(t){if(!t.length)return;const n=this.normalizeDataKeys(t.map(i=>i.rest_id)),r=[];for(const i of Fc(n,Pc))r.push(...await this.tweets().where("rest_id").anyOf(i).toArray());const o=new Map(r.map(i=>[String(i.rest_id),i])),a=t.map(i=>{const s={...i,twe_private_fields:{created_at:Qo(i),updated_at:Date.now(),media_count:lo(i).length}};return H0(o.get(i.rest_id)??null,s)});await this.bulkPutInChunks(this.tweets(),a);}async putUsers(t){if(!t.length)return;const n=t.map(r=>({...r,twe_private_fields:{created_at:+Na(r.core.created_at),updated_at:Date.now()}}));await this.bulkPutInChunks(this.users(),n);}async bulkPutInChunks(t,n){for(const r of Fc(n,Pc))await t.bulkPut(r);}normalizeRowsByRestId(t){const n=new Map;for(const r of t){const o=String((r==null?void 0:r.rest_id)||"").trim();o&&n.set(o,{...r,rest_id:o});}return [...n.values()]}async upsertTweets(t){const n=this.normalizeRowsByRestId(t);if(n.length)return this.enqueueWrite("upsertTweets",async()=>{await this.db.transaction("rw",this.tweets(),async()=>{await this.putMergedTweets(n);});})}async upsertUsers(t){const n=this.normalizeRowsByRestId(t);if(n.length)return this.enqueueWrite("upsertUsers",async()=>{await this.db.transaction("rw",this.users(),async()=>{await this.putUsers(n);});})}async upsertCaptures(t){if(t.length)return this.enqueueWrite("upsertCaptures",async()=>{await this.db.transaction("rw",this.captures(),async()=>{await this.bulkPutInChunks(this.captures(),t);}),await this.invalidateCaptureIndexPagesForRows(t);})}async upsertSocialEdges(t){if(t.length)return this.enqueueWrite("upsertSocialEdges",async()=>{await this.db.transaction("rw",this.socialEdges(),async()=>{await this.bulkPutInChunks(this.socialEdges(),t);});})}async deleteAllTweets(){return this.tweets().clear().catch(this.logError)}async deleteAllUsers(){return this.users().clear().catch(this.logError)}async deleteAllCaptures(){return this.bumpAllCaptureIndexRevisions(),await this.deleteAllCaptureIndexPages(),this.captures().clear().catch(this.logError)}async deleteAllCaptureIndexPages(){return this.captureIndexPages().clear().catch(this.logError)}async deleteAllSocialEdges(){return this.socialEdges().clear().catch(this.logError)}async deleteAllSearchDocuments(){return await this.invalidateFolderSourceIndexPages(),this.searchDocuments().clear().catch(this.logError)}async bundleDelete(t){await this.db.transaction("rw",[this.importedBundles(),this.importedBundleCollections(),this.importedBundleItems(),this.importedEntitySnapshots(),this.importedBundleImportReports(),this.searchDocuments()],async()=>{const n=await this.importedBundleCollections().where("bundle_id").equals(t).primaryKeys(),r=await this.importedBundleItems().where("bundle_id").equals(t).primaryKeys(),o=await this.importedEntitySnapshots().where("bundle_id").equals(t).primaryKeys(),a=await this.importedBundleImportReports().where("bundle_id").equals(t).primaryKeys(),i=await this.searchDocuments().where("bundle_id").equals(t).primaryKeys();await this.importedBundleCollections().bulkDelete(n),await this.importedBundleItems().bulkDelete(r),await this.importedEntitySnapshots().bulkDelete(o),await this.importedBundleImportReports().bulkDelete(a),await this.searchDocuments().bulkDelete(i),await this.importedBundles().delete(t);}).catch(this.logError),await this.invalidateFolderSourceIndexPages(),In({operation:"bundleDelete",keys:[t]});}async enrichUsersWithRelationshipContext(t,n){if(!n.length||t!=="FollowersModule"&&t!=="FollowingModule")return n;const r=this.normalizeDataKeys(n.map(a=>a.rest_id));if(!r.length)return n;const o=await this.socialEdges().where("[extension+related_user_id]").anyOf(r.map(a=>[t,a])).toArray().catch(this.logError);return o!=null&&o.length?T0(n,o):n}normalizeDataKeys(t){const n=new Set;for(const r of t){const o=String(r||"").trim();o&&n.add(o);}return [...n]}filterEmptyData(t){if(!t)return Ie.warn("Empty data found in DB",t),false;if(t.__typename==="Tweet"){const n=t;return !n.legacy&&!n.article?(Ie.warn("Empty data found in DB",t),false):true}return t.legacy?true:(Ie.warn("Empty data found in DB",t),false)}async init(){const t=["rest_id","twe_private_fields.created_at","twe_private_fields.updated_at","twe_private_fields.media_count","core.user_results.result.core.screen_name","legacy.favorite_count","legacy.retweet_count","legacy.bookmark_count","legacy.quote_count","legacy.reply_count","views.count","legacy.favorited","legacy.retweeted","legacy.bookmarked"],n=["rest_id","twe_private_fields.created_at","twe_private_fields.updated_at","core.screen_name","legacy.followers_count","legacy.friends_count","legacy.statuses_count","legacy.favourites_count","legacy.listed_count","verification.verified_type","is_blue_verified","relationship_perspectives.following","relationship_perspectives.followed_by"],r=["id","extension","type","created_at","[extension+type]","[extension+type+created_at]","[extension+type+created_at+id]"],o=["id","extension","type","order","source_count","page_start","[extension+type+order+source_count+page_start]"],a=["id","source_hash","source_key","extension_name","entity_type","source_count","source_revision","page_start","[source_hash+source_count+source_revision+page_start]"],i=["id","extension","relation_type","subject_user_id","related_user_id","observed_at","[extension+relation_type]","[extension+subject_user_id]","[extension+related_user_id]"],s=["id","status","visibility","importedAt","updatedAt","recordCount"],l=["id","bundle_id","kind","[bundle_id+kind]"],c=["id","bundle_id","collection_id","record_id","kind","source_id","sort_time","[bundle_id+kind]","[bundle_id+sort_time]"],h=["id","bundle_id","kind","source_id","source_extension","observed_at","updated_at","[bundle_id+kind]","[kind+source_id]"],f=["id","bundle_id","started_at","finished_at","status"],m=["id","source_key","source_kind","entity_type","entity_id","extension_name","bundle_id","bundle_item_id","updated_at_ms","created_at_ms","observed_at_ms","author_screen_name","author_id","folder_id","media_flag","numeric_json.media_count","[source_key+entity_type]","[extension_name+entity_type]","[extension_name+entity_type+media_flag+observed_at_ms+id]","[extension_name+entity_type+numeric_json.media_count+observed_at_ms+id]","[extension_name+entity_type+folder_id+observed_at_ms]","[extension_name+entity_type+folder_id+observed_at_ms+id]","[bundle_id+entity_type]","[entity_type+entity_id]"];try{this.db.version(2).stores({tweets:t.join(","),users:n.join(","),captures:r.join(",")}).upgrade(async g=>{Ie.info("Upgrading database schema..."),await S0(g),Ie.info("Database upgraded");}),this.db.version(L0).stores({tweets:t.join(","),users:n.join(","),captures:r.join(","),capture_index_pages:o.join(","),folder_source_index_pages:a.join(","),social_edges:i.join(","),imported_bundles:s.join(","),imported_bundle_collections:l.join(","),imported_bundle_items:c.join(","),imported_entity_snapshots:h.join(","),imported_bundle_import_reports:f.join(","),search_documents:m.join(",")}),await this.db.open(),Ie.info(`Database connected: ${this.db.name}`);}catch(g){this.logError(g);}}logError(t,n){const r=t instanceof Error?t.message:String(t),o=n?`Database Error (${n})`:"Database Error";Ie.error(`${o}: ${r}`,t);}}function q0(e){return {schema:"scrollmark.result_source.v1",kind:"captures",extensionName:e.extensionName,extensionType:e.extensionType,sort:{kind:"observed_at",direction:e.direction??"desc"}}}function V0(e){return {schema:"scrollmark.result_source.v1",kind:"folder",extensionName:e.extensionName,entityType:e.entityType,folderIds:[...e.folderIds],sort:{kind:"observed_at",direction:e.direction??"desc"}}}function z0(e){var t;return {schema:"scrollmark.result_source.v1",kind:"media",extensionName:e.extensionName,entityType:"tweet",folderIds:(t=e.folderIds)!=null&&t.length?[...e.folderIds]:void 0,sort:{kind:"observed_at",direction:e.direction??"desc"}}}function Fl(e){return JSON.stringify(e)}const Rh="__scrollmark_result_source_diagnostics_v1",K0=24;function ny(){const e=globalThis,t=e[Rh];if(t instanceof Map)return t;const n=new Map;return e[Rh]=n,n}function Jo(e){const t=ny();for(t.set(e.sourceKey,{schema:"scrollmark.result_source.diagnostics.v1",mode:e.descriptor.kind,updatedAtMs:e.updatedAtMs??Date.now(),...e});t.size>K0;){const n=[...t.entries()].sort((r,o)=>r[1].updatedAtMs-o[1].updatedAtMs)[0];if(!n)break;t.delete(n[0]);}}function G0(){return [...ny().values()].sort((e,t)=>t.updatedAtMs-e.updatedAtMs)}const Ih=160;function Eh(e,t){const n=e[t];if(!(t<0||!n))return {index:t,id:n}}function W0(e,t,n){if(t.after){const r=e[t.after.index]===t.after.id?t.after.index:-1,o=e.indexOf(t.after.id);return Math.max(0,(r>=0?r:o)+1)}if(t.before){const r=e[t.before.index]===t.before.id?t.before.index:-1,o=e.indexOf(t.before.id);return Math.max(0,(r>=0?r:o)-n)}return Math.max(0,Math.floor(Number(t.startIndex)||0))}function ry(e){const t=[...e.ids],n=Fl(e.descriptor),r=e.totalCount??t.length,o=async a=>{const i=performance.now(),s=Math.max(1,Math.min(1e3,Number(a.limit)||Ih)),l=W0(t,a,s),c=t.slice(l,l+s),h=await e.hydrateByIds(c),f={source:e.descriptor,totalCount:r,startIndex:l,rows:h,rowIds:c,hasBefore:l>0,hasAfter:l+c.length<r,cursorBefore:Eh(t,l),cursorAfter:Eh(t,l+c.length-1)};return Jo({sourceKey:n,descriptor:e.descriptor,totalCount:r,cachedPages:0,cachedRows:0,lastFetchDurationMs:performance.now()-i,lastWindowRows:h.length,lastWindowStartIndex:l,lastCacheHit:false}),f};return {key:n,descriptor:e.descriptor,totalCount:async()=>r,getWindow:o,getByIds:e.hydrateByIds,streamRows:async function*(i={}){var c,h;let s=0;i.cursor&&(s=Math.max(0,i.cursor.index+1));const l=Math.max(1,Math.min(1e3,Number(i.batchSize)||Ih));for(;s<r&&!((c=i.signal)!=null&&c.aborted);){const f=await o({startIndex:s,limit:l});for(const m of f.rows){if((h=i.signal)!=null&&h.aborted)return;yield m;}if(!f.rowIds.length||!f.hasAfter)return;s+=f.rowIds.length;}}}}function Y0(e){const t={schema:"scrollmark.result_source.v1",kind:"explicit-selection",extensionName:e.extensionName,entityType:e.entityType,ids:[...e.ids],source:e.source};return ry({descriptor:t,ids:e.ids,hydrateByIds:e.hydrateByIds})}function X0(e){const t={schema:"scrollmark.result_source.v1",kind:"search",extensionName:e.extensionName,entityType:e.entityType,query:e.query,folderIds:e.folderIds,searchEngine:e.searchEngine??"worker-corpus",sort:{kind:"search_rank",direction:"desc"}};return ry({descriptor:t,ids:e.ids,totalCount:e.totalCount,hydrateByIds:e.hydrateByIds})}const $a=160,Ol=10,Q0=1e3,Z0=5e3,ws=256,J0=1e3,eS=1500,Oc="__twe_capture_counts_v2",tS="__twe_active_db_name_v1";class Sd{constructor(t=Ol){Ve(this,"entries",new Map);this.maxPages=t;}get(t){const n=this.entries.get(t);return n?(n.touchedAt=Date.now(),n.value):null}set(t,n){if(this.entries.set(t,{key:t,value:n,touchedAt:Date.now()}),this.entries.size<=this.maxPages)return;const r=[...this.entries.values()].sort((o,a)=>o.touchedAt-a.touchedAt);for(const o of r.slice(0,Math.max(0,this.entries.size-this.maxPages)))this.entries.delete(o.key);}get size(){return this.entries.size}get rowCount(){let t=0;for(const n of this.entries.values())t+=n.value.rows.length;return t}}function Pa(e,t,n){const r=Math.max(0,Math.floor(Number(t)||0));r>0&&!n||e.set(r,{index:r,cursorAfter:n});}function oy(e,t){let n=null;for(const r of e.values())r.index>t||(!n||r.index>n.index)&&(n=r);return !n||t-n.index>Z0?null:n}function Cd(e){return JSON.stringify({startIndex:e.startIndex??0,limit:e.limit,after:e.after??null,before:e.before??null,direction:e.direction??"forward"})}function ay(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].sort()}function nS(){try{const e=localStorage.getItem(tS);return (e==null?void 0:e.trim())??""}catch{return ""}}function Ah(e){var i;const t=[],n=nS(),r=s=>{if(!s||typeof s!="object")return;const l=s[Oc];if(!l||typeof l!="object")return;const c=l[e];if(!c||typeof c!="object")return;const h=c,f=Number(h.count);if(!Number.isFinite(f)||f<0)return;const m=typeof h.dbName=="string"?h.dbName:"",g=Number(h.updatedAt);t.push({count:Math.floor(f),dbName:m,updatedAt:Number.isFinite(g)?g:0});};try{r(globalThis);}catch{}try{typeof window<"u"&&r(window);}catch{}try{const s=localStorage.getItem(Oc);s&&r({[Oc]:JSON.parse(s)});}catch{}const o=n?t.filter(s=>s.dbName===n):t,a=o.length?o:t;return a.sort((s,l)=>l.updatedAt!==s.updatedAt?l.updatedAt-s.updatedAt:l.count-s.count),((i=a[0])==null?void 0:i.count)??null}function vo(e){if(e)return {observedAtMs:Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,documentId:e.id}}function Dh(e){if(e)return {createdAt:Number(e.created_at)||0,captureId:e.id}}function Ph(e,t){const n=Number(e.observed_at_ms||e.created_at_ms||e.updated_at_ms)||0,r=Number(t.observed_at_ms||t.created_at_ms||t.updated_at_ms)||0;return r!==n?r-n:t.id.localeCompare(e.id)}function Lc(e){const t=new Set,n=[];for(const r of e)t.has(r.id)||(t.add(r.id),n.push(r));return n}async function Fh(e,t){return e===_t.USER?await We.extGetUsersByIds(t)??[]:await We.extGetTweetsByIds(t)??[]}async function Oh(e,t){return e==="user"?await We.extGetUsersByIds(t)??[]:e==="tweet"?await We.extGetTweetsByIds(t)??[]:[]}function rS(e){const t=q0({extensionName:e.extensionName,extensionType:e.extensionType,direction:"desc"}),n=new Sd(e.cachePages??Ol),r=new Map;Pa(r,0);const o=Fl(t);let a=Ah(e.extensionName),i=null;const s=async()=>{const h=Ah(e.extensionName);return h!==null?(a=h,h):(a!==null||(i||(i=We.extGetCaptureCount(e.extensionName,e.extensionType).then(f=>Number(f)||0).finally(()=>{i=null;})),a=await i),a)},l=async(h,f)=>{const m=oy(r,h);if(!m)return null;const g=h+f;let _=m.index,b=m.cursorAfter,C=false;const v=[];for(;_<g;){const T=await We.extGetCaptureIdsCursorPage(e.extensionName,{type:e.extensionType,after:b,limit:Math.min(1e3,Math.max(1,g-_)),order:"newest"});if(!T.captures.length){C=false;break}const R=_,P=_+T.captures.length,L=Math.max(0,h-R),D=Math.max(L,Math.min(T.captures.length,g-R));if(v.push(...T.captures.slice(L,D)),_=P,b=T.cursorAfter,C=T.hasAfter,Pa(r,_,b),!T.hasAfter||P<=R)break}return {captures:v,cursorBefore:Dh(v[0]),cursorAfter:Dh(v[v.length-1]),hasBefore:h>0,hasAfter:C||_>g}},c=async h=>{const f=performance.now(),m=Math.max(1,Math.min(1e3,Number(h.limit)||$a)),g={...h,limit:m,direction:h.direction??"forward"},_=Cd(g),b=n.get(_);if(b)return Jo({sourceKey:o,descriptor:t,totalCount:b.totalCount,cachedPages:n.size,cachedRows:n.rowCount,lastFetchDurationMs:performance.now()-f,lastWindowRows:b.rows.length,lastWindowStartIndex:b.startIndex,lastCacheHit:true}),b;const C=s();let v=[],T,R,P=false,L=false,D=null;if(g.after||g.before){const I=await We.extGetCaptureIdsCursorPage(e.extensionName,{type:e.extensionType,after:g.after,before:g.before,limit:m,order:"newest"});v=I.ids,T=I.cursorBefore,R=I.cursorAfter,P=I.hasBefore,L=I.hasAfter;}else {const I=Math.max(0,Math.floor(Number(g.startIndex)||0));D=await C;const x=await We.extGetCaptureIdsIndexedPage(e.extensionName,{type:e.extensionType,offset:I,limit:m,order:"newest",sourceCount:D});if(x)v=x,P=I>0,L=I+v.length<D;else {const F=await l(I,m);F?(v=F.captures.map(U=>U.data_key).filter(Boolean),T=F.cursorBefore,R=F.cursorAfter,P=F.hasBefore,L=F.hasAfter):(v=await We.extGetCaptureIdsPage(e.extensionName,{type:e.extensionType,offset:I,limit:m,order:"newest"}),P=I>0);}}D??(D=await C),L||(L=Math.max(0,Math.floor(Number(g.startIndex)||0))+v.length<D);const O=await Fh(e.extensionType,v),B={source:t,totalCount:D,startIndex:g.startIndex,rows:O,rowIds:v,hasBefore:P,hasAfter:L,cursorBefore:T,cursorAfter:R};return Pa(r,Math.max(0,Math.floor(Number(g.startIndex)||0))+v.length,R),n.set(_,B),Jo({sourceKey:o,descriptor:t,totalCount:D,cachedPages:n.size,cachedRows:n.rowCount,lastFetchDurationMs:performance.now()-f,lastWindowRows:O.length,lastWindowStartIndex:g.startIndex,lastCacheHit:false}),B};return {key:o,descriptor:t,totalCount:s,getWindow:c,getByIds:h=>Fh(e.extensionType,h),streamRows:async function*(f={}){var C,v;let m=f.cursor,g=0;const _=!!f.cursor,b=Math.max(1,Math.min(1e3,Number(f.batchSize)||$a));for(;!((C=f.signal)!=null&&C.aborted);){const T=_&&m?await c({limit:b,after:m}):await c({startIndex:g,limit:b});for(const R of T.rows){if((v=f.signal)!=null&&v.aborted)return;yield R;}if(!T.hasAfter||!T.rowIds.length)return;if(g+=T.rowIds.length,T.cursorAfter)m=T.cursorAfter;else if(_)return}}}}function Lh(e){const t=ay([...e.folderIds??[],...e.folderId?[e.folderId]:[]]),n=V0({extensionName:e.extensionName,entityType:e.entityType,folderIds:t,direction:"desc"}),r=new Sd(e.cachePages??Ol),o=new Map;Pa(o,0);const a=Fl(n),i=typeof e.knownTotalCount=="number"&&Number.isFinite(e.knownTotalCount)?Math.max(0,Math.floor(e.knownTotalCount)):null;let s=null;const l=async()=>i!==null?i:(await Promise.all(t.map(C=>We.extGetSearchDocumentCount(e.extensionName,{entityType:e.entityType,folderId:C})))).reduce((C,v)=>C+(Number(v)||0),0),c=async(b,C)=>{if(t.length===1)return We.extGetSearchDocumentFolderCursorPage(e.extensionName,{entityType:e.entityType,folderId:t[0],after:b.after,before:b.before,limit:C,order:"newest"});const v=await Promise.all(t.map(R=>We.extGetSearchDocumentFolderCursorPage(e.extensionName,{entityType:e.entityType,folderId:R,after:b.after,before:b.before,limit:C+1,order:"newest"}))),T=Lc(v.flatMap(R=>R.documents).sort(Ph)).slice(0,C);return {documents:T,cursorBefore:vo(T[0]),cursorAfter:vo(T[T.length-1]),hasBefore:!!(b.after||b.before),hasAfter:v.some(R=>R.hasAfter)||Lc(v.flatMap(R=>R.documents)).length>C}},h=async(b,C)=>{const v=oy(o,b);if(!v)return null;const T=b+C;let R=v.index,P=v.cursorAfter,L=false;const D=[];for(;R<T;){const O=await c({after:P},Math.min(1e3,Math.max(1,T-R)));if(!O.documents.length){L=false;break}const B=R,I=R+O.documents.length,x=Math.max(0,b-B),F=Math.max(x,Math.min(O.documents.length,T-B));if(D.push(...O.documents.slice(x,F)),R=I,P=O.cursorAfter,L=O.hasAfter,Pa(o,R,P),!O.hasAfter||I<=B)break}return {documents:D,cursorBefore:vo(D[0]),cursorAfter:vo(D[D.length-1]),hasBefore:b>0,hasAfter:L}},f=async(b,C)=>{if(t.length===1)return We.extGetSearchDocumentFolderPage(e.extensionName,{entityType:e.entityType,folderId:t[0],offset:b,limit:C,order:"newest"});const v=b+C+1,T=await Promise.all(t.map(async L=>{const D=[];let O=0;for(;D.length<v;){const B=await We.extGetSearchDocumentFolderPage(e.extensionName,{entityType:e.entityType,folderId:L,offset:O,limit:Math.min(Q0,v-D.length),order:"newest"});if(D.push(...B.documents),!B.hasAfter||!B.documents.length)break;O+=B.documents.length;}return D})),R=Lc(T.flat().sort(Ph)),P=R.slice(b,b+C);return {documents:P,cursorBefore:vo(P[0]),cursorAfter:vo(P[P.length-1]),hasBefore:b>0,hasAfter:R.length>b+C}},m=async b=>{const C=ze(),v=Math.max(0,Math.floor(Number(b)||0));if(!v)return false;const T=We.readFolderSourceIndexRevision(e.extensionName),R=[];let P=0,L,D=[];for(;;){const I=await c({after:L},1e3);for(D.push(...I.documents);D.length>=ws;){const U=D.slice(0,ws);D=D.slice(ws),R.push({pageStart:P,rowIds:U.map(Ce=>Ce.raw_ref_key||Ce.entity_id).filter(Boolean),cursorAfter:vo(U[U.length-1])}),P+=ws;}const x=L?`${L.observedAtMs}|${L.documentId}`:"",F=I.cursorAfter?`${I.cursorAfter.observedAtMs}|${I.cursorAfter.documentId}`:"";if(!I.hasAfter||!I.cursorAfter||!I.documents.length||F===x)break;L=I.cursorAfter;}D.length&&R.push({pageStart:P,rowIds:D.map(I=>I.raw_ref_key||I.entity_id).filter(Boolean),cursorAfter:vo(D[D.length-1])});const O=await l(),B=We.readFolderSourceIndexRevision(e.extensionName);return O!==v||B!==T?(Be({kind:"db",name:"folder-source-index-build-stale",durationMs:ze()-C,value:R.length,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,expectedCount:v,currentCount:O,sourceRevision:T,currentRevision:B}}),false):(await We.extPutFolderSourceIndexPages({sourceKey:a,extensionName:e.extensionName,entityType:e.entityType,folderIds:t,sourceCount:v,sourceRevision:T,pages:R}),Be({kind:"db",name:"folder-source-index-build",durationMs:ze()-C,value:R.length,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,sourceCount:v,sourceRevision:T}}),true)},g=b=>{const C=Math.max(0,Math.floor(Number(b)||0));C<J0||s||(s=new Promise((v,T)=>{globalThis.setTimeout(()=>{m(C).then(v,T);},eS);}).finally(()=>{s=null;}),s.catch(v=>{Be({kind:"db",name:"folder-source-index-build-error",value:0,tags:{extName:e.extensionName,entityType:e.entityType,folderCount:t.length,message:v instanceof Error?v.message:String(v)}});}));},_=async b=>{const C=performance.now(),v=Math.max(1,Math.min(1e3,Number(b.limit)||$a)),T={...b,limit:v,direction:b.direction??"forward"},R=Cd(T),P=r.get(R);if(P)return Jo({sourceKey:a,descriptor:n,totalCount:P.totalCount,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-C,lastWindowRows:P.rows.length,lastWindowStartIndex:P.startIndex,lastCacheHit:true}),P;const L=Math.max(0,Math.floor(Number(T.startIndex)||0)),D=l();let O=null,B=[],I,x,F=false,U=false;const Ce=!!(T.after||T.before);if(Ce){const Z=await c(T,v);B=Z.documents.map(ce=>ce.raw_ref_key||ce.entity_id).filter(Boolean),I=Z.cursorBefore,x=Z.cursorAfter,F=Z.hasBefore,U=Z.hasAfter;}else {O=await D;const Z=await We.extGetFolderSourceIndexedPage({sourceKey:a,extensionName:e.extensionName,entityType:e.entityType,folderIds:t,sourceCount:O,offset:L,limit:v});if(Z)B=Z.rowIds,x=Z.cursorAfter,F=L>0,U=L+B.length<O;else {g(O);const ce=await h(L,v)??await f(L,v);B=ce.documents.map(he=>he.raw_ref_key||he.entity_id).filter(Boolean),I=ce.cursorBefore,x=ce.cursorAfter,F=ce.hasBefore,U=ce.hasAfter;}}O??(O=await D),!Ce&&!U&&(U=L+B.length<O);const X=await Oh(e.entityType,B),re={source:n,totalCount:O,startIndex:T.startIndex,rows:X,rowIds:B,hasBefore:F,hasAfter:U,cursorBefore:I,cursorAfter:x};return Pa(o,L+B.length,x),r.set(R,re),Jo({sourceKey:a,descriptor:n,totalCount:O,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-C,lastWindowRows:X.length,lastWindowStartIndex:T.startIndex,lastCacheHit:false}),re};return {key:a,descriptor:n,totalCount:l,getWindow:_,getByIds:b=>Oh(e.entityType,b),streamRows:async function*(C={}){var L,D;let v=C.cursor,T=0;const R=!!C.cursor,P=Math.max(1,Math.min(1e3,Number(C.batchSize)||$a));for(;!((L=C.signal)!=null&&L.aborted);){const O=R&&v?await _({limit:P,after:v}):await _({startIndex:T,limit:P});for(const B of O.rows){if((D=C.signal)!=null&&D.aborted)return;yield B;}if(!O.hasAfter||!O.rows.length)return;if(T+=O.rows.length,O.cursorAfter)v=O.cursorAfter;else if(R)return}}}}function oS(e){const t=ay(e.folderIds??[]),n=z0({extensionName:e.extensionName,folderIds:t,direction:"desc"}),r=new Sd(e.cachePages??Ol),o=Fl(n);let a=null,i=null;const s=async()=>i!==null?i:(a||(a=We.extGetSearchDocumentMediaCount(e.extensionName,{entityType:"tweet",folderIds:t}).then(c=>(i=Number(c)||0,i)).catch(c=>{throw a=null,c})),await a),l=async c=>{const h=performance.now(),f=Math.max(1,Math.min(1e3,Number(c.limit)||$a)),m={...c,limit:f,direction:c.direction??"forward"},g=Cd(m),_=r.get(g);if(_)return Jo({sourceKey:o,descriptor:n,totalCount:_.totalCount,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-h,lastWindowRows:_.rows.length,lastWindowStartIndex:_.startIndex,lastCacheHit:true}),_;const b=Math.max(0,Math.floor(Number(m.startIndex)||0)),C=await We.extGetSearchDocumentMediaCursorPage(e.extensionName,{entityType:"tweet",folderIds:t,after:m.after,before:m.before,offset:m.after||m.before?void 0:b,limit:f,order:"newest"}),v=i??Math.max(b+C.documents.length+(C.hasAfter?1:0),0),T=C.documents.map(L=>L.entity_id).filter(Boolean),R=await We.extGetTweetsByIds(T)??[],P={source:n,totalCount:v,startIndex:m.startIndex,rows:R,rowIds:T,hasBefore:C.hasBefore,hasAfter:C.hasAfter,cursorBefore:C.cursorBefore,cursorAfter:C.cursorAfter};return r.set(g,P),Jo({sourceKey:o,descriptor:n,totalCount:v,cachedPages:r.size,cachedRows:r.rowCount,lastFetchDurationMs:performance.now()-h,lastWindowRows:R.length,lastWindowStartIndex:m.startIndex,lastCacheHit:false}),i===null&&globalThis.setTimeout(()=>{s().catch(()=>{});},3e3),P};return {key:o,descriptor:n,totalCount:s,getWindow:l,getByIds:async c=>await We.extGetTweetsByIds(c)??[],streamRows:async function*(h={}){var b,C;let f=h.cursor,m=0;const g=!!h.cursor,_=Math.max(1,Math.min(1e3,Number(h.batchSize)||$a));for(;!((b=h.signal)!=null&&b.aborted);){const v=g&&f?await l({limit:_,after:f}):await l({startIndex:m,limit:_});for(const T of v.rows){if((C=h.signal)!=null&&C.aborted)return;yield T;}if(!v.hasAfter||!v.rows.length)return;if(m+=v.rows.length,v.cursorAfter)f=v.cursorAfter;else if(g)return}}}}let bs=null;function Nh(){return bs||(bs=new j0,bs)}const We=new Proxy({},{get(e,t,n){const r=Nh(),o=Reflect.get(r,t,n);return typeof o=="function"?o.bind(r):o},set(e,t,n,r){const o=Nh();return Reflect.set(o,t,n,r)}}),Bh="__twe_active_db_name_v1",Nc="BookmarksModule",aS=["twitter-web-exporter","scrollmark"],iS=["captures","tweets","users","social_edges","search_documents","imported_bundles","imported_entity_snapshots"];function iy(e){return aS.some(t=>e.includes(t))}function sS(){const e=t=>{if(!t||typeof t!="object")return null;const n=t[Bh];return typeof n=="string"&&n.trim()?n.trim():null};try{const t=e(globalThis);if(t)return t}catch{}try{if(typeof window<"u"){const t=e(window);if(t)return t}}catch{}try{if(typeof localStorage<"u"){const t=localStorage.getItem(Bh);if(t!=null&&t.trim())return t.trim()}}catch{}return null}async function lS(){if(typeof indexedDB>"u"||typeof indexedDB.databases!="function")return [];try{const e=await indexedDB.databases();return Array.from(new Set((e||[]).map(t=>t==null?void 0:t.name).filter(t=>typeof t=="string"&&iy(t)))).sort()}catch{return []}}function Bc(e){return new Promise(t=>{e.onsuccess=()=>t(Number(e.result)||0),e.onerror=()=>t(0);})}async function cS(e,t){return await new Promise(n=>{const r=indexedDB.open(e);r.onerror=()=>{var o;n({name:e,active:e===t,tables:{},error:((o=r.error)==null?void 0:o.message)||"open failed"});},r.onsuccess=()=>{const o=r.result;(async()=>{try{const a=iS.filter(m=>o.objectStoreNames.contains(m));if(!a.length){o.close(),n({name:e,active:e===t,tables:{}});return}const i={},s=o.transaction(a,"readonly");s.onerror=()=>{var m;o.close(),n({name:e,active:e===t,tables:i,error:((m=s.error)==null?void 0:m.message)||"transaction failed"});};const l={};let c;const h=a.map(async m=>{i[m]=await Bc(s.objectStore(m).count());}),f=[];if(a.includes("captures")){const m=s.objectStore("captures");m.indexNames.contains("extension")&&f.push(Bc(m.index("extension").count(Nc)).then(g=>{l[Nc]=g;})),m.indexNames.contains("[extension+type]")&&f.push(Bc(m.index("[extension+type]").count([Nc,"tweet"])).then(g=>{c=g;}));}await Promise.all([...h,...f]),o.close(),n({name:e,active:e===t,tables:i,captures_by_extension:Object.keys(l).length?l:void 0,bookmark_tweet_captures:c});}catch(a){o.close(),n({name:e,active:e===t,tables:{},error:a instanceof Error?a.message:String(a)});}})();};})}async function sy(){const e=sS(),t=await lS();return e&&iy(e)&&!t.includes(e)&&(t.push(e),t.sort()),typeof indexedDB>"u"?{active_db_name:e,databases:[]}:{active_db_name:e,databases:await Promise.all(t.map(n=>cS(n,e)))}}function ly(){try{const e=globalThis.GM_info;if(!e||typeof e!="object")return {};const t=e,n=t.script&&typeof t.script=="object"?t.script:{};return {scriptHandler:t.scriptHandler,version:t.version,platform:t.platform,script:n}}catch{return {}}}function cy(){const e=typeof navigator<"u"?navigator:null;return {userAgent:(e==null?void 0:e.userAgent)??"",vendor:(e==null?void 0:e.vendor)??"",platform:(e==null?void 0:e.platform)??"",language:(e==null?void 0:e.language)??"",languages:e!=null&&e.languages?[...e.languages]:[],cookieEnabled:(e==null?void 0:e.cookieEnabled)??null,webdriver:(e==null?void 0:e.webdriver)??null}}async function uS(){const e=await We.count().catch(()=>null),t=(await We.bundleList().catch(()=>[])??[]).map(n=>({id:n.id,title:n.title,status:n.status,recordCount:n.recordCount,schemaVersion:n.schemaVersion,importedAt:n.importedAt,updatedAt:n.updatedAt}));return {generated_at_ms:Date.now(),browser:cy(),userscript_manager:ly(),runtime_modes:fy(),hook_stats:hy(),raw_capture_stats:dl(),diagnostic_capture_enabled:kr(),database_counts:e,imported_bundle_count:t.length,imported_bundles:t,checklist:{canonical_bundle_export:"manual-qc-required",canonical_bundle_import:"manual-qc-required",legacy_json_import:"manual-qc-required",malicious_import_safety:"manual-qc-required",chrome_parity:"manual-qc-required",firefox_parity:"manual-qc-required"}}}async function uy(){const e=Date.now(),t=new Date(e).toISOString(),n=globalThis,r=await(async()=>{try{if(!(indexedDB!=null&&indexedDB.databases))return [];const m=await indexedDB.databases();return (Array.isArray(m)?m:[]).map(g=>g==null?void 0:g.name).filter(g=>typeof g=="string")}catch{return []}})(),o=await sy(),a=(()=>{try{const m=n.__twe_raw_events_v1;return Array.isArray(m)?m.slice(-10).map(g=>{if(!g||typeof g!="object")return null;const _=g;return {event_id:typeof _.event_id=="string"?_.event_id:null,kind:typeof _.kind=="string"?_.kind:null,wall_time_ms:typeof _.wall_time_ms=="number"?_.wall_time_ms:null,route_type:typeof _.route_type=="string"?_.route_type:null}}):[]}catch{return []}})(),i=(()=>{try{const m=n.__twe_raw_events_v1;return Array.isArray(m)?m.slice():[]}catch{return []}})(),s=Ib(),l=el.value.slice(-400),c=["twe_safe_mode_v1","twe_hook_mode_v1","twe_repair_mode_v1","twe_raw_capture_enabled_v1","twe_raw_capture_encryption_ready_v1","twe_raw_capture_dm_session_armed_until_ms_v1","twe_raw_capture_stream_enabled_v1","twe_raw_capture_daemon_url_v1"],h={};for(const m of c)try{h[m]=localStorage.getItem(m);}catch{h[m]=null;}const f={dedicatedDbForAccounts:ut.get("dedicatedDbForAccounts",false),directMessagesCaptureEnabled:ut.get("directMessagesCaptureEnabled",false),rawCaptureEncryptedStorageReady:ut.get("rawCaptureEncryptedStorageReady",false),rawCapturePolicyPublicEnabled:ut.get("rawCapturePolicyPublicEnabled",true),rawCapturePolicySensitiveEnabled:ut.get("rawCapturePolicySensitiveEnabled",true),rawCapturePolicyDmEnabled:ut.get("rawCapturePolicyDmEnabled",true)};return {generated_at_ms:e,generated_at_iso:t,location:typeof location<"u"?location.href:"",title:typeof document<"u"?document.title:"",runtime_modes:fy(),hook_stats:hy(),browser:cy(),userscript_manager:ly(),release_readiness:await uS(),performance:A0(),result_sources:G0(),raw_capture_stats:dl(),raw_events_recent:a,raw_events_count:i.length,diagnostic_capture_enabled:kr(),diagnostic_buffer_counts:{parser:s.parser.length,db:s.db.length,interaction:s.interaction.length,logs:l.length},indexeddb_names:r,indexeddb_inventory:o,local_storage:h,app_options:f,raw_events_full:i,diagnostic_buffers:s,recent_logs:l}}function dy(e,t){const n=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,o.click(),URL.revokeObjectURL(r);}async function Td(){const e=await uy(),t=Date.now(),{raw_events_full:n=[],diagnostic_buffers:r={parser:[],db:[],interaction:[]},recent_logs:o=[],...a}=e,i=[{filename:"summary.json",blob:new Blob([JSON.stringify(a,null,2)],{type:"application/json"})},{filename:"raw-events.json",blob:new Blob([JSON.stringify(n,null,2)],{type:"application/json"})},{filename:"parser-events.json",blob:new Blob([JSON.stringify(r.parser??[],null,2)],{type:"application/json"})},{filename:"db-events.json",blob:new Blob([JSON.stringify(r.db??[],null,2)],{type:"application/json"})},{filename:"interaction-events.json",blob:new Blob([JSON.stringify(r.interaction??[],null,2)],{type:"application/json"})},{filename:"recent-logs.json",blob:new Blob([JSON.stringify(o,null,2)],{type:"application/json"})},{filename:"release-readiness.json",blob:new Blob([JSON.stringify(a.release_readiness??{},null,2)],{type:"application/json"})}];return await vd(`twe-diagnostics-${t}.zip`,i)}function dS(){try{return localStorage.getItem("twe_enable_synthetic_db_tools_v1")==="1"||location.search.includes("scrollmarkSyntheticDb=1")}catch{return false}}function fS(){if(!dS())return;const e=globalThis;e.__scrollmark_collect_diagnostics_bundle_v1=uy,e.__scrollmark_export_diagnostics_bundle_zip_v1=Td;}fS();function dl(){try{const e=globalThis.__twe_raw_capture_stats_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}function fy(){try{const e=globalThis.__twe_runtime_modes_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}function hy(){try{const e=globalThis.__twe_hook_stats_v1;return !e||typeof e!="object"?{}:e}catch{return {}}}function hS(e){return String(e||"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/_+/g,"_")}function pS(e){const t=e.data&&typeof e.data=="object"?e.data:{},n=t.metadata&&typeof t.metadata=="object"?t.metadata:{},r=[t.full_text,t.text,t.description,n.legacy&&typeof n.legacy=="object"?n.legacy.full_text:void 0,t.name,t.screen_name];for(const o of r)if(typeof o=="string"&&o.trim())return o.trim();return String(e.search_text||"").slice(0,240)}function Uc(e){if(typeof e!="string")return null;try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:null}catch{return null}}function Uh(e){const t=new Set;for(const o of e.media_refs||[]){const a=Uc(o.previewUrl),i=Uc(o.url);a&&t.add(a),i&&t.add(i);}const n=e.data&&typeof e.data=="object"?e.data:{},r=Array.isArray(n.media)?n.media:[];for(const o of r){if(!o||typeof o!="object")continue;const a=o;for(const i of ["thumbnail","original","url","media_url_https"]){const s=a[i],l=Uc(s);l&&t.add(l);}}return [...t].slice(0,8)}async function $h(){await new Promise(e=>{setTimeout(e,0);});}function mS(){const{t:e,i18n:t}=Qn(),n=rn(ut.get("theme")),r=rn(0),[o,a]=ir(false),[i,s]=ir(false),[l,c]=ir(false),[h,f]=ir(false),m=rn(true),g=rn(true),_=rn(false),b=rn({current:0,total:0}),C=rn(""),v=rn(null),T=rn(""),R=rn(""),P=rn([]),L=rn([]),D=rn(""),O=rn(""),B=rn("all"),I=rn(""),x=rn(false),F=rn(""),U=rn(false),Ce=rn(kr()),X={subtitle:"mb-2 text-base-content ml-4 opacity-50 font-semibold text-xs",block:"text-sm mb-2 w-full flex px-4 py-2 text-base-content bg-base-200 rounded-box justify-between",item:"label cursor-pointer flex justify-between h-8 items-center p-0",wrapButton:"btn btn-xs h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight"},re=async()=>{if(_.value)return;_.value=true,v.value=null,C.value="Preparing export...",b.value={current:0,total:0};const z=Date.now(),ue=[],Ae=[];let ie=0;try{if(m.value){C.value="Exporting DB snapshot...";const ne=await We.export();ne&&ue.push({filename:"database/twitter-web-exporter-db.json",blob:ne});}if(g.value){C.value="Collecting module exports...";const ne=er.getExtensions(),V=ne.length;for(const[se,_e]of ne.entries()){C.value=`Collecting module exports (${se+1}/${V}): ${_e.name}`;const ke=await We.extGetCaptures(_e.name)??[];if(!ke.length){ie+=1,await $h();continue}let Ze=[];_e.type===_t.TWEET?Ze=await We.extGetCapturedTweets(_e.name,ke)??[]:_e.type===_t.USER&&(Ze=await We.extGetCapturedUsers(_e.name,ke)??[]);const Me=`modules/${hS(_e.name)}.json`,bt={extension:_e.name,type:_e.type,exported_at_ms:z,capture_count:ke.length,record_count:Ze.length,captures:ke,records:Ze};ue.push({filename:Me,blob:new Blob([JSON.stringify(bt)],{type:"application/json"})}),Ae.push({extension:_e.name,type:_e.type,capture_count:ke.length,record_count:Ze.length,filename:Me}),await $h();}}const Oe={generated_at_ms:z,generated_at_iso:new Date(z).toISOString(),include_db_snapshot:m.value,include_module_exports:g.value,files_total:ue.length+1,modules_exported:Ae.length,modules_skipped_empty:ie,modules:Ae};if(ue.unshift({filename:"manifest.json",blob:new Blob([JSON.stringify(Oe,void 0,2)],{type:"application/json"})}),!ue.length)throw new Error("No files prepared for bundle export.");const Le=`twitter-web-exporter-bundle-${z}.zip`;C.value="Creating ZIP...",b.value={current:0,total:ue.length};const ee=await vd(Le,ue,(ne,V)=>{b.value={current:ne,total:V};});R.value&&(URL.revokeObjectURL(R.value),R.value=""),T.value=Le,R.value=URL.createObjectURL(ee),C.value=`Bundle export completed: ${Le}`,v.value={modules:Ae.length,files:ue.length,skipped:ie};}catch(Oe){C.value=`Bundle export failed: ${(Oe==null?void 0:Oe.message)??"Unknown error"}`;}finally{_.value=false;}},Z=async()=>{P.value=await We.bundleList()??[];},ce=async z=>{if(!(!z||x.value)){x.value=true,I.value=`Importing ${z.name}...`;try{const Ae=z.name.toLowerCase().endsWith(".zip")||z.type==="application/zip"||z.type==="application/x-zip-compressed"?await Ig(We,z):await Dg(We,z);I.value=`Imported ${Ae.recordsImported}/${Ae.recordsSeen} records from ${z.name}`,await Z();}catch(ue){I.value=`Import failed: ${ue.message}`;}finally{x.value=false;}}},he=async()=>{if(!D.value){L.value=[];return}const z=await We.bundleSearchSnapshots(D.value,O.value,1e3)??[];L.value=B.value==="all"?z:z.filter(ue=>ue.kind===B.value);},fe=async()=>{const z=P.value.find(ue=>ue.id===D.value);!z||!L.value.length||await Cx(L.value.map((ue,Ae)=>({id:ue.source_id||ue.id||String(Ae),original:ue.data,record:ue.data&&typeof ue.data=="object"?ue.data:{value:ue.data}})),{title:`${z.title}-subset`,description:`Re-exported subset from imported bundle ${z.id}`,scope:"bundle",queryText:O.value});},me=async()=>{if(!U.value){U.value=true,F.value="Preparing QC diagnostics bundle...";try{await Td(),F.value="QC diagnostics bundle exported.";}catch(z){F.value=`QC diagnostics export failed: ${z.message}`;}finally{U.value=false;}}};return it(()=>{const z=ut.signal.subscribe(()=>{r.value++,n.value=ut.get("theme");});return ()=>{typeof z=="function"&&z(),R.value&&URL.revokeObjectURL(R.value);}},[]),it(()=>{l&&Z();},[l]),it(()=>{typeof nl=="function"&&nl(`${e("Version")} ${vr.version}`,()=>{window.open(vr.homepage,"_blank");});},[]),d(fr,{children:[d("div",{onClick:a,class:"w-9 h-9 mr-2 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:d(Tw,{})}),d(sr,{title:e("Settings"),show:o,onClose:a,class:"max-w-lg",children:[d("p",{class:X.subtitle,children:e("General")}),d("div",{class:an(X.block,"flex-col"),children:[d("label",{class:X.item,children:[d("span",{class:"label-text whitespace-nowrap",children:e("Theme")}),d("select",{class:"select select-xs",onChange:z=>{var ue;n.value=((ue=z.target)==null?void 0:ue.value)??Ls.theme,ut.set("theme",n.value);},children:Xb.map(z=>d("option",{value:z,selected:n.value===z,children:e(`theme.${z}`)},z))})]}),d("label",{class:X.item,children:[d("span",{class:"label-text whitespace-nowrap",children:e("Language")}),d("select",{class:"select select-xs",onChange:z=>{var Ae;const ue=((Ae=z.target)==null?void 0:Ae.value)??Zm();t.changeLanguage(ue),ut.set("language",ue);},children:Object.entries(Qm).map(([z,ue])=>d("option",{value:z,selected:ut.get("language")===z,children:[ue.nameEn," - ",ue.name]},z))})]}),d("label",{class:X.item,children:[d("span",{class:"label-text whitespace-nowrap",children:e("Debug")}),d("input",{type:"checkbox",class:"toggle toggle-primary",checked:ut.get("debug"),onChange:z=>{var ue;ut.set("debug",(ue=z.target)==null?void 0:ue.checked);}})]}),d("label",{class:X.item,children:[d("div",{class:"flex items-center",children:[d("span",{class:"label-text whitespace-nowrap",children:e("Safe mode")}),d("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Disables hook-based capture when enabled. Turn this off for normal browsing and diagnostic capture."),children:d(Sa,{size:20})})]}),d("input",{type:"checkbox",class:"toggle toggle-warning",checked:ut.get("safeMode"),onChange:z=>{var ue;ut.set("safeMode",(ue=z.target)==null?void 0:ue.checked);}},`safe-mode-${r.value}`)]}),d("label",{class:X.item,children:[d("div",{class:"flex items-center",children:[d("span",{class:"label-text whitespace-nowrap",children:e("Hook mode")}),d("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Controls whether the userscript hooks XHR, fetch, both, or neither."),children:d(Sa,{size:20})})]}),d("select",{class:"select select-xs",value:ut.get("hookMode"),onChange:z=>{var ue;ut.set("hookMode",(ue=z.target)==null?void 0:ue.value);},children:[d("option",{value:"both",children:e("both")}),d("option",{value:"xhr",children:e("xhr")}),d("option",{value:"fetch",children:e("fetch")}),d("option",{value:"off",children:e("off")})]})]}),d("label",{class:X.item,children:[d("div",{class:"flex items-center",children:[d("span",{class:"label-text whitespace-nowrap",children:e("Repair mode")}),d("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Controls whether hook repair watchdog behavior is active."),children:d(Sa,{size:20})})]}),d("select",{class:"select select-xs",value:ut.get("repairMode"),onChange:z=>{var ue;ut.set("repairMode",(ue=z.target)==null?void 0:ue.value);},children:[d("option",{value:"watchdog",children:e("watchdog")}),d("option",{value:"off",children:e("off")})]})]}),d("label",{class:X.item,children:[d("div",{class:"flex items-center",children:[d("span",{class:"label-text whitespace-nowrap",children:e("Date Time Format")}),d("a",{href:"https://day.js.org/docs/en/display/format",target:"_blank",rel:"noopener noreferrer",class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("Click for more information. This will take effect on both previewer and exported files."),children:d(Sa,{size:20})})]}),d("input",{type:"text",class:"input input-bordered input-xs w-48",value:ut.get("dateTimeFormat"),onChange:z=>{var ue;ut.set("dateTimeFormat",(ue=z.target)==null?void 0:ue.value);}})]}),d("label",{class:X.item,children:[d("div",{class:"flex items-center",children:[d("span",{class:"label-text whitespace-nowrap",children:e("Use dedicated DB for accounts")}),d("a",{class:"tooltip tooltip-bottom ml-0.5 before:max-w-40","data-tip":e("This will create separate database for each Twitter account, which can help reduce the chance of data mixing when you use multiple accounts."),children:d(Sa,{size:20})})]}),d("input",{type:"checkbox",class:"toggle toggle-primary",checked:ut.get("dedicatedDbForAccounts"),onChange:z=>{var ue;ut.set("dedicatedDbForAccounts",(ue=z.target)==null?void 0:ue.checked);}})]}),d("div",{class:"flex w-full flex-col gap-2 py-1",children:[d("div",{class:"flex items-center justify-between gap-2",children:d("span",{class:"label-text whitespace-nowrap",children:e("Local Database")})}),d("div",{class:"grid min-w-0 grid-cols-2 gap-2 sm:grid-cols-3",children:[d("button",{class:an(X.wrapButton,"btn-neutral"),onClick:async()=>{let z="Storage usage: N/A";if(typeof navigator.storage.estimate=="function"){const{quota:ie=1,usage:Oe=0}=await navigator.storage.estimate(),Le=(Oe/1024/1024).toFixed(2),ee=(ie/1024/1024).toFixed(2);z=`Storage usage: ${Le}MB / ${ee}MB`;}const ue=await We.count(),Ae=await sy();alert(z+`
IndexedDB tables count:
`+JSON.stringify(ue,void 0," ")+`
Scrollmark database inventory:
`+JSON.stringify(Ae,void 0," "));},children:[d(ff,{size:20}),e("Analyze DB")]}),d("button",{class:an(X.wrapButton,"btn-primary"),onClick:async()=>{const z=await We.export();z&&Xo(`twitter-web-exporter-${Date.now()}.json`,z);},children:[d(dc,{size:20}),e("Export DB")]}),d("button",{class:an(X.wrapButton,"btn-info"),onClick:s,children:[d(dc,{size:20}),e("Bundle Export")]}),d("button",{class:an(X.wrapButton,"btn-secondary"),onClick:c,children:[d(dc,{size:20}),e("Bundle Library")]}),d("button",{class:an(X.wrapButton,"btn-accent"),onClick:f,children:[d(ff,{size:20}),e("QC Session")]}),d("button",{class:an(X.wrapButton,"btn-warning"),onClick:async()=>{confirm(e("Are you sure to clear all data in the database?"))&&await We.clear();},children:[d(Iw,{size:20}),e("Clear DB")]})]})]})]}),d("p",{class:X.subtitle,children:e("Modules (Scroll to see more)")}),d("div",{class:an(X.block,"flex-col","max-h-44 overflow-scroll"),children:er.getExtensions().map(z=>d("label",{class:an(X.item,"flex-shrink-0"),children:[d("span",{children:[e(z.name.replace("Module",""))," ",e("Module")]}),d("input",{type:"checkbox",class:"toggle toggle-secondary",checked:z.enabled,onChange:()=>{z.enabled?er.disable(z.name):er.enable(z.name);}})]},z.name))}),d("p",{class:X.subtitle,children:e("About")}),d("div",{class:X.block,children:[d("span",{class:"label-text whitespace-nowrap",children:[e("Version")," ",vr.version]}),d("a",{class:"btn btn-xs btn-ghost",target:"_blank",href:vr.homepage,children:[d(Aw,{class:"[&>path]:stroke-0"}),"GitHub"]})]})]}),d(sr,{title:"Bundle Export",show:i,onClose:s,class:"max-w-lg",children:[d("div",{class:"px-4 text-base",children:[d("p",{class:"text-base-content text-opacity-60 mb-2 leading-5 text-sm",children:"Create one ZIP with a DB snapshot and per-module JSON exports."}),d("label",{class:X.item,children:[d("span",{class:"label-text whitespace-nowrap",children:"Include DB snapshot"}),d("input",{type:"checkbox",class:"toggle toggle-primary",checked:m.value,onChange:z=>{var ue;m.value=(ue=z.target)==null?void 0:ue.checked;}})]}),d("label",{class:X.item,children:[d("span",{class:"label-text whitespace-nowrap",children:"Include module exports"}),d("input",{type:"checkbox",class:"toggle toggle-primary",checked:g.value,onChange:z=>{var ue;g.value=(ue=z.target)==null?void 0:ue.checked;}})]}),d("div",{class:"text-xs text-base-content text-opacity-70 mt-2",children:["Status: ",C.value||"Idle"]}),d("div",{class:"text-xs text-base-content text-opacity-70",children:["Progress: ",b.value.current,"/",b.value.total]}),v.value&&d("div",{class:"text-xs text-base-content text-opacity-70 mt-1",children:["Exported modules: ",v.value.modules," | files: ",v.value.files," | skipped empty modules: ",v.value.skipped]}),T.value&&d("div",{class:"text-xs text-base-content text-opacity-70 mt-1 break-all",children:["Last ZIP: ",d("code",{children:T.value})]}),R.value&&d("div",{class:"text-xs mt-1",children:d("a",{class:"link link-primary",href:R.value,download:T.value,children:"Download again"})})]}),d("div",{class:"flex space-x-2",children:[d("span",{class:"flex-grow"}),d("button",{class:"btn",onClick:s,children:"Cancel"}),d("button",{class:an("btn btn-primary",_.value&&"btn-disabled"),onClick:re,children:[_.value&&d("span",{class:"loading loading-spinner"}),"Export Bundle ZIP"]})]})]}),d(sr,{title:"Bundle Library",show:l,onClose:c,class:"max-w-2xl",children:[d("div",{class:"px-4 text-sm",children:[d("p",{class:"text-base-content text-opacity-60 mb-3 leading-5",children:"Import canonical TWE bundle ZIPs into isolated local bundle tables. Imported bundles do not mutate live captures or your X account."}),d("div",{class:"rounded-box-half border border-base-300 bg-base-200/70 p-3",children:[d("label",{class:"flex items-center justify-between gap-3",children:[d("span",{class:"font-semibold",children:"Import bundle ZIP or legacy JSON/JSONL"}),d("input",{type:"file",accept:".zip,.json,.jsonl,application/zip,application/json,application/x-ndjson",class:"file-input file-input-bordered file-input-sm max-w-xs",disabled:x.value,onChange:z=>{var Ae;const ue=z.target;ce((Ae=ue.files)==null?void 0:Ae[0]),ue.value="";}})]}),d("div",{class:"mt-2 font-mono text-xs opacity-70",children:[x.value?"busy: ":"",I.value||"Idle"]})]}),d("div",{class:"mt-3 flex items-center justify-between",children:[d("h3",{class:"font-semibold",children:"Imported bundles"}),d("button",{class:"btn btn-xs btn-outline",onClick:()=>void Z(),children:"Refresh"})]}),d("div",{class:"mt-2 max-h-80 overflow-y-auto rounded-box-half border border-base-300",children:P.value.length?d("table",{class:"table table-sm",children:[d("thead",{children:d("tr",{children:[d("th",{children:"Title"}),d("th",{children:"Status"}),d("th",{children:"Records"}),d("th",{children:"Imported"}),d("th",{})]})}),d("tbody",{children:P.value.map(z=>d("tr",{children:[d("td",{children:[d("div",{class:"font-semibold",children:z.title}),d("div",{class:"font-mono text-[10px] opacity-60",children:z.id})]}),d("td",{children:d("span",{class:"badge badge-sm badge-outline",children:z.status})}),d("td",{class:"font-mono text-xs",children:z.recordCount}),d("td",{class:"font-mono text-xs",children:new Date(z.importedAt).toLocaleString()}),d("td",{children:[d("button",{class:"btn btn-xs btn-primary btn-outline mr-1",onClick:async()=>{D.value=z.id,O.value="",B.value="all",await he();},children:"View"}),d("button",{class:"btn btn-xs btn-error btn-outline",onClick:async()=>{confirm(`Delete imported bundle "${z.title}"?`)&&(await We.bundleDelete(z.id),D.value===z.id&&(D.value="",L.value=[]),await Z());},children:"Delete"})]})]},z.id))})]}):d("div",{class:"p-6 text-center text-base-content/50",children:"No imported bundles yet."})}),D.value?d("div",{class:"mt-3 rounded-box-half border border-base-300 bg-base-200/50 p-3",children:[d("div",{class:"mb-2 flex items-center justify-between gap-2",children:[d("div",{children:[d("h3",{class:"font-semibold",children:"Bundle Viewer"}),d("div",{class:"font-mono text-[10px] opacity-60",children:D.value})]}),d("button",{class:"btn btn-xs btn-outline",onClick:()=>{D.value="",L.value=[];},children:"Close Viewer"})]}),d("label",{class:"input input-bordered input-sm mb-2 flex items-center gap-2",children:[d("span",{class:"text-xs opacity-60",children:"Search"}),d("input",{class:"grow bg-transparent",value:O.value,onInput:z=>{O.value=z.target.value;},onKeyDown:z=>{z.key==="Enter"&&he();}}),d("button",{class:"btn btn-xs",onClick:()=>void he(),children:"Run"})]}),d("div",{class:"mb-2 flex items-center justify-between gap-2",children:[d("div",{class:"flex items-center gap-2",children:[d("select",{class:"select select-bordered select-xs",value:B.value,onChange:z=>{B.value=z.target.value,he();},children:[d("option",{value:"all",children:"all kinds"}),d("option",{value:"tweet",children:"tweets"}),d("option",{value:"user",children:"users"}),d("option",{value:"unknown",children:"unknown"})]}),d("span",{class:"font-mono text-xs opacity-70",children:["Showing ",L.value.length," snapshots"]})]}),d("button",{class:"btn btn-xs btn-secondary",disabled:!L.value.length,onClick:()=>void fe(),children:"Export Loaded Subset"})]}),d("div",{class:"max-h-72 overflow-y-auto rounded-box-half border border-base-300 bg-base-100",children:L.value.length?L.value.map(z=>d("details",{class:"border-b border-base-300 p-2 text-xs",children:[d("summary",{class:"cursor-pointer",children:[d("span",{class:"badge badge-xs badge-outline mr-2",children:z.kind}),d("span",{class:"font-mono mr-2",children:z.source_id||z.id}),d("span",{class:"opacity-60",children:z.observed_at?new Date(z.observed_at).toLocaleString():""})]}),d("div",{class:"mt-2 rounded bg-base-100 p-2",children:[d("p",{class:"whitespace-pre-wrap text-sm leading-5",children:pS(z)||"(no text preview)"}),Uh(z).length?d("div",{class:"mt-2 grid grid-cols-4 gap-2",children:Uh(z).map(ue=>d("a",{href:ue,target:"_blank",rel:"noopener noreferrer",children:ue.includes(".mp4")?d("video",{src:ue,class:"h-20 w-full rounded object-cover"}):d("img",{src:ue,class:"h-20 w-full rounded object-cover",loading:"lazy"})},ue))}):null]}),d("pre",{class:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap rounded bg-base-200 p-2 text-[10px] leading-4",children:JSON.stringify(z.data,null,2)})]},z.id)):d("div",{class:"p-6 text-center text-base-content/50",children:"No snapshots loaded."})})]}):null]}),d("div",{class:"flex space-x-2",children:[d("span",{class:"flex-grow"}),d("button",{class:"btn",onClick:c,children:"Close"})]})]}),d(sr,{title:"Unified QC Session",show:h,onClose:f,class:"max-w-3xl",children:[d("div",{class:"px-4 text-sm",children:[d("p",{class:"mb-3 text-base-content/70",children:"Use this single session to QC Bundle Library, core release workflows, and Firefox/Chrome parity. Run Firefox first, export diagnostics, then repeat the browser parity subset in Chrome and export diagnostics again."}),d("div",{class:"grid gap-3 md:grid-cols-2",children:[d("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[d("h3",{class:"mb-2 font-semibold",children:"Preparation"}),d("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[d("li",{children:"Install the current local userscript in Firefox."}),d("li",{children:"Open Settings and set Safe mode off, Hook mode both, Repair mode watchdog."}),d("li",{children:"Enable Diagnostic capture below."}),d("li",{children:"Browse X normally long enough to confirm counters increment."}),d("li",{children:"Repeat the parity subset in Chrome after Firefox is complete."})]})]}),d("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[d("h3",{class:"mb-2 font-semibold",children:"Bundle Library"}),d("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[d("li",{children:["Export a filtered result set with Export Data ","->"," Export Bundle ZIP."]}),d("li",{children:["Import that ZIP through Settings ","->"," Bundle Library."]}),d("li",{children:"Search exact text from one imported row."}),d("li",{children:"Filter by tweets/users, inspect text/media/raw JSON."}),d("li",{children:"Export Loaded Subset, then import that subset ZIP."}),d("li",{children:"Import the legacy and malicious fixtures from e2e/fixtures/bundles."})]})]}),d("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[d("h3",{class:"mb-2 font-semibold",children:"Core Release Smoke"}),d("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[d("li",{children:"Bookmarks folder scroll indexes rows and folder metadata."}),d("li",{children:"Bookmark-from-feed increments and later resolves folder details."}),d("li",{children:"Search exact snippets and phrases rank correctly enough for QC."}),d("li",{children:"Table fullscreen and masonry scrolling remain stable."}),d("li",{children:"Export Data and Export Media complete without browser freeze."})]})]}),d("section",{class:"rounded-box-half border border-base-300 bg-base-200/60 p-3",children:[d("h3",{class:"mb-2 font-semibold",children:"Chrome Parity"}),d("ol",{class:"list-decimal space-y-1 pl-5 text-xs leading-5",children:[d("li",{children:"Install in Chrome userscript manager."}),d("li",{children:"Confirm widget loads on x.com and settings toggles work."}),d("li",{children:"Confirm hooks/counters increment with Safe mode off."}),d("li",{children:"Run Bundle ZIP export/import and legacy import."}),d("li",{children:"Run one media export and one diagnostics export."}),d("li",{children:"Record any Chrome-only console errors or CSP differences."})]})]})]}),d("div",{class:"mt-3 rounded-box-half border border-base-300 bg-base-100 p-3",children:[d("div",{class:"grid min-w-0 grid-cols-2 items-center gap-2",children:[d("label",{class:"label min-w-0 cursor-pointer gap-2 py-0",children:[d("span",{class:"text-xs",children:e("Diagnostic capture")}),d("input",{type:"checkbox",class:"toggle toggle-sm",checked:Ce.value,onChange:z=>{const ue=z.target.checked;Km(ue),Ce.value=ue;}})]}),d("button",{class:an(X.wrapButton,"btn-outline"),onClick:()=>{Gm(),F.value=e("Diagnostic buffers cleared.");},children:e("Clear Buffers")}),d("button",{class:an(X.wrapButton,"btn-primary col-span-2"),disabled:U.value,onClick:me,children:U.value?e("Preparing..."):e("Export QC Diagnostics")})]}),d("div",{class:"mt-2 font-mono text-xs opacity-70",children:F.value||e("QC idle.")}),d("div",{class:"mt-2 text-xs opacity-70",children:["Full runbook: ",d("code",{children:"docs/release/unified-qc-session-runbook.md"})]})]})]}),d("div",{class:"flex space-x-2",children:[d("span",{class:"flex-grow"}),d("button",{class:"btn",onClick:f,children:"Close"})]})]})]})}function gS({currentTheme:e,show:t,title:n,byline:r,description:o,hookLine:a,healthLine:i,onToggle:s,children:l}){return d("section",{"data-theme":e,class:an("card card-compact bg-base-100 fixed border shadow-xl w-80 leading-loose text-base-content py-3 rounded-box border-solid border-neutral-content border-opacity-50 left-8 top-8 transition-transform duration-500 flex flex-col overflow-hidden",t?"translate-x-0 transform-none":"translate-x-[-500px]"),style:{maxHeight:"calc(100vh - 4rem)"},children:[d("header",{class:"mx-4 mb-1 flex h-9 items-center",children:[d(Dw,{class:"mr-2 shrink-0 text-base-content"}),d("div",{class:"flex-grow leading-none",children:[d("h2",{class:"m-0 flex items-baseline gap-2 text-xl font-semibold leading-none",children:[d("span",{children:n}),d("span",{class:"font-mono text-[10px] font-normal text-base-content opacity-70",children:["v",vr.version]})]}),r?d("p",{class:"font-mono text-[10px] opacity-70 m-0 mt-1",children:r}):null]}),d(_i,{children:d(mS,{})}),d("div",{onClick:s,class:"w-9 h-9 cursor-pointer flex justify-center items-center transition-colors duration-200 rounded-full hover:bg-base-200",children:d(zs,{})})]}),d("p",{class:"mx-4 mb-1 text-sm leading-none text-base-content text-opacity-70",children:o}),d("p",{class:"mx-4 mb-1 font-mono text-xs leading-none text-base-content text-opacity-60",children:a}),d("p",{class:"mx-4 mb-1 font-mono text-xs leading-none text-base-content text-opacity-60",children:i}),d("div",{class:"divider mt-0 mb-0"}),d("main",{class:"min-h-0 grow overflow-y-auto overscroll-contain scroll-smooth",children:d("div",{class:"pl-4 pr-2",children:l})})]})}const Hh=5e3;function yS(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`rs-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function So(e,t){var l,c;if(!e||typeof e!="object")return `row-${t}`;const n=e,r=h=>typeof h=="string"&&h.trim()?h.trim():typeof h=="number"&&Number.isFinite(h)?String(h):"",a=((...h)=>{for(const f of h){const m=r(f);if(m)return m}return ""})(n.id,n.rest_id,n.id_str,(l=n.legacy)==null?void 0:l.id_str,(c=n.core)==null?void 0:c.screen_name,n.screen_name),i=[n.__bookmark_folder_id,n.__twe_imported_bundle_id,n.__twe_imported_snapshot_id,n.entryId,n.conversationId,n.conversation_id,n.dm_conversation_id].map(r).filter(Boolean);return (a&&i.length?`${a}::${i.join("::")}`:a)||`row-${t}`}function py(e){const t=String(e||"").trim();if(!t)return "";const[n]=t.split("::");return n||t}function vs(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function _S(e){return typeof e=="string"&&e.trim()?e.trim():typeof e=="number"&&Number.isFinite(e)?String(e):""}function qo(e,t){const n=new Set,r=o=>{const a=_S(o);a&&n.add(a);};if(r(So(e,t)),e&&typeof e=="object"){const o=e;r(o.id),r(o.rest_id),r(o.id_str),r(vs(o,"legacy.id_str")),r(vs(o,"legacy.id")),r(vs(o,"core.user_results.result.rest_id")),r(vs(o,"core.screen_name")),r(o.__twe_imported_snapshot_id),r(o.__twe_imported_source_id);}return [...n]}function wS(e,t,n=new Set){const r=[];for(const o of e){const a=t.get(o);if(a){r.push(a);continue}if(!n.has(o))break}return r}function bS(e){return e!=null&&e.length?e.map(t=>`${t.id}:${t.desc?"desc":"asc"}`).join(","):"default"}function vS(e){const t=e.sourceDescriptor&&e.idsTruncated?[]:e.ids.slice(0,Hh),n=!!e.idsTruncated||e.ids.length>Hh;return {resultSetId:yS(),scope:"table",engine:"local-sync",generatedAtMs:Date.now(),queryText:e.queryText,sort:e.sort,totalMatches:e.totalMatches,ids:t,idsTotalCount:e.ids.length,idsTruncated:n,sourceDescriptor:e.sourceDescriptor,warnings:[...e.warnings]}}const kS="^[a-zA-Z0-9_.]+$",xS=["from","from_id","author_id","to","to_id","in_reply_to_id","lang","since","until","since_time","until_time","since_id","max_id","conversation_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","url","domain","id","source","card_name","filter","include","is","has","bookmark_folder","folder","route","mention","hashtag","cashtag"],SS=["since","until","since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","id","from_id","author_id","to_id","in_reply_to_id","conversation_id"],CS={min_content_term_length:2,full_run_exact_min_terms:2,stop_terms:["a","an","the","and","or","but","if","then","than","to","of","in","on","for","with","by","at","from","into","onto","as","is","are","was","were","be","been","being","do","does","did","done","have","has","had","can","could","should","would","will","just","about","what","when","where","why","how","who","whom","whose","this","that","these","those","it","its","my","your","our","their","his","her","me","you","we","they","he","she","them","us","post","tweet","too"],bigram_slop:2,trigram_slop:3,fourgram_slop:4,bigram_boost:20,trigram_boost:60,fourgram_boost:140,full_run_exact_boost:320},TS={min_term_length:3,max_expansions:128},MS={min_term_length:5,max_edit_distance:1,prefix_root_length:4,max_expansions:64},ra={field_path_pattern:kS,known_filter_keys:xS,non_highlight_filters:SS,free_text:CS,prefix:TS,fuzzy:MS},my=new RegExp(ra.field_path_pattern),jh=new Set(ra.known_filter_keys),RS=new Set(ra.non_highlight_filters),eo=ra.free_text,Md=ra.prefix,zi=ra.fuzzy,IS=new Set((ra.free_text.stop_terms||[]).map(e=>String(e||"").trim().toLowerCase()).filter(Boolean));function gy(e){return e.kind==="term"||e.kind==="phrase"}const ES=/[\p{L}\p{N}_]+(?:['’][\p{L}\p{N}_]+)*/gu,AS=32,DS=Math.max(1,Number(eo.min_content_term_length)),PS=Math.max(2,Number(eo.full_run_exact_min_terms)),FS=Math.max(1,Number(Md.min_term_length)),OS=Math.max(1,Number(zi.min_term_length)),LS=[{category:"lexical",syntax:"plain free text",description:"Unstructured text expands into content-term matches plus boosted adjacent phrase windows; common filler words are deprioritized unless quoted.",examples:["tour guides in France","distributed systems design"]},{category:"lexical",syntax:'"exact phrase"~2',description:"Phrase search with optional slop.",examples:['"design system"','"design system"~2',"machine^2"]},{category:"lexical",syntax:"AND / OR / NOT / (...)",description:"Boolean operators with standard precedence and parentheses.",examples:["machine OR reliability","(machine OR reliability) AND fragile","machine AND NOT reliability"]},{category:"identity",syntax:"from: / from_id: / author_id:",description:"Match the author handle or author id.",examples:["from:alice","from_id:12345"]},{category:"identity",syntax:"@user",description:"Shorthand for an enforced author constraint, equivalent to from:user.",examples:["@sama","@openai"]},{category:"identity",syntax:"to: / to_id: / in_reply_to_id: / id: / conversation_id:",description:"Match reply targets, entity ids, or conversation ids.",examples:["to:alice","in_reply_to_id:1888","id:1999"]},{category:"metadata",syntax:"bookmark_folder: / folder:",description:"Match bookmark folder id or folder name.",examples:["bookmark_folder:12345",'folder:"Design References"']},{category:"metadata",syntax:"lang: / route: / source: / card_name:",description:"Match language, route surface, source text, or card name.",examples:["lang:en","route:bookmarks","source:iphone"]},{category:"metadata",syntax:"domain: / url:",description:"Match domains or URLs found in tweets.",examples:["domain:github.com","url:openai.com"]},{category:"presence",syntax:"is:",description:"Boolean state filters.",examples:["is:bookmarked","is:reply","is:verified","is:blue_verified"]},{category:"presence",syntax:"has:",description:"Presence filters for media, links, mentions, hashtags, cashtags, engagement, and polls.",examples:["has:media","has:links","has:hashtags","has:engagement"]},{category:"compatibility",syntax:"filter: / include:",description:"Compatibility aliases retained for Twitter-style queries.",examples:["filter:media","filter:replies","include:nativeretweets"]},{category:"numeric_date",syntax:"min_likes: / min_retweets: / min_replies: / min_bookmarks:",description:"Numeric threshold filters.",examples:["min_likes:50","min_bookmarks:10"]},{category:"numeric_date",syntax:"since: / until: / since_time: / until_time: / since_id: / max_id:",description:"Date, timestamp, and Snowflake-style boundary filters.",examples:["since:2026-03-01","until:2026-03-31","since_id:1900"]},{category:"compatibility",syntax:"mention: / #tag / $symbol",description:"Explicit mention filter plus shorthand hashtag and cashtag filters.",examples:["mention:alice","#ai","$tsla"]},{category:"metadata",syntax:'field:value / field:"quoted phrase"',description:"Field-scoped lexical search over raw nested paths, including dotted object paths and arrays.",examples:["md.collection:B","legacy.entities.hashtags.text:ai",'core.user_results.result.legacy.name:"Jane Doe"']}];function Ta(e,t,n=""){return {code:e,message:t,token:n||void 0,severity:"warn"}}function qh(e){const t=Number(e);return Number.isFinite(t)?Math.max(.05,Math.min(100,t)):1}function Ao(e){if(!e)return [];const t=e.toLowerCase().match(ES);return t?t.map(n=>n.replace(/['’]/g,"")).filter(Boolean):[]}function Rd(e){const t=String(e||"").trim().toLowerCase();return !t||t.length<DS?true:IS.has(t)}function yy(e){const t=e.flatMap(r=>Ao(r.value)),n=t.filter(r=>!Rd(r));return n.length?n:t}function NS(e){const t=new Set(yy(e));if(!t.size)return e;const n=e.filter(r=>t.has(String(r.value||"").trim().toLowerCase()));return n.length?n:e}function $c(e){let t=0;for(const n of e)for(const r of Ao(n.value))Rd(r)||(t+=1);return t}function pi(e){return Ao(e).join(" ").trim()}function BS(e){return Number.isFinite(e)?Math.round(e*100)/100:1}function US(e,t){const n=e.lastIndexOf(t);if(n<=0)return {base:e,value:null};const r=e.slice(n+1);return !r||!/^\d+(?:\.\d+)?$/.test(r)?{base:e,value:null}:{base:e.slice(0,n),value:r}}function $S(e){const t=String(e||""),n=[];let r=0;for(;r<t.length;){for(;r<t.length&&/\s/.test(t[r]??"");)r+=1;if(r>=t.length)break;const o=t[r]??"";if(o==="("){n.push({kind:"lparen"}),r+=1;continue}if(o===")"){n.push({kind:"rparen"}),r+=1;continue}let a=false;if(o==="-"){for(a=true,r+=1;r<t.length&&/\s/.test(t[r]??"");)r+=1;if(r>=t.length)break;if((t[r]??"")==="("){n.push({kind:"op",op:"NOT"});continue}}let i;const s=r;for(;r<t.length&&/[a-zA-Z0-9_.]/.test(t[r]??"");)r+=1;if(r>s&&(t[r]??"")===":"&&(t[r+1]??"")==='"'&&my.test(t.slice(s,r))?(i=t.slice(s,r),r+=1):r=s,(t[r]??"")==='"'){r+=1;let g="";for(;r<t.length;){const C=t[r]??"";if(C==="\\"&&r+1<t.length){g+=t[r+1]??"",r+=2;continue}if(C==='"'){r+=1;break}g+=C,r+=1;}let _=0,b=1;if((t[r]??"")==="~"){r+=1;const C=r;for(;r<t.length&&/\d/.test(t[r]??"");)r+=1;r>C&&(_=Math.max(0,Number(t.slice(C,r))||0));}if((t[r]??"")==="^"){r+=1;const C=r;for(;r<t.length&&/[\d.]/.test(t[r]??"");)r+=1;r>C&&(b=qh(t.slice(C,r)));}n.push({kind:"phrase",value:g.trim(),negated:a,boost:b,slop:_,field:i,quoted:true});continue}const l=r;for(;r<t.length&&!/\s/.test(t[r]??"")&&(t[r]??"")!=="("&&(t[r]??"")!==")";)r+=1;const c=t.slice(l,r).trim();if(!c)continue;const{base:h,value:f}=US(c,"^"),m=h.toUpperCase();if((m==="AND"||m==="OR"||m==="NOT")&&!a){n.push({kind:"op",op:m});continue}n.push({kind:"term",value:h,negated:a,boost:f?qh(f):1,slop:0});}return n}function HS(e,t){if(t.length&&!/\s$/.test(String(e||"")))for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(!r||!gy(r))continue;if(r.kind!=="term"||r.field||r.quoted)return;const o=pi(r.value);o.length>=FS&&(r.prefix=true),o.length>=OS&&(r.fuzzy=true);return}}function ro(e){return e?e.kind==="term"||e.kind==="phrase":false}function jS(e){const t=[];if(!e.length)return {ast:null,warnings:t};const n=[];let r=null;for(const f of e){let m=false;if(r){const g=ro(r)||r.kind==="rparen",_=ro(f)||f.kind==="lparen"||f.kind==="op"&&f.op==="NOT";g&&_&&(m=true);}m&&n.push({kind:"op",op:"AND"}),n.push(f),r=f;}const o={OR:1,AND:2,NOT:3},a=[],i=[];for(const f of n){if(ro(f)){a.push(f);continue}if(f.kind==="lparen"){i.push(f);continue}if(f.kind==="rparen"){let m=false;for(;i.length;){const g=i.pop();if(!g)break;if(g.kind==="lparen"){m=true;break}a.push(g);}m||t.push(Ta("boolean_syntax","unmatched closing parenthesis in query"));continue}if(f.kind==="op"){for(;i.length;){const m=i[i.length-1];if(!m||m.kind!=="op"||!(f.op==="NOT"?o[f.op]<o[m.op]:o[f.op]<=o[m.op]))break;a.push(i.pop());}i.push(f);}}for(;i.length;){const f=i.pop();if(!f)break;if(f.kind==="lparen"){t.push(Ta("boolean_syntax","unmatched opening parenthesis in query"));continue}a.push(f);}const s=[];for(const f of a){if(ro(f)){s.push(f);continue}if(f.kind!=="op")continue;if(f.op==="NOT"){const _=s.pop();if(!_){t.push(Ta("boolean_syntax","dangling NOT operator in query","NOT"));continue}s.push({kind:"op",op:"NOT",child:_});continue}const m=s.pop(),g=s.pop();if(!g||!m){t.push(Ta("boolean_syntax",`dangling ${f.op} operator in query`,f.op));continue}s.push({kind:"op",op:f.op,left:g,right:m});}if(s.length===1)return {ast:s[0]??null,warnings:t};const l=e.filter(ro);if(!l.length)return {ast:null,warnings:t};const c=l[0];if(!c)return {ast:null,warnings:t};let h=c;for(let f=1;f<l.length;f+=1){const m=l[f];m&&(h={kind:"op",op:"AND",left:h,right:m});}return t.push(Ta("boolean_syntax","query boolean expression was malformed; fell back to implicit AND between lexical terms")),{ast:h,warnings:t}}function Vh(e,t){const n=[],r=(o,a)=>{if(o){if(ro(o)){a===t&&n.push(o);return}if(o.op==="NOT"){r(o.child,!a);return}r(o.left,a),r(o.right,a);}};return r(e,true),n}function Lu(e,t,n){if(e){if(!ro(e)&&e.op===t){Lu(e.left,t,n),Lu(e.right,t,n);return}n.push(e);}}function Nu(e){if(!e)return "";if(ro(e)){let r=e.kind==="phrase"?`"${e.value}"`:e.value;return e.prefix&&(r+="*"),e.kind==="phrase"&&e.slop>0&&(r+=`~${e.slop}`),Math.abs(e.boost-1)>1e-9&&(r+=`^${e.boost}`),e.field&&(r=`${e.field}:${r}`),r}if(e.op==="NOT"){const r=Nu(e.child);return r?`NOT (${r})`:"NOT (?)"}const t=[];return Lu(e,e.op,t),t.map(r=>{const o=Nu(r);return o?!ro(r)&&r.op!==e.op?`(${o})`:o:""}).filter(Boolean).join(` ${e.op} `)}function qS(e){return !e.field&&e.kind==="term"&&Ao(e.value).length===1}function VS(e){var a,i,s,l,c,h,f,m;if(e.length<=1)return e;const t=[],n=new Set,r=g=>{const _=`${g.kind}|${g.field||""}|${g.value}|${g.slop}|${g.boost}`;n.has(_)||(n.add(_),t.push(g));},o=(g,_)=>{const b=g.reduce((C,v)=>C+v.boost,0)/g.length;return BS(_*b)};for(const g of NS(e))r(g);for(let g=0;g<=e.length-2;g+=1){const _=e.slice(g,g+2);$c(_)<2||r({kind:"phrase",value:_.map(b=>b.value).join(" "),slop:eo.bigram_slop,boost:o(_,eo.bigram_boost),prefix:!!((a=_[_.length-1])!=null&&a.prefix),fuzzy:!!((i=_[_.length-1])!=null&&i.fuzzy)});}for(let g=0;g<=e.length-3;g+=1){const _=e.slice(g,g+3);$c(_)<2||r({kind:"phrase",value:_.map(b=>b.value).join(" "),slop:eo.trigram_slop,boost:o(_,eo.trigram_boost),prefix:!!((s=_[_.length-1])!=null&&s.prefix),fuzzy:!!((l=_[_.length-1])!=null&&l.fuzzy)});}for(let g=0;g<=e.length-4;g+=1){const _=e.slice(g,g+4);$c(_)<2||r({kind:"phrase",value:_.map(b=>b.value).join(" "),slop:eo.fourgram_slop,boost:o(_,eo.fourgram_boost),prefix:!!((c=_[_.length-1])!=null&&c.prefix),fuzzy:!!((h=_[_.length-1])!=null&&h.fuzzy)});}return e.length>=PS&&r({kind:"phrase",value:e.map(g=>g.value).join(" "),slop:0,boost:o(e,eo.full_run_exact_boost),prefix:!!((f=e[e.length-1])!=null&&f.prefix),fuzzy:!!((m=e[e.length-1])!=null&&m.fuzzy)}),t}function zS(e,t){if(!t.length)return;if(t.length===1){e.push(t[0]),t.length=0;return}const n=VS(t);e.push({kind:"lparen"}),n.forEach((r,o)=>{o>0&&e.push({kind:"op",op:"OR"}),e.push(r);}),e.push({kind:"rparen"}),t.length=0;}function KS(e){const t=new Set,n=[];for(const r of e)for(const o of Ao(r))!o||t.has(o)||(t.add(o),n.push(o));return n}function GS(e,t){const n=new Set;for(const r of e)for(const o of Ao(r.value))o&&!Rd(o)&&n.add(o);for(const r of t)if(!(r.negated||RS.has(r.name)))for(const o of Ao(r.value))o&&n.add(o);return [...n].slice(0,AS)}function WS(e){var v;const t=$S(e);HS(e,t);const n=[],r=[],o=[],a=[],i=[],s=[],l=()=>{if(a.length){const T=yy(a);s.push(...T),i.push(...T);}zS(o,a);};for(const T of t){if(!gy(T)){l(),o.push(T);continue}const R=String(T.value||"").trim();if(!R)continue;let P=T.kind,L=R,D=(v=T.field)==null?void 0:v.trim(),O=false;if(D&&jh.has(D)){n.push({name:D,value:R,negated:T.negated}),l();continue}if(T.kind==="term"&&R.startsWith("@")&&R.length>1){const I=pi(R.slice(1));if(I){n.push({name:"from",value:I,negated:T.negated}),l();continue}}else if(T.kind==="term"&&R.startsWith("#")&&R.length>1){const I=pi(R.slice(1));I&&(n.push({name:"hashtag",value:I,negated:T.negated}),P="term",L=I,O=true);}else if(T.kind==="term"&&R.startsWith("$")&&R.length>1){const I=pi(R.slice(1));I&&(n.push({name:"cashtag",value:I,negated:T.negated}),P="term",L=I,O=true);}else if(T.kind==="term"&&R.includes(":")){const[I,...x]=R.split(":"),F=String(I||"").trim().toLowerCase(),U=x.join(":").trim();if(jh.has(F)){if(!U){r.push(R);continue}n.push({name:F,value:U,negated:T.negated}),l();continue}F&&U&&my.test(F)&&(P="term",L=U,D=F);}const B={kind:P,value:P==="term"?pi(L):L.trim(),boost:T.boost,slop:T.slop,field:D||void 0,quoted:!!T.quoted,prefix:!!T.prefix,fuzzy:!!T.fuzzy};if(B.value){if(T.negated){l(),o.push({kind:"op",op:"NOT"}),o.push(B);continue}if(!O&&qS(B)){a.push(B);continue}if(l(),!B.field){const I=Ao(B.value);s.push(...I),i.push(...I);}o.push(B);}}l();const{ast:c,warnings:h}=jS(o),f=Vh(c,true),m=Vh(c,false),g=s.filter(Boolean),_=KS(i),b=GS(f,n),C=r.map(T=>Ta("unsupported_token",`unsupported token: ${T}`,T));return {query:String(e||""),lexicalTokens:o,lexicalAst:c,lexicalExpression:Nu(c),positiveLexicalTokens:f,negativeLexicalTokens:m,positiveTerms:_,filters:n,unsupported:r,orderedTerms:g,highlightTerms:b,warnings:[...h,...C],hasPositiveLexical:f.length>0,filterBooleanSemantics:"global_and"}}const _y="twe_search_history_v1";function wy(){return typeof localStorage<"u"}function by(e){return [...new Set(e.map(t=>t.trim()).filter(Boolean))].sort()}function zh(e,t,n){return `${e}::${t}::${by(n).join(",")}`}function Id(e){if(!wy())return [];try{const t=localStorage.getItem(_y);if(!t)return [];const n=JSON.parse(t);if(!Array.isArray(n))return [];const r=n.filter(o=>!!o&&typeof o=="object");return e?r.filter(o=>o.scope===e):r}catch{return []}}function YS(e){const t=Date.now(),n={...e,selected_folders:by(e.selected_folders),id:`${e.scope}:${t}:${Math.random().toString(36).slice(2,8)}`,searched_at_iso:new Date(t).toISOString(),repeat_count:1},o=[...Id()],a=zh(n.scope,n.normalized_query,n.selected_folders),i=o[o.length-1];i&&zh(i.scope,i.normalized_query,i.selected_folders||[])===a?o[o.length-1]={...i,query:n.query,title:n.title,searched_at_ms:n.searched_at_ms,searched_at_iso:n.searched_at_iso,result_count:n.result_count,total_records:n.total_records,lexical_expression:n.lexical_expression,warning_messages:[...n.warning_messages],repeat_count:(i.repeat_count||1)+1}:o.push(n);const s=o.slice(-4e3);if(wy())try{localStorage.setItem(_y,JSON.stringify(s));}catch{}return s}/**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ed(){return {accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function ao(e,t){return typeof e=="function"?e(t):e}function hr(e,t){return n=>{t.setState(r=>({...r,[e]:ao(n,r[e])}));}}function Ll(e){return e instanceof Function}function XS(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function QS(e,t){const n=[],r=o=>{o.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i);});};return r(e),n}function Ft(e,t,n){let r=[],o;return a=>{let i;n.key&&n.debug&&(i=Date.now());const s=e(a);if(!(s.length!==r.length||s.some((h,f)=>r[f]!==h)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-i)*100)/100,f=Math.round((Date.now()-c)*100)/100,m=f/16,g=(_,b)=>{for(_=String(_);_.length<b;)_=" "+_;return _};console.info(`%c⏱ ${g(f,5)} /${g(h,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key);}return o}}function Ot(e,t,n,r){return {debug:()=>{var o;return (o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:false,onChange:r}}function ZS(e,t,n,r){const o=()=>{var i;return (i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Ft(()=>[e,n,t,a],(i,s,l,c)=>({table:i,column:s,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Ot(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e);},{}),a}function JS(e,t,n,r){var o,a;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let c=(o=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,h;if(s.accessorFn?h=s.accessorFn:l&&(l.includes(".")?h=m=>{let g=m;for(const b of l.split(".")){var _;g=(_=g)==null?void 0:_[b];}return g}:h=m=>m[s.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:h,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Ft(()=>[true],()=>{var m;return [f,...(m=f.columns)==null?void 0:m.flatMap(g=>g.getFlatColumns())]},Ot(e.options,"debugColumns")),getLeafColumns:Ft(()=>[e._getOrderColumnsFn()],m=>{var g;if((g=f.columns)!=null&&g.length){let _=f.columns.flatMap(b=>b.getLeafColumns());return m(_)}return [f]},Ot(e.options,"debugColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(f,e);return f}const Xn="debugHeaders";function Kh(e,t,n){var r;let a={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=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l);};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e);}),a}const e1={createTable:e=>{e.getHeaderGroups=Ft(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var a,i;const s=(a=r==null?void 0:r.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?a:[],l=(i=o==null?void 0:o.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?i:[],c=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return ks(t,[...s,...c,...l],e)},Ot(e.options,Xn)),e.getCenterHeaderGroups=Ft(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(o!=null&&o.includes(a.id))),ks(t,n,e,"center")),Ot(e.options,Xn)),e.getLeftHeaderGroups=Ft(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return ks(t,a,e,"left")},Ot(e.options,Xn)),e.getRightHeaderGroups=Ft(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return ks(t,a,e,"right")},Ot(e.options,Xn)),e.getFooterGroups=Ft(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ot(e.options,Xn)),e.getLeftFooterGroups=Ft(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ot(e.options,Xn)),e.getCenterFooterGroups=Ft(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ot(e.options,Xn)),e.getRightFooterGroups=Ft(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ot(e.options,Xn)),e.getFlatHeaders=Ft(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ot(e.options,Xn)),e.getLeftFlatHeaders=Ft(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ot(e.options,Xn)),e.getCenterFlatHeaders=Ft(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ot(e.options,Xn)),e.getRightFlatHeaders=Ft(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ot(e.options,Xn)),e.getCenterLeafHeaders=Ft(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ot(e.options,Xn)),e.getLeftLeafHeaders=Ft(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ot(e.options,Xn)),e.getRightLeafHeaders=Ft(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return !((r=n.subHeaders)!=null&&r.length)}),Ot(e.options,Xn)),e.getLeafHeaders=Ft(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,a,i,s,l,c;return [...(o=(a=t[0])==null?void 0:a.headers)!=null?o:[],...(i=(s=n[0])==null?void 0:s.headers)!=null?i:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(h=>h.getLeafHeaders()).flat()},Ot(e.options,Xn));}};function ks(e,t,n,r){var o,a;let i=0;const s=function(m,g){g===void 0&&(g=1),i=Math.max(i,g),m.filter(_=>_.getIsVisible()).forEach(_=>{var b;(b=_.columns)!=null&&b.length&&s(_.columns,g+1);},0);};s(e);let l=[];const c=(m,g)=>{const _={depth:g,id:[r,`${g}`].filter(Boolean).join("_"),headers:[]},b=[];m.forEach(C=>{const v=[...b].reverse()[0],T=C.column.depth===_.depth;let R,P=false;if(T&&C.column.parent?R=C.column.parent:(R=C.column,P=true),v&&(v==null?void 0:v.column)===R)v.subHeaders.push(C);else {const L=Kh(n,R,{id:[r,g,R.id,C==null?void 0:C.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${b.filter(D=>D.column===R).length}`:void 0,depth:g,index:b.length});L.subHeaders.push(C),b.push(L);}_.headers.push(C),C.headerGroup=_;}),l.push(_),g>0&&c(b,g-1);},h=t.map((m,g)=>Kh(n,m,{depth:i,index:g}));c(h,i-1),l.reverse();const f=m=>m.filter(_=>_.column.getIsVisible()).map(_=>{let b=0,C=0,v=[0];_.subHeaders&&_.subHeaders.length?(v=[],f(_.subHeaders).forEach(R=>{let{colSpan:P,rowSpan:L}=R;b+=P,v.push(L);})):b=1;const T=Math.min(...v);return C=C+T,_.colSpan=b,_.rowSpan=C,{colSpan:b,rowSpan:C}});return f((o=(a=l[0])==null?void 0:a.headers)!=null?o:[]),l}const t1=(e,t,n,r,o,a,i)=>{let s={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return s._valuesCache[l]=c.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var c;return (c=s.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>QS(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,true):void 0,getParentRows:()=>{let l=[],c=s;for(;;){const h=c.getParentRow();if(!h)break;l.push(h),c=h;}return l.reverse()},getAllCells:Ft(()=>[e.getAllLeafColumns()],l=>l.map(c=>ZS(e,s,c,c.id)),Ot(e.options,"debugRows")),_getAllCellsByColumnId:Ft(()=>[s.getAllCells()],l=>l.reduce((c,h)=>(c[h.column.id]=h,c),{}),Ot(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(s,e);}return s},n1={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()};}},vy=(e,t,n)=>{var r,o;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return !!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};vy.autoRemove=e=>Ar(e);const ky=(e,t,n)=>{var r;return !!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};ky.autoRemove=e=>Ar(e);const xy=(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())};xy.autoRemove=e=>Ar(e);const Sy=(e,t,n)=>{var r;return (r=e.getValue(t))==null?void 0:r.includes(n)};Sy.autoRemove=e=>Ar(e);const Cy=(e,t,n)=>!n.some(r=>{var o;return !((o=e.getValue(t))!=null&&o.includes(r))});Cy.autoRemove=e=>Ar(e)||!(e!=null&&e.length);const Ty=(e,t,n)=>n.some(r=>{var o;return (o=e.getValue(t))==null?void 0:o.includes(r)});Ty.autoRemove=e=>Ar(e)||!(e!=null&&e.length);const My=(e,t,n)=>e.getValue(t)===n;My.autoRemove=e=>Ar(e);const Ry=(e,t,n)=>e.getValue(t)==n;Ry.autoRemove=e=>Ar(e);const Ad=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};Ad.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(a>i){const s=a;a=i,i=s;}return [a,i]};Ad.autoRemove=e=>Ar(e)||Ar(e[0])&&Ar(e[1]);const to={includesString:vy,includesStringSensitive:ky,equalsString:xy,arrIncludes:Sy,arrIncludesAll:Cy,arrIncludesSome:Ty,equals:My,weakEquals:Ry,inNumberRange:Ad};function Ar(e){return e==null||e===""}const r1={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:hr("columnFilters",e),filterFromLeafRows:false,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"?to.includesString:typeof r=="number"?to.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?to.equals:Array.isArray(r)?to.arrIncludes:to.weakEquals},e.getFilterFn=()=>{var n,r;return Ll(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:to[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return ((n=e.columnDef.enableColumnFilter)!=null?n:true)&&((r=t.options.enableColumnFilters)!=null?r:true)&&((o=t.options.enableFilters)!=null?o:true)&&!!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(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),a=r==null?void 0:r.find(h=>h.id===e.id),i=ao(n,a?a.value:void 0);if(Gh(o,i,e)){var s;return (s=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?s:[]}const l={id:e.id,value:i};if(a){var c;return (c=r==null?void 0:r.map(h=>h.id===e.id?l:h))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]});};},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={};},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var a;return (a=ao(t,o))==null?void 0:a.filter(i=>{const s=n.find(l=>l.id===i.id);if(s){const l=s.getFilterFn();if(Gh(l,i.value,s))return false}return true})};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 Gh(e,t,n){return (e&&e.autoRemove?e.autoRemove(t,n):false)||typeof t>"u"||typeof t=="string"&&!t}const o1=(e,t,n)=>n.reduce((r,o)=>{const a=o.getValue(e);return r+(typeof a=="number"?a:0)},0),a1=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);}),r},i1=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);}),r},s1=(e,t,n)=>{let r,o;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)));}),[r,o]},l1=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a);}),n)return r/n},c1=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!XS(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((a,i)=>a-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},u1=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),d1=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,f1=(e,t)=>t.length,Hc={sum:o1,min:a1,max:i1,extent:s1,mean:l1,median:c1,unique:u1,uniqueCount:d1,count:f1},h1={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:hr("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:true)&&((r=t.options.enableGrouping)!=null?r:true)&&(!!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 Hc.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Hc.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Ll(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:Hc[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 o;return !e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)};}};function p1(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const m1={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:hr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ft(n=>[xi(t,n)],n=>n.findIndex(r=>r.id===e.id),Ot(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return ((r=xi(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=xi(t,n);return ((r=o[o.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=Ft(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let a=[];if(!(t!=null&&t.length))a=o;else {const i=[...t],s=[...o];for(;s.length&&i.length;){const l=i.shift(),c=s.findIndex(h=>h.id===l);c>-1&&a.push(s.splice(c,1)[0]);}a=[...a,...s];}return p1(a,n,r)},Ot(e.options,"debugTable"));}},jc=()=>({left:[],right:[]}),g1={getInitialState:e=>({columnPinning:jc(),...e}),getDefaultOptions:e=>({onColumnPinningChange:hr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var a,i;if(n==="right"){var s,l;return {left:((s=o==null?void 0:o.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var c,h;return {left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((h=o==null?void 0:o.right)!=null?h:[]).filter(f=>!(r!=null&&r.includes(f)))}}return {left:((a=o==null?void 0:o.left)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f)))}});},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,a,i;return ((o=r.columnDef.enablePinning)!=null?o:true)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:true)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,a=n.some(s=>r==null?void 0:r.includes(s)),i=n.some(s=>o==null?void 0:o.includes(s));return a?"left":i?"right":false},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0};},createRow:(e,t)=>{e.getCenterVisibleCells=Ft(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const a=[...r??[],...o??[]];return n.filter(i=>!a.includes(i.column.id))},Ot(t.options,"debugRows")),e.getLeftVisibleCells=Ft(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Ot(t.options,"debugRows")),e.getRightVisibleCells=Ft(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Ot(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?jc():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:jc())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,a;return !!((o=r.left)!=null&&o.length||(a=r.right)!=null&&a.length)}return !!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ft(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ot(e.options,"debugColumns")),e.getRightLeafColumns=Ft(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ot(e.options,"debugColumns")),e.getCenterLeafColumns=Ft(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(a=>!o.includes(a.id))},Ot(e.options,"debugColumns"));}},xs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},qc=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:false,columnSizingStart:[]}),y1={getDefaultColumnDef:()=>xs,getInitialState:e=>({columnSizing:{},columnSizingInfo:qc(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:hr("columnSizing",e),onColumnSizingInfoChange:hr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:xs.minSize,(r=a??e.columnDef.size)!=null?r:xs.size),(o=e.columnDef.maxSize)!=null?o:xs.maxSize)},e.getStart=Ft(n=>[n,xi(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,a)=>o+a.getSize(),0),Ot(t.options,"debugColumns")),e.getAfter=Ft(n=>[n,xi(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,a)=>o+a.getSize(),0),Ot(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o});},e.getCanResize=()=>{var n,r;return ((n=e.columnDef.enableResizing)!=null?n:true)&&((r=t.options.enableColumnResizing)!=null?r:true)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id;},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else {var a;n+=(a=o.column.getSize())!=null?a: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),o=r==null?void 0:r.getCanResize();return a=>{if(!r||!o||(a.persist==null||a.persist(),Vc(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=Vc(a)?Math.round(a.touches[0].clientX):a.clientX,c={},h=(v,T)=>{typeof T=="number"&&(t.setColumnSizingInfo(R=>{var P,L;const D=t.options.columnResizeDirection==="rtl"?-1:1,O=(T-((P=R==null?void 0:R.startOffset)!=null?P:0))*D,B=Math.max(O/((L=R==null?void 0:R.startSize)!=null?L:0),-0.999999);return R.columnSizingStart.forEach(I=>{let[x,F]=I;c[x]=Math.round(Math.max(F+F*B,0)*100)/100;}),{...R,deltaOffset:O,deltaPercentage:B}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(R=>({...R,...c})));},f=v=>h("move",v),m=v=>{h("end",v),t.setColumnSizingInfo(T=>({...T,isResizingColumn:false,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}));},g=n||typeof document<"u"?document:null,_={moveHandler:v=>f(v.clientX),upHandler:v=>{g==null||g.removeEventListener("mousemove",_.moveHandler),g==null||g.removeEventListener("mouseup",_.upHandler),m(v.clientX);}},b={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),f(v.touches[0].clientX),false),upHandler:v=>{var T;g==null||g.removeEventListener("touchmove",b.moveHandler),g==null||g.removeEventListener("touchend",b.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),m((T=v.touches[0])==null?void 0:T.clientX);}},C=_1()?{passive:false}:false;Vc(a)?(g==null||g.addEventListener("touchmove",b.moveHandler,C),g==null||g.addEventListener("touchend",b.upHandler,C)):(g==null||g.addEventListener("mousemove",_.moveHandler,C),g==null||g.addEventListener("mouseup",_.upHandler,C)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,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?qc():(n=e.initialState.columnSizingInfo)!=null?n:qc());},e.getTotalSize=()=>{var t,n;return (t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return (t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return (t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return (t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0};}};let Ss=null;function _1(){if(typeof Ss=="boolean")return Ss;let e=false;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n);}catch{e=false;}return Ss=e,Ss}function Vc(e){return e.type==="touchstart"}const w1={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:hr("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 o=e.columns;return (n=o.length?o.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:true},e.getCanHide=()=>{var n,r;return ((n=e.columnDef.enableHiding)!=null?n:true)&&((r=t.options.enableHiding)!=null?r:true)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked);};},createRow:(e,t)=>{e._getAllVisibleCells=Ft(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ot(t.options,"debugRows")),e.getVisibleCells=Ft(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Ot(t.options,"debugRows"));},createTable:e=>{const t=(n,r)=>Ft(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Ot(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((o,a)=>({...o,[a.id]:n||!(a.getCanHide!=null&&a.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 xi(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const b1={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()};}},v1={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:hr("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,o,a;return ((n=e.columnDef.enableGlobalFilter)!=null?n:true)&&((r=t.options.enableGlobalFilter)!=null?r:true)&&((o=t.options.enableFilters)!=null?o:true)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:true)&&!!e.accessorFn};},createTable:e=>{e.getGlobalAutoFilterFn=()=>to.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Ll(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:to[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t);},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter);};}},k1={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:hr("expanded",e),paginateExpandedRows:true}),createTable:e=>{let t=false,n=false;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=true;});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=true,e._queue(()=>{e.resetExpanded(),n=false;});}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(true):e.setExpanded({});},e.resetExpanded=r=>{var o,a;e.setExpanded(r?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{});},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===true||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===true:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return (e.getState().expanded===true?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.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 o;const a=r===true?true:!!(r!=null&&r[e.id]);let i={};if(r===true?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=true;}):i=r,n=(o=n)!=null?o:!a,!a&&n)return {...i,[e.id]:true};if(a&&!n){const{[e.id]:s,...l}=i;return l}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===true||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return (n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:true)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=true,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,true),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return ()=>{n&&e.toggleExpanded();}};}},Bu=0,Uu=10,zc=()=>({pageIndex:Bu,pageSize:Uu}),x1={getInitialState:e=>({...e,pagination:{...zc(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:hr("pagination",e)}),createTable:e=>{let t=false,n=false;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=true;});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=true,e._queue(()=>{e.resetPageIndex(),n=false;});}},e.setPagination=r=>{const o=a=>ao(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?zc():(o=e.initialState.pagination)!=null?o:zc());},e.setPageIndex=r=>{e.setPagination(o=>{let a=ao(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}});},e.resetPageIndex=r=>{var o,a;e.setPageIndex(r?Bu:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:Bu);},e.resetPageSize=r=>{var o,a;e.setPageSize(r?Uu:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:Uu);},e.setPageSize=r=>{e.setPagination(o=>{const a=Math.max(1,ao(r,o.pageSize)),i=o.pageSize*o.pageIndex,s=Math.floor(i/a);return {...o,pageIndex:s,pageSize:a}});},e.setPageCount=r=>e.setPagination(o=>{var a;let i=ao(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=Ft(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((a,i)=>i)),o},Ot(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?true:o===0?false:r<o-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};}},Kc=()=>({top:[],bottom:[]}),S1={getInitialState:e=>({rowPinning:Kc(),...e}),getDefaultOptions:e=>({onRowPinningChange:hr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var c,h;if(n==="bottom"){var f,m;return {top:((f=l==null?void 0:l.top)!=null?f:[]).filter(b=>!(s!=null&&s.has(b))),bottom:[...((m=l==null?void 0:l.bottom)!=null?m:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)]}}if(n==="top"){var g,_;return {top:[...((g=l==null?void 0:l.top)!=null?g:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)],bottom:((_=l==null?void 0:l.bottom)!=null?_:[]).filter(b=>!(s!=null&&s.has(b)))}}return {top:((c=l==null?void 0:l.top)!=null?c:[]).filter(b=>!(s!=null&&s.has(b))),bottom:((h=l==null?void 0:l.bottom)!=null?h:[]).filter(b=>!(s!=null&&s.has(b)))}});},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:true},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some(s=>r==null?void 0:r.includes(s)),i=n.some(s=>o==null?void 0:o.includes(s));return a?"top":i?"bottom":false},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return -1;const a=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:s}=i;return s});return (r=a==null?void 0:a.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?Kc():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Kc())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,a;return !!((o=r.top)!=null&&o.length||(a=r.bottom)!=null&&a.length)}return !!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return ((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const s=e.getRow(i,true);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=Ft(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ot(e.options,"debugRows")),e.getBottomRows=Ft(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ot(e.options,"debugRows")),e.getCenterRows=Ft(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(a=>!o.has(a.id))},Ot(e.options,"debugRows"));}},C1={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:hr("rowSelection",e),enableRowSelection:true,enableMultiRowSelection:true,enableSubRowSelection:true}),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},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(a=>{a.getCanSelect()&&(r[a.id]=true);}):o.forEach(a=>{delete r[a.id];}),r});},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(a=>{$u(o,a.id,r,true,e);}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ft(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Gc(e,n):{rows:[],flatRows:[],rowsById:{}},Ot(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ft(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Gc(e,n):{rows:[],flatRows:[],rowsById:{}},Ot(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ft(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Gc(e,n):{rows:[],flatRows:[],rowsById:{}},Ot(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(o=>o.getCanSelect()&&!n[o.id])&&(r=false),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=false),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()?false: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 o=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return a;const s={...a};return $u(s,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:true,t),s});},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Dd(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Hu(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Hu(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:true},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:true},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:true},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked);}};}},$u=(e,t,n,r,o)=>{var a;const i=o.getRow(t,true);n?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=true)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>$u(e,s.id,n,r,o));};function Gc(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(i,s){return i.map(l=>{var c;const h=Dd(l,n);if(h&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:a(l.subRows)}),h)return l}).filter(Boolean)};return {rows:a(t.rows),flatRows:r,rowsById:o}}function Dd(e,t){var n;return (n=t[e.id])!=null?n:false}function Hu(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return false;let o=true,a=false;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(Dd(i,t)?a=true:o=false),i.subRows&&i.subRows.length)){const s=Hu(i,t);s==="all"?a=true:(s==="some"&&(a=true),o=false);}}),o?"all":a?"some":false}const ju=/([0-9]+)/gm,T1=(e,t,n)=>Iy(Do(e.getValue(n)).toLowerCase(),Do(t.getValue(n)).toLowerCase()),M1=(e,t,n)=>Iy(Do(e.getValue(n)),Do(t.getValue(n))),R1=(e,t,n)=>Pd(Do(e.getValue(n)).toLowerCase(),Do(t.getValue(n)).toLowerCase()),I1=(e,t,n)=>Pd(Do(e.getValue(n)),Do(t.getValue(n))),E1=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},A1=(e,t,n)=>Pd(e.getValue(n),t.getValue(n));function Pd(e,t){return e===t?0:e>t?1:-1}function Do(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Iy(e,t){const n=e.split(ju).filter(Boolean),r=t.split(ju).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),a=r.shift(),i=parseInt(o,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(o>a)return 1;if(a>o)return -1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return -1}return n.length-r.length}const ai={alphanumeric:T1,alphanumericCaseSensitive:M1,text:R1,textCaseSensitive:I1,datetime:E1,basic:A1},D1={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:hr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=false;for(const o of n){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return ai.datetime;if(typeof a=="string"&&(r=true,a.split(ju).length>1))return ai.alphanumeric}return r?ai.text:ai.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 Ll(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:ai[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const s=i==null?void 0:i.find(g=>g.id===e.id),l=i==null?void 0:i.findIndex(g=>g.id===e.id);let c=[],h,f=a?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?s?h="toggle":h="add":i!=null&&i.length&&l!==i.length-1?h="replace":s?h="toggle":h="replace",h==="toggle"&&(a||o||(h="remove")),h==="add"){var m;c=[...i,{id:e.id,desc:f}],c.splice(0,c.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER));}else h==="toggle"?c=i.map(g=>g.id===e.id?{...g,desc:f}:g):h==="remove"?c=i.filter(g=>g.id!==e.id):c=[{id:e.id,desc:f}];return c});},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,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?false:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return ((n=e.columnDef.enableSorting)!=null?n:true)&&((r=t.options.enableSorting)!=null?r:true)&&!!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(o=>o.id===e.id);return r?r.desc?"desc":"asc":false},e.getSortIndex=()=>{var n,r;return (n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.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):false));}};},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());}},P1=[e1,w1,m1,g1,n1,r1,b1,v1,D1,h1,k1,x1,S1,C1,y1];function F1(e){var t,n;const r=[...P1,...(t=e._features)!=null?t:[]];let o={_features:r};const a=o._features.reduce((m,g)=>Object.assign(m,g.getDefaultOptions==null?void 0:g.getDefaultOptions(o)),{}),i=m=>o.options.mergeOptions?o.options.mergeOptions(a,m):{...a,...m};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var g;l=(g=m.getInitialState==null?void 0:m.getInitialState(l))!=null?g:l;});const c=[];let h=false;const f={_features:r,options:{...a,...e},initialState:l,_queue:m=>{c.push(m),h||(h=true,Promise.resolve().then(()=>{for(;c.length;)c.shift()();h=false;}).catch(g=>setTimeout(()=>{throw g})));},reset:()=>{o.setState(o.initialState);},setOptions:m=>{const g=ao(m,o.options);o.options=i(g);},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m);},_getRowId:(m,g,_)=>{var b;return (b=o.options.getRowId==null?void 0:o.options.getRowId(m,g,_))!=null?b:`${_?[_.id,g].join("."):g}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,g)=>{let _=(g?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!_&&(_=o.getCoreRowModel().rowsById[m],!_))throw new Error;return _},_getDefaultColumnDef:Ft(()=>[o.options.defaultColumn],m=>{var g;return m=(g=m)!=null?g:{},{header:_=>{const b=_.header.column.columnDef;return b.accessorKey?b.accessorKey:b.accessorFn?b.id:null},cell:_=>{var b,C;return (b=(C=_.renderValue())==null||C.toString==null?void 0:C.toString())!=null?b:null},...o._features.reduce((_,b)=>Object.assign(_,b.getDefaultColumnDef==null?void 0:b.getDefaultColumnDef()),{}),...m}},Ot(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Ft(()=>[o._getColumnDefs()],m=>{const g=function(_,b,C){return C===void 0&&(C=0),_.map(v=>{const T=JS(o,v,C,b),R=v;return T.columns=R.columns?g(R.columns,T,C+1):[],T})};return g(m)},Ot(e,"debugColumns")),getAllFlatColumns:Ft(()=>[o.getAllColumns()],m=>m.flatMap(g=>g.getFlatColumns()),Ot(e,"debugColumns")),_getAllFlatColumnsById:Ft(()=>[o.getAllFlatColumns()],m=>m.reduce((g,_)=>(g[_.id]=_,g),{}),Ot(e,"debugColumns")),getAllLeafColumns:Ft(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,g)=>{let _=m.flatMap(b=>b.getLeafColumns());return g(_)},Ot(e,"debugColumns")),getColumn:m=>o._getAllFlatColumnsById()[m]};Object.assign(o,f);for(let m=0;m<o._features.length;m++){const g=o._features[m];g==null||g.createTable==null||g.createTable(o);}return o}function O1(){return e=>Ft(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,a,i){a===void 0&&(a=0);const s=[];for(let c=0;c<o.length;c++){const h=t1(e,e._getRowId(o[c],c,i),o[c],c,a,void 0,i==null?void 0:i.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,s.push(h),e.options.getSubRows){var l;h.originalSubRows=e.options.getSubRows(o[c],c),(l=h.originalSubRows)!=null&&l.length&&(h.subRows=r(h.originalSubRows,a+1,h));}}return s};return n.rows=r(t),n},Ot(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Wh(e,t){return e?L1(e)?d(e,{...t}):e:null}function L1(e){return typeof e=="function"}/**
* @license MIT
* https://github.com/TanStack/table/blob/main/packages/react-table/src/index.tsx
*/function N1(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=Ne(()=>({current:F1(t)})),[r,o]=Ne(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{var s;o(i),(s=e.onStateChange)==null||s.call(e,i);}})),n.current}const Ey='(function(){"use strict";var Ne={version:"1.2.0"};const Oe=4294967296;function pe(r){let e=2166136261;for(let n=0;n<r.length;n+=1)e^=r.charCodeAt(n),e=Math.imul(e,16777619)>>>0;return e.toString(16).padStart(8,"0")}async function q(r){var t;const e=typeof r=="string"?new TextEncoder().encode(r):r;if((t=globalThis.crypto)!=null&&t.subtle){const a=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),i=await globalThis.crypto.subtle.digest("SHA-256",a);return[...new Uint8Array(i)].map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let a=0;a<e.length;a+=4096)n+=pe(String.fromCharCode(...e.slice(a,a+4096)));return pe(`${e.length}:${n}:${Oe}`)}async function Ue(r){return`bundle_${(await q(r)).slice(0,24)}`}async function De(r,e,n){return`record_${(await q(`${r}:${e}:${n}`)).slice(0,32)}`}const Je={includeViewerAccountId:!1,includeSourceCaptureTimes:!1,includeRawGraphQL:!1,includePrivateNotes:!1,includeMediaBlobs:!1,visibility:"shared_safe"};function je(r){return{visibility:r.visibility,includesViewerAccountId:r.includeViewerAccountId,includesSourceCaptureTimes:r.includeSourceCaptureTimes,includesRawGraphQL:r.includeRawGraphQL,includesPrivateNotes:r.includePrivateNotes,includesMediaBlobs:r.includeMediaBlobs,warnings:He(r)}}function He(r){const e=[];return r.includeViewerAccountId&&e.push("Includes the exporting account identifier."),r.includeSourceCaptureTimes&&e.push("Includes local capture/import timestamps."),r.includeRawGraphQL&&e.push("Includes raw API payloads that may contain unrelated account context."),r.includePrivateNotes&&e.push("Includes user-authored local notes or labels."),r.includeMediaBlobs&&e.push("Includes downloaded media files, increasing size and redistribution risk."),r.visibility==="public"&&e.length&&e.unshift("Public bundle includes fields that should be reviewed before sharing."),e}var S=Uint8Array,R=Uint16Array,ae=Int32Array,ie=new S([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]),oe=new S([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]),me=new S([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xe=function(r,e){for(var n=new R(31),t=0;t<31;++t)n[t]=e+=1<<r[t-1];for(var a=new ae(n[30]),t=1;t<30;++t)for(var i=n[t];i<n[t+1];++i)a[i]=i-n[t]<<5|t;return{b:n,r:a}},be=xe(ie,2),Ve=be.b,le=be.r;Ve[28]=258,le[258]=28;for(var Ze=xe(oe,0),Ae=Ze.r,se=new R(32768),y=0;y<32768;++y){var D=(y&43690)>>1|(y&21845)<<1;D=(D&52428)>>2|(D&13107)<<2,D=(D&61680)>>4|(D&3855)<<4,se[y]=((D&65280)>>8|(D&255)<<8)>>1}for(var Q=(function(r,e,n){for(var t=r.length,a=0,i=new R(e);a<t;++a)r[a]&&++i[r[a]-1];var o=new R(e);for(a=1;a<e;++a)o[a]=o[a-1]+i[a-1]<<1;var s;if(n){s=new R(1<<e);var f=15-e;for(a=0;a<t;++a)if(r[a])for(var u=a<<4|r[a],l=e-r[a],c=o[r[a]-1]++<<l,w=c|(1<<l)-1;c<=w;++c)s[se[c]>>f]=u}else for(s=new R(t),a=0;a<t;++a)r[a]&&(s[a]=se[o[r[a]-1]++]>>15-r[a]);return s}),j=new S(288),y=0;y<144;++y)j[y]=8;for(var y=144;y<256;++y)j[y]=9;for(var y=256;y<280;++y)j[y]=7;for(var y=280;y<288;++y)j[y]=8;for(var ee=new S(32),y=0;y<32;++y)ee[y]=5;var Ge=Q(j,9,0),Qe=Q(ee,5,0),Ie=function(r){return(r+7)/8|0},Me=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new S(r.subarray(e,n))},Ke=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],re=function(r,e,n){var t=new Error(e||Ke[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,re),!n)throw t;return t},U=function(r,e,n){n<<=e&7;var t=e/8|0;r[t]|=n,r[t+1]|=n>>8},K=function(r,e,n){n<<=e&7;var t=e/8|0;r[t]|=n,r[t+1]|=n>>8,r[t+2]|=n>>16},fe=function(r,e){for(var n=[],t=0;t<r.length;++t)r[t]&&n.push({s:t,f:r[t]});var a=n.length,i=n.slice();if(!a)return{t:Te,l:0};if(a==1){var o=new S(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(x,b){return x.f-b.f}),n.push({s:-1,f:25001});var s=n[0],f=n[1],u=0,l=1,c=2;for(n[0]={s:-1,f:s.f+f.f,l:s,r:f};l!=a-1;)s=n[n[u].f<n[c].f?u++:c++],f=n[u!=l&&n[u].f<n[c].f?u++:c++],n[l++]={s:-1,f:s.f+f.f,l:s,r:f};for(var w=i[0].s,t=1;t<a;++t)i[t].s>w&&(w=i[t].s);var h=new R(w+1),p=ce(n[l-1],h,0);if(p>e){var t=0,g=0,M=p-e,C=1<<M;for(i.sort(function(b,A){return h[A.s]-h[b.s]||b.f-A.f});t<a;++t){var T=i[t].s;if(h[T]>e)g+=C-(1<<p-h[T]),h[T]=e;else break}for(g>>=M;g>0;){var E=i[t].s;h[E]<e?g-=1<<e-h[E]++-1:++t}for(;t>=0&&g;--t){var m=i[t].s;h[m]==e&&(--h[m],++g)}p=e}return{t:new S(h),l:p}},ce=function(r,e,n){return r.s==-1?Math.max(ce(r.l,e,n+1),ce(r.r,e,n+1)):e[r.s]=n},_e=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new R(++e),t=0,a=r[0],i=1,o=function(f){n[t++]=f},s=1;s<=e;++s)if(r[s]==a&&s!=e)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=r[s]}return{c:n.subarray(0,t),n:e}},W=function(r,e){for(var n=0,t=0;t<e.length;++t)n+=r[t]*e[t];return n},Se=function(r,e,n){var t=n.length,a=Ie(e+2);r[a]=t&255,r[a+1]=t>>8,r[a+2]=r[a]^255,r[a+3]=r[a+1]^255;for(var i=0;i<t;++i)r[a+i+4]=n[i];return(a+4+t)*8},ke=function(r,e,n,t,a,i,o,s,f,u,l){U(e,l++,n),++a[256];for(var c=fe(a,15),w=c.t,h=c.l,p=fe(i,15),g=p.t,M=p.l,C=_e(w),T=C.c,E=C.n,m=_e(g),x=m.c,b=m.n,A=new R(19),d=0;d<T.length;++d)++A[T[d]&31];for(var d=0;d<x.length;++d)++A[x[d]&31];for(var v=fe(A,7),B=v.t,H=v.l,F=19;F>4&&!B[me[F-1]];--F);var V=u+5<<3,$=W(a,j)+W(i,ee)+o,L=W(a,w)+W(i,g)+o+14+3*F+W(A,B)+2*A[16]+3*A[17]+7*A[18];if(f>=0&&V<=$&&V<=L)return Se(e,l,r.subarray(f,f+u));var z,_,P,J;if(U(e,l,1+(L<$)),l+=2,L<$){z=Q(w,h,0),_=w,P=Q(g,M,0),J=g;var he=Q(B,H,0);U(e,l,E-257),U(e,l+5,b-1),U(e,l+10,F-4),l+=14;for(var d=0;d<F;++d)U(e,l+3*d,B[me[d]]);l+=3*F;for(var N=[T,x],X=0;X<2;++X)for(var Z=N[X],d=0;d<Z.length;++d){var O=Z[d]&31;U(e,l,he[O]),l+=B[O],O>15&&(U(e,l,Z[d]>>5&127),l+=Z[d]>>12)}}else z=Ge,_=j,P=Qe,J=ee;for(var d=0;d<s;++d){var k=t[d];if(k>255){var O=k>>18&31;K(e,l,z[O+257]),l+=_[O+257],O>7&&(U(e,l,k>>23&31),l+=ie[O]);var G=k&31;K(e,l,P[G]),l+=J[G],G>3&&(K(e,l,k>>5&8191),l+=oe[G])}else K(e,l,z[k]),l+=_[k]}return K(e,l,z[256]),l+_[256]},We=new ae([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Te=new S(0),Ye=function(r,e,n,t,a,i){var o=i.z||r.length,s=new S(t+o+5*(1+Math.ceil(o/7e3))+a),f=s.subarray(t,s.length-a),u=i.l,l=(i.r||0)&7;if(e){l&&(f[0]=i.r>>3);for(var c=We[e-1],w=c>>13,h=c&8191,p=(1<<n)-1,g=i.p||new R(32768),M=i.h||new R(p+1),C=Math.ceil(n/3),T=2*C,E=function(ye){return(r[ye]^r[ye+1]<<C^r[ye+2]<<T)&p},m=new ae(25e3),x=new R(288),b=new R(32),A=0,d=0,v=i.i||0,B=0,H=i.w||0,F=0;v+2<o;++v){var V=E(v),$=v&32767,L=M[V];if(g[$]=L,M[V]=$,H<=v){var z=o-v;if((A>7e3||B>24576)&&(z>423||!u)){l=ke(r,f,0,m,x,b,d,B,F,v-F,l),B=A=d=0,F=v;for(var _=0;_<286;++_)x[_]=0;for(var _=0;_<30;++_)b[_]=0}var P=2,J=0,he=h,N=$-L&32767;if(z>2&&V==E(v-N))for(var X=Math.min(w,z)-1,Z=Math.min(32767,v),O=Math.min(258,z);N<=Z&&--he&&$!=L;){if(r[v+P]==r[v+P-N]){for(var k=0;k<O&&r[v+k]==r[v+k-N];++k);if(k>P){if(P=k,J=N,k>X)break;for(var G=Math.min(N,k-2),$e=0,_=0;_<G;++_){var we=v-N+_&32767,mr=g[we],Le=we-mr&32767;Le>$e&&($e=Le,L=we)}}}$=L,L=g[$],N+=$-L&32767}if(J){m[B++]=268435456|le[P]<<18|Ae[J];var Pe=le[P]&31,ze=Ae[J]&31;d+=ie[Pe]+oe[ze],++x[257+Pe],++b[ze],H=v+P,++A}else m[B++]=r[v],++x[r[v]]}}for(v=Math.max(v,H);v<o;++v)m[B++]=r[v],++x[r[v]];l=ke(r,f,u,m,x,b,d,B,F,v-F,l),u||(i.r=l&7|f[l/8|0]<<3,l-=7,i.h=M,i.p=g,i.i=v,i.w=H)}else{for(var v=i.w||0;v<o+u;v+=65535){var ge=v+65535;ge>=o&&(f[l/8|0]=u,ge=o),l=Se(f,l+1,r.subarray(v,ge))}i.i=o}return Me(s,0,t+Ie(l)+a)},Xe=(function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var n=e,t=9;--t;)n=(n&1&&-306674912)^n>>>1;r[e]=n}return r})(),qe=function(){var r=-1;return{p:function(e){for(var n=r,t=0;t<e.length;++t)n=Xe[n&255^e[t]]^n>>>8;r=n},d:function(){return~r}}},er=function(r,e,n,t,a){if(!a&&(a={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),o=new S(i.length+r.length);o.set(i),o.set(r,i.length),r=o,a.w=i.length}return Ye(r,e.level==null?6:e.level,e.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,t,a)},Ce=function(r,e){var n={};for(var t in r)n[t]=r[t];for(var t in e)n[t]=e[t];return n},I=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function rr(r,e){return er(r,e||{},0,0)}var Re=function(r,e,n,t){for(var a in r){var i=r[a],o=e+a,s=t;Array.isArray(i)&&(s=Ce(t,i[1]),i=i[0]),i instanceof S?n[o]=[i,s]:(n[o+="/"]=[new S(0),s],Re(i,o,n,t))}},Be=typeof TextEncoder<"u"&&new TextEncoder,nr=typeof TextDecoder<"u"&&new TextDecoder,tr=0;try{nr.decode(Te,{stream:!0}),tr=1}catch{}function ue(r,e){var n;if(Be)return Be.encode(r);for(var t=r.length,a=new S(r.length+(r.length>>1)),i=0,o=function(u){a[i++]=u},n=0;n<t;++n){if(i+5>a.length){var s=new S(i+8+(t-n<<1));s.set(a),a=s}var f=r.charCodeAt(n);f<128||e?o(f):f<2048?(o(192|f>>6),o(128|f&63)):f>55295&&f<57344?(f=65536+(f&1047552)|r.charCodeAt(++n)&1023,o(240|f>>18),o(128|f>>12&63),o(128|f>>6&63),o(128|f&63)):(o(224|f>>12),o(128|f>>6&63),o(128|f&63))}return Me(a,0,i)}var ve=function(r){var e=0;if(r)for(var n in r){var t=r[n].length;t>65535&&re(9),e+=t+4}return e},Fe=function(r,e,n,t,a,i,o,s){var f=t.length,u=n.extra,l=s&&s.length,c=ve(u);I(r,e,o!=null?33639248:67324752),e+=4,o!=null&&(r[e++]=20,r[e++]=n.os),r[e]=20,e+=2,r[e++]=n.flag<<1|(i<0&&8),r[e++]=a&&8,r[e++]=n.compression&255,r[e++]=n.compression>>8;var w=new Date(n.mtime==null?Date.now():n.mtime),h=w.getFullYear()-1980;if((h<0||h>119)&&re(10),I(r,e,h<<25|w.getMonth()+1<<21|w.getDate()<<16|w.getHours()<<11|w.getMinutes()<<5|w.getSeconds()>>1),e+=4,i!=-1&&(I(r,e,n.crc),I(r,e+4,i<0?-i-2:i),I(r,e+8,n.size)),I(r,e+12,f),I(r,e+14,c),e+=16,o!=null&&(I(r,e,l),I(r,e+6,n.attrs),I(r,e+10,o),e+=14),r.set(t,e),e+=f,c)for(var p in u){var g=u[p],M=g.length;I(r,e,+p),I(r,e+2,M),r.set(g,e+4),e+=4+M}return l&&(r.set(s,e),e+=l),e},ar=function(r,e,n,t,a){I(r,e,101010256),I(r,e+8,n),I(r,e+10,n),I(r,e+12,t),I(r,e+16,a)};function ir(r,e){e||(e={});var n={},t=[];Re(r,"",n,e);var a=0,i=0;for(var o in n){var s=n[o],f=s[0],u=s[1],l=u.level==0?0:8,c=ue(o),w=c.length,h=u.comment,p=h&&ue(h),g=p&&p.length,M=ve(u.extra);w>65535&&re(11);var C=l?rr(f,u):f,T=C.length,E=qe();E.p(f),t.push(Ce(u,{size:f.length,crc:E.d(),c:C,f:c,m:p,u:w!=o.length||p&&h.length!=g,o:a,compression:l})),a+=30+w+M+T,i+=76+2*(w+M)+(g||0)+T}for(var m=new S(i+22),x=a,b=i-a,A=0;A<t.length;++A){var c=t[A];Fe(m,c.o,c,c.f,c.u,c.c.length);var d=30+c.f.length+ve(c.extra);m.set(c.c,c.o+d),Fe(m,a,c,c.f,c.u,c.c.length,c.o,c.m),a+=16+d+(c.m?c.m.length:0)}return ar(m,a,t.length,b,x),m}function or(r){const e=r.replace(/\\\\/g,"/").replace(/^\\/+/,"");if(!e||e.includes("..")||e.startsWith("/"))throw new Error(`Unsafe bundle ZIP path: ${r}`);return e}function lr(r){const e={};for(const n of r){const t=or(n.path),a={level:n.level??6};e[t]=[typeof n.data=="string"?ue(n.data):n.data,a]}return ir(e)}function sr(r){return String(r||"bundle").trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"bundle"}function Ee(r){if(typeof r=="string")try{const e=new URL(r);return e.protocol==="http:"||e.protocol==="https:"?e.href:void 0}catch{return}}function fr(r,e){const t=String((r&&typeof r=="object"?r:{}).__typename||e.__typename||"").toLowerCase();return t.includes("tweet")||e.full_text||e.media?"tweet":t.includes("user")||e.screen_name||e.profile_image_url?"user":"unknown"}function cr(r,e){const t=(r&&typeof r=="object"?r:{}).twe_private_fields,a=[t==null?void 0:t.created_at,t==null?void 0:t.updated_at,e.created_at,e.time,e.date];for(const i of a){const o=Number(i);if(Number.isFinite(o)&&o>0)return o;if(typeof i=="string"){const s=Date.parse(i);if(Number.isFinite(s))return s}}}async function ur(r,e,n){const t=fr(e.original,e.record),a=String(e.id||e.record.id||e.record.rest_id||""),i=await De(r,t,a||JSON.stringify(e.record)),o=n.includeOriginalMetadata?{...e.record,metadata:e.original}:e.record;return{id:i,kind:t,sourceId:a||void 0,observedAt:cr(e.original,e.record),sensitivity:"low",data:o,mediaRefs:Array.isArray(e.record.media)?e.record.media.map((s,f)=>({id:`${i}:media:${f}`,type:s.type==="photo"||s.type==="video"||s.type==="animated_gif"?s.type:"unknown",url:Ee(s.original),previewUrl:Ee(s.thumbnail),altText:typeof s.ext_alt_text=="string"?s.ext_alt_text:void 0})):void 0}}function vr(){return{records:0,tweets:0,users:0,socialEdges:0,captures:0,mediaBlobs:0}}function dr(r,e){r.records+=1,e.kind==="tweet"&&(r.tweets+=1),e.kind==="user"&&(r.users+=1),e.kind==="social_edge"&&(r.socialEdges+=1),e.kind==="capture"&&(r.captures+=1),r.mediaBlobs+=0}async function hr(r,e){const n=Date.now(),t=typeof performance<"u"?performance.now():Date.now(),a=Math.max(0,Math.floor(Number(e.totalRecords||0))),i=(m,x)=>{var b;(b=e.onProgress)==null||b.call(e,{phase:m,processedRecords:x,totalRecords:a||x,elapsedMs:(typeof performance<"u"?performance.now():Date.now())-t})},o=await Ue(`${e.title}:${e.scope}:${e.queryText||""}:${n}:${a}`),s=vr(),f=[],u=[];let l=0;for await(const m of r){if(!m)continue;const x=await ur(o,m,e);dr(s,x),f.push(`${JSON.stringify(x)}\n`);for(const b of x.mediaRefs||[])b.url&&u.push(b.url);l+=1,(l===1||l===a||l%100===0)&&i("envelope",l)}const c=f.join(""),w=je(Je),h=[{path:"manifest.json",contentType:"application/json",role:"manifest"},{path:"records/records.jsonl",contentType:"application/x-ndjson",role:"records",bytes:new TextEncoder().encode(c).byteLength,sha256:await q(c)}],p=u.join(`\n`)+(u.length?`\n`:"");u.length&&h.push({path:"media/media-urls.txt",contentType:"text/plain",role:"media",bytes:new TextEncoder().encode(p).byteLength,sha256:await q(p)});const g={id:o,title:e.title,description:e.description,producer:{app:"twitter-web-exporter",appVersion:Ne.version,schemaVersion:1,exportedAt:n},privacy:w,counts:s,files:h},M=h[0];M&&(h[0]={...M,bytes:new TextEncoder().encode(JSON.stringify(g,void 0,2)).byteLength}),i("manifest",l);const C=e.compressionLevel??1,T=[{path:"manifest.json",data:JSON.stringify(g,void 0,2),level:C},{path:"records/records.jsonl",data:c,level:C}];u.length&&T.push({path:"media/media-urls.txt",data:p,level:C}),i("zip",l);const E={filename:`twe-bundle-${sr(e.title)}-${n}.zip`,bytes:lr(T),manifest:g};return i("done",l),E}const Y=new Map;function de(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function ne(r,e){self.postMessage(r,{transfer:e||[]})}function wr(r){return r instanceof Error?r.message:String(r)}function te(r){var e;(e=r.wake)==null||e.call(r),r.wake=null}async function gr(r){r.rows.length||r.finished||r.cancelled||(r.waitingForChunk||(r.waitingForChunk=!0,ne({type:"bundle-export:ready-for-chunk",jobId:r.jobId})),await new Promise(e=>{r.wake=e}))}async function*yr(r){for(;;){if(await gr(r),r.cancelled)throw new Error("Bundle export cancelled.");const e=r.rows.shift();if(e){yield e;continue}if(r.finished)return}}async function pr(r,e){try{const n=await hr(yr(r),{...e.options,totalRecords:e.totalRecords,onProgress:a=>{if(r.cancelled)throw new Error("Bundle export cancelled.");ne({type:"bundle-export:progress",jobId:e.jobId,progress:a})}});if(r.cancelled)return;const t=n.bytes.buffer.slice(n.bytes.byteOffset,n.bytes.byteOffset+n.bytes.byteLength);ne({type:"bundle-export:done",jobId:e.jobId,filename:n.filename,buffer:t,manifest:n.manifest,elapsedMs:de()-r.startedAt},[t])}catch(n){r.cancelled||ne({type:"bundle-export:error",jobId:e.jobId,error:wr(n),elapsedMs:de()-r.startedAt})}finally{Y.delete(e.jobId)}}self.onmessage=r=>{const e=r.data;if(!e||typeof e!="object")return;if(e.type==="bundle-export:start"){const t=Y.get(e.jobId);t&&(t.cancelled=!0,te(t),Y.delete(e.jobId));const a={jobId:e.jobId,startedAt:de(),rows:[],finished:!1,cancelled:!1,waitingForChunk:!1,wake:null};Y.set(e.jobId,a),pr(a,e);return}const n=Y.get(e.jobId);if(n){if(e.type==="bundle-export:chunk"){!n.finished&&!n.cancelled&&(n.rows.push(...e.rows),n.waitingForChunk=!1,te(n));return}if(e.type==="bundle-export:finish"){n.finished=!0,te(n);return}e.type==="bundle-export:cancel"&&(n.cancelled=!0,te(n))}}})();\n',Yh=typeof self<"u"&&self.Blob&&new Blob([Ey],{type:"text/javascript;charset=utf-8"});function B1(e){let t;try{if(t=Yh&&(self.URL||self.webkitURL).createObjectURL(Yh),!t)throw "";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ey),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}const U1=100,$1="twe_bundle_export_batch_delay_ms_v1";function H1(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`bundle-${crypto.randomUUID()}`:`bundle-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function j1(e){return !!e&&typeof e=="object"&&Symbol.asyncIterator in e}async function*q1(e){if(j1(e)){yield*e;return}yield*e;}function V1(){if(typeof localStorage>"u")return 0;try{const e=localStorage.getItem($1),t=Number(e||0);return Number.isFinite(t)&&t>0?Math.min(1e3,t):0}catch{return 0}}async function Xh(e){e&&await new Promise(t=>{globalThis.setTimeout(t,e);});}function z1({rows:e,totalRecords:t,options:n,onProgress:r,batchSize:o=U1}){const a=H1(),i=ze(),s=Math.max(1,Math.floor(o)),l=V1();let c=null,h=false,f=false,m=0,g=0,_=null,b=null,C=false;const v=()=>new Promise((L,D)=>{if(f||h){D(new Error("Bundle export cancelled."));return}if(C){C=false,L();return}b=L;}),T=()=>{h=true,b==null||b(),b=null;},R=L=>{!c||h||f||c.postMessage(L);},P=new Promise((L,D)=>{_=D;try{c=new B1,Da("export",!0);}catch(O){Da("export",false),D(O instanceof Error?O:new Error(String(O)));return}c.onmessage=O=>{const B=O.data;if(!B||B.jobId!==a)return;if(B.type==="bundle-export:ready-for-chunk"){b?(b(),b=null):C=true;return}if(B.type==="bundle-export:progress"){r==null||r(B.progress);return}if(T(),c==null||c.terminate(),c=null,B.type==="bundle-export:error"){Be({kind:"export",name:"bundle-worker-error",durationMs:B.elapsedMs,tags:{error:B.error}}),D(new Error(B.error));return}const I=new Blob([B.buffer],{type:"application/zip"});Xo(B.filename,I),Be({kind:"export",name:"bundle-worker-complete",durationMs:ze()-i,value:B.buffer.byteLength,tags:{records:B.manifest.counts.records,compressionLevel:n.compressionLevel??1,batches:g,sentRows:m}}),L(B.filename);},c.onerror=O=>{h||(T(),Da("export",false),c==null||c.terminate(),c=null,D(new Error(O.message||"Bundle export worker failed.")));},R({type:"bundle-export:start",jobId:a,totalRecords:t,options:{...n,compressionLevel:n.compressionLevel??1,totalRecords:t}}),(async()=>{try{let O=[];for await(const B of q1(e)){if(f||h)return;if(O.push(B),!(O.length<s)){if(await v(),f||h)return;g+=1,m+=O.length,R({type:"bundle-export:chunk",jobId:a,rows:O}),Be({kind:"export",name:"bundle-worker-batch-sent",value:O.length,tags:{batch:g,sentRows:m,totalRecords:t}}),O=[],await Xh(l);}}if(O.length){if(await v(),f||h)return;g+=1,m+=O.length,R({type:"bundle-export:chunk",jobId:a,rows:O}),Be({kind:"export",name:"bundle-worker-batch-sent",value:O.length,tags:{batch:g,sentRows:m,totalRecords:t}}),await Xh(l);}if(await v(),f||h)return;R({type:"bundle-export:finish",jobId:a}),Be({kind:"export",name:"bundle-worker-stream-complete",durationMs:ze()-i,value:m,tags:{batches:g,totalRecords:t}});}catch(O){if(h)return;T(),c==null||c.terminate(),c=null,D(O instanceof Error?O:new Error(String(O)));}})();});return {jobId:a,promise:P,cancel:()=>{h||f||(f=true,T(),c==null||c.postMessage({type:"bundle-export:cancel",jobId:a}),c==null||c.terminate(),c=null,_==null||_(new Error("Bundle export cancelled.")),Be({kind:"export",name:"bundle-worker-cancel",durationMs:ze()-i,value:m,tags:{batches:g}}));}}}function Tr(e){if(e==null||typeof e!="object")return e;if(typeof structuredClone=="function")try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}function K1(e,t){if(!e||typeof e!="object")return;const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return;r=r[o];}return r}function Fd(e){const t=[];for(const n of e){if("columns"in n&&Array.isArray(n.columns)){t.push(...Fd(n.columns));continue}t.push(n);}return t}function qu(e){return "id"in e&&typeof e.id=="string"&&e.id?e.id:"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:""}function G1(e,t,n){if("accessorFn"in e&&typeof e.accessorFn=="function")return e.accessorFn(t,n);if("accessorKey"in e){if(typeof e.accessorKey=="string")return K1(t,e.accessorKey);if(typeof e.accessorKey=="number"&&Array.isArray(t))return t[e.accessorKey]}}function ii(e,t,n){const r={},o=Fd(t);for(const i of o){const s=i.meta;if((s==null?void 0:s.exportable)===false)continue;const l=G1(i,e,n),c={original:e};let h=s!=null&&s.exportValue?s.exportValue(c):l;h===void 0&&(h=null),r[(s==null?void 0:s.exportKey)||qu(i)]=Tr(h);}const a=Tr(e);if(a&&(a.__bookmark_folder_id||a.__bookmark_folder_name||a.__bookmark_folder_url)){const i=a.__bookmark_folder_name_source==="api"?a.__bookmark_folder_name??null:null;r.bookmark_folder_id=a.__bookmark_folder_id??null,r.bookmark_folder_name=i,r.bookmark_folder_url=a.__bookmark_folder_url??null;}return {id:So(a,n),original:Tr(e),record:r}}function W1({title:e,columns:t,resultRecords:n,selectedRecords:r,selectedRecordCount:o,selectionExcludedRecordIds:a=[],resultCount:i,streamResultRecords:s,streamSelectedRecords:l,resultSetSnapshot:c,selectionMode:h,preparingFullDataset:f=false,show:m,onClose:g}){const{t:_}=Qn("exporter"),[b,C]=$n(To.JSON),[v,T]=$n(false),[R,P]=$n(false),[L,D]=ir(false),[O,B]=$n(0),[I,x]=$n(0),[F,U]=$n("result_set"),[Ce,X]=$n(1),[re,Z]=Ne(null),ce=kt(false),he=kt(null),fe=kt(null),me=kt(null),z=kt(false);it(()=>{if(!m){ce.current=false;return}ce.current||(ce.current=true,Z({...c,ids:[...c.ids],warnings:[...c.warnings]}),U(r.length>0&&h==="explicit"?"selected":"result_set"),B(0),x(0));},[c,r,h,B,U,x,m]);const ue=i??(re==null?void 0:re.totalMatches)??n.length,Ae=Tt(()=>new Set(h==="all"?a:[]),[a,h]),ie=h==="all"?Math.min(Ae.size,ue):0,Oe=Math.max(0,ue-ie),Le=o??r.length,ee=F==="selected"?r:n,ne=F==="selected"?Le:Oe,V=F==="result_set"&&!!s,se=F==="selected"&&!!l,_e=V||se,ke=f&&F==="result_set",Ze=ne>0&&!ke,Je=Ue=>F==="result_set"&&Ae.has(Ue),Me=()=>{const Ue=[];return ee.forEach((Ye,wt)=>{const Re=ii(Ye,t,wt);Je(Re.id)||Ue.push(Re);}),Ue};async function*bt(){if(V&&s){let Ue=0;for await(const Ye of s()){const wt=ii(Ye,t,Ue);if(Ue+=1,Je(wt.id))continue;const Re=Tr(wt.record);L&&(Re.metadata=Tr(wt.original)),yield Re;}return}if(se&&l){let Ue=0;for await(const Ye of l()){const wt=ii(Ye,t,Ue);Ue+=1;const Re=Tr(wt.record);L&&(Re.metadata=Tr(wt.original)),yield Re;}return}for(const Ue of Me()){const Ye=Tr(Ue.record);L&&(Ye.metadata=Tr(Ue.original)),yield Ye;}}const Nt=async()=>{if(!Ze)return;const Ue=new AbortController,Ye=ze();z.current=false,fe.current=Ue,T(true),B(0),x(ne),Be({kind:"export",name:"modal-export-start",value:ne,tags:{scope:F,format:b,streaming:_e,excluded:ie}});const wt=Fd(t).reduce((gt,ot)=>{var ge,M;const $e=((ge=ot.meta)==null?void 0:ge.exportKey)||qu(ot),be=((M=ot.meta)==null?void 0:M.exportHeader)||qu(ot);return gt[$e]=_(be),gt},{});if(_e){if(await Lg(bt(),b,`twitter-${e}-${F==="selected"?"selected":"results"}-${Date.now()}.${b.toLowerCase()}`,wt,{onProgress:B,signal:Ue.signal}),fe.current=null,T(false),Ue.signal.aborted){z.current||Be({kind:"export",name:"modal-export-cancel",durationMs:ze()-Ye,value:O,tags:{scope:F,format:b,streaming:true,excluded:ie}});return}Be({kind:"export",name:"modal-export-complete",durationMs:ze()-Ye,value:ne,tags:{scope:F,format:b,streaming:true,excluded:ie}});return}const Re=[];for(const gt of Me()){if(Ue.signal.aborted){fe.current=null,T(false);return}const ot=Tr(gt.record);L&&(ot.metadata=Tr(gt.original)),Re.push(ot),B(Re.length);}Be({kind:"export",name:"modal-array-export-rows",value:Re.length,tags:{scope:F,format:b,excluded:ie}}),await Og(Re,b,`twitter-${e}-${F==="selected"?"selected":"results"}-${Date.now()}.${b.toLowerCase()}`,wt),fe.current=null,T(false),Be({kind:"export",name:"modal-export-complete",durationMs:ze()-Ye,value:Re.length,tags:{scope:F,format:b,streaming:false,excluded:ie}});};async function*Kt(Ue){if(V&&s){let Ye=0;for await(const wt of s()){if(Ue.aborted)return;const Re=ii(wt,t,Ye);Ye+=1,!Je(Re.id)&&(yield Re);}return}if(se&&l){let Ye=0;for await(const wt of l()){if(Ue.aborted)return;yield ii(wt,t,Ye),Ye+=1;}return}for(const Ye of Me()){if(Ue.aborted)return;yield Ye;}}const qt=async()=>{if(!Ze)return;const Ue=new AbortController;me.current=Ue,P(true),B(0),x(ne);try{const Ye=z1({rows:Kt(Ue.signal),totalRecords:ne,options:{title:e,scope:F,queryText:re==null?void 0:re.queryText,sort:re==null?void 0:re.sort,includeOriginalMetadata:L,compressionLevel:Ce},onProgress:wt=>{B(wt.processedRecords),x(wt.totalRecords);}});if(he.current=Ye,await Ye.promise,Ue.signal.aborted)return;B(ne);}catch(Ye){const wt=Ye instanceof Error?Ye.message:String(Ye);/cancelled/i.test(wt)||console.error("[twitter-web-exporter] Failed to export bundle ZIP.",Ye);}finally{he.current=null,me.current=null,P(false);}},Mt=()=>{var Ue,Ye,wt;if(v){(Ue=fe.current)==null||Ue.abort(),z.current=true,Be({kind:"export",name:"modal-export-cancel",value:O,tags:{scope:F,format:b,streaming:_e}}),fe.current=null,T(false);return}if(R){(Ye=me.current)==null||Ye.abort(),(wt=he.current)==null||wt.cancel(),he.current=null,me.current=null,P(false);return}g==null||g();};return d(sr,{class:"max-w-sm md:max-w-screen-sm sm:max-w-screen-sm max-h-full",title:`${e} ${_("Data")}`,show:m,onClose:g,children:[d("div",{class:"px-4 text-base",children:[d("p",{class:"text-base-content text-opacity-60 mb-2 leading-5 text-sm",children:_("Export captured data as JSON/HTML/CSV file. This may take a while depending on the amount of data. The exported file does not include media files such as images and videos but only the URLs.")}),d("div",{class:"flex items-center",children:[d("p",{class:"mr-2 leading-8",children:_("Data length:")}),d("span",{class:"font-mono leading-6 h-6 bg-base-200 px-2 rounded-md",children:ne}),ke?d("span",{class:"ml-2 inline-flex items-center gap-1 text-xs opacity-70",children:[d("span",{class:"loading loading-spinner loading-xs"}),_("loading remaining rows")]}):null]}),d("div",{class:"flex items-center gap-4",children:[d("p",{class:"leading-8",children:_("Export scope:")}),d("label",{class:"label cursor-pointer gap-2 py-0",children:[d("input",{type:"radio",name:"export-scope",class:"radio radio-sm",checked:F==="result_set",onChange:()=>U("result_set")}),d("span",{children:_("All current results")}),d("span",{class:"font-mono opacity-60",children:["(",Oe,")"]})]}),d("label",{class:an("label cursor-pointer gap-2 py-0",Le<=0&&"opacity-50"),children:[d("input",{type:"radio",name:"export-scope",class:"radio radio-sm",checked:F==="selected",disabled:Le<=0,onChange:()=>U("selected")}),d("span",{children:_("Selected rows")}),d("span",{class:"font-mono opacity-60",children:["(",Le,")"]})]})]}),re?d("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5",children:[d("div",{class:"font-semibold",children:_("Pinned result set")}),d("div",{class:"font-mono opacity-70",children:re.resultSetId}),d("div",{children:[_("Query"),":"," ",d("span",{class:"font-mono",children:re.queryText||"-"})]}),d("div",{children:[_("Sort"),": ",d("span",{class:"font-mono",children:re.sort})]})]}):null,d("div",{class:"flex items-center",children:[d("p",{class:"mr-2 leading-8",children:_("Include all metadata:")}),d("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:L,onChange:D})]}),d("div",{class:"flex",children:[d("p",{class:"mr-2 leading-8",children:_("Export as:")}),d("select",{class:"select select-bordered select-sm w-32",onChange:Ue=>{C(Ue.target.value);},children:Object.values(To).map(Ue=>d("option",{selected:Ue===b,children:Ue},Ue))})]}),d("div",{class:"flex items-center gap-2",children:[d("p",{class:"leading-8",children:_("Bundle ZIP compression:")}),d("select",{class:"select select-bordered select-sm w-44",value:String(Ce),onChange:Ue=>X(Number(Ue.target.value)),children:[d("option",{value:"0",children:_("Fastest / store")}),d("option",{value:"1",children:_("Balanced / fast")}),d("option",{value:"6",children:_("Smaller / slower")})]})]}),ne>0?null:d("div",{class:"flex items-center justify-center h-28 w-full",children:d("p",{class:"text-base-content text-opacity-50",children:_("No data selected.")})}),d("div",{class:"flex flex-col mt-6",children:[d("progress",{class:"progress progress-primary w-full",value:O/(I||1)*100,max:"100"}),d("span",{class:"text-sm leading-none mt-2 text-base-content text-opacity-60",children:`${O}/${ne}`})]})]}),d("div",{class:"flex space-x-2",children:[d("span",{class:"flex-grow"}),d("button",{class:"btn",onClick:Mt,children:_(R||v?"Cancel Export":"Cancel")}),d("button",{class:an("btn btn-secondary",(R||!Ze)&&"btn-disabled"),onClick:qt,title:_("Export a canonical portable ZIP bundle for sharing/importing."),children:[R&&d("span",{class:"loading loading-spinner"}),_("Export Bundle ZIP")]}),d("button",{class:an("btn btn-primary",(v||!Ze)&&"btn-disabled"),onClick:Nt,children:[v&&d("span",{class:"loading loading-spinner"}),_("Start Export")]})]})]})}const Y1=/[\p{L}\p{N}_]+(?:['’][\p{L}\p{N}_]+)*/gu,Qh={bm25:1,lexical:1,cover_density:1,recency:0,term_match:1,phrase_match:8,quoted_phrase_match:256,cover_bigram:10,cover_trigram:30},X1="twe_raw_search_ranking_v1",Q1=128,Ay=Math.max(1,Number(Md.min_term_length)),Z1=Math.max(8,Number(Md.max_expansions)),Vu=Math.max(1,Number(zi.min_term_length)),Si=Math.max(0,Number(zi.max_edit_distance)),Dy=Math.max(1,Number(zi.prefix_root_length)),Py=Math.max(8,Number(zi.max_expansions)),Fy=3,J1=4,eC=.65,tC=1.5,si=new Map,Zh=new WeakMap;function ct(e,t){const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return null;r=r[o];}return r}function Lt(e){return typeof e=="string"?e:""}function li(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e>0;if(typeof e=="string"){const t=e.trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}return false}function Cs(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){const t=Number(e);if(Number.isFinite(t))return t}return 0}function Dn(e){return e.trim().toLowerCase()}function Mo(e){if(!e)return [];const t=e.toLowerCase().match(Y1);return t?t.map(n=>n.replace(/['’]/g,"")).filter(Boolean):[]}function Wc(e){const t=new Map;for(let n=0;n<e.length;n+=1){const r=e[n];r&&t.set(r,(t.get(r)||0)+1);}return t}function Oy(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=new Array(t.length+1),r=new Array(t.length+1);for(let o=0;o<=t.length;o+=1)n[o]=o;for(let o=1;o<=e.length;o+=1){r[0]=o;for(let a=1;a<=t.length;a+=1){const i=e[o-1]===t[a-1]?0:1;r[a]=Math.min((n[a]??0)+1,(r[a-1]??0)+1,(n[a-1]??0)+i);}for(let a=0;a<=t.length;a+=1)n[a]=r[a]??0;}return n[t.length]??Math.max(e.length,t.length)}function zu(e,t=false){if(!e)return 0;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const r=t?"T23:59:59.999Z":"T00:00:00.000Z",o=Date.parse(`${e}${r}`);return Number.isFinite(o)?o:0}const n=Date.parse(e);return Number.isFinite(n)?n:0}function nC(e){return e?e.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim():""}function rC(e){const t=new Set,n=r=>{if(Array.isArray(r))for(const o of r){if(!o||typeof o!="object")continue;const a=o,i=Lt(a.expanded_url).trim(),s=Lt(a.display_url).trim(),l=Lt(a.url).trim();i&&t.add(i),s&&t.add(s),l&&t.add(l);}};return n(ct(e,"legacy.entities.urls")),n(ct(e,"legacy.entities.media")),n(ct(e,"legacy.entities.description.urls")),n(ct(e,"legacy.entities.url.urls")),[...t]}function Yc(e,t,n="text"){const r=ct(e,t);if(!Array.isArray(r))return [];const o=new Set;for(const a of r){if(!a||typeof a!="object")continue;const s=Dn(Lt(a[n]).trim());s&&o.add(s);}return [...o]}function oC(e){const t=(Array.isArray(ct(e,"legacy.extended_entities.media"))?ct(e,"legacy.extended_entities.media"):ct(e,"legacy.entities.media"))||[];if(!Array.isArray(t))return [];const n=new Set;for(const r of t){if(!r||typeof r!="object")continue;const a=Dn(Lt(r.type).trim());a&&n.add(a);}return [...n]}function aC(e){const t=ct(e,"article.article_results.result.content_state.blocks");if(!Array.isArray(t))return [];const n=[];for(const r of t){if(!r||typeof r!="object")continue;const o=Lt(r.text).trim();o&&n.push(o);}return n}function iC(e){const t=new Set;for(const n of e)try{const r=n.startsWith("http")?n:`https://${n}`,o=new URL(r).hostname.replace(/^www\./,"").toLowerCase();o&&t.add(o);}catch{}return [...t]}function Ci(e,t,n=false){if(!t.length)return 0;const r=t[0],o=[];for(let i=0;i<e.length;i+=1)e[i]===r&&o.push(i);if(!o.length)return null;let a=null;for(const i of o){let s=i,l=true;for(let m=1;m<t.length;m+=1){const g=t[m],_=n&&m===t.length-1;let b=-1;for(let C=s+1;C<e.length;C+=1){const v=e[C];if(_&&g&&(v!=null&&v.startsWith(g))||v===g){b=C;break}}if(b<0){l=false;break}s=b;}if(!l)continue;const c=s-i,h=Math.max(0,t.length-1),f=Math.max(0,c-h);(a===null||f<a)&&(a=f);}return a}function Jh(e){const t=e||{},n=Lt(ct(t,"rest_id"))||Lt(ct(t,"legacy.id_str"))||Lt(ct(t,"id_str"))||`${Math.random().toString(36).slice(2)}`,r=Lt(ct(t,"note_tweet.note_tweet_results.result.text"))||[Lt(ct(t,"article.article_results.result.title")),Lt(ct(t,"article.article_results.result.preview_text")),...aC(t)].map(Mt=>Mt.trim()).filter(Boolean).filter((Mt,Ue,Ye)=>Ye.indexOf(Mt)===Ue).join(`
`)||Lt(ct(t,"legacy.full_text"))||Lt(ct(t,"legacy.text"))||Lt(ct(t,"legacy.description")),o=Lt(ct(t,"quoted_status_result.result.note_tweet.note_tweet_results.result.text"))||Lt(ct(t,"quoted_status_result.result.legacy.full_text"))||Lt(ct(t,"quoted_status_result.result.legacy.text"))||Lt(ct(t,"quoted_status_result.result.article.article_results.result.title"))||Lt(ct(t,"quoted_status_result.result.article.article_results.result.preview_text")),a=Dn(Lt(ct(t,"quoted_status_result.result.core.user_results.result.core.screen_name"))),i=Lt(ct(t,"quoted_status_result.result.core.user_results.result.core.name")),s=Dn(Lt(ct(t,"core.user_results.result.core.screen_name"))||Lt(ct(t,"core.screen_name"))),l=Lt(ct(t,"core.user_results.result.core.name"))||Lt(ct(t,"core.name")),c=Lt(ct(t,"core.user_results.result.rest_id"))||Lt(ct(t,"rest_id")),h=Lt(ct(t,"legacy.created_at"))||Lt(ct(t,"core.created_at")),f=h?Number(Na(h)||0):Number(ct(t,"article.article_results.result.metadata.first_published_at_secs")||0)*1e3,m=nC(Lt(ct(t,"legacy.source"))),g=Dn(Lt(ct(t,"card.card_platform.card_name"))||Lt(ct(t,"card.name"))||Lt(ct(t,"__card_name"))),_=Lt(ct(t,"__bookmark_folder_id")).trim(),b=Lt(ct(t,"__bookmark_folder_name")).trim(),C=rC(t),v=iC(C),T=Yc(t,"legacy.entities.user_mentions","screen_name"),R=Yc(t,"legacy.entities.hashtags"),P=Yc(t,"legacy.entities.symbols"),L=oC(t),D=io(ct(t,"twe_relationship_fields.subject_screen_names")).map(Mt=>Dn(Mt)),O=io(ct(t,"twe_relationship_fields.subject_user_ids")).map(Mt=>String(Mt).trim()),B=io(ct(t,"twe_relationship_fields.relation_types")).map(Mt=>Dn(Mt)),I=Dn(Lt(ct(t,"legacy.in_reply_to_screen_name"))),x=Lt(ct(t,"legacy.in_reply_to_user_id_str")).trim(),F=Lt(ct(t,"legacy.in_reply_to_status_id_str")).trim(),U=Lt(ct(t,"legacy.conversation_id_str"))||Lt(ct(t,"conversation_id_str")),Ce=Dn(Lt(ct(t,"legacy.lang"))),X=Dn(Lt(ct(t,"__route_type"))),re=L.length>0,Z=L.includes("photo"),ce=L.includes("video")||L.includes("animated_gif"),he=C.length>0,fe=!!ct(t,"legacy.retweeted_status_result")||Lt(ct(t,"legacy.full_text")).startsWith("RT @"),me=!!ct(t,"quoted_status_result"),z=!!F,ue=Dn(Lt(ct(t,"core.user_results.result.verification.verified_type")))==="verified"||Dn(Lt(ct(t,"verification.verified_type")))==="verified",Ae=li(ct(t,"core.user_results.result.is_blue_verified"))||li(ct(t,"is_blue_verified")),ie=li(ct(t,"legacy.favorited")),Oe=li(ct(t,"legacy.retweeted")),Le=li(ct(t,"legacy.bookmarked")),ee=Cs(ct(t,"legacy.favorite_count")),ne=Cs(ct(t,"legacy.retweet_count")),V=Cs(ct(t,"legacy.reply_count")),se=Cs(ct(t,"legacy.bookmark_count")),_e=[r,o,m,s,l,a,i,I,_,b,g,...D,...O,...B,...T,...R,...P,...C,...v].filter(Boolean).join(" ").trim(),ke=[r,m,s,l,I,_,b,g,...D,...O,...B,...T,...R,...P,...C,...v].filter(Boolean).join(" ").trim(),Ze=[o,a,i].filter(Boolean).join(" ").trim(),Je=Mo(_e),Me=Mo(ke),bt=Mo(Ze),Nt=Wc(Je),Kt=Wc(Me),qt=Wc(bt);return {raw:e,id:n,text:_e,primaryText:ke,quotedText:Ze,tokens:Je,primaryTokens:Me,quotedTokens:bt,tokenFreq:Nt,primaryTokenFreq:Kt,quotedTokenFreq:qt,createdAtMs:f,authorScreenName:s,authorId:c,toUser:I,toUserId:x,inReplyToId:F,conversationId:U,lang:Ce,routeType:X,sourceText:Dn(m),cardName:g,bookmarkFolderId:_,bookmarkFolderName:Dn(b),mentions:T,hashtags:R,cashtags:P,urls:C.map(Mt=>Mt.toLowerCase()),domains:v,favoriteCount:ee,retweetCount:ne,replyCount:V,bookmarkCount:se,favorited:ie,retweeted:Oe,bookmarked:Le,hasMedia:re,hasImages:Z,hasVideo:ce,hasLinks:he,isReply:z,isRetweet:fe,isQuote:me,isVerified:ue,isBlueVerified:Ae,fieldSearchCache:new Map}}function sC(e){if(!e||typeof e!="object")return Jh(e);const t=Zh.get(e);if(t)return t;const n=Jh(e);return Zh.set(e,n),n}function io(e){if(e==null)return [];if(typeof e=="string"){const t=e.trim();return t?[t]:[]}return typeof e=="number"||typeof e=="boolean"?[String(e)]:Array.isArray(e)?e.flatMap(t=>io(t)):typeof e=="object"?Object.values(e).flatMap(t=>io(t)):[]}function lC(e,t){switch(t){case "text":return e.text;case "id":return e.id;case "author_screen_name":return e.authorScreenName;case "author_id":return e.authorId;case "to_user":return e.toUser;case "to_user_id":return e.toUserId;case "conversation_id":return e.conversationId;case "lang":return e.lang;case "route":case "route_type":return e.routeType;case "source":case "source_text":return e.sourceText;case "card_name":return e.cardName;case "bookmark_folder_id":return e.bookmarkFolderId;case "bookmark_folder_name":return e.bookmarkFolderName;case "subject_screen_names":return io(ct(e.raw||{},"twe_relationship_fields.subject_screen_names"));case "subject_user_ids":return io(ct(e.raw||{},"twe_relationship_fields.subject_user_ids"));case "relation_types":return io(ct(e.raw||{},"twe_relationship_fields.relation_types"));case "mentions":return e.mentions;case "hashtags":return e.hashtags;case "cashtags":return e.cashtags;case "urls":return e.urls;case "domains":return e.domains;default:return ct(e.raw||{},t)}}function cC(e,t){const n=String(t||"").trim();if(!n)return {text:e.text,tokens:e.tokens,tokenFreq:e.tokenFreq};const r=e.fieldSearchCache.get(n);if(r)return r;const a=io(lC(e,n)).join(" ").trim(),i=Mo(a),s=new Map;for(const c of i)s.set(c,(s.get(c)||0)+1);const l={text:a,tokens:i,tokenFreq:s};return e.fieldSearchCache.set(n,l),l}function uC(e){const t=new Map;let n=0;for(const r of e){n+=r.tokens.length;for(const o of r.tokenFreq.keys())t.set(o,(t.get(o)||0)+1);}return {docCount:e.length,avgDocLength:e.length?n/e.length:1,termDocFreq:t}}function cn(e,t,n){if(!t)return;const r=e.get(t);if(r){r.push(n);return}e.set(t,[n]);}function Jt(e,t){return `${e}:${t}`}function dC(e){const t=new Map,n=new Map;for(let r=0;r<e.length;r+=1){const o=e[r];if(o){for(const a of o.tokenFreq.keys())cn(t,a,r);cn(n,Jt("id",o.id),r),cn(n,Jt("from",o.authorScreenName),r),cn(n,Jt("from_id",o.authorId),r),cn(n,Jt("author_id",o.authorId),r),cn(n,Jt("to",o.toUser),r),cn(n,Jt("to_id",o.toUserId),r),cn(n,Jt("in_reply_to_id",o.inReplyToId),r),cn(n,Jt("conversation_id",o.conversationId),r),cn(n,Jt("lang",o.lang),r),cn(n,Jt("route",o.routeType),r),cn(n,Jt("bookmark_folder",o.bookmarkFolderId),r);for(const a of o.mentions)cn(n,Jt("mention",a),r);for(const a of o.hashtags)cn(n,Jt("hashtag",a),r);for(const a of o.cashtags)cn(n,Jt("cashtag",a),r);o.hasMedia&&cn(n,Jt("is","media"),r),o.hasImages&&cn(n,Jt("is","images"),r),o.hasVideo&&cn(n,Jt("is","videos"),r),o.hasLinks&&cn(n,Jt("is","links"),r),o.bookmarked&&cn(n,Jt("is","bookmarked"),r),o.favorited&&cn(n,Jt("is","liked"),r),o.retweeted&&cn(n,Jt("is","retweeted"),r),o.isReply&&cn(n,Jt("is","reply"),r),o.isRetweet&&cn(n,Jt("is","retweet"),r),o.isQuote&&cn(n,Jt("is","quote"),r),o.isVerified&&cn(n,Jt("is","verified"),r),o.isBlueVerified&&cn(n,Jt("is","blue_verified"),r);}}return {tokenDocs:t,exactFilterDocs:n,tokenVocabulary:[...t.keys()].sort()}}function Xc(e,t){const n=t instanceof Set?t:new Set(t);if(!e)return new Set(n);const r=new Set;for(const o of e)n.has(o)&&r.add(o);return r}function fl(e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}function fC(e,t){if(!e.length||!t.length)return [];const n=e.length<=t.length?e:t,r=e.length<=t.length?t:e,o=new Set(r),a=[];for(const i of n)o.has(i)&&a.push(i);return a}function hC(e,t){const n=t.orderedTerms.filter(Boolean);if(n.length<Fy)return null;const r=[];for(let a=0;a<n.length-1;a+=1){const i=e.indexes.tokenDocs.get(n[a]||"")||[],s=e.indexes.tokenDocs.get(n[a+1]||"")||[],l=fC(i,s);l.length&&r.push(l);}if(!r.length)return null;const o=fl(r);return !o.size||o.size>=e.docs.length?null:o}function pC(e,t){var f;const n=t.positiveTerms.filter(Boolean);if(n.length<Fy)return null;const r=Math.max(1,e.rankingContext.docCount),o=n.map(m=>({term:m,docFreq:e.rankingContext.termDocFreq.get(m)||0})).filter(m=>m.docFreq>0).sort((m,g)=>m.docFreq!==g.docFreq?m.docFreq-g.docFreq:m.term.localeCompare(g.term));if(!o.length)return null;const a=o.filter(m=>m.docFreq/r<=eC),i=a.length?a:o,s=((f=i[0])==null?void 0:f.docFreq)||0,l=s>0?i.filter(m=>m.docFreq<=s*tC):i,c=(l.length?l:i).slice(0,J1);if(!c.length)return null;const h=fl(c.map(m=>e.indexes.tokenDocs.get(m.term)||[]));return !h.size||h.size>=e.docs.length?null:h}function mC(e,t,n){if(!t||t.length<Ay)return [];const r=[];for(const o of e)if(o.startsWith(t)&&(r.push(o),r.length>=n))break;return r}function Ly(e,t,n){if(!t||t.length<Vu||Si<=0)return [];const r=t.slice(0,Dy),o=[];for(const a of e)if(a.startsWith(r)&&!(Math.abs(a.length-t.length)>Si)&&!(Oy(a,t)>Si)&&(o.push(a),o.length>=n))break;return o}function gC(e,t){const n=e.indexes.tokenDocs,r=e.indexes.tokenVocabulary,o=Mo(t.value);if(!o.length)return [];const a=new Set;for(let i=0;i<o.length;i+=1){const s=o[i];if(!(!s||(a.add(s),!(i===o.length-1)))){if(t.prefix)for(const c of mC(r,s,Z1))a.add(c);if(t.fuzzy)for(const c of Ly(r,s,Py))a.add(c);}}return [...a].flatMap(i=>n.get(i)||[])}function yC(e,t){const n=String(t.value||"").trim(),r=Dn(n);if(!n)return null;const o=e.indexes.exactFilterDocs;switch(t.name){case "from":case "to":case "lang":case "route":case "mention":case "hashtag":case "cashtag":case "id":return new Set(o.get(Jt(t.name,r))||[]);case "from_id":case "author_id":case "to_id":case "in_reply_to_id":case "conversation_id":return new Set(o.get(Jt(t.name,n))||[]);case "bookmark_folder":return /^\d+$/.test(n)?new Set(o.get(Jt("bookmark_folder",n))||[]):null;case "folder":return /^\d+$/.test(n)?new Set(o.get(Jt("bookmark_folder",n))||[]):null;case "is":return new Set(o.get(Jt("is",r))||[]);default:return null}}function _C(e,t,n){let r=null;if(n.size){const s=fl([...n].map(l=>e.indexes.exactFilterDocs.get(Jt("bookmark_folder",l))||[]));r=Xc(r,s);}for(const s of t.filters){const l=yC(e,s);if(l){if(s.negated){if(!r)continue;for(const c of l)r.delete(c);continue}r=Xc(r,l);}}const o=t.negativeLexicalTokens.length?null:hC(e,t)||pC(e,t),a=t.positiveLexicalTokens.filter(s=>!s.field),i=o||fl(a.map(s=>gC(e,s)));return i.size&&(r=Xc(r,i)),r}function wC(){const e={...Qh};try{if(typeof localStorage>"u")return e;const t=localStorage.getItem(X1);if(!t)return e;const n=JSON.parse(t);for(const r of Object.keys(Qh)){const o=Number(n[r]);Number.isFinite(o)&&(e[r]=o);}return e}catch{return e}}function bC(e){const t=String(e||"").trim(),n=si.get(t);if(n)return n;const r=WS(t);if(si.set(t,r),si.size>Q1){const o=si.keys().next().value;typeof o=="string"&&si.delete(o);}return r}function vC(e,t,n){const r=e.tokenFreq.get(t)||0;if(!r)return 0;const o=n.termDocFreq.get(t)||0,a=Math.max(1,n.docCount),i=Math.max(1,n.avgDocLength),s=Math.max(1,e.tokens.length),l=1.2,c=.75,h=Math.log(1+(a-o+.5)/(o+.5)),f=r+l*(1-c+c*s/i);return h*(r*(l+1))/f}function kC(e){const t=[],n=new Set(["bookmarked","liked","retweeted","reply","retweet","quote","media","images","videos","links","verified","blue_verified"]),r=new Set(["media","images","videos","links","mentions","hashtags","cashtags","engagement","polls"]),o=new Set(["replies","retweets","nativeretweets","quote","media","images","videos","links","mentions","hashtags","verified","blue_verified","twimg","native_video","consumer_video","pro_video","has_engagement"]);for(const a of e){const i=`${a.name}:${a.value}`,s=String(a.value||"").trim();if(s){if(["since","until"].includes(a.name)&&!zu(s,a.name==="until")){t.push({code:"invalid_filter_value",message:`invalid ${i}`,token:i,severity:"warn"});continue}if(["since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks"].includes(a.name)&&!Number.isFinite(Number(s))){t.push({code:"invalid_filter_value",message:`invalid ${i}`,token:i,severity:"warn"});continue}if(a.name==="is"&&!n.has(Dn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}if(a.name==="has"&&!r.has(Dn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}if(["filter","include"].includes(a.name)&&!o.has(Dn(s))){t.push({code:"unsupported_filter",message:`unsupported ${i}`,token:i,severity:"warn"});continue}}}return t}function xC(e,t){const n=String(t.value||"").trim(),r=Dn(n);if(!n)return true;const a=(()=>{switch(t.name){case "from":return e.authorScreenName===r;case "from_id":case "author_id":return e.authorId===n;case "to":return e.toUser===r;case "to_id":return e.toUserId===n;case "in_reply_to_id":return e.inReplyToId===n;case "id":return e.id===n;case "lang":return e.lang===r;case "route":return e.routeType===r;case "conversation_id":return e.conversationId===n;case "bookmark_folder":case "folder":return /^\d+$/.test(n)?e.bookmarkFolderId===n:e.bookmarkFolderName===r||e.bookmarkFolderName.includes(r);case "mention":return e.mentions.includes(r);case "hashtag":return e.hashtags.includes(r);case "cashtag":return e.cashtags.includes(r);case "source":return e.sourceText.includes(r);case "card_name":{const i=r.replace(/\s+/g,"_");return e.cardName===i||e.cardName.includes(i)}case "domain":return e.domains.some(i=>i===r||i.endsWith(`.${r}`));case "url":return e.urls.some(i=>i.includes(r));case "is":return r==="bookmarked"?e.bookmarked:r==="liked"?e.favorited:r==="retweeted"?e.retweeted:r==="reply"?e.isReply:r==="retweet"?e.isRetweet:r==="quote"?e.isQuote:r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"?e.hasVideo:r==="links"?e.hasLinks:r==="verified"?e.isVerified:r==="blue_verified"?e.isBlueVerified:true;case "has":return r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"?e.hasVideo:r==="links"?e.hasLinks:r==="mentions"?e.mentions.length>0:r==="hashtags"?e.hashtags.length>0:r==="cashtags"?e.cashtags.length>0:r==="engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:r==="polls"?e.cardName.includes("poll"):true;case "filter":case "include":return t.name==="include"&&r==="nativeretweets"&&!t.negated?true:r==="replies"?e.isReply:r==="retweets"?e.isRetweet||e.isQuote:r==="nativeretweets"?e.isRetweet:r==="quote"?e.isQuote:r==="media"?e.hasMedia:r==="images"?e.hasImages:r==="videos"||r==="native_video"||r==="consumer_video"||r==="pro_video"?e.hasVideo:r==="links"?e.hasLinks:r==="mentions"?e.mentions.length>0:r==="hashtags"?e.hashtags.length>0:r==="verified"?e.isVerified:r==="blue_verified"?e.isBlueVerified:r==="twimg"?e.urls.some(i=>i.includes("pbs.twimg.com")||i.includes("pic.twitter.com")):r==="has_engagement"?e.favoriteCount+e.retweetCount+e.replyCount+e.bookmarkCount>0:true;case "since":{const i=zu(n,false);return !i||!e.createdAtMs?true:e.createdAtMs>=i}case "until":{const i=zu(n,true);return !i||!e.createdAtMs?true:e.createdAtMs<i}case "since_time":{const i=Number(n)*1e3;return !Number.isFinite(i)||!e.createdAtMs?true:e.createdAtMs>=i}case "until_time":{const i=Number(n)*1e3;return !Number.isFinite(i)||!e.createdAtMs?true:e.createdAtMs<i}case "since_id":return /^\d+$/.test(e.id)&&Number(e.id)>Number(n);case "max_id":return /^\d+$/.test(e.id)&&Number(e.id)<=Number(n);case "min_faves":case "min_likes":return e.favoriteCount>=Number(n);case "min_retweets":return e.retweetCount>=Number(n);case "min_replies":return e.replyCount>=Number(n);case "min_bookmarks":return e.bookmarkCount>=Number(n);default:return true}})();return t.negated?!a:a}function Qc(e,t,n){if(n.kind==="phrase"){const a=Mo(n.value),i=Ci(e,a,!!n.prefix);if(i===null){if(n.fuzzy&&a.length){const s=a[a.length-1],l=s&&s.length>=Vu?Ly([...new Set(e)],s,Py):[];for(const c of l){const h=[...a];h[h.length-1]=c;const f=Ci(e,h,false);if(f!==null&&f<=n.slop)return {matched:true,slopUsed:f}}}return {matched:false,slopUsed:Number.POSITIVE_INFINITY}}return i>n.slop?{matched:false,slopUsed:i}:{matched:true,slopUsed:i}}const r=Mo(n.value);if(!r.length)return {matched:false,slopUsed:Number.POSITIVE_INFINITY};if(r.length===1){const a=r[0];if(!a)return {matched:false,slopUsed:Number.POSITIVE_INFINITY};let i=t.has(a);return !i&&n.prefix&&a.length>=Ay&&(i=[...t.keys()].some(s=>s.startsWith(a))),!i&&n.fuzzy&&a.length>=Vu&&(i=[...t.keys()].some(s=>s.startsWith(a.slice(0,Dy))&&Math.abs(s.length-a.length)<=Si&&Oy(s,a)<=Si)),{matched:i,slopUsed:i?0:Number.POSITIVE_INFINITY}}const o=Ci(e,r,!!n.prefix);return {matched:o!==null&&o<=0,slopUsed:o??Number.POSITIVE_INFINITY}}function Ny(e,t){const n=t.field?cC(e,t.field):null;if(n){const i=Qc(n.tokens,n.tokenFreq,t);return {matched:i.matched,slopUsed:i.slopUsed,primaryMatched:i.matched,quotedMatched:false}}const r=Qc(e.primaryTokens,e.primaryTokenFreq,t),o=e.quotedTokens.length>0?Qc(e.quotedTokens,e.quotedTokenFreq,t):{matched:false,slopUsed:Number.POSITIVE_INFINITY};if(!r.matched&&!o.matched)return {matched:false,slopUsed:Number.POSITIVE_INFINITY,primaryMatched:false,quotedMatched:false};let a=Number.POSITIVE_INFINITY;return r.matched&&(a=Math.min(a,r.slopUsed)),o.matched&&(a=Math.min(a,o.slopUsed)),{matched:true,slopUsed:a,primaryMatched:r.matched,quotedMatched:o.matched}}function SC(e,t,n,r=false){if(e.kind==="phrase"){const i=(e.quoted&&e.slop===0?n.quoted_phrase_match:n.phrase_match)*e.boost/(1+Math.max(0,t));return r?i*.2:i}const o=n.term_match*e.boost;return r?o*.2:o}function CC(e,t){let n=0,r=0,o=0,a=0;for(const i of t){if(i.kind!=="phrase")continue;const s=Ny(e,i);if(!s.matched||s.slopUsed!==0)continue;const c=Mo(i.value).length;c>n&&(n=c),s.primaryMatched&&c>o&&(o=c),i.quoted&&i.slop===0&&c>r&&(r=c),i.quoted&&i.slop===0&&s.primaryMatched&&c>a&&(a=c);}return {exactPhraseTerms:n,exactQuotedPhraseTerms:r,exactPrimaryPhraseTerms:o,exactPrimaryQuotedPhraseTerms:a}}function Ma(e,t,n){if(t.kind==="term"||t.kind==="phrase"){const a=Ny(e,t);return a.matched?{matched:true,lexicalRaw:SC(t,a.slopUsed,n,a.quotedMatched&&!a.primaryMatched)}:{matched:false,lexicalRaw:0}}if(t.kind!=="op")return {matched:true,lexicalRaw:0};if(t.op==="NOT")return {matched:!Ma(e,t.child,n).matched,lexicalRaw:0};if(t.op==="AND"){const a=Ma(e,t.left,n);if(!a.matched)return {matched:false,lexicalRaw:0};const i=Ma(e,t.right,n);return i.matched?{matched:true,lexicalRaw:a.lexicalRaw+i.lexicalRaw}:{matched:false,lexicalRaw:0}}const r=Ma(e,t.left,n),o=Ma(e,t.right,n);return !r.matched&&!o.matched?{matched:false,lexicalRaw:0}:r.matched&&o.matched?{matched:true,lexicalRaw:r.lexicalRaw+o.lexicalRaw}:r.matched?r:o}function TC(e,t,n){const r=t.filter(Boolean);if(!r.length)return 0;let o=0;if(r.length>=2)for(let a=0;a<r.length-1;a+=1){const i=r.slice(a,a+2),s=Ci(e.tokens,i);s===null||s>2||(o+=n.cover_bigram/(1+s));}if(r.length>=3)for(let a=0;a<r.length-2;a+=1){const i=r.slice(a,a+3),s=Ci(e.tokens,i);s===null||s>3||(o+=n.cover_trigram/(1+s));}return o}function MC(e,t){if(!t.length)return e;const n=new Set(t.map(r=>String(r||"").trim()).filter(Boolean));return n.size?e.filter(r=>{const a=String(ct(r||{},"__bookmark_folder_id")||"").trim();return a?n.has(a):false}):e}function RC(e){const t=e.map(n=>sC(n));return {records:e,docs:t,rankingContext:uC(t),indexes:dC(t)}}function IC(e,t,n={}){const r=String(t||"").trim(),o=new Set((n.bookmarkFolderIds||[]).map(v=>String(v||"").trim()).filter(Boolean)),a=o.size>0;if(!r){const v=a?e.docs.filter(T=>T.bookmarkFolderId&&o.has(T.bookmarkFolderId)).map(T=>T.raw):e.records;return {records:v,highlightTerms:[],totalMatches:v.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const i=wC(),s=bC(r),l=[...s.warnings,...kC(s.filters)],c=Date.now(),h=_C(e,s,o),f=h&&h.size<e.docs.length?[...h].sort((v,T)=>v-T).map(v=>e.docs[v]).filter(v=>!!v):e.docs,m=[];for(const v of f){if(a&&(!v.bookmarkFolderId||!o.has(v.bookmarkFolderId)))continue;let T=true;for(const Ce of s.filters)if(!xC(v,Ce)){T=false;break}if(!T)continue;let R=!s.hasPositiveLexical,P=0;if(s.lexicalAst){const Ce=Ma(v,s.lexicalAst,i);R=Ce.matched,P=Ce.lexicalRaw;}if(!R)continue;let L=0;for(const Ce of s.positiveTerms)L+=vC(v,Ce,e.rankingContext);const D=TC(v,s.orderedTerms,i),O=L*i.bm25,B=P*i.lexical,I=D*i.cover_density,x=(v.createdAtMs?v.createdAtMs/1e15:c/1e15)*i.recency,F=CC(v,s.positiveLexicalTokens),U=O+B+I+x;m.push({doc:v,score:U,weightedBm25:O,weightedLexical:B,weightedDensity:I,exactPhraseTerms:F.exactPhraseTerms,exactQuotedPhraseTerms:F.exactQuotedPhraseTerms,exactPrimaryPhraseTerms:F.exactPrimaryPhraseTerms,exactPrimaryQuotedPhraseTerms:F.exactPrimaryQuotedPhraseTerms});}m.sort((v,T)=>T.score!==v.score?T.score-v.score:T.exactPrimaryQuotedPhraseTerms!==v.exactPrimaryQuotedPhraseTerms?T.exactPrimaryQuotedPhraseTerms-v.exactPrimaryQuotedPhraseTerms:T.exactPrimaryPhraseTerms!==v.exactPrimaryPhraseTerms?T.exactPrimaryPhraseTerms-v.exactPrimaryPhraseTerms:T.exactQuotedPhraseTerms!==v.exactQuotedPhraseTerms?T.exactQuotedPhraseTerms-v.exactQuotedPhraseTerms:T.exactPhraseTerms!==v.exactPhraseTerms?T.exactPhraseTerms-v.exactPhraseTerms:T.weightedLexical!==v.weightedLexical?T.weightedLexical-v.weightedLexical:T.weightedDensity!==v.weightedDensity?T.weightedDensity-v.weightedDensity:T.doc.createdAtMs!==v.doc.createdAtMs?T.doc.createdAtMs-v.doc.createdAtMs:T.doc.id.localeCompare(v.doc.id));const g=[],_=new Set;for(const v of m){const T=[v.doc.authorId||v.doc.authorScreenName||"",v.doc.text.replace(/\s+/g," ").trim().toLowerCase()].join("::");T!=="::"&&_.has(T)||(T!=="::"&&_.add(T),g.push(v));}const b=Number(n.limit||0);return {records:(Number.isFinite(b)&&b>0?g.slice(0,Math.max(1,Math.floor(b))):g).map(v=>v.doc.raw),highlightTerms:s.highlightTerms,totalMatches:g.length,warnings:l.map(v=>v.message),warningObjects:l,parsed:{query:s.query,lexicalExpression:s.lexicalExpression,filterBooleanSemantics:s.filterBooleanSemantics}}}function ep(e,t,n={}){const r=MC(e,n.bookmarkFolderIds||[]),o=String(t||"").trim();return o?IC(RC(r),o):{records:r,highlightTerms:[],totalMatches:r.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const By='(function(){"use strict";function Vt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fe={exports:{}},Qt=Fe.exports,st;function Wt(){return st||(st=1,(function(t,e){(function(n,r){t.exports=r()})(Qt,(function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",a="minute",d="hour",f="day",M="week",c="month",y="quarter",l="year",x="date",A="Invalid Date",F=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,g=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(b){var _=["th","st","nd","rd"],u=b%100;return"["+b+(_[(u-20)%10]||_[u]||_[0])+"]"}},R=function(b,_,u){var v=String(b);return!v||v.length>=_?b:""+Array(_+1-v.length).join(u)+b},Y={s:R,z:function(b){var _=-b.utcOffset(),u=Math.abs(_),v=Math.floor(u/60),m=u%60;return(_<=0?"+":"-")+R(v,2,"0")+":"+R(m,2,"0")},m:function b(_,u){if(_.date()<u.date())return-b(u,_);var v=12*(u.year()-_.year())+(u.month()-_.month()),m=_.clone().add(v,c),k=u-m<0,T=_.clone().add(v+(k?-1:1),c);return+(-(v+(u-m)/(k?m-T:T-m))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:c,y:l,w:M,d:f,D:x,h:d,m:a,s:o,ms:i,Q:y}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},z="en",H={};H[z]=p;var X="$isDayjsObject",K=function(b){return b instanceof W||!(!b||!b[X])},C=function b(_,u,v){var m;if(!_)return z;if(typeof _=="string"){var k=_.toLowerCase();H[k]&&(m=k),u&&(H[k]=u,m=k);var T=_.split("-");if(!m&&T.length>1)return b(T[0])}else{var N=_.name;H[N]=_,m=N}return!v&&m&&(z=m),m||!v&&z},q=function(b,_){if(K(b))return b.clone();var u=typeof _=="object"?_:{};return u.date=b,u.args=arguments,new W(u)},S=Y;S.l=C,S.i=K,S.w=function(b,_){return q(b,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var W=(function(){function b(u){this.$L=C(u.locale,null,!0),this.parse(u),this.$x=this.$x||u.x||{},this[X]=!0}var _=b.prototype;return _.parse=function(u){this.$d=(function(v){var m=v.date,k=v.utc;if(m===null)return new Date(NaN);if(S.u(m))return new Date;if(m instanceof Date)return new Date(m);if(typeof m=="string"&&!/Z$/i.test(m)){var T=m.match(F);if(T){var N=T[2]-1||0,D=(T[7]||"0").substring(0,3);return k?new Date(Date.UTC(T[1],N,T[3]||1,T[4]||0,T[5]||0,T[6]||0,D)):new Date(T[1],N,T[3]||1,T[4]||0,T[5]||0,T[6]||0,D)}}return new Date(m)})(u),this.init()},_.init=function(){var u=this.$d;this.$y=u.getFullYear(),this.$M=u.getMonth(),this.$D=u.getDate(),this.$W=u.getDay(),this.$H=u.getHours(),this.$m=u.getMinutes(),this.$s=u.getSeconds(),this.$ms=u.getMilliseconds()},_.$utils=function(){return S},_.isValid=function(){return this.$d.toString()!==A},_.isSame=function(u,v){var m=q(u);return this.startOf(v)<=m&&m<=this.endOf(v)},_.isAfter=function(u,v){return q(u)<this.startOf(v)},_.isBefore=function(u,v){return this.endOf(v)<q(u)},_.$g=function(u,v,m){return S.u(u)?this[v]:this.set(m,u)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(u,v){var m=this,k=!!S.u(v)||v,T=S.p(u),N=function(oe,B){var J=S.w(m.$u?Date.UTC(m.$y,B,oe):new Date(m.$y,B,oe),m);return k?J:J.endOf(f)},D=function(oe,B){return S.w(m.toDate()[oe].apply(m.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(B)),m)},O=this.$W,U=this.$M,V=this.$D,le="set"+(this.$u?"UTC":"");switch(T){case l:return k?N(1,0):N(31,11);case c:return k?N(1,U):N(0,U+1);case M:var ie=this.$locale().weekStart||0,me=(O<ie?O+7:O)-ie;return N(k?V-me:V+(6-me),U);case f:case x:return D(le+"Hours",0);case d:return D(le+"Minutes",1);case a:return D(le+"Seconds",2);case o:return D(le+"Milliseconds",3);default:return this.clone()}},_.endOf=function(u){return this.startOf(u,!1)},_.$set=function(u,v){var m,k=S.p(u),T="set"+(this.$u?"UTC":""),N=(m={},m[f]=T+"Date",m[x]=T+"Date",m[c]=T+"Month",m[l]=T+"FullYear",m[d]=T+"Hours",m[a]=T+"Minutes",m[o]=T+"Seconds",m[i]=T+"Milliseconds",m)[k],D=k===f?this.$D+(v-this.$W):v;if(k===c||k===l){var O=this.clone().set(x,1);O.$d[N](D),O.init(),this.$d=O.set(x,Math.min(this.$D,O.daysInMonth())).$d}else N&&this.$d[N](D);return this.init(),this},_.set=function(u,v){return this.clone().$set(u,v)},_.get=function(u){return this[S.p(u)]()},_.add=function(u,v){var m,k=this;u=Number(u);var T=S.p(v),N=function(U){var V=q(k);return S.w(V.date(V.date()+Math.round(U*u)),k)};if(T===c)return this.set(c,this.$M+u);if(T===l)return this.set(l,this.$y+u);if(T===f)return N(1);if(T===M)return N(7);var D=(m={},m[a]=r,m[d]=s,m[o]=n,m)[T]||1,O=this.$d.getTime()+u*D;return S.w(O,this)},_.subtract=function(u,v){return this.add(-1*u,v)},_.format=function(u){var v=this,m=this.$locale();if(!this.isValid())return m.invalidDate||A;var k=u||"YYYY-MM-DDTHH:mm:ssZ",T=S.z(this),N=this.$H,D=this.$m,O=this.$M,U=m.weekdays,V=m.months,le=m.meridiem,ie=function(B,J,fe,_e){return B&&(B[J]||B(v,k))||fe[J].slice(0,_e)},me=function(B){return S.s(N%12||12,B,"0")},oe=le||function(B,J,fe){var _e=B<12?"AM":"PM";return fe?_e.toLowerCase():_e};return k.replace(g,(function(B,J){return J||(function(fe){switch(fe){case"YY":return String(v.$y).slice(-2);case"YYYY":return S.s(v.$y,4,"0");case"M":return O+1;case"MM":return S.s(O+1,2,"0");case"MMM":return ie(m.monthsShort,O,V,3);case"MMMM":return ie(V,O);case"D":return v.$D;case"DD":return S.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return ie(m.weekdaysMin,v.$W,U,2);case"ddd":return ie(m.weekdaysShort,v.$W,U,3);case"dddd":return U[v.$W];case"H":return String(N);case"HH":return S.s(N,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return oe(N,D,!0);case"A":return oe(N,D,!1);case"m":return String(D);case"mm":return S.s(D,2,"0");case"s":return String(v.$s);case"ss":return S.s(v.$s,2,"0");case"SSS":return S.s(v.$ms,3,"0");case"Z":return T}return null})(B)||T.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(u,v,m){var k,T=this,N=S.p(v),D=q(u),O=(D.utcOffset()-this.utcOffset())*r,U=this-D,V=function(){return S.m(T,D)};switch(N){case l:k=V()/12;break;case c:k=V();break;case y:k=V()/3;break;case M:k=(U-O)/6048e5;break;case f:k=(U-O)/864e5;break;case d:k=U/s;break;case a:k=U/r;break;case o:k=U/n;break;default:k=U}return m?k:S.a(k)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return H[this.$L]},_.locale=function(u,v){if(!u)return this.$L;var m=this.clone(),k=C(u,v,!0);return k&&(m.$L=k),m},_.clone=function(){return S.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},b})(),G=W.prototype;return q.prototype=G,[["$ms",i],["$s",o],["$m",a],["$H",d],["$W",f],["$M",c],["$y",l],["$D",x]].forEach((function(b){G[b[1]]=function(_){return this.$g(_,b[0],b[1])}})),q.extend=function(b,_){return b.$i||(b(_,W,q),b.$i=!0),q},q.locale=C,q.isDayjs=K,q.unix=function(b){return q(1e3*b)},q.en=H[z],q.Ls=H,q.p={},q}))})(Fe)),Fe.exports}var Zt=Wt(),it=Vt(Zt),be,ze;be={__e:function(t,e,n,r){for(var s,i,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,r||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},ze=function(t){return t!=null&&t.constructor==null},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var He,Q,Ue,ot,at=0,ut=[],P=be,ct=P.__b,lt=P.__r,ft=P.diffed,ht=P.__c,dt=P.unmount,mt=P.__;function Xt(t,e){P.__h&&P.__h(Q,t,at||e),at=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _t(t,e){var n=Xt(He++,7);return er(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Gt(){for(var t;t=ut.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ce),t.__H.__h.forEach(je),t.__H.__h=[]}catch(e){t.__H.__h=[],P.__e(e,t.__v)}}P.__b=function(t){Q=null,ct&&ct(t)},P.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),mt&&mt(t,e)},P.__r=function(t){lt&<(t),He=0;var e=(Q=t.__c).__H;e&&(Ue===Q?(e.__h=[],Q.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Ce),e.__h.forEach(je),e.__h=[],He=0)),Ue=Q},P.diffed=function(t){ft&&ft(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ut.push(e)!==1&&ot===P.requestAnimationFrame||((ot=P.requestAnimationFrame)||Jt)(Gt)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ue=Q=null},P.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Ce),n.__h=n.__h.filter(function(r){return!r.__||je(r)})}catch(r){e.some(function(s){s.__h&&(s.__h=[])}),e=[],P.__e(r,n.__v)}}),ht&&ht(t,e)},P.unmount=function(t){dt&&dt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ce(r)}catch(s){e=s}}),n.__H=void 0,e&&P.__e(e,n.__v))};var pt=typeof requestAnimationFrame=="function";function Jt(t){var e,n=function(){clearTimeout(r),pt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);pt&&(e=requestAnimationFrame(n))}function Ce(t){var e=Q,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Q=e}function je(t){var e=Q;t.__c=t.__(),Q=e}function er(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var tr=Symbol.for("preact-signals");function Re(){if(ae>1)ae--;else{for(var t,e=!1;ke!==void 0;){var n=ke;for(ke=void 0,Ke++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&vt(n))try{n.c()}catch(s){e||(t=s,e=!0)}n=r}}if(Ke=0,ae--,e)throw t}}function rr(t){if(ae>0)return t();ae++;try{return t()}finally{Re()}}var I=void 0,ke=void 0,ae=0,Ke=0,qe=0;function gt(t){if(I!==void 0){var e=t.n;if(e===void 0||e.t!==I)return e={i:0,S:t,p:I.s,n:void 0,t:I,e:void 0,x:void 0,r:e},I.s!==void 0&&(I.s.n=e),I.s=e,t.n=e,32&I.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=I.s,e.n=void 0,I.s.n=e,I.s=e),e}}function j(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}j.prototype.brand=tr,j.prototype.h=function(){return!0},j.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},j.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}},j.prototype.subscribe=function(t){var e=this;return De(function(){var n=e.value,r=I;I=void 0;try{t(n)}finally{I=r}})},j.prototype.valueOf=function(){return this.value},j.prototype.toString=function(){return this.value+""},j.prototype.toJSON=function(){return this.value},j.prototype.peek=function(){var t=I;I=void 0;try{return this.value}finally{I=t}},Object.defineProperty(j.prototype,"value",{get:function(){var t=gt(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Ke>100)throw new Error("Cycle detected");this.v=t,this.i++,qe++,ae++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Re()}}}});function yt(t){return new j(t)}function vt(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function xt(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function wt(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function pe(t){j.call(this,void 0),this.x=t,this.s=void 0,this.g=qe-1,this.f=4}(pe.prototype=new j).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===qe))return!0;if(this.g=qe,this.f|=1,this.i>0&&!vt(this))return this.f&=-2,!0;var t=I;try{xt(this),I=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return I=t,wt(this),this.f&=-2,!0},pe.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}j.prototype.S.call(this,t)},pe.prototype.U=function(t){if(this.t!==void 0&&(j.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},pe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(pe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=gt(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function bt(t){return new pe(t)}function kt(t){var e=t.u;if(t.u=void 0,typeof e=="function"){ae++;var n=I;I=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Be(t),r}finally{I=n,Re()}}}function Be(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,kt(t)}function nr(t){if(I!==this)throw new Error("Out-of-order effect");wt(this),I=t,this.f&=-2,8&this.f&&Be(this),Re()}function Te(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Te.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Te.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,kt(this),xt(this),ae++;var t=I;return I=this,nr.bind(this,t)},Te.prototype.N=function(){2&this.f||(this.f|=2,this.o=ke,ke=this)},Te.prototype.d=function(){this.f|=8,1&this.f||Be(this)};function De(t){var e=new Te(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Ye;function ge(t,e){be[t]=e.bind(null,be[t]||function(){})}function Oe(t){Ye&&Ye(),Ye=t&&t.S()}function Tt(t){var e=this,n=t.data,r=ir(n);r.value=n;var s=_t(function(){for(var i=e,o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}var a=bt(function(){var f=r.value.value;return f===0?0:f===!0?"":f||""}),d=bt(function(){var f;return ze(a.value)||((f=e.base)==null?void 0:f.nodeType)!==3});return e.__$u.c=function(){var f;!ze(s.peek())&&((f=e.base)==null?void 0:f.nodeType)===3?e.base.data=s.peek():(e.__$f|=1,e.setState({}))},De(function(){Se||(Se=this.N),this.N=Mt,d.value&&i.base&&(i.base.data=a.value)}),a},[]);return s.value}Tt.displayName="_st",Object.defineProperties(j.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Tt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),ge("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var s in r)if(s!=="children"){var i=r[s];i instanceof j&&(n||(e.__np=n={}),n[s]=i,r[s]=i.peek())}}t(e)}),ge("__r",function(t,e){Oe();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(s){var i;return De(function(){i=this}),i.c=function(){r.__$f|=1,r.setState({})},i})())),Oe(n),t(e)}),ge("__e",function(t,e,n,r){Oe(),t(e,n,r)}),ge("diffed",function(t,e){Oe();var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,s=e.props;if(r){var i=n.U;if(i)for(var o in i){var a=i[o];a!==void 0&&!(o in r)&&(a.d(),i[o]=void 0)}else n.U=i={};for(var d in r){var f=i[d],M=r[d];f===void 0?(f=sr(n,d,M,s),i[d]=f):f.o(M,s)}}}t(e)});function sr(t,e,n,r){var s=e in t&&t.ownerSVGElement===void 0,i=yt(n);return{o:function(o,a){i.value=o,r=a},d:De(function(){Se||(Se=this.N),this.N=Mt;var o=i.value.value;r[e]!==o&&(r[e]=o,s?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}ge("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var s in r){var i=r[s];i&&i.d()}}}}else{var o=e.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}t(e)}),ge("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});function ir(t){return _t(function(){return yt(t)},[])}var Se,St=[],or=function(t){queueMicrotask(function(){queueMicrotask(t)})};function ar(){rr(function(){for(var t;t=St.shift();)Se.call(t)})}function Mt(){St.push(this)===1&&(be.requestAnimationFrame||or)(ar)}function ur(t){if(!t)return it(0);const e=t.replace(/^\\w+ (.*)$/,"$1");return it(e,"MMM DD HH:mm:ss ZZ YYYY","en")}var he={field_path_pattern:"^[a-zA-Z0-9_.]+$",known_filter_keys:["from","from_id","author_id","to","to_id","in_reply_to_id","lang","since","until","since_time","until_time","since_id","max_id","conversation_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","url","domain","id","source","card_name","filter","include","is","has","bookmark_folder","folder","route","mention","hashtag","cashtag"],non_highlight_filters:["since","until","since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks","id","from_id","author_id","to_id","in_reply_to_id","conversation_id"],free_text:{min_content_term_length:2,full_run_exact_min_terms:2,stop_terms:["a","an","the","and","or","but","if","then","than","to","of","in","on","for","with","by","at","from","into","onto","as","is","are","was","were","be","been","being","do","does","did","done","have","has","had","can","could","should","would","will","just","about","what","when","where","why","how","who","whom","whose","this","that","these","those","it","its","my","your","our","their","his","her","me","you","we","they","he","she","them","us","post","tweet","too"],bigram_slop:2,trigram_slop:3,fourgram_slop:4,bigram_boost:20,trigram_boost:60,fourgram_boost:140,full_run_exact_boost:320},prefix:{min_term_length:3,max_expansions:128},fuzzy:{min_term_length:5,max_edit_distance:1,prefix_root_length:4,max_expansions:64}};const $t=new RegExp(he.field_path_pattern),Nt=new Set(he.known_filter_keys),cr=new Set(he.non_highlight_filters),re=he.free_text,Ve=he.prefix,Me=he.fuzzy,lr=new Set((he.free_text.stop_terms||[]).map(t=>String(t||"").trim().toLowerCase()).filter(Boolean));function It(t){return t.kind==="term"||t.kind==="phrase"}const fr=/[\\p{L}\\p{N}_]+(?:[\'’][\\p{L}\\p{N}_]+)*/gu,hr=32,dr=Math.max(1,Number(re.min_content_term_length)),mr=Math.max(2,Number(re.full_run_exact_min_terms)),_r=Math.max(1,Number(Ve.min_term_length)),pr=Math.max(1,Number(Me.min_term_length));function ye(t,e,n=""){return{code:t,message:e,token:n||void 0,severity:"warn"}}function Et(t){const e=Number(t);return Number.isFinite(e)?Math.max(.05,Math.min(100,e)):1}function ue(t){if(!t)return[];const e=t.toLowerCase().match(fr);return e?e.map(n=>n.replace(/[\'’]/g,"")).filter(Boolean):[]}function Qe(t){const e=String(t||"").trim().toLowerCase();return!e||e.length<dr?!0:lr.has(e)}function At(t){const e=t.flatMap(r=>ue(r.value)),n=e.filter(r=>!Qe(r));return n.length?n:e}function gr(t){const e=new Set(At(t));if(!e.size)return t;const n=t.filter(r=>e.has(String(r.value||"").trim().toLowerCase()));return n.length?n:t}function We(t){let e=0;for(const n of t)for(const r of ue(n.value))Qe(r)||(e+=1);return e}function $e(t){return ue(t).join(" ").trim()}function yr(t){return Number.isFinite(t)?Math.round(t*100)/100:1}function vr(t,e){const n=t.lastIndexOf(e);if(n<=0)return{base:t,value:null};const r=t.slice(n+1);return!r||!/^\\d+(?:\\.\\d+)?$/.test(r)?{base:t,value:null}:{base:t.slice(0,n),value:r}}function xr(t){const e=String(t||""),n=[];let r=0;for(;r<e.length;){for(;r<e.length&&/\\s/.test(e[r]??"");)r+=1;if(r>=e.length)break;const s=e[r]??"";if(s==="("){n.push({kind:"lparen"}),r+=1;continue}if(s===")"){n.push({kind:"rparen"}),r+=1;continue}let i=!1;if(s==="-"){for(i=!0,r+=1;r<e.length&&/\\s/.test(e[r]??"");)r+=1;if(r>=e.length)break;if((e[r]??"")==="("){n.push({kind:"op",op:"NOT"});continue}}let o;const a=r;for(;r<e.length&&/[a-zA-Z0-9_.]/.test(e[r]??"");)r+=1;if(r>a&&(e[r]??"")===":"&&(e[r+1]??"")===\'"\'&&$t.test(e.slice(a,r))?(o=e.slice(a,r),r+=1):r=a,(e[r]??"")===\'"\'){r+=1;let l="";for(;r<e.length;){const F=e[r]??"";if(F==="\\\\"&&r+1<e.length){l+=e[r+1]??"",r+=2;continue}if(F===\'"\'){r+=1;break}l+=F,r+=1}let x=0,A=1;if((e[r]??"")==="~"){r+=1;const F=r;for(;r<e.length&&/\\d/.test(e[r]??"");)r+=1;r>F&&(x=Math.max(0,Number(e.slice(F,r))||0))}if((e[r]??"")==="^"){r+=1;const F=r;for(;r<e.length&&/[\\d.]/.test(e[r]??"");)r+=1;r>F&&(A=Et(e.slice(F,r)))}n.push({kind:"phrase",value:l.trim(),negated:i,boost:A,slop:x,field:o,quoted:!0});continue}const d=r;for(;r<e.length&&!/\\s/.test(e[r]??"")&&(e[r]??"")!=="("&&(e[r]??"")!==")";)r+=1;const f=e.slice(d,r).trim();if(!f)continue;const{base:M,value:c}=vr(f,"^"),y=M.toUpperCase();if((y==="AND"||y==="OR"||y==="NOT")&&!i){n.push({kind:"op",op:y});continue}n.push({kind:"term",value:M,negated:i,boost:c?Et(c):1,slop:0})}return n}function wr(t,e){if(e.length&&!/\\s$/.test(String(t||"")))for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(!r||!It(r))continue;if(r.kind!=="term"||r.field||r.quoted)return;const s=$e(r.value);s.length>=_r&&(r.prefix=!0),s.length>=pr&&(r.fuzzy=!0);return}}function ne(t){return t?t.kind==="term"||t.kind==="phrase":!1}function br(t){const e=[];if(!t.length)return{ast:null,warnings:e};const n=[];let r=null;for(const c of t){let y=!1;if(r){const l=ne(r)||r.kind==="rparen",x=ne(c)||c.kind==="lparen"||c.kind==="op"&&c.op==="NOT";l&&x&&(y=!0)}y&&n.push({kind:"op",op:"AND"}),n.push(c),r=c}const s={OR:1,AND:2,NOT:3},i=[],o=[];for(const c of n){if(ne(c)){i.push(c);continue}if(c.kind==="lparen"){o.push(c);continue}if(c.kind==="rparen"){let y=!1;for(;o.length;){const l=o.pop();if(!l)break;if(l.kind==="lparen"){y=!0;break}i.push(l)}y||e.push(ye("boolean_syntax","unmatched closing parenthesis in query"));continue}if(c.kind==="op"){for(;o.length;){const y=o[o.length-1];if(!y||y.kind!=="op"||!(c.op==="NOT"?s[c.op]<s[y.op]:s[c.op]<=s[y.op]))break;i.push(o.pop())}o.push(c)}}for(;o.length;){const c=o.pop();if(!c)break;if(c.kind==="lparen"){e.push(ye("boolean_syntax","unmatched opening parenthesis in query"));continue}i.push(c)}const a=[];for(const c of i){if(ne(c)){a.push(c);continue}if(c.kind!=="op")continue;if(c.op==="NOT"){const x=a.pop();if(!x){e.push(ye("boolean_syntax","dangling NOT operator in query","NOT"));continue}a.push({kind:"op",op:"NOT",child:x});continue}const y=a.pop(),l=a.pop();if(!l||!y){e.push(ye("boolean_syntax",`dangling ${c.op} operator in query`,c.op));continue}a.push({kind:"op",op:c.op,left:l,right:y})}if(a.length===1)return{ast:a[0]??null,warnings:e};const d=t.filter(ne);if(!d.length)return{ast:null,warnings:e};const f=d[0];if(!f)return{ast:null,warnings:e};let M=f;for(let c=1;c<d.length;c+=1){const y=d[c];y&&(M={kind:"op",op:"AND",left:M,right:y})}return e.push(ye("boolean_syntax","query boolean expression was malformed; fell back to implicit AND between lexical terms")),{ast:M,warnings:e}}function Ft(t,e){const n=[],r=(s,i)=>{if(s){if(ne(s)){i===e&&n.push(s);return}if(s.op==="NOT"){r(s.child,!i);return}r(s.left,i),r(s.right,i)}};return r(t,!0),n}function Ze(t,e,n){if(t){if(!ne(t)&&t.op===e){Ze(t.left,e,n),Ze(t.right,e,n);return}n.push(t)}}function Xe(t){if(!t)return"";if(ne(t)){let r=t.kind==="phrase"?`"${t.value}"`:t.value;return t.prefix&&(r+="*"),t.kind==="phrase"&&t.slop>0&&(r+=`~${t.slop}`),Math.abs(t.boost-1)>1e-9&&(r+=`^${t.boost}`),t.field&&(r=`${t.field}:${r}`),r}if(t.op==="NOT"){const r=Xe(t.child);return r?`NOT (${r})`:"NOT (?)"}const e=[];return Ze(t,t.op,e),e.map(r=>{const s=Xe(r);return s?!ne(r)&&r.op!==t.op?`(${s})`:s:""}).filter(Boolean).join(` ${t.op} `)}function kr(t){return!t.field&&t.kind==="term"&&ue(t.value).length===1}function Tr(t){var i,o,a,d,f,M,c,y;if(t.length<=1)return t;const e=[],n=new Set,r=l=>{const x=`${l.kind}|${l.field||""}|${l.value}|${l.slop}|${l.boost}`;n.has(x)||(n.add(x),e.push(l))},s=(l,x)=>{const A=l.reduce((F,g)=>F+g.boost,0)/l.length;return yr(x*A)};for(const l of gr(t))r(l);for(let l=0;l<=t.length-2;l+=1){const x=t.slice(l,l+2);We(x)<2||r({kind:"phrase",value:x.map(A=>A.value).join(" "),slop:re.bigram_slop,boost:s(x,re.bigram_boost),prefix:!!((i=x[x.length-1])!=null&&i.prefix),fuzzy:!!((o=x[x.length-1])!=null&&o.fuzzy)})}for(let l=0;l<=t.length-3;l+=1){const x=t.slice(l,l+3);We(x)<2||r({kind:"phrase",value:x.map(A=>A.value).join(" "),slop:re.trigram_slop,boost:s(x,re.trigram_boost),prefix:!!((a=x[x.length-1])!=null&&a.prefix),fuzzy:!!((d=x[x.length-1])!=null&&d.fuzzy)})}for(let l=0;l<=t.length-4;l+=1){const x=t.slice(l,l+4);We(x)<2||r({kind:"phrase",value:x.map(A=>A.value).join(" "),slop:re.fourgram_slop,boost:s(x,re.fourgram_boost),prefix:!!((f=x[x.length-1])!=null&&f.prefix),fuzzy:!!((M=x[x.length-1])!=null&&M.fuzzy)})}return t.length>=mr&&r({kind:"phrase",value:t.map(l=>l.value).join(" "),slop:0,boost:s(t,re.full_run_exact_boost),prefix:!!((c=t[t.length-1])!=null&&c.prefix),fuzzy:!!((y=t[t.length-1])!=null&&y.fuzzy)}),e}function Sr(t,e){if(!e.length)return;if(e.length===1){t.push(e[0]),e.length=0;return}const n=Tr(e);t.push({kind:"lparen"}),n.forEach((r,s)=>{s>0&&t.push({kind:"op",op:"OR"}),t.push(r)}),t.push({kind:"rparen"}),e.length=0}function Mr(t){const e=new Set,n=[];for(const r of t)for(const s of ue(r))!s||e.has(s)||(e.add(s),n.push(s));return n}function $r(t,e){const n=new Set;for(const r of t)for(const s of ue(r.value))s&&!Qe(s)&&n.add(s);for(const r of e)if(!(r.negated||cr.has(r.name)))for(const s of ue(r.value))s&&n.add(s);return[...n].slice(0,hr)}function Nr(t){var g;const e=xr(t);wr(t,e);const n=[],r=[],s=[],i=[],o=[],a=[],d=()=>{if(i.length){const p=At(i);a.push(...p),o.push(...p)}Sr(s,i)};for(const p of e){if(!It(p)){d(),s.push(p);continue}const R=String(p.value||"").trim();if(!R)continue;let Y=p.kind,z=R,H=(g=p.field)==null?void 0:g.trim(),X=!1;if(H&&Nt.has(H)){n.push({name:H,value:R,negated:p.negated}),d();continue}if(p.kind==="term"&&R.startsWith("@")&&R.length>1){const C=$e(R.slice(1));if(C){n.push({name:"from",value:C,negated:p.negated}),d();continue}}else if(p.kind==="term"&&R.startsWith("#")&&R.length>1){const C=$e(R.slice(1));C&&(n.push({name:"hashtag",value:C,negated:p.negated}),Y="term",z=C,X=!0)}else if(p.kind==="term"&&R.startsWith("$")&&R.length>1){const C=$e(R.slice(1));C&&(n.push({name:"cashtag",value:C,negated:p.negated}),Y="term",z=C,X=!0)}else if(p.kind==="term"&&R.includes(":")){const[C,...q]=R.split(":"),S=String(C||"").trim().toLowerCase(),W=q.join(":").trim();if(Nt.has(S)){if(!W){r.push(R);continue}n.push({name:S,value:W,negated:p.negated}),d();continue}S&&W&&$t.test(S)&&(Y="term",z=W,H=S)}const K={kind:Y,value:Y==="term"?$e(z):z.trim(),boost:p.boost,slop:p.slop,field:H||void 0,quoted:!!p.quoted,prefix:!!p.prefix,fuzzy:!!p.fuzzy};if(K.value){if(p.negated){d(),s.push({kind:"op",op:"NOT"}),s.push(K);continue}if(!X&&kr(K)){i.push(K);continue}if(d(),!K.field){const C=ue(K.value);a.push(...C),o.push(...C)}s.push(K)}}d();const{ast:f,warnings:M}=br(s),c=Ft(f,!0),y=Ft(f,!1),l=a.filter(Boolean),x=Mr(o),A=$r(c,n),F=r.map(p=>ye("unsupported_token",`unsupported token: ${p}`,p));return{query:String(t||""),lexicalTokens:s,lexicalAst:f,lexicalExpression:Xe(f),positiveLexicalTokens:c,negativeLexicalTokens:y,positiveTerms:x,filters:n,unsupported:r,orderedTerms:l,highlightTerms:A,warnings:[...M,...F],hasPositiveLexical:c.length>0,filterBooleanSemantics:"global_and"}}const Ir=/[\\p{L}\\p{N}_]+(?:[\'’][\\p{L}\\p{N}_]+)*/gu,Ct={bm25:1,lexical:1,cover_density:1,recency:0,term_match:1,phrase_match:8,quoted_phrase_match:256,cover_bigram:10,cover_trigram:30},Er="twe_raw_search_ranking_v1",Ar=128,Rt=Math.max(1,Number(Ve.min_term_length)),Fr=Math.max(8,Number(Ve.max_expansions)),Ge=Math.max(1,Number(Me.min_term_length)),Ne=Math.max(0,Number(Me.max_edit_distance)),qt=Math.max(1,Number(Me.prefix_root_length)),Dt=Math.max(8,Number(Me.max_expansions)),Ot=3,Cr=4,Rr=.65,qr=1.5,Ie=new Map,Pt=new WeakMap;function h(t,e){const n=e.split(".");let r=t;for(const s of n){if(!r||typeof r!="object")return null;r=r[s]}return r}function w(t){return typeof t=="string"?t:""}function Ee(t){if(typeof t=="boolean")return t;if(typeof t=="number")return t>0;if(typeof t=="string"){const e=t.trim().toLowerCase();return e==="1"||e==="true"||e==="yes"}return!1}function Pe(t){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){const e=Number(t);if(Number.isFinite(e))return e}return 0}function L(t){return t.trim().toLowerCase()}function ce(t){if(!t)return[];const e=t.toLowerCase().match(Ir);return e?e.map(n=>n.replace(/[\'’]/g,"")).filter(Boolean):[]}function Je(t){const e=new Map;for(let n=0;n<t.length;n+=1){const r=t[n];r&&e.set(r,(e.get(r)||0)+1)}return e}function Lt(t,e){if(t===e)return 0;if(!t.length)return e.length;if(!e.length)return t.length;const n=new Array(e.length+1),r=new Array(e.length+1);for(let s=0;s<=e.length;s+=1)n[s]=s;for(let s=1;s<=t.length;s+=1){r[0]=s;for(let i=1;i<=e.length;i+=1){const o=t[s-1]===e[i-1]?0:1;r[i]=Math.min((n[i]??0)+1,(r[i-1]??0)+1,(n[i-1]??0)+o)}for(let i=0;i<=e.length;i+=1)n[i]=r[i]??0}return n[e.length]??Math.max(t.length,e.length)}function et(t,e=!1){if(!t)return 0;if(/^\\d{4}-\\d{2}-\\d{2}$/.test(t)){const r=e?"T23:59:59.999Z":"T00:00:00.000Z",s=Date.parse(`${t}${r}`);return Number.isFinite(s)?s:0}const n=Date.parse(t);return Number.isFinite(n)?n:0}function Dr(t){return t?t.replace(/<[^>]+>/g," ").replace(/\\s+/g," ").trim():""}function Or(t){const e=new Set,n=r=>{if(Array.isArray(r))for(const s of r){if(!s||typeof s!="object")continue;const i=s,o=w(i.expanded_url).trim(),a=w(i.display_url).trim(),d=w(i.url).trim();o&&e.add(o),a&&e.add(a),d&&e.add(d)}};return n(h(t,"legacy.entities.urls")),n(h(t,"legacy.entities.media")),n(h(t,"legacy.entities.description.urls")),n(h(t,"legacy.entities.url.urls")),[...e]}function tt(t,e,n="text"){const r=h(t,e);if(!Array.isArray(r))return[];const s=new Set;for(const i of r){if(!i||typeof i!="object")continue;const a=L(w(i[n]).trim());a&&s.add(a)}return[...s]}function Pr(t){const e=(Array.isArray(h(t,"legacy.extended_entities.media"))?h(t,"legacy.extended_entities.media"):h(t,"legacy.entities.media"))||[];if(!Array.isArray(e))return[];const n=new Set;for(const r of e){if(!r||typeof r!="object")continue;const i=L(w(r.type).trim());i&&n.add(i)}return[...n]}function Lr(t){const e=h(t,"article.article_results.result.content_state.blocks");if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||typeof r!="object")continue;const s=w(r.text).trim();s&&n.push(s)}return n}function zr(t){const e=new Set;for(const n of t)try{const r=n.startsWith("http")?n:`https://${n}`,s=new URL(r).hostname.replace(/^www\\./,"").toLowerCase();s&&e.add(s)}catch{}return[...e]}function Ae(t,e,n=!1){if(!e.length)return 0;const r=e[0],s=[];for(let o=0;o<t.length;o+=1)t[o]===r&&s.push(o);if(!s.length)return null;let i=null;for(const o of s){let a=o,d=!0;for(let y=1;y<e.length;y+=1){const l=e[y],x=n&&y===e.length-1;let A=-1;for(let F=a+1;F<t.length;F+=1){const g=t[F];if(x&&l&&(g!=null&&g.startsWith(l))||g===l){A=F;break}}if(A<0){d=!1;break}a=A}if(!d)continue;const f=a-o,M=Math.max(0,e.length-1),c=Math.max(0,f-M);(i===null||c<i)&&(i=c)}return i}function zt(t){const e=t||{},n=w(h(e,"rest_id"))||w(h(e,"legacy.id_str"))||w(h(e,"id_str"))||`${Math.random().toString(36).slice(2)}`,r=w(h(e,"note_tweet.note_tweet_results.result.text"))||[w(h(e,"article.article_results.result.title")),w(h(e,"article.article_results.result.preview_text")),...Lr(e)].map(ee=>ee.trim()).filter(Boolean).filter((ee,mn,_n)=>_n.indexOf(ee)===mn).join(`\n\n`)||w(h(e,"legacy.full_text"))||w(h(e,"legacy.text"))||w(h(e,"legacy.description")),s=w(h(e,"quoted_status_result.result.note_tweet.note_tweet_results.result.text"))||w(h(e,"quoted_status_result.result.legacy.full_text"))||w(h(e,"quoted_status_result.result.legacy.text"))||w(h(e,"quoted_status_result.result.article.article_results.result.title"))||w(h(e,"quoted_status_result.result.article.article_results.result.preview_text")),i=L(w(h(e,"quoted_status_result.result.core.user_results.result.core.screen_name"))),o=w(h(e,"quoted_status_result.result.core.user_results.result.core.name")),a=L(w(h(e,"core.user_results.result.core.screen_name"))||w(h(e,"core.screen_name"))),d=w(h(e,"core.user_results.result.core.name"))||w(h(e,"core.name")),f=w(h(e,"core.user_results.result.rest_id"))||w(h(e,"rest_id")),M=w(h(e,"legacy.created_at"))||w(h(e,"core.created_at")),c=M?Number(ur(M)||0):Number(h(e,"article.article_results.result.metadata.first_published_at_secs")||0)*1e3,y=Dr(w(h(e,"legacy.source"))),l=L(w(h(e,"card.card_platform.card_name"))||w(h(e,"card.name"))||w(h(e,"__card_name"))),x=w(h(e,"__bookmark_folder_id")).trim(),A=w(h(e,"__bookmark_folder_name")).trim(),F=Or(e),g=zr(F),p=tt(e,"legacy.entities.user_mentions","screen_name"),R=tt(e,"legacy.entities.hashtags"),Y=tt(e,"legacy.entities.symbols"),z=Pr(e),H=se(h(e,"twe_relationship_fields.subject_screen_names")).map(ee=>L(ee)),X=se(h(e,"twe_relationship_fields.subject_user_ids")).map(ee=>String(ee).trim()),K=se(h(e,"twe_relationship_fields.relation_types")).map(ee=>L(ee)),C=L(w(h(e,"legacy.in_reply_to_screen_name"))),q=w(h(e,"legacy.in_reply_to_user_id_str")).trim(),S=w(h(e,"legacy.in_reply_to_status_id_str")).trim(),W=w(h(e,"legacy.conversation_id_str"))||w(h(e,"conversation_id_str")),G=L(w(h(e,"legacy.lang"))),b=L(w(h(e,"__route_type"))),_=z.length>0,u=z.includes("photo"),v=z.includes("video")||z.includes("animated_gif"),m=F.length>0,k=!!h(e,"legacy.retweeted_status_result")||w(h(e,"legacy.full_text")).startsWith("RT @"),T=!!h(e,"quoted_status_result"),N=!!S,D=L(w(h(e,"core.user_results.result.verification.verified_type")))==="verified"||L(w(h(e,"verification.verified_type")))==="verified",O=Ee(h(e,"core.user_results.result.is_blue_verified"))||Ee(h(e,"is_blue_verified")),U=Ee(h(e,"legacy.favorited")),V=Ee(h(e,"legacy.retweeted")),le=Ee(h(e,"legacy.bookmarked")),ie=Pe(h(e,"legacy.favorite_count")),me=Pe(h(e,"legacy.retweet_count")),oe=Pe(h(e,"legacy.reply_count")),B=Pe(h(e,"legacy.bookmark_count")),J=[r,s,y,a,d,i,o,C,x,A,l,...H,...X,...K,...p,...R,...Y,...F,...g].filter(Boolean).join(" ").trim(),fe=[r,y,a,d,C,x,A,l,...H,...X,...K,...p,...R,...Y,...F,...g].filter(Boolean).join(" ").trim(),_e=[s,i,o].filter(Boolean).join(" ").trim(),Kt=ce(J),Bt=ce(fe),Yt=ce(_e),fn=Je(Kt),hn=Je(Bt),dn=Je(Yt);return{raw:t,id:n,text:J,primaryText:fe,quotedText:_e,tokens:Kt,primaryTokens:Bt,quotedTokens:Yt,tokenFreq:fn,primaryTokenFreq:hn,quotedTokenFreq:dn,createdAtMs:c,authorScreenName:a,authorId:f,toUser:C,toUserId:q,inReplyToId:S,conversationId:W,lang:G,routeType:b,sourceText:L(y),cardName:l,bookmarkFolderId:x,bookmarkFolderName:L(A),mentions:p,hashtags:R,cashtags:Y,urls:F.map(ee=>ee.toLowerCase()),domains:g,favoriteCount:ie,retweetCount:me,replyCount:oe,bookmarkCount:B,favorited:U,retweeted:V,bookmarked:le,hasMedia:_,hasImages:u,hasVideo:v,hasLinks:m,isReply:N,isRetweet:k,isQuote:T,isVerified:D,isBlueVerified:O,fieldSearchCache:new Map}}function Hr(t){if(!t||typeof t!="object")return zt(t);const e=Pt.get(t);if(e)return e;const n=zt(t);return Pt.set(t,n),n}function se(t){if(t==null)return[];if(typeof t=="string"){const e=t.trim();return e?[e]:[]}return typeof t=="number"||typeof t=="boolean"?[String(t)]:Array.isArray(t)?t.flatMap(e=>se(e)):typeof t=="object"?Object.values(t).flatMap(e=>se(e)):[]}function Ur(t,e){switch(e){case"text":return t.text;case"id":return t.id;case"author_screen_name":return t.authorScreenName;case"author_id":return t.authorId;case"to_user":return t.toUser;case"to_user_id":return t.toUserId;case"conversation_id":return t.conversationId;case"lang":return t.lang;case"route":case"route_type":return t.routeType;case"source":case"source_text":return t.sourceText;case"card_name":return t.cardName;case"bookmark_folder_id":return t.bookmarkFolderId;case"bookmark_folder_name":return t.bookmarkFolderName;case"subject_screen_names":return se(h(t.raw||{},"twe_relationship_fields.subject_screen_names"));case"subject_user_ids":return se(h(t.raw||{},"twe_relationship_fields.subject_user_ids"));case"relation_types":return se(h(t.raw||{},"twe_relationship_fields.relation_types"));case"mentions":return t.mentions;case"hashtags":return t.hashtags;case"cashtags":return t.cashtags;case"urls":return t.urls;case"domains":return t.domains;default:return h(t.raw||{},e)}}function jr(t,e){const n=String(e||"").trim();if(!n)return{text:t.text,tokens:t.tokens,tokenFreq:t.tokenFreq};const r=t.fieldSearchCache.get(n);if(r)return r;const i=se(Ur(t,n)).join(" ").trim(),o=ce(i),a=new Map;for(const f of o)a.set(f,(a.get(f)||0)+1);const d={text:i,tokens:o,tokenFreq:a};return t.fieldSearchCache.set(n,d),d}function Kr(t){const e=new Map;let n=0;for(const r of t){n+=r.tokens.length;for(const s of r.tokenFreq.keys())e.set(s,(e.get(s)||0)+1)}return{docCount:t.length,avgDocLength:t.length?n/t.length:1,termDocFreq:e}}function E(t,e,n){if(!e)return;const r=t.get(e);if(r){r.push(n);return}t.set(e,[n])}function $(t,e){return`${t}:${e}`}function Br(t){const e=new Map,n=new Map;for(let r=0;r<t.length;r+=1){const s=t[r];if(s){for(const i of s.tokenFreq.keys())E(e,i,r);E(n,$("id",s.id),r),E(n,$("from",s.authorScreenName),r),E(n,$("from_id",s.authorId),r),E(n,$("author_id",s.authorId),r),E(n,$("to",s.toUser),r),E(n,$("to_id",s.toUserId),r),E(n,$("in_reply_to_id",s.inReplyToId),r),E(n,$("conversation_id",s.conversationId),r),E(n,$("lang",s.lang),r),E(n,$("route",s.routeType),r),E(n,$("bookmark_folder",s.bookmarkFolderId),r);for(const i of s.mentions)E(n,$("mention",i),r);for(const i of s.hashtags)E(n,$("hashtag",i),r);for(const i of s.cashtags)E(n,$("cashtag",i),r);s.hasMedia&&E(n,$("is","media"),r),s.hasImages&&E(n,$("is","images"),r),s.hasVideo&&E(n,$("is","videos"),r),s.hasLinks&&E(n,$("is","links"),r),s.bookmarked&&E(n,$("is","bookmarked"),r),s.favorited&&E(n,$("is","liked"),r),s.retweeted&&E(n,$("is","retweeted"),r),s.isReply&&E(n,$("is","reply"),r),s.isRetweet&&E(n,$("is","retweet"),r),s.isQuote&&E(n,$("is","quote"),r),s.isVerified&&E(n,$("is","verified"),r),s.isBlueVerified&&E(n,$("is","blue_verified"),r)}}return{tokenDocs:e,exactFilterDocs:n,tokenVocabulary:[...e.keys()].sort()}}function rt(t,e){const n=e instanceof Set?e:new Set(e);if(!t)return new Set(n);const r=new Set;for(const s of t)n.has(s)&&r.add(s);return r}function Le(t){const e=new Set;for(const n of t)for(const r of n)e.add(r);return e}function Yr(t,e){if(!t.length||!e.length)return[];const n=t.length<=e.length?t:e,r=t.length<=e.length?e:t,s=new Set(r),i=[];for(const o of n)s.has(o)&&i.push(o);return i}function Vr(t,e){const n=e.orderedTerms.filter(Boolean);if(n.length<Ot)return null;const r=[];for(let i=0;i<n.length-1;i+=1){const o=t.indexes.tokenDocs.get(n[i]||"")||[],a=t.indexes.tokenDocs.get(n[i+1]||"")||[],d=Yr(o,a);d.length&&r.push(d)}if(!r.length)return null;const s=Le(r);return!s.size||s.size>=t.docs.length?null:s}function Qr(t,e){var c;const n=e.positiveTerms.filter(Boolean);if(n.length<Ot)return null;const r=Math.max(1,t.rankingContext.docCount),s=n.map(y=>({term:y,docFreq:t.rankingContext.termDocFreq.get(y)||0})).filter(y=>y.docFreq>0).sort((y,l)=>y.docFreq!==l.docFreq?y.docFreq-l.docFreq:y.term.localeCompare(l.term));if(!s.length)return null;const i=s.filter(y=>y.docFreq/r<=Rr),o=i.length?i:s,a=((c=o[0])==null?void 0:c.docFreq)||0,d=a>0?o.filter(y=>y.docFreq<=a*qr):o,f=(d.length?d:o).slice(0,Cr);if(!f.length)return null;const M=Le(f.map(y=>t.indexes.tokenDocs.get(y.term)||[]));return!M.size||M.size>=t.docs.length?null:M}function Wr(t,e,n){if(!e||e.length<Rt)return[];const r=[];for(const s of t)if(s.startsWith(e)&&(r.push(s),r.length>=n))break;return r}function Ht(t,e,n){if(!e||e.length<Ge||Ne<=0)return[];const r=e.slice(0,qt),s=[];for(const i of t)if(i.startsWith(r)&&!(Math.abs(i.length-e.length)>Ne)&&!(Lt(i,e)>Ne)&&(s.push(i),s.length>=n))break;return s}function Zr(t,e){const n=t.indexes.tokenDocs,r=t.indexes.tokenVocabulary,s=ce(e.value);if(!s.length)return[];const i=new Set;for(let o=0;o<s.length;o+=1){const a=s[o];if(!(!a||(i.add(a),!(o===s.length-1)))){if(e.prefix)for(const f of Wr(r,a,Fr))i.add(f);if(e.fuzzy)for(const f of Ht(r,a,Dt))i.add(f)}}return[...i].flatMap(o=>n.get(o)||[])}function Xr(t,e){const n=String(e.value||"").trim(),r=L(n);if(!n)return null;const s=t.indexes.exactFilterDocs;switch(e.name){case"from":case"to":case"lang":case"route":case"mention":case"hashtag":case"cashtag":case"id":return new Set(s.get($(e.name,r))||[]);case"from_id":case"author_id":case"to_id":case"in_reply_to_id":case"conversation_id":return new Set(s.get($(e.name,n))||[]);case"bookmark_folder":return/^\\d+$/.test(n)?new Set(s.get($("bookmark_folder",n))||[]):null;case"folder":return/^\\d+$/.test(n)?new Set(s.get($("bookmark_folder",n))||[]):null;case"is":return new Set(s.get($("is",r))||[]);default:return null}}function Gr(t,e,n){let r=null;if(n.size){const a=Le([...n].map(d=>t.indexes.exactFilterDocs.get($("bookmark_folder",d))||[]));r=rt(r,a)}for(const a of e.filters){const d=Xr(t,a);if(d){if(a.negated){if(!r)continue;for(const f of d)r.delete(f);continue}r=rt(r,d)}}const s=e.negativeLexicalTokens.length?null:Vr(t,e)||Qr(t,e),i=e.positiveLexicalTokens.filter(a=>!a.field),o=s||Le(i.map(a=>Zr(t,a)));return o.size&&(r=rt(r,o)),r}function Jr(){const t={...Ct};try{if(typeof localStorage>"u")return t;const e=localStorage.getItem(Er);if(!e)return t;const n=JSON.parse(e);for(const r of Object.keys(Ct)){const s=Number(n[r]);Number.isFinite(s)&&(t[r]=s)}return t}catch{return t}}function en(t){const e=String(t||"").trim(),n=Ie.get(e);if(n)return n;const r=Nr(e);if(Ie.set(e,r),Ie.size>Ar){const s=Ie.keys().next().value;typeof s=="string"&&Ie.delete(s)}return r}function tn(t,e,n){const r=t.tokenFreq.get(e)||0;if(!r)return 0;const s=n.termDocFreq.get(e)||0,i=Math.max(1,n.docCount),o=Math.max(1,n.avgDocLength),a=Math.max(1,t.tokens.length),d=1.2,f=.75,M=Math.log(1+(i-s+.5)/(s+.5)),c=r+d*(1-f+f*a/o);return M*(r*(d+1))/c}function rn(t){const e=[],n=new Set(["bookmarked","liked","retweeted","reply","retweet","quote","media","images","videos","links","verified","blue_verified"]),r=new Set(["media","images","videos","links","mentions","hashtags","cashtags","engagement","polls"]),s=new Set(["replies","retweets","nativeretweets","quote","media","images","videos","links","mentions","hashtags","verified","blue_verified","twimg","native_video","consumer_video","pro_video","has_engagement"]);for(const i of t){const o=`${i.name}:${i.value}`,a=String(i.value||"").trim();if(a){if(["since","until"].includes(i.name)&&!et(a,i.name==="until")){e.push({code:"invalid_filter_value",message:`invalid ${o}`,token:o,severity:"warn"});continue}if(["since_time","until_time","since_id","max_id","min_faves","min_likes","min_retweets","min_replies","min_bookmarks"].includes(i.name)&&!Number.isFinite(Number(a))){e.push({code:"invalid_filter_value",message:`invalid ${o}`,token:o,severity:"warn"});continue}if(i.name==="is"&&!n.has(L(a))){e.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}if(i.name==="has"&&!r.has(L(a))){e.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}if(["filter","include"].includes(i.name)&&!s.has(L(a))){e.push({code:"unsupported_filter",message:`unsupported ${o}`,token:o,severity:"warn"});continue}}}return e}function nn(t,e){const n=String(e.value||"").trim(),r=L(n);if(!n)return!0;const i=(()=>{switch(e.name){case"from":return t.authorScreenName===r;case"from_id":case"author_id":return t.authorId===n;case"to":return t.toUser===r;case"to_id":return t.toUserId===n;case"in_reply_to_id":return t.inReplyToId===n;case"id":return t.id===n;case"lang":return t.lang===r;case"route":return t.routeType===r;case"conversation_id":return t.conversationId===n;case"bookmark_folder":case"folder":return/^\\d+$/.test(n)?t.bookmarkFolderId===n:t.bookmarkFolderName===r||t.bookmarkFolderName.includes(r);case"mention":return t.mentions.includes(r);case"hashtag":return t.hashtags.includes(r);case"cashtag":return t.cashtags.includes(r);case"source":return t.sourceText.includes(r);case"card_name":{const o=r.replace(/\\s+/g,"_");return t.cardName===o||t.cardName.includes(o)}case"domain":return t.domains.some(o=>o===r||o.endsWith(`.${r}`));case"url":return t.urls.some(o=>o.includes(r));case"is":return r==="bookmarked"?t.bookmarked:r==="liked"?t.favorited:r==="retweeted"?t.retweeted:r==="reply"?t.isReply:r==="retweet"?t.isRetweet:r==="quote"?t.isQuote:r==="media"?t.hasMedia:r==="images"?t.hasImages:r==="videos"?t.hasVideo:r==="links"?t.hasLinks:r==="verified"?t.isVerified:r==="blue_verified"?t.isBlueVerified:!0;case"has":return r==="media"?t.hasMedia:r==="images"?t.hasImages:r==="videos"?t.hasVideo:r==="links"?t.hasLinks:r==="mentions"?t.mentions.length>0:r==="hashtags"?t.hashtags.length>0:r==="cashtags"?t.cashtags.length>0:r==="engagement"?t.favoriteCount+t.retweetCount+t.replyCount+t.bookmarkCount>0:r==="polls"?t.cardName.includes("poll"):!0;case"filter":case"include":return e.name==="include"&&r==="nativeretweets"&&!e.negated?!0:r==="replies"?t.isReply:r==="retweets"?t.isRetweet||t.isQuote:r==="nativeretweets"?t.isRetweet:r==="quote"?t.isQuote:r==="media"?t.hasMedia:r==="images"?t.hasImages:r==="videos"||r==="native_video"||r==="consumer_video"||r==="pro_video"?t.hasVideo:r==="links"?t.hasLinks:r==="mentions"?t.mentions.length>0:r==="hashtags"?t.hashtags.length>0:r==="verified"?t.isVerified:r==="blue_verified"?t.isBlueVerified:r==="twimg"?t.urls.some(o=>o.includes("pbs.twimg.com")||o.includes("pic.twitter.com")):r==="has_engagement"?t.favoriteCount+t.retweetCount+t.replyCount+t.bookmarkCount>0:!0;case"since":{const o=et(n,!1);return!o||!t.createdAtMs?!0:t.createdAtMs>=o}case"until":{const o=et(n,!0);return!o||!t.createdAtMs?!0:t.createdAtMs<o}case"since_time":{const o=Number(n)*1e3;return!Number.isFinite(o)||!t.createdAtMs?!0:t.createdAtMs>=o}case"until_time":{const o=Number(n)*1e3;return!Number.isFinite(o)||!t.createdAtMs?!0:t.createdAtMs<o}case"since_id":return/^\\d+$/.test(t.id)&&Number(t.id)>Number(n);case"max_id":return/^\\d+$/.test(t.id)&&Number(t.id)<=Number(n);case"min_faves":case"min_likes":return t.favoriteCount>=Number(n);case"min_retweets":return t.retweetCount>=Number(n);case"min_replies":return t.replyCount>=Number(n);case"min_bookmarks":return t.bookmarkCount>=Number(n);default:return!0}})();return e.negated?!i:i}function nt(t,e,n){if(n.kind==="phrase"){const i=ce(n.value),o=Ae(t,i,!!n.prefix);if(o===null){if(n.fuzzy&&i.length){const a=i[i.length-1],d=a&&a.length>=Ge?Ht([...new Set(t)],a,Dt):[];for(const f of d){const M=[...i];M[M.length-1]=f;const c=Ae(t,M,!1);if(c!==null&&c<=n.slop)return{matched:!0,slopUsed:c}}}return{matched:!1,slopUsed:Number.POSITIVE_INFINITY}}return o>n.slop?{matched:!1,slopUsed:o}:{matched:!0,slopUsed:o}}const r=ce(n.value);if(!r.length)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY};if(r.length===1){const i=r[0];if(!i)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY};let o=e.has(i);return!o&&n.prefix&&i.length>=Rt&&(o=[...e.keys()].some(a=>a.startsWith(i))),!o&&n.fuzzy&&i.length>=Ge&&(o=[...e.keys()].some(a=>a.startsWith(i.slice(0,qt))&&Math.abs(a.length-i.length)<=Ne&&Lt(a,i)<=Ne)),{matched:o,slopUsed:o?0:Number.POSITIVE_INFINITY}}const s=Ae(t,r,!!n.prefix);return{matched:s!==null&&s<=0,slopUsed:s??Number.POSITIVE_INFINITY}}function Ut(t,e){const n=e.field?jr(t,e.field):null;if(n){const o=nt(n.tokens,n.tokenFreq,e);return{matched:o.matched,slopUsed:o.slopUsed,primaryMatched:o.matched,quotedMatched:!1}}const r=nt(t.primaryTokens,t.primaryTokenFreq,e),s=t.quotedTokens.length>0?nt(t.quotedTokens,t.quotedTokenFreq,e):{matched:!1,slopUsed:Number.POSITIVE_INFINITY};if(!r.matched&&!s.matched)return{matched:!1,slopUsed:Number.POSITIVE_INFINITY,primaryMatched:!1,quotedMatched:!1};let i=Number.POSITIVE_INFINITY;return r.matched&&(i=Math.min(i,r.slopUsed)),s.matched&&(i=Math.min(i,s.slopUsed)),{matched:!0,slopUsed:i,primaryMatched:r.matched,quotedMatched:s.matched}}function sn(t,e,n,r=!1){if(t.kind==="phrase"){const o=(t.quoted&&t.slop===0?n.quoted_phrase_match:n.phrase_match)*t.boost/(1+Math.max(0,e));return r?o*.2:o}const s=n.term_match*t.boost;return r?s*.2:s}function on(t,e){let n=0,r=0,s=0,i=0;for(const o of e){if(o.kind!=="phrase")continue;const a=Ut(t,o);if(!a.matched||a.slopUsed!==0)continue;const f=ce(o.value).length;f>n&&(n=f),a.primaryMatched&&f>s&&(s=f),o.quoted&&o.slop===0&&f>r&&(r=f),o.quoted&&o.slop===0&&a.primaryMatched&&f>i&&(i=f)}return{exactPhraseTerms:n,exactQuotedPhraseTerms:r,exactPrimaryPhraseTerms:s,exactPrimaryQuotedPhraseTerms:i}}function ve(t,e,n){if(e.kind==="term"||e.kind==="phrase"){const i=Ut(t,e);return i.matched?{matched:!0,lexicalRaw:sn(e,i.slopUsed,n,i.quotedMatched&&!i.primaryMatched)}:{matched:!1,lexicalRaw:0}}if(e.kind!=="op")return{matched:!0,lexicalRaw:0};if(e.op==="NOT")return{matched:!ve(t,e.child,n).matched,lexicalRaw:0};if(e.op==="AND"){const i=ve(t,e.left,n);if(!i.matched)return{matched:!1,lexicalRaw:0};const o=ve(t,e.right,n);return o.matched?{matched:!0,lexicalRaw:i.lexicalRaw+o.lexicalRaw}:{matched:!1,lexicalRaw:0}}const r=ve(t,e.left,n),s=ve(t,e.right,n);return!r.matched&&!s.matched?{matched:!1,lexicalRaw:0}:r.matched&&s.matched?{matched:!0,lexicalRaw:r.lexicalRaw+s.lexicalRaw}:r.matched?r:s}function an(t,e,n){const r=e.filter(Boolean);if(!r.length)return 0;let s=0;if(r.length>=2)for(let i=0;i<r.length-1;i+=1){const o=r.slice(i,i+2),a=Ae(t.tokens,o);a===null||a>2||(s+=n.cover_bigram/(1+a))}if(r.length>=3)for(let i=0;i<r.length-2;i+=1){const o=r.slice(i,i+3),a=Ae(t.tokens,o);a===null||a>3||(s+=n.cover_trigram/(1+a))}return s}function un(t){const e=t.map(n=>Hr(n));return{records:t,docs:e,rankingContext:Kr(e),indexes:Br(e)}}function cn(t,e,n={}){const r=String(e||"").trim(),s=new Set((n.bookmarkFolderIds||[]).map(g=>String(g||"").trim()).filter(Boolean)),i=s.size>0;if(!r){const g=i?t.docs.filter(p=>p.bookmarkFolderId&&s.has(p.bookmarkFolderId)).map(p=>p.raw):t.records;return{records:g,highlightTerms:[],totalMatches:g.length,warnings:[],warningObjects:[],parsed:{query:"",lexicalExpression:"",filterBooleanSemantics:"global_and"}}}const o=Jr(),a=en(r),d=[...a.warnings,...rn(a.filters)],f=Date.now(),M=Gr(t,a,s),c=M&&M.size<t.docs.length?[...M].sort((g,p)=>g-p).map(g=>t.docs[g]).filter(g=>!!g):t.docs,y=[];for(const g of c){if(i&&(!g.bookmarkFolderId||!s.has(g.bookmarkFolderId)))continue;let p=!0;for(const G of a.filters)if(!nn(g,G)){p=!1;break}if(!p)continue;let R=!a.hasPositiveLexical,Y=0;if(a.lexicalAst){const G=ve(g,a.lexicalAst,o);R=G.matched,Y=G.lexicalRaw}if(!R)continue;let z=0;for(const G of a.positiveTerms)z+=tn(g,G,t.rankingContext);const H=an(g,a.orderedTerms,o),X=z*o.bm25,K=Y*o.lexical,C=H*o.cover_density,q=(g.createdAtMs?g.createdAtMs/1e15:f/1e15)*o.recency,S=on(g,a.positiveLexicalTokens),W=X+K+C+q;y.push({doc:g,score:W,weightedBm25:X,weightedLexical:K,weightedDensity:C,exactPhraseTerms:S.exactPhraseTerms,exactQuotedPhraseTerms:S.exactQuotedPhraseTerms,exactPrimaryPhraseTerms:S.exactPrimaryPhraseTerms,exactPrimaryQuotedPhraseTerms:S.exactPrimaryQuotedPhraseTerms})}y.sort((g,p)=>p.score!==g.score?p.score-g.score:p.exactPrimaryQuotedPhraseTerms!==g.exactPrimaryQuotedPhraseTerms?p.exactPrimaryQuotedPhraseTerms-g.exactPrimaryQuotedPhraseTerms:p.exactPrimaryPhraseTerms!==g.exactPrimaryPhraseTerms?p.exactPrimaryPhraseTerms-g.exactPrimaryPhraseTerms:p.exactQuotedPhraseTerms!==g.exactQuotedPhraseTerms?p.exactQuotedPhraseTerms-g.exactQuotedPhraseTerms:p.exactPhraseTerms!==g.exactPhraseTerms?p.exactPhraseTerms-g.exactPhraseTerms:p.weightedLexical!==g.weightedLexical?p.weightedLexical-g.weightedLexical:p.weightedDensity!==g.weightedDensity?p.weightedDensity-g.weightedDensity:p.doc.createdAtMs!==g.doc.createdAtMs?p.doc.createdAtMs-g.doc.createdAtMs:p.doc.id.localeCompare(g.doc.id));const l=[],x=new Set;for(const g of y){const p=[g.doc.authorId||g.doc.authorScreenName||"",g.doc.text.replace(/\\s+/g," ").trim().toLowerCase()].join("::");p!=="::"&&x.has(p)||(p!=="::"&&x.add(p),l.push(g))}const A=Number(n.limit||0);return{records:(Number.isFinite(A)&&A>0?l.slice(0,Math.max(1,Math.floor(A))):l).map(g=>g.doc.raw),highlightTerms:a.highlightTerms,totalMatches:l.length,warnings:d.map(g=>g.message),warningObjects:d,parsed:{query:a.query,lexicalExpression:a.lexicalExpression,filterBooleanSemantics:a.filterBooleanSemantics}}}function de(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}const xe=new Map,te=new Map,Z=new Set;function we(t){self.postMessage(t)}function ln(t){return t instanceof Error?t.message:String(t)}function jt(t,e){const n=e.map(s=>s.record),r=new Map;return e.forEach((s,i)=>{r.set(s.record,s.id||`row-${i}`)}),{rows:e,prepared:un(n),idByRecord:r}}self.onmessage=t=>{const e=t.data;if(!e||typeof e!="object")return;if(e.type==="search:cancel"){Z.add(e.requestId);return}if(e.type==="search:dispose"){e.scopeKey?(xe.delete(e.scopeKey),te.delete(e.scopeKey)):(xe.clear(),te.clear()),Z.delete(e.requestId);return}const n=de();try{if(e.type==="search:set-corpus"){const r=jt(e.scopeKey,e.records||[]);xe.set(e.scopeKey,r),we({type:"search:corpus-ready",requestId:e.requestId,scopeKey:e.scopeKey,corpusSize:r.rows.length,elapsedMs:de()-n});return}if(e.type==="search:begin-corpus"){if(Z.has(e.requestId)){te.delete(e.scopeKey),Z.delete(e.requestId);return}xe.delete(e.scopeKey),te.set(e.scopeKey,[]);return}if(e.type==="search:append-corpus"){if(Z.has(e.requestId)){te.delete(e.scopeKey),Z.delete(e.requestId);return}const r=te.get(e.scopeKey);if(!r){te.set(e.scopeKey,[...e.records||[]]);return}r.push(...e.records||[]);return}if(e.type==="search:commit-corpus"){if(Z.has(e.requestId)){te.delete(e.scopeKey),Z.delete(e.requestId);return}const r=te.get(e.scopeKey);if(!r){we({type:"search:error",requestId:e.requestId,scopeKey:e.scopeKey,error:`Search corpus chunks not ready for scope: ${e.scopeKey}`,elapsedMs:de()-n});return}te.delete(e.scopeKey);const s=jt(e.scopeKey,r);xe.set(e.scopeKey,s),we({type:"search:corpus-ready",requestId:e.requestId,scopeKey:e.scopeKey,corpusSize:s.rows.length,elapsedMs:de()-n});return}if(e.type==="search:query"){const r=xe.get(e.scopeKey);if(!r){we({type:"search:error",requestId:e.requestId,scopeKey:e.scopeKey,error:`Search corpus not ready for scope: ${e.scopeKey}`,elapsedMs:de()-n});return}if(Z.has(e.requestId)){Z.delete(e.requestId);return}const s=cn(r.prepared,e.query,e.options);if(Z.has(e.requestId)){Z.delete(e.requestId);return}const i=s.records.map((o,a)=>{var d;return r.idByRecord.get(o)||((d=r.rows[a])==null?void 0:d.id)||`row-${a}`});we({type:"search:result",requestId:e.requestId,scopeKey:e.scopeKey,query:e.query,ids:i,elapsedMs:de()-n,corpusSize:r.rows.length,result:{highlightTerms:s.highlightTerms,totalMatches:s.totalMatches,warnings:s.warnings,warningObjects:s.warningObjects,parsed:s.parsed}})}}catch(r){we({type:"search:error",requestId:e.requestId,scopeKey:"scopeKey"in e?e.scopeKey:void 0,error:ln(r),elapsedMs:de()-n})}}})();\n',tp=typeof self<"u"&&self.Blob&&new Blob([By],{type:"text/javascript;charset=utf-8"});function EC(e){let t;try{if(t=tp&&(self.URL||self.webkitURL).createObjectURL(tp),!t)throw "";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(By),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}const AC="twe_search_worker_request_delay_ms_v1",DC=5e3;function np(e){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function PC(e){if(e.type!=="search:query")return 0;try{if(typeof localStorage>"u")return 0;const t=localStorage.getItem(AC);if(!t)return 0;const n=Number(t);return !Number.isFinite(n)||n<=0?0:Math.min(DC,Math.floor(n))}catch{return 0}}class FC{constructor(){Ve(this,"worker",null);Ve(this,"pending",new Map);Ve(this,"available",false);try{this.worker=new EC,this.worker.onmessage=t=>this.handleMessage(t.data),this.worker.onerror=t=>{Da("search",!1),ko("search:worker:error");for(const[n,r]of this.pending)r.reject(new Error(t.message||`Search worker error: ${n}`));this.pending.clear();},this.available=!0,Da("search",!0);}catch(t){this.worker=null,this.available=false,Da("search",false),Be({kind:"worker",name:"search-create-failed",tags:{error:t instanceof Error?t.message:String(t)}});}}isAvailable(){return this.available&&!!this.worker}async setCorpus(t,n){const r=np("corpus");return this.request({type:"search:set-corpus",requestId:r,scopeKey:t,records:n})}beginCorpus(t){this.worker&&this.worker.postMessage({type:"search:begin-corpus",requestId:t.requestId,scopeKey:t.scopeKey,expectedCount:t.expectedCount});}appendCorpus(t){this.worker&&this.worker.postMessage({type:"search:append-corpus",requestId:t.requestId,scopeKey:t.scopeKey,records:t.records});}async commitCorpus(t,n){return this.request({type:"search:commit-corpus",requestId:n,scopeKey:t})}async query(t){const n=t.requestId||np("query"),r=await this.request({type:"search:query",requestId:n,scopeKey:t.scopeKey,query:t.query,options:t.options});if(r.type==="search:result")return r;throw r.type==="search:error"?new Error(r.error):new Error(`Unexpected search worker response: ${r.type}`)}cancel(t){const n=this.pending.get(t);n&&(n.reject(new Error(`Search request cancelled: ${t}`)),this.pending.delete(t)),this.worker&&(this.worker.postMessage({type:"search:cancel",requestId:t}),ko("search:cancelled"),Be({kind:"search",name:"query-cancel",tags:{requestId:t,pending:!!n}}));}dispose(){var t;for(const[n,r]of this.pending)r.reject(new Error(`Search worker disposed: ${n}`));this.pending.clear(),(t=this.worker)==null||t.terminate(),this.worker=null,this.available=false;}request(t){if(!this.worker)return Promise.reject(new Error("Search worker unavailable"));const n=ze(),r=PC(t);return new Promise((o,a)=>{this.pending.set(t.requestId,{resolve:o,reject:a,startedAt:n});const i=()=>{var s;if(!this.pending.has(t.requestId)){r>0&&Be({kind:"search",name:"delayed-query-cancelled-before-post",value:r,tags:{requestId:t.requestId,type:t.type}});return}(s=this.worker)==null||s.postMessage(t);};r>0?globalThis.setTimeout(i,r):i();})}handleMessage(t){const n=this.pending.get(t.requestId);if(!n){ko("search:stale-response");return}this.pending.delete(t.requestId),Be({kind:"search",name:t.type==="search:result"?"worker-query":"worker-corpus",durationMs:ze()-n.startedAt,tags:{type:t.type,corpusSize:"corpusSize"in t?t.corpusSize:void 0,resultCount:t.type==="search:result"?t.ids.length:void 0}}),n.resolve(t);}}function Uy(e,t){if(!e||typeof e!="object")return;const n=t.split(".");let r=e;for(const o of n){if(!r||typeof r!="object")return;r=r[o];}return r}function rp(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)?e:typeof e=="boolean"?e?1:0:e instanceof Date?e.getTime():String(e).toLowerCase()}function OC(e,t){const n=rp(e),r=rp(t);return typeof n=="number"&&typeof r=="number"?n-r:String(n).localeCompare(String(r),void 0,{numeric:true,sensitivity:"base"})}function $y(e){const t=[];for(const n of e){if("columns"in n&&Array.isArray(n.columns)){t.push(...$y(n.columns));continue}t.push(n);}return t}function LC(e){return "id"in e&&typeof e.id=="string"&&e.id?e.id:"accessorKey"in e&&typeof e.accessorKey=="string"?e.accessorKey:""}function op(e,t,n){if("accessorFn"in e&&typeof e.accessorFn=="function")return e.accessorFn(t,n);if("accessorKey"in e){if(typeof e.accessorKey=="string")return Uy(t,e.accessorKey);if(typeof e.accessorKey=="number"&&Array.isArray(t))return t[e.accessorKey]}}function NC(e){if(typeof e=="number"&&Number.isFinite(e))return e;const t=Number(e);return Number.isFinite(t)?t:null}function BC(e){if(e==null||e==="")return null;const t=NC(e);if(t!==null)return t>1e12?t:t*1e3;if(typeof e=="string"){const n=Number(Na(e)||0);if(Number.isFinite(n)&&n>0)return n;const r=Date.parse(e);if(Number.isFinite(r))return r}return null}function ap(e){if(!e||typeof e!="object")return 0;const t=["twe_private_fields.created_at","created_at","legacy.created_at","core.created_at","article.published_at","__seen_at"];for(const n of t){const r=Uy(e,n),o=BC(r);if(o!==null&&o>0)return o}return 0}const ip=1200,Ts=6e3,Zc=320,UC=1e3;function ba(e,t=[]){return {records:[],highlightTerms:[],totalMatches:0,warnings:t,warningObjects:t.map(n=>({code:"unsupported_token",message:n,severity:"warn"})),parsed:{query:e,lexicalExpression:"",filterBooleanSemantics:"global_and"}}}function sp(e){return {records:e.records,highlightTerms:[],totalMatches:e.totalMatches,warnings:[],warningObjects:[],parsed:{query:e.query,lexicalExpression:"",filterBooleanSemantics:"global_and"}}}function $C(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`search-${crypto.randomUUID()}`:`search-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function va(e){switch(e){case "idle":return "search idle";case "unavailable":return "search worker unavailable";case "preparing-corpus":return "preparing search index";case "ready":return "search ready";case "querying":return "querying local index";case "degraded":return "search degraded";case "cancelled":return "search cancelled";case "failed":return "search failed";default:return "search"}}function kn(e,t){let n=e;for(const r of t.split(".")){if(!n||typeof n!="object")return;n=n[r];}return n}function HC(e){if(!e||typeof e!="object")return e;const t=e;return {__typename:t.__typename,rest_id:t.rest_id,id_str:t.id_str,__bookmark_folder_id:t.__bookmark_folder_id,__bookmark_folder_name:t.__bookmark_folder_name,__route_type:t.__route_type,twe_relationship_fields:t.twe_relationship_fields,note_tweet:t.note_tweet,article:t.article,quoted_status_result:t.quoted_status_result,card:t.card,views:t.views,core:t.core,verification:t.verification,is_blue_verified:t.is_blue_verified,legacy:{id_str:kn(t,"legacy.id_str"),full_text:kn(t,"legacy.full_text"),text:kn(t,"legacy.text"),description:kn(t,"legacy.description"),created_at:kn(t,"legacy.created_at"),source:kn(t,"legacy.source"),lang:kn(t,"legacy.lang"),entities:kn(t,"legacy.entities"),extended_entities:kn(t,"legacy.extended_entities"),in_reply_to_screen_name:kn(t,"legacy.in_reply_to_screen_name"),in_reply_to_user_id_str:kn(t,"legacy.in_reply_to_user_id_str"),in_reply_to_status_id_str:kn(t,"legacy.in_reply_to_status_id_str"),conversation_id_str:kn(t,"legacy.conversation_id_str"),favorite_count:kn(t,"legacy.favorite_count"),retweet_count:kn(t,"legacy.retweet_count"),reply_count:kn(t,"legacy.reply_count"),bookmark_count:kn(t,"legacy.bookmark_count"),quote_count:kn(t,"legacy.quote_count"),favorited:kn(t,"legacy.favorited"),retweeted:kn(t,"legacy.retweeted"),bookmarked:kn(t,"legacy.bookmarked"),retweeted_status_result:kn(t,"legacy.retweeted_status_result")}}}function Hy(e){var r,o,a,i,s;const t=e.raw_ref_key||e.entity_id,n=[e.primary_text,e.quoted_text,e.auxiliary_text].filter(l=>typeof l=="string"&&l.trim().length>0).join(`
`);return {rest_id:t,id_str:t,__bookmark_folder_id:e.folder_id,__bookmark_folder_name:e.folder_name,__route_type:e.route_type,core:{user_results:{result:{rest_id:e.author_id,core:{screen_name:e.author_screen_name,name:e.author_screen_name},legacy:{screen_name:e.author_screen_name,name:e.author_screen_name}}}},legacy:{id_str:t,full_text:n,text:n,created_at:e.created_at_ms?new Date(e.created_at_ms).toUTCString():void 0,lang:e.lang,favorite_count:(r=e.numeric_json)==null?void 0:r.favorite_count,retweet_count:(o=e.numeric_json)==null?void 0:o.retweet_count,reply_count:(a=e.numeric_json)==null?void 0:a.reply_count,bookmark_count:(i=e.numeric_json)==null?void 0:i.bookmark_count,quote_count:(s=e.numeric_json)==null?void 0:s.quote_count}}}function jC(e,t){return e.map((n,r)=>({id:n.raw_ref_key||n.entity_id||`search-doc-${t+r}`,record:Hy(n)}))}function qC({title:e,viewStateKey:t,fullscreen:n,onFullscreenChange:r,records:o,searchDocuments:a,searchDocumentsLoading:i=false,searchDocumentsLoaded:s=false,searchDocumentTotalCount:l=0,searchDocumentsBlockedReason:c,loadSearchDocuments:h,loadSearchDocumentChunks:f,folderScopeSourceBacked:m=false,resultSourceDescriptor:g,resultSourceTotalCount:_,resultEntityType:b,hydrateRecordsByIds:C,columns:v,alternateViews:T}){const[R,P]=Ne(""),[L,D]=Ne(""),[O,B]=Ne([]),[I,x]=Ne({}),[F,U]=Ne([]),[Ce,X]=Ne("all"),[re,Z]=Ne(false),[ce,he]=Ne("table"),[fe,me]=Ne(null),[z,ue]=Ne([]),[Ae,ie]=Ne(()=>({key:"",ids:new Set})),Oe=kt(null),Le=kt(""),ee=kt(""),ne=kt(""),V=kt(""),se=kt(""),_e=kt(null),ke=kt(""),Ze=kt(""),Je=L.trim(),Me=Je.length>0,bt=O.length>0,Nt=bt&&m&&!Me,Kt=Me,qt=(Me||bt&&!Nt)&&(s||!!(a!=null&&a.length)),Mt=Me&&qt,Ue=Mt&&!(a!=null&&a.length)&&l>0&&!!f,Ye=Tt(()=>{const Se=R.trim();if(!Se)return 60;const Ee=/["():]|^[@#$-]/.test(Se),xt=Se.split(/\s+/).filter(Boolean).length;return Ee||xt>1?180:240},[R]),wt=n??re,Re=Se=>{const Ee=typeof Se=="function"?Se(wt):Se;n===void 0&&Z(Ee),r==null||r(Ee);},gt=Tt(()=>`twe_table_view_state_v2:${t||e}`,[e,t]),ot=Tt(()=>a!=null&&a.length||l>0?`${gt}:search-documents:${l||(a==null?void 0:a.length)||0}`:`${gt}:records:${o.length}`,[o.length,gt,l,a==null?void 0:a.length]),$e=Tt(()=>[...O].sort().join(","),[O]),be=Tt(()=>o.map((Se,Ee)=>So(Se,Ee)),[o]),ge=Tt(()=>{if(a!=null&&a.length){const Se=a[0],Ee=a[a.length-1];return [ot,"docs",a.length,(Se==null?void 0:Se.id)||"",(Se==null?void 0:Se.updated_at_ms)||"",(Ee==null?void 0:Ee.id)||"",(Ee==null?void 0:Ee.updated_at_ms)||""].join(":")}return Ue?[ot,"docs-stream",l].join(":"):[ot,"records",o.length,be[0]||"",be[be.length-1]||""].join(":")},[be,o.length,ot,l,a,Ue]),M=`${ge}:${Je}:${$e}`,k=Tt(()=>{const Se=new Map;return o.forEach((Ee,xt)=>{for(const tt of qo(Ee,xt))Se.set(tt,Ee);Se.set(be[xt]||`row-${xt}`,Ee);}),z.forEach((Ee,xt)=>{for(const tt of qo(Ee,xt))Se.set(tt,Ee);}),Se},[be,o,z]),A=kt(k);it(()=>{A.current=k;},[k]),it(()=>{Be({kind:"viewer",name:"table-record-lookup-ids",value:k.size,tags:{title:e,viewStateKey:t||"",records:o.length,searchHydratedRecords:z.length}});},[k.size,o.length,z.length,e,t]),it(()=>{ue([]),ie({key:"",ids:new Set}),ke.current="",Ze.current="",_e.current=null,ee.current="",ne.current="";},[ot]);const H=Tt(()=>Mt?(a==null?void 0:a.map((Se,Ee)=>({id:Se.raw_ref_key||Se.entity_id||`search-doc-${Ee}`,record:Hy(Se)})))??[]:[],[a,Mt]),K=Tt(()=>!Me||qt?[]:o.map((Se,Ee)=>({id:be[Ee]||`row-${Ee}`,record:HC(Se)})),[Me,be,o,qt]),Te=qt?H:K,le=kt(Te),Ke=kt(O),De=kt(C);it(()=>{Be({kind:"search",name:"worker-corpus-candidates",value:Te.length,tags:{title:e,viewStateKey:t||"",source:qt?"search-documents":"records",records:o.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentTotalCount:l,searchDocumentsLoaded:s,searchDocumentsLoading:i,searchDocumentsBlocked:!!c}});},[o.length,a==null?void 0:a.length,l,c,s,i,qt,e,t,Te.length]),it(()=>{le.current=Te;},[Te]),it(()=>{!Me||!h||c||s||i||a!=null&&a.length||h().catch(Se=>{Be({kind:"search",name:"lazy-search-documents-error",tags:{error:Se instanceof Error?Se.message:String(Se)}});});},[bt,Me,Nt,h,c,a==null?void 0:a.length,s,i]),it(()=>{Ke.current=O;},[O]),it(()=>{De.current=C;},[C]);const lt=Tt(()=>{if(Nt||Me||!bt||!(a!=null&&a.length))return [];const Se=new Set(O);return a.filter(Ee=>Ee.folder_id&&Se.has(Ee.folder_id)).sort((Ee,xt)=>{const tt=xt.observed_at_ms||xt.created_at_ms||xt.updated_at_ms||0,Rt=Ee.observed_at_ms||Ee.created_at_ms||Ee.updated_at_ms||0;return tt!==Rt?tt-Rt:(xt.raw_ref_key||xt.entity_id).localeCompare(Ee.raw_ref_key||Ee.entity_id)})},[Nt,bt,Me,a,O]),we=Tt(()=>lt.map(Se=>Se.raw_ref_key||Se.entity_id).filter(Boolean).slice(0,Ts),[lt]),mt=Tt(()=>{if(!we.length)return "";const Se=we[0]||"",Ee=we[we.length-1]||"";return `${ot}:folders:${$e}:${we.length}:${Se}:${Ee}`},[we,ot,$e]);it(()=>{if(Me||Nt||!bt||!we.length||!C||ke.current===mt||Ze.current===mt)return;ke.current=mt,ie(tt=>tt.key===mt?tt:{key:mt,ids:new Set});let Se=false;const Ee=tt=>{tt.length&&ue(Rt=>{const St=new Set(Rt.flatMap((yt,Ht)=>qo(yt,Ht))),st=tt.filter((yt,Ht)=>{const Zt=qo(yt,Ht);return Zt.some(Qt=>St.has(Qt))?false:(Zt.forEach(Qt=>St.add(Qt)),true)});return st.length?[...Rt,...st].slice(-Ts):Rt});};return (async()=>{const tt=ze();let Rt=0;const St=we.filter(st=>!A.current.has(st));for(let st=0;st<St.length&&!Se;st+=Zc){const yt=St.slice(st,st+Zc),Ht=await C(yt);if(Se||ke.current!==mt)return;Rt+=Ht.length,ie(Zt=>{if(Zt.key!==mt)return Zt;const Qt=new Set(Zt.ids);return yt.forEach(On=>Qt.add(On)),{key:mt,ids:Qt}}),Ee(Ht),await new Promise(Zt=>globalThis.setTimeout(Zt,0));}!Se&&ke.current===mt&&(Ze.current=mt,ke.current=""),Be({kind:"viewer",name:"folder-result-hydrate",durationMs:ze()-tt,value:Rt,tags:{selectedFolders:$e,totalMatches:we.length,missingIds:St.length,batchSize:Zc}});})().catch(tt=>{ke.current===mt&&(ke.current=""),Be({kind:"viewer",name:"folder-result-hydrate-error",tags:{error:tt instanceof Error?tt.message:String(tt)}});}),()=>{Se=true,ke.current===mt&&(ke.current="");}},[mt,we,Nt,bt,Me,C,$e]),it(()=>{const Se=new FC;return Oe.current=Se,()=>{Se.dispose(),Oe.current=null,V.current="";}},[]),it(()=>{V.current="",se.current="";},[ot]),it(()=>{const Se=Oe.current;if(!Me||!(Se!=null&&Se.isAvailable())||!le.current.length||V.current===ge||se.current===ge)return;let Ee=false;const xt=()=>{if(Ee||V.current===ge)return;se.current=ge;const Rt=ze(),St=Se.setCorpus(ot,le.current);_e.current=St,St.then(st=>{Ee||st.type==="search:corpus-ready"&&(V.current=ge,Be({kind:"search",name:"corpus-warm-ready",durationMs:ze()-Rt,tags:{corpusSize:st.corpusSize}}));}).catch(st=>{Ee||Be({kind:"search",name:"corpus-warm-error",durationMs:ze()-Rt,tags:{error:st instanceof Error?st.message:String(st)}});}).finally(()=>{se.current===ge&&(se.current=""),_e.current===St&&(_e.current=null);});},tt=globalThis.setTimeout(xt,120);return ()=>{Ee=true,globalThis.clearTimeout(tt);}},[ge,Me,ot]),it(()=>{if(!Kt){ee.current="",ne.current="",me(null);return}if(c){me({key:M,pending:false,phase:"degraded",result:ba(Je,[c]),error:c}),ko("search:large-corpus-blocked");return}const Se=Oe.current;if(h&&!s&&!(a!=null&&a.length)){me({key:M,pending:true,phase:"preparing-corpus",result:ba(Je)});return}if(ne.current===M||ee.current===M)return;ee.current=M;const Ee=$C();Le.current=Ee;const xt=ze(),tt=Je;let Rt=false;if(!(Se!=null&&Se.isAvailable())){if(o.length<=1500||!(a!=null&&a.length)){const yt=ep(o??[],tt,{bookmarkFolderIds:Ke.current});ne.current=M,ee.current="";const Ht=yt.records.map((Zt,Qt)=>py(So(Zt,Qt)));me({key:M,pending:false,phase:"unavailable",result:yt,resultIds:Ht,error:"Search worker unavailable; used bounded main-thread fallback."});return}const st=a!=null&&a.length?"Search worker unavailable; large-corpus indexed folder/search hydration was blocked.":"Search worker unavailable; large-corpus main-thread search was blocked.";me({key:M,pending:false,phase:"unavailable",result:ba(tt,[st]),error:st}),ee.current="",ko("search:large-fallback-blocked");return}return me(st=>({key:M,pending:true,phase:V.current===ge?"querying":"preparing-corpus",result:(st==null?void 0:st.key)===M?st.result:null})),(async()=>{if(V.current!==ge){const st=ze();let yt=null;if(se.current===ge&&_e.current)try{yt=await _e.current;}catch{yt=null;}if((!yt||yt.type!=="search:corpus-ready")&&Ue&&f){let Ht=0;if(Se.beginCorpus({scopeKey:ot,requestId:Ee,expectedCount:l}),(await f({chunkSize:UC,isCancelled:()=>Rt||Le.current!==Ee,onChunk:(Qt,On)=>{if(Rt||Le.current!==Ee)return;const fn=jC(Qt,Ht);Ht+=fn.length,Se.appendCorpus({scopeKey:ot,requestId:Ee,records:fn}),Be({kind:"search",name:"chunked-corpus-transfer",value:On.loaded,tags:{totalCount:On.totalCount,chunkRows:fn.length,scopeKey:ot}});}})).cancelled||Rt||Le.current!==Ee){ko("search:chunked-corpus-cancelled");return}yt=await Se.commitCorpus(ot,Ee);}if((!yt||yt.type!=="search:corpus-ready")&&(yt=await Se.setCorpus(ot,le.current)),Le.current!==Ee){ko("search:stale-corpus-ignored");return}yt.type==="search:corpus-ready"&&(V.current=ge,me(Ht=>(Ht==null?void 0:Ht.key)===M?{...Ht,pending:true,phase:"querying"}:Ht),Be({kind:"search",name:"corpus-ready",durationMs:ze()-st,tags:{corpusSize:yt.corpusSize}}));}return await Se.query({scopeKey:ot,query:tt,options:{bookmarkFolderIds:Ke.current,limit:ip},requestId:Ee})})().then(st=>{if(!st){ee.current===M&&(ee.current="");return}if(Le.current!==Ee){ee.current===M&&(ee.current=""),ko("search:stale-ignored");return}const yt=A.current,Ht=st.ids.map(fn=>yt.get(fn)).filter(fn=>!!fn);me({key:M,pending:false,phase:"ready",result:{...st.result,records:Ht},resultIds:st.ids}),ne.current=M,ee.current===M&&(ee.current="");const Zt=Me?ip:Ts,Qt=De.current,On=Qt?st.ids.filter(fn=>!yt.has(fn)).slice(0,Zt):[];if(On.length){const fn=ze();Qt==null||Qt(On).then(Bt=>{if(Le.current!==Ee)return;const vn=new Map(A.current);Bt.forEach((Dt,Pt)=>{for(const Ln of qo(Dt,Pt))vn.set(Ln,Dt);}),ue(Dt=>{const Pt=new Set(Dt.flatMap((lr,rr)=>qo(lr,rr))),Ln=Bt.filter((lr,rr)=>{const gn=qo(lr,rr);return gn.some(uo=>Pt.has(uo))?false:(gn.forEach(uo=>Pt.add(uo)),true)});return Ln.length?[...Dt,...Ln].slice(-Ts):Dt});const tn=st.ids.map(Dt=>vn.get(Dt)).filter(Dt=>!!Dt);me({key:M,pending:false,phase:"ready",result:{...st.result,records:tn},resultIds:st.ids}),Be({kind:"viewer",name:"search-result-hydrate",durationMs:ze()-fn,value:Bt.length,tags:{missingIds:On.length,resultCount:st.ids.length}});}).catch(Bt=>{Be({kind:"viewer",name:"search-result-hydrate-error",durationMs:ze()-fn,tags:{error:Bt instanceof Error?Bt.message:String(Bt)}});});}Be({kind:"search",name:"query-total",durationMs:ze()-xt,tags:{corpusSize:st.corpusSize,resultCount:st.ids.length,queryLength:tt.length}});}).catch(st=>{if(Le.current!==Ee)return;const yt=st instanceof Error?st.message:String(st);me({key:M,pending:false,phase:/cancelled/i.test(yt)?"cancelled":"failed",result:ba(tt,[yt]),error:yt}),ee.current===M&&(ee.current=""),Be({kind:"search",name:"query-error",durationMs:ze()-xt,tags:{error:yt,queryLength:tt.length}});}),()=>{Rt=true;const st=ee.current===M;st&&(ee.current=""),Se.cancel(Ee),st&&Be({kind:"search",name:"readiness-state",value:1,tags:{phase:"cancelled",queryLength:Je.length,corpusRows:le.current.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentsLoaded:s,searchDocumentsLoading:i,cancellable:false}}),me(yt=>(yt==null?void 0:yt.key)===M&&yt.pending?{...yt,pending:false,phase:"cancelled",result:yt.result??ba(Je),error:"Search request cancelled."}:yt);}},[M,Me,Kt,Je,ge,ot,f,l,a==null?void 0:a.length,s,i,c,Ue]);const It=Tt(()=>{if(!Me&&Nt)return sp({query:"",records:o??[],totalMatches:(o==null?void 0:o.length)??0});if(!Me&&bt&&(a!=null&&a.length)){const Se=Ae.key===mt?Ae.ids:new Set,Ee=wS(we,k,Se);return sp({query:"",records:Ee,totalMatches:lt.length})}return Kt?(fe==null?void 0:fe.key)===M&&fe.result?fe.result:ba(Je):ep(o??[],"",{bookmarkFolderIds:O})},[M,fe,we,lt.length,Ae,mt,Nt,bt,Me,Kt,Je,k,o,a==null?void 0:a.length,O]),$t=!!(Kt&&(fe==null?void 0:fe.key)===M&&fe.pending),Et=Me&&(fe==null?void 0:fe.key)===M?fe.resultIds??[]:[],Yt=Tt(()=>{if(!Me||F.length||!C||!b||!Et.length)return;const Se=X0({extensionName:g&&"extensionName"in g&&typeof g.extensionName=="string"&&g.extensionName?g.extensionName:e,entityType:b,query:Je,ids:Et,totalCount:Et.length,folderIds:O,hydrateByIds:C});return ()=>Se.streamRows()},[Me,C,Je,b,g,Et,O,F.length,e]),j=(fe==null?void 0:fe.key)===M?fe:null,Xe=Tt(()=>Me?j!=null&&j.phase?{phase:j.phase,label:va(j.phase),detail:j.error,cancellable:j.pending&&(j.phase==="preparing-corpus"||j.phase==="querying")}:c?{phase:"degraded",label:va("degraded"),detail:c,cancellable:false}:h&&!s&&!(a!=null&&a.length)?{phase:"preparing-corpus",label:va("preparing-corpus"),detail:i?"loading search documents":"waiting for search corpus",cancellable:true}:V.current===ge?{phase:"ready",label:va("ready"),cancellable:false}:{phase:"preparing-corpus",label:va("preparing-corpus"),cancellable:true}:{phase:"idle",label:va("idle"),cancellable:false},[ge,j,Me,h,a==null?void 0:a.length,c,s,i]);it(()=>{Be({kind:"search",name:"readiness-state",value:Me?1:0,tags:{phase:Xe.phase,queryLength:Je.length,corpusRows:Te.length,searchDocuments:(a==null?void 0:a.length)??0,searchDocumentsLoaded:s,searchDocumentsLoading:i,cancellable:Xe.cancellable}});},[Me,Je.length,a==null?void 0:a.length,s,i,Xe.cancellable,Xe.phase,Te.length]);const vt=Tt(()=>{const Se=$y(v),Ee=new Map;for(const xt of Se){const tt=LC(xt);tt&&Ee.set(tt,xt);}return Ee},[v]),Qe=Tt(()=>{if(!F.length)return Me||bt&&(a!=null&&a.length)?It.records:[...It.records].sort((xt,tt)=>{const Rt=ap(tt),St=ap(xt);return Rt!==St?Rt-St:0});const Se=new Map;It.records.forEach((xt,tt)=>{Se.set(xt,tt);});const Ee=[...It.records];return Ee.sort((xt,tt)=>{const Rt=Se.get(xt)??0,St=Se.get(tt)??0;for(const st of F){const yt=vt.get(st.id);if(!yt)continue;const Ht=op(yt,xt,Rt),Zt=op(yt,tt,St),Qt=OC(Ht,Zt);if(Qt!==0)return st.desc?-Qt:Qt}return Rt-St}),Ee},[Me,It.records,vt,F]),Fe=Tt(()=>Qe.map((Se,Ee)=>So(Se,Ee)),[Qe]),ft=!!g&&!Me&&!F.length&&(!bt||Nt),He=Se=>{const Ee=ao(Se,I);if(x(Ee),!Fe.length)return;const xt=Fe.every(tt=>!!Ee[tt]);X(xt?"all":"explicit");},Pe=Tt(()=>Ce==="all"?[]:Qe.filter((Se,Ee)=>{const xt=So(Se,Ee);return !!I[xt]}),[I,Ce,Qe]),At=Tt(()=>Ce==="all"?[]:Object.entries(I).filter(([,Se])=>Se).map(([Se])=>Se),[I,Ce]),mn=Tt(()=>vS({queryText:Je,sort:bS(F),ids:ft?[]:Fe,idsTruncated:ft?Fe.length>0:false,sourceDescriptor:ft?g:void 0,totalMatches:ft?_??It.totalMatches:It.totalMatches,warnings:It.warnings}),[Fe,ft,Je,g,_,It.totalMatches,It.warnings,F]);return it(()=>{const Se=globalThis.setTimeout(()=>{D(R);},Ye);return ()=>{globalThis.clearTimeout(Se);}},[Ye,R]),it(()=>{if(!(T!=null&&T.length)&&ce!=="table"){he("table");return}ce!=="table"&&!(T!=null&&T.some(Se=>Se.id===ce))&&he("table");},[ce,T]),it(()=>{try{if(typeof localStorage>"u")return;const Se=localStorage.getItem(gt);if(!Se)return;const Ee=JSON.parse(Se);n===void 0&&typeof Ee.fullscreen=="boolean"&&Z(Ee.fullscreen),typeof Ee.activeViewId=="string"&&Ee.activeViewId.trim()&&he(Ee.activeViewId);}catch{}},[gt]),it(()=>{try{if(typeof localStorage>"u")return;localStorage.setItem(gt,JSON.stringify({fullscreen:wt,activeViewId:ce}));}catch{}},[ce,wt,gt]),{searchQuery:R,setSearchQuery:P,normalizedSearchQuery:Je,selectedFolders:O,setSelectedFolders:B,rowSelection:I,setRowSelection:x,sorting:F,setSorting:U,selectionMode:Ce,setSelectionMode:X,isFullscreen:wt,setIsFullscreen:Re,activeViewId:ce,setActiveViewId:he,searchResult:It,searchPending:$t,searchReadinessState:Xe,sortedRecords:Qe,currentResultIds:Fe,handleRowSelectionChange:He,selectedRecords:Pe,selectedRecordIds:At,streamSearchResultRows:Yt,resultSetSnapshot:mn,resolvedViewStateKey:gt}}const Vo=12,lp=74,VC=4,Ms=1600,zC=90,KC=24,Ku=2500,cp=1e4,GC="data-twe-highlight-v1",WC="scrollmark-table-search-",Gu=new WeakMap;let up=0;function YC(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e),t.normalize();}}function Wu(e){const t=Gu.get(e),n=jy();t&&n&&(n.delete(t),ZC(t)),e.querySelectorAll(`mark[${GC}="1"]`).forEach(o=>{o instanceof HTMLElement&&YC(o);});}function jy(){const e=globalThis.CSS,t=qy();return !(e!=null&&e.highlights)||!t?null:e.highlights}function qy(){const e=globalThis.Highlight;return typeof e=="function"?e:null}function XC(e){const t=Gu.get(e);if(t)return dp(t),t;up+=1;const n=`${WC}${up}`;return Gu.set(e,n),dp(n),n}function QC(e="sm"){switch(e){case "md":return "hidden md:inline";case "lg":return "hidden lg:inline";case "xl":return "hidden xl:inline";case "sm":default:return "hidden sm:inline"}}function dp(e){if(typeof document>"u")return;const t=`twe-css-highlight-style-${e}`;if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=`
::highlight(${e}) {
background-color: rgba(250, 204, 21, 0.32);
color: inherit;
}
`,document.head.appendChild(n);}function ZC(e){var t;typeof document>"u"||(t=document.getElementById(`twe-css-highlight-style-${e}`))==null||t.remove();}function JC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eT(e,t){if(Wu(e),!t.length)return;const n=[...new Set(t.map(c=>c.trim().toLowerCase()))].filter(c=>c.length>=2).sort((c,h)=>h.length-c.length).slice(0,24);if(!n.length)return;const r=jy(),o=qy();if(!r||!o)return;const a=new RegExp(`(${n.map(c=>JC(c)).join("|")})`,"ig"),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:c=>{if(!c.nodeValue||!c.nodeValue.trim())return NodeFilter.FILTER_REJECT;const h=c.parentElement;return !h||h.closest("mark,button,input,textarea,select,option,svg,code,pre,.btn,.checkbox,.label,.dropdown-content")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];for(;i.nextNode();)s.push(i.currentNode);const l=[];for(const c of s){const h=c.nodeValue||"";a.lastIndex=0,a.test(h)&&(a.lastIndex=0,h.replace(a,(f,m,g)=>{const _=document.createRange();return _.setStart(c,g),_.setEnd(c,g+f.length),l.push(_),f}));}l.length&&r.set(XC(e),new o(...l));}function fp(e,t){if(t<=0||e.length<=1)return 0;let n=0,r=e.length-1;for(;n<r;){const o=Math.floor((n+r+1)/2);(e[o]||0)<=t?n=o:r=o-1;}return Math.max(0,Math.min(e.length-2,n))}function tT(e){if(e.size<=Ku)return;const t=[...e.entries()].sort((n,r)=>n[1].touchedAt-r[1].touchedAt);for(const[n]of t.slice(0,e.size-Ku))e.delete(n);}function Bi({title:e,viewStateKey:t,searchHistoryScope:n,fullscreen:r,onFullscreenChange:o,loading:a=false,loadingMore:i=false,loadedCount:s=0,totalCount:l=0,hasMore:c=false,sourceMode:h=false,sourceModeFiltersActive:f=false,sourceWindowStartIndex:m=0,resultSourceDescriptor:g,resultEntityType:_,onSourceWindowChange:b,streamSourceRows:C,streamMediaRows:v,mediaSourceKey:T,mediaSourceTotalCount:R,getMediaWindow:P,onBookmarkFolderSelectionChange:L,loadMore:D,loadAll:O,hydrateRecordsByIds:B,records:I,searchDocuments:x,searchDocumentsLoading:F,searchDocumentsLoaded:U,searchDocumentTotalCount:Ce,searchDocumentsBlockedReason:X,loadSearchDocuments:re,loadSearchDocumentChunks:Z,columns:ce,clear:he,showClearButton:fe=true,renderActions:me,renderExtra:z,bookmarkFolderOptions:ue,alternateViews:Ae}){const{t:ie}=Qn(),Oe=kt(ze()),Le=kt(false),ee=kt(false),ne=kt(false),[V,se]=$n(""),[_e,ke]=$n(false),[Ze,Je]=$n(null),[Me,bt]=ir(false),[Nt,Kt]=Ne(0),{searchQuery:qt,setSearchQuery:Mt,normalizedSearchQuery:Ue,selectedFolders:Ye,setSelectedFolders:wt,rowSelection:Re,setRowSelection:gt,sorting:ot,setSorting:$e,selectionMode:be,setSelectionMode:ge,isFullscreen:M,setIsFullscreen:k,activeViewId:A,setActiveViewId:H,searchResult:K,searchPending:Te,searchReadinessState:le,sortedRecords:Ke,currentResultIds:De,handleRowSelectionChange:lt,selectedRecords:we,selectedRecordIds:mt,streamSearchResultRows:It,resultSetSnapshot:$t,resolvedViewStateKey:Et}=qC({title:e,viewStateKey:t,fullscreen:r,onFullscreenChange:o,records:I,columns:ce,alternateViews:Ae,searchDocuments:x,searchDocumentsLoading:F,searchDocumentsLoaded:U,searchDocumentTotalCount:Ce,searchDocumentsBlockedReason:X,loadSearchDocuments:re,loadSearchDocumentChunks:Z,hydrateRecordsByIds:B,folderScopeSourceBacked:f,resultSourceDescriptor:g,resultEntityType:_,resultSourceTotalCount:l}),Yt=Tt(()=>{const ve=new Map;for(const rt of LS){const Ct=ve.get(rt.category)||[];Ct.push(rt),ve.set(rt.category,Ct);}return [...ve.entries()]},[]),j=Tt(()=>(Ae==null?void 0:Ae.find(ve=>ve.id===A))??null,[A,Ae]),Xe=!j,[vt,Qe]=Ne(null),Fe=nr(ve=>{Qe(ve);},[]);it(()=>{Qe(null);},[j==null?void 0:j.id]);const ft=!!j&&h&&l>cp&&(j==null?void 0:j.sourceBacked)!==true&&!Ue,He=ve=>{L==null||L(ve),wt(ve);};it(()=>{L==null||L(Ye);},[L,Ye]);const Pe=Tt(()=>({title:e,viewStateKey:t||"",resolvedViewStateKey:Et,activeViewId:A,fullscreen:M}),[A,M,Et,e,t]);it(()=>{Be({kind:"viewer",name:"table-open-start",value:l,tags:{...Pe,loadedCount:s,totalCount:l,searchDocuments:(x==null?void 0:x.length)??0}});},[]);const At=kt(null),mn=kt(null),Se=kt(0),Ee=kt(null),xt=kt(new Map),tt=kt(false),[Rt,St]=Ne(0),[st,yt]=Ne(520),[Ht,Zt]=Ne(lp),[Qt,On]=Ne(0);it(()=>{const ve=At.current;ve&&(ve.scrollTop=0,Se.current=0,St(0),yt(Math.max(320,ve.clientHeight||520)));},[A,Ue,Ye]);const fn=()=>{const ve=At.current;ve&&(Se.current=ve.scrollTop,Ee.current===null&&(Ee.current=window.requestAnimationFrame(()=>{Ee.current=null;const rt=Se.current;St(Ct=>Math.abs(rt-Ct)<KC?Ct:rt);})));};it(()=>{const ve=At.current;if(!ve||typeof ResizeObserver>"u")return;const rt=new ResizeObserver(()=>{const Ct=Math.max(320,ve.clientHeight||520);yt(Kn=>Math.abs(Kn-Ct)>12?Ct:Kn);});return rt.observe(ve),()=>rt.disconnect()},[]),it(()=>()=>{Ee.current!==null&&window.cancelAnimationFrame(Ee.current);},[]);const Bt=Math.max(32,Ht||lp),vn=h&&!Ue&&(!Ye.length||f)&&!j,tn=vn&&l>I.length,Dt=vn&&!ot.length,Pt=Dt?Math.max(l,I.length):Ke.length,Ln=De,lr=Tt(()=>{var rt;if(Dt)return [];const ve=new Array(Pt+1);ve[0]=0;for(let Ct=0;Ct<Pt;Ct+=1){const Kn=Ln[Ct]||`row-${Ct}`,gr=((rt=xt.current.get(Kn))==null?void 0:rt.height)||Bt;ve[Ct+1]=(ve[Ct]||0)+Math.max(24,gr);}return ve},[Qt,Ln,Bt,Dt,Pt]),rr=Dt?Pt*Bt:lr[Pt]||0,gn=Dt?Math.max(0,Math.floor(Math.max(0,Rt-Ms)/Bt)-Vo):Math.max(0,fp(lr,Rt-Ms)-Vo),uo=Dt?Math.ceil((Rt+st+Ms)/Bt)+Vo+1:fp(lr,Rt+st+Ms)+Vo+1,Nn=Math.min(Pt,Math.max(gn+1,Math.min(uo,gn+zC))),Ka=m+I.length,zt=Dt?Math.max(m,Math.min(gn,Ka)):gn,Ga=Dt?Math.max(zt,Math.min(Nn,Ka,Pt)):Nn,Pr=Tt(()=>{if(Dt){const ve=Math.max(0,zt-m),rt=Math.max(ve,Ga-m);return I.slice(ve,rt)}return Ke.slice(gn,Nn)},[Nn,I,Ke,Dt,Ga,zt,m,gn]);it(()=>{if(!Dt||!b)return;const ve=Math.max(0,gn-Vo),rt=Math.min(Pt,Nn+Vo);b(ve,rt);},[Nn,b,Dt,gn,Pt]),it(()=>{if(Dt||!c||a||i||j||Ue)return;const ve=Math.max(0,rr-(Rt+st)),rt=Math.max(900,st*VC,Bt*80);Pt>0&&(Nn>=Pt-Vo||ve<=rt)&&(D==null||D());},[j,Nn,c,D,a,i,Ue,Bt,rr,Pt,Rt,st]);const fo=Dt?zt:gn,sn=Dt?Math.min(Pt,zt+Pr.length):Nn,Xr=Tt(()=>be==="all"?Object.entries(Re).filter(([,ve])=>ve).map(([ve])=>ve):[],[Re,be]),pr=Xr.length,Fr=be==="all"?Math.max(0,Pt-pr):mt.length,Wa=Tt(()=>{if(be!=="explicit"||!mt.length||!B||!g||!_)return;const ve=mt.map(Ct=>py(Ct)).filter(Ct=>Ct.length>0);if(!ve.length)return;const rt=Y0({extensionName:"extensionName"in g?g.extensionName:void 0,entityType:_,ids:ve,source:g,hydrateByIds:B});return ()=>rt.streamRows()},[B,_,g,mt,be]),ia=Dt?fo*Bt:lr[gn]||0,Oo=Math.max(0,rr-(Dt?sn*Bt:lr[Nn]||rr));it(()=>{!tn||!ot.length||($e([]),Be({kind:"viewer",name:"source-sort-cleared",value:l,tags:Pe}));},[Pe,$e,ot.length,tn,l]);const Gi=ve=>{if(be==="all"){gt(rt=>{const Ct={...rt};return Ct[ve]?delete Ct[ve]:Ct[ve]=true,Be({kind:"viewer",name:"selection-all-exception-toggle",value:Object.keys(Ct).length,tags:{...Pe,totalRows:Pt,rowId:ve}}),Ct}),Be({kind:"viewer",name:"selection-mode-retained-all",value:Math.max(0,Pt-1),tags:{...Pe,totalRows:Pt,rowId:ve}});return}lt(rt=>({...rt,[ve]:!rt[ve]}));},sa=()=>{if(be==="all"){if(pr>0){gt({}),Be({kind:"viewer",name:"selection-all-exceptions-cleared",value:Pt,tags:Pe});return}ge("explicit"),gt({}),Be({kind:"viewer",name:"selection-all-cleared",value:0,tags:Pe});return}if(De.length>0&&De.every(rt=>!!Re[rt])){gt({}),Be({kind:"viewer",name:"selection-explicit-visible-cleared",value:0,tags:Pe});return}ge("all"),gt({}),Be({kind:"viewer",name:"selection-explicit-promoted-all",value:Pt,tags:Pe});},Or=N1({data:Pr,columns:ce,defaultColumn:{size:160,minSize:48,maxSize:520},enableRowSelection:true,getCoreRowModel:O1(),getRowId:(ve,rt)=>So(ve,fo+rt),enableSorting:!tn,manualSorting:true,onSortingChange:$e,onRowSelectionChange:lt,state:{rowSelection:Re,sorting:ot},meta:{mediaPreview:V,setMediaPreview:ve=>{se(ve),ke(true);},rawDataPreview:Ze,setRawDataPreview:ve=>Je(ve),isAllResultRowsSelected:()=>be==="all"?De.length>0&&pr===0:De.length>0&&De.every(ve=>!!Re[ve]),isSomeResultRowsSelected:()=>be==="all"?pr>0:De.some(ve=>!!Re[ve]),toggleAllResultRowsSelected:sa,isResultRowSelected:ve=>be==="all"?!Re[ve]:!!Re[ve],toggleResultRowSelected:Gi}}),hn=Or.getRowModel().rows,Ya=Or.getVisibleLeafColumns(),ql=Ya.reduce((ve,rt)=>ve+rt.getSize(),0);it(()=>{Le.current||!hn.length||(Le.current=true,Be({kind:"viewer",name:"first-visible-rows",durationMs:ze()-Oe.current,value:hn.length,tags:{...Pe,hydratedRecords:I.length,totalRows:Pt,loadedCount:s,totalCount:l,searchDocuments:(x==null?void 0:x.length)??0,visibleRows:hn.length,loading:a}}));},[s,a,Pe,I.length,x==null?void 0:x.length,l,Pt,hn.length]),it(()=>{ee.current||a||!hn.length||(ee.current=true,Be({kind:"viewer",name:"first-interactive",durationMs:ze()-Oe.current,value:hn.length,tags:{...Pe,hydratedRecords:I.length,loadedCount:s,totalCount:l,totalRows:Pt,visibleRows:hn.length}}));},[s,a,Pe,I.length,l,Pt,hn.length]),it(()=>{if(ne.current||a||i||!hn.length)return;const ve=globalThis.setTimeout(()=>{ne.current||(ne.current=true,Be({kind:"viewer",name:"first-stable-layout",durationMs:ze()-Oe.current,value:hn.length,tags:{...Pe,hydratedRecords:I.length,loadedCount:s,totalCount:l,totalRows:Pt,visibleRows:hn.length,safeRowHeight:Bt,measuredRows:xt.current.size,virtualHeight:rr}}));},350);return ()=>globalThis.clearTimeout(ve)},[s,a,i,Pe,I.length,Bt,l,Pt,rr,hn.length]),it(()=>{Be({kind:"viewer",name:"table-hydrated-records",value:I.length,tags:Pe}),Be({kind:"viewer",name:"table-search-documents",value:(x==null?void 0:x.length)??0,tags:Pe}),Be({kind:"viewer",name:"table-result-ids",value:De.length,tags:Pe}),Be({kind:"viewer",name:"table-selected-records",value:we.length,tags:{...Pe,selectionMode:be}}),Be({kind:"viewer",name:"table-selection-exceptions",value:pr,tags:{...Pe,selectionMode:be}}),Be({kind:"viewer",name:"table-selected-result-count",value:Fr,tags:{...Pe,selectionMode:be}}),Be({kind:"viewer",name:"table-visible-rows",value:hn.length,tags:{...Pe,startIndex:gn,endIndex:Nn}});},[De.length,Nn,Pe,I.length,x==null?void 0:x.length,we.length,Fr,pr,be,gn,hn.length]),it(()=>{const ve=mn.current;if(!ve)return;const rt=ve.querySelectorAll('tr[data-vrow="1"]');if(!rt.length)return;let Ct=0,Kn=0,gr=false;rt.forEach(Un=>{if(Un instanceof HTMLTableRowElement){const Nr=Un.getBoundingClientRect().height;Ct+=Nr,Kn+=1;const or=Un.dataset.vrowKey;if(or&&Number.isFinite(Nr)&&Nr>0){const No=xt.current.get(or);!No||Math.abs(No.height-Nr)>2?(xt.current.set(or,{height:Nr,touchedAt:ze()}),tT(xt.current),gr=true):No.touchedAt=ze();}}});const Lo=Ct/Kn;Number.isFinite(Lo)&&Lo>16&&Zt(Un=>{const Nr=Math.max(24,Un*.85+Lo*.15);return Math.abs(Nr-Un)>3?Nr:Un}),gr&&(On(Un=>Un+1),Be({kind:"viewer",name:"table-row-height-cache",value:xt.current.size,tags:{...Pe,limit:Ku,measuredRows:Kn,visibleRows:hn.length}}));},[Nn,Pe,Ue,Ye,gn,hn]),it(()=>{const ve=mn.current;if(ve){if(!K.highlightTerms.length){tt.current&&(Wu(ve),tt.current=false);return}return tt.current=true,eT(ve,K.highlightTerms),()=>{Wu(ve);}}},[hn,K.highlightTerms]),it(()=>{if(!M)return;const ve=rt=>{rt.key==="Escape"&&k(false);};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[M]);const Xt=kt(""),mr=kt(null);it(()=>{!n||typeof localStorage>"u"||Kt(Id(n).length);},[n]),it(()=>{if(!n)return;if(!Ue){Xt.current="";return}const ve=[...Ye].sort().join(","),rt=`${n}::${Ue}::${ve}`;if(Xt.current===rt)return;Xt.current=rt;const Ct=()=>{const Kn=YS({scope:n,title:e,query:qt,normalized_query:Ue,searched_at_ms:Date.now(),result_count:K.totalMatches,total_records:I.length,selected_folders:Ye,lexical_expression:K.parsed.lexicalExpression,warning_messages:K.warnings});Kt(Kn.filter(gr=>gr.scope===n).length);};return typeof window<"u"&&"requestIdleCallback"in window&&typeof window.requestIdleCallback=="function"?mr.current=window.requestIdleCallback(()=>{mr.current=null,Ct();}):mr.current=window.setTimeout(()=>{mr.current=null,Ct();},160),()=>{mr.current!==null&&(typeof window<"u"&&"cancelIdleCallback"in window&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(mr.current):window.clearTimeout(mr.current),mr.current=null);}},[I.length,n,qt,K.parsed.lexicalExpression,K.totalMatches,K.warnings,Ue,Ye,e]),it(()=>{if(!M||typeof document>"u")return;const{body:ve}=document,rt=ve.style.overflow;return ve.style.overflow="hidden",()=>{ve.style.overflow=rt;}},[M]);const[Vl,Wi]=ir(),[Bn,Qr]=Ne(false),la=()=>{Wi(),c&&!Ue&&O&&!Bn&&(Qr(true),O().finally(()=>{Qr(false);}));},Lr=M?"relative flex min-h-0 grow flex-col overflow-hidden bg-base-100 text-base-content":"relative flex min-h-0 grow flex-col",ca=j==null?void 0:j.component;return d("div",{class:Lr,children:[d("section",{class:M?"sticky top-0 z-20 border-b border-base-300 bg-base-100 px-3 py-2":"sticky top-0 z-20 mb-1.5 rounded-box-half border border-base-300 bg-base-200 px-2 py-1.5",children:[d("div",{class:"flex items-center gap-2",children:[d("label",{class:"input input-bordered input-sm flex h-9 flex-1 items-center gap-2",children:[d(Cw,{size:18,class:"opacity-70"}),d("input",{type:"text",class:"grow bg-transparent text-sm",value:qt,placeholder:ie('Search with operators, phrases, and boolean logic: from:alice ("design system"~2 OR reliability)'),onInput:ve=>Mt(ve.target.value),onKeyDown:ve=>{ve.key==="Escape"&&Mt("");}}),qt?d("button",{class:"btn btn-ghost btn-xs",title:ie("Clear search"),onClick:()=>Mt(""),children:d(zs,{size:14})}):null]}),ue!=null&&ue.length?d(fg,{class:"w-56",options:ue,selected:Ye,onChange:He,placeholder:ie("Bookmark folders"),selectedSummary:ve=>ve===1?ie("1 folder selected"):ie("{{count}} folders selected",{count:ve})}):null,d("button",{class:"btn btn-ghost btn-sm",onClick:bt,title:ie("Search help"),children:d(Em,{size:18})}),Ae!=null&&Ae.length?d("div",{class:"join",children:[d("button",{class:`btn join-item btn-sm ${A==="table"?"btn-primary":"btn-ghost"}`,onClick:()=>H("table"),title:ie("Table view"),children:d(Ps,{size:16})}),Ae.map(ve=>{const rt=h&&l>cp&&ve.sourceBacked!==true&&!Ue;return d("button",{class:`btn join-item btn-sm ${A===ve.id?"btn-primary":"btn-ghost"} ${rt?"btn-disabled":""}`,onClick:()=>H(ve.id),disabled:rt,title:rt?ie("{{view}} is disabled for large source-backed result sets.",{view:ve.label}):ie(ve.label),children:ve.icon==="grid"?d(vw,{size:16}):d(Ps,{size:16})},ve.id)})]}):null,d("button",{class:"btn btn-ghost btn-sm",onClick:()=>k(ve=>!ve),title:ie(M?"Exit fullscreen":"Fullscreen"),children:M?d(dw,{size:18}):d(uw,{size:18})})]}),Ue?d("div",{class:"mt-1.5 space-y-1 text-[10px] leading-4",children:[le.phase!=="idle"?d("div",{class:`font-mono ${le.phase==="degraded"||le.phase==="failed"?"text-warning":"opacity-70"}`,children:[le.label,le.cancellable?" - cancellable on query change":""]}):null,K.parsed.lexicalExpression?d("div",{class:"font-mono opacity-70 break-all",children:["parsed: ",K.parsed.lexicalExpression]}):null,K.warningObjects.length?d("div",{class:"rounded-box-half border border-warning/40 bg-warning/10 px-2 py-1 font-mono text-warning",children:K.warningObjects.map((ve,rt)=>d("div",{children:["[",ve.code,"] ",ve.message,ve.token?` (${ve.token})`:""]},`search-warning-${rt}`))}):null]}):null,d("div",{class:"mt-1 flex min-w-0 items-center justify-between gap-3 overflow-hidden whitespace-nowrap text-[10px] leading-4 font-mono opacity-70",children:[d("span",{class:"min-w-0 flex-1 truncate",children:[j?vt!=null&&vt.primary?ie("{{view}} view - {{status}}",{view:ie(j.label),status:vt.primary}):ie("{{view}} view",{view:ie(j.label)}):a?ie("loading {{loaded}}/{{total}}",{loaded:s,total:Math.max(l,I.length)}):Ue?Te?ie("searching {{matches}}/{{total}}",{matches:K.totalMatches,total:I.length}):ie("matches {{matches}}/{{total}}",{matches:K.totalMatches,total:I.length}):c||l>I.length?ie("rows {{loaded}}/{{total}}",{loaded:I.length,total:Math.max(l,I.length)}):ie("rows {{count}}",{count:I.length}),!j&&!Ue&&i?` ${ie("buffering...")}`:""]}),d("div",{class:"flex shrink-0 items-center gap-3 overflow-hidden whitespace-nowrap",children:j?d(fr,{children:[((vt==null?void 0:vt.details)??[]).map(ve=>d("span",{class:QC(ve.minWidth),children:ve.label},ve.key)),vt!=null&&vt.actions?d("span",{class:"shrink-0",children:vt.actions}):null]}):d(fr,{children:[n?d("span",{class:"hidden lg:inline",children:ie("history {{count}}",{count:Nt})}):null,d("span",{class:"hidden md:inline",children:ie("selected {{count}} ({{mode}})",{count:Fr,mode:ie(be)})}),Xe?d("span",{class:"hidden sm:inline",children:ie("rendered {{rendered}}/{{total}} (window {{start}}-{{end}})",{rendered:hn.length,total:Pt,start:fo+1,end:sn||0})}):null]})})]})]}),d("main",{ref:At,onScroll:fn,class:"max-w-full min-h-0 grow overflow-y-auto overflow-x-auto bg-base-200 overscroll-none rounded-box-half border border-base-300",children:ca&&ft?d("div",{class:"flex h-[320px] flex-col items-center justify-center gap-3 px-4 text-center text-sm",children:[d("div",{class:"max-w-md opacity-70",children:[j==null?void 0:j.label," is available after narrowing the result set or switching back to table mode."]}),d("button",{class:"btn btn-sm btn-primary",onClick:()=>H("table"),children:[d(Ps,{size:16}),"Table"]})]}):ca?d(ca,{records:Ke,scrollParentRef:At,storageKey:`${Et}:${(j==null?void 0:j.id)||"table"}`,fullscreen:M,sourceMode:h,sourceTotalCount:l,streamSourceRows:C,mediaSourceKey:T,mediaSourceTotalCount:R,getMediaWindow:P,streamMediaRows:v,onDiagnosticsChange:Fe,onOpenMedia:ve=>{se(ve),ke(true);}}):d(fr,{children:[d("table",{class:"table table-fixed table-pin-rows table-border-bc table-padding-sm",style:{width:`max(${ql}px, 100%)`},children:[d("colgroup",{children:Ya.map(ve=>d("col",{style:{width:`${ve.getSize()}px`}},ve.id))}),d("thead",{children:Or.getHeaderGroups().map(ve=>d("tr",{children:ve.headers.map(rt=>d("th",{className:rt.column.getCanSort()?"cursor-pointer select-none":"",onClick:rt.column.getToggleSortingHandler(),children:[Wh(rt.column.columnDef.header,rt.getContext()),rt.column.getIsSorted()==="asc"&&d(Mw,{size:15,class:"inline align-top ml-1"}),rt.column.getIsSorted()==="desc"&&d(Rw,{size:15,class:"inline align-top ml-1"})]},rt.id))},ve.id))}),d("tbody",{ref:mn,children:[ia>0?d("tr",{"aria-hidden":"true",children:d("td",{colSpan:Math.max(1,Or.getVisibleFlatColumns().length),style:{height:`${ia}px`,padding:0,border:0}})}):null,hn.map((ve,rt)=>d("tr",{"data-vrow":"1","data-vrow-key":Ln[Dt?Math.max(0,fo-m)+rt:fo+rt]||ve.id,children:ve.getVisibleCells().map(Ct=>d("td",{children:Wh(Ct.column.columnDef.cell,Ct.getContext())},Ct.id))},ve.id)),Oo>0?d("tr",{"aria-hidden":"true",children:d("td",{colSpan:Math.max(1,Or.getVisibleFlatColumns().length),style:{height:`${Oo}px`,padding:0,border:0}})}):null]})]}),Pr.length>0?null:d("div",{class:"flex items-center justify-center h-[320px] w-full",children:d("p",{class:"text-base-content text-opacity-50",children:ie("No data available.")})})]})}),d("div",{class:"flex mt-1.5 items-center gap-2 border-t border-base-300 px-2 py-1.5",children:[fe?d("button",{class:"btn btn-sm btn-neutral btn-ghost",onClick:he,children:ie("Clear")}):null,d("span",{class:"flex-grow"}),me==null?void 0:me(Or,{loading:a,loadingMore:i,loadedCount:s,totalCount:l,resultRecords:Dt?Pr:Ke,visibleRecords:Pr}),d("button",{class:"btn btn-sm btn-primary",onClick:la,disabled:a,title:Bn?ie("Export menu is open while remaining rows load in the background."):a?ie("Wait for records to finish loading before exporting."):Dt&&C?ie("Exports stream from the active source without loading all rows into the table."):c&&!Ue?ie("Opens immediately and loads remaining rows in the background."):void 0,children:[Bn?d("span",{class:"loading loading-spinner"}):null,ie("Export Data")]})]}),V&&!_e?d("aside",{class:"absolute right-2 bottom-14 z-[2] w-56 rounded-box-half border border-base-300 bg-base-100 shadow-lg",children:[d("header",{class:"flex items-center justify-between border-b border-base-300 px-2 py-1 text-xs font-semibold",children:[d("span",{children:ie("Media View")}),d("div",{class:"flex items-center gap-1",children:[d("button",{class:"btn btn-ghost btn-xs",onClick:()=>ke(true),children:"Open"}),d("button",{class:"btn btn-ghost btn-xs",onClick:()=>se(""),children:d(zs,{size:12})})]})]}),d("div",{class:"h-36 overflow-hidden bg-base-200",children:V.includes(".mp4")?d("video",{controls:true,class:"h-full w-full object-contain",src:V}):d("img",{class:"h-full w-full object-contain",src:V})})]}):null,d(sr,{title:ie("JSON View"),class:"max-w-xl",show:!!Ze,onClose:()=>Je(null),children:d("main",{class:"max-w-full max-h-[500px] overflow-scroll overscroll-none",children:typeof Ze=="string"?d("p",{class:"whitespace-pre-wrap",children:Ze}):d("pre",{class:"text-xs leading-none",children:JSON.stringify(Ze,null,2)})})}),d(sr,{title:ie("Media View"),class:"max-w-xl",show:_e&&!!V,onClose:()=>ke(false),children:d("main",{class:"max-w-full",children:V.includes(".mp4")?d("video",{controls:true,class:"w-full max-h-[400px] object-contain",src:V}):d("img",{class:"w-full max-h-[400px] object-contain",src:V})})}),d(sr,{title:ie("Search Operators"),class:"max-w-2xl max-h-[calc(100vh-2rem)] overflow-hidden",show:Me,onClose:bt,children:d("div",{class:"min-h-0 grow overflow-y-auto pr-1 text-sm leading-6",children:[d("p",{class:"mb-2",children:[ie("Query semantics now follow recorder-style precedence:")," ",d("code",{class:"ml-1",children:"NOT"}),",",d("code",{class:"ml-1",children:"AND"}),",",d("code",{class:"ml-1",children:"OR"}),", ",ie("with implicit")," ",d("code",{class:"ml-1",children:"AND"})," ",ie("between adjacent terms.")]}),d("div",{class:"grid gap-3 md:grid-cols-2",children:Yt.map(([ve,rt])=>d("section",{class:"rounded-box-half border border-base-300 bg-base-200/70 p-3",children:[d("h4",{class:"mb-2 text-xs font-semibold uppercase tracking-[0.08em] opacity-70",children:ie(`search.category.${ve}`)}),d("div",{class:"space-y-2",children:rt.map(Ct=>d("div",{class:"text-xs",children:[d("div",{class:"font-mono text-[11px] text-info",children:Ct.syntax}),d("div",{children:ie(Ct.description)}),d("div",{class:"font-mono opacity-70",children:Ct.examples.join(" | ")})]},`${ve}-${Ct.syntax}`))})]},ve))})]})}),d(W1,{title:e,columns:ce,resultRecords:Dt?Pr:Ke,resultCount:Dt?Pt:Ke.length,streamResultRecords:Dt?C:It,selectedRecords:we,selectedRecordCount:be==="explicit"?mt.length:void 0,streamSelectedRecords:Wa,selectionExcludedRecordIds:Xr,resultSetSnapshot:$t,selectionMode:be,preparingFullDataset:Bn,show:Vl,onClose:Wi}),z==null?void 0:z(Or,{resultSetSnapshot:$t,resultRecords:Dt?Pr:Ke,selectedRecords:we,selectionMode:be,selectionExcludedRecordIds:Xr})]})}const dn=Ed(),hp=new WeakMap;function qn(e){var a;const t=hp.get(e);if(t)return t;const n=(()=>{const i=e,s=i.__bookmark_folder_name_source,l=i.__bookmark_folder_name;return s==="api"&&typeof l=="string"&&l.trim()?l:null})(),r=(()=>{const i=e.__bookmark_folder_id;return typeof i=="string"&&i.trim()?i:null})(),o={createdAtMs:typeof((a=e.twe_private_fields)==null?void 0:a.created_at)=="number"?e.twe_private_fields.created_at:Qo(e),fullText:Il(e),media:lo(e),mediaTags:Pk(e),retweetedTweet:Va(e),quotedTweet:yd(e),bookmarkFolderName:n,bookmarkFolderId:r};return hp.set(e,o),o}const nT=e=>{const t=qn(e).retweetedTweet;return t?Rl(t):null},rT=e=>{const t=qn(e).quotedTweet;return t?Rl(t):null},pp=e=>qn(e).bookmarkFolderName,mp=e=>qn(e).bookmarkFolderId,Vy=[dn.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>{var t,n,r,o;return d("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:((n=(t=e.options.meta)==null?void 0:t.isAllResultRowsSelected)==null?void 0:n.call(t))??e.getIsAllRowsSelected(),indeterminate:((o=(r=e.options.meta)==null?void 0:r.isSomeResultRowsSelected)==null?void 0:o.call(r))??e.getIsSomeRowsSelected(),onChange:()=>{var a;if((a=e.options.meta)!=null&&a.toggleAllResultRowsSelected){e.options.meta.toggleAllResultRowsSelected();return}e.toggleAllRowsSelected();}})},cell:({row:e,table:t})=>{var n,r;return d("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:((r=(n=t.options.meta)==null?void 0:n.isResultRowSelected)==null?void 0:r.call(n,e.id))??e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:()=>{var o;if((o=t.options.meta)!=null&&o.toggleResultRowSelected){t.options.meta.toggleResultRowSelected(e.id);return}e.toggleSelected();}})}}),dn.accessor("rest_id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>d(pt,{i18nKey:"ID"}),cell:e=>d("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),dn.accessor(e=>qn(e).createdAtMs,{id:"created_at",size:136,minSize:128,meta:{exportKey:"created_at",exportHeader:"Date",exportValue:e=>Ir(qn(e.original).createdAtMs,ut.get("dateTimeFormat"))},header:()=>d(pt,{i18nKey:"Date"}),cell:e=>d("p",{class:"w-24",children:d("a",{class:"link",target:"_blank",href:Go(e.row.original),children:Ir(e.getValue(),ut.get("dateTimeFormat"))})})}),dn.accessor("legacy.full_text",{size:360,minSize:280,maxSize:520,meta:{exportKey:"full_text",exportHeader:"Content",exportValue:e=>qn(e.original).fullText},header:()=>d(pt,{i18nKey:"Content"}),cell:e=>{var t,n,r,o;return d("div",{children:[d("p",{class:"w-60 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:tl(qn(e.row.original).fullText,[...((n=(t=e.row.original.legacy)==null?void 0:t.entities)==null?void 0:n.urls)??[],...((o=(r=e.row.original.legacy)==null?void 0:r.entities)==null?void 0:o.media)??[]])}}),e.row.original.note_tweet&&d("button",{class:"link",onClick:()=>{var a;return (a=e.table.options.meta)==null?void 0:a.setRawDataPreview(qn(e.row.original).fullText)},children:[">>"," ",d(pt,{i18nKey:"Show Full Text"})]})]})}}),dn.accessor(e=>qn(e).media.length,{id:"media",size:176,minSize:136,meta:{exportKey:"media",exportHeader:"Media",exportValue:e=>qn(e.original).media.map(t=>({type:t.type,url:t.url,thumbnail:Ua(t.media_url_https,"thumb"),original:Zo(t),ext_alt_text:t.ext_alt_text}))},header:()=>d(pt,{i18nKey:"Media"}),cell:e=>d(hg,{data:qn(e.row.original).media,onClick:t=>{var n;return (n=e.table.options.meta)==null?void 0:n.setMediaPreview(Zo(t))}})}),dn.accessor("core.user_results.result.core.screen_name",{size:144,minSize:120,meta:{exportKey:"screen_name",exportHeader:"Screen Name"},header:()=>d(pt,{i18nKey:"Screen Name"}),cell:e=>d("p",{class:"whitespace-pre",children:d("a",{class:"link",target:"_blank",href:vi(e.row.original.core.user_results.result),children:["@",e.getValue()]})})}),dn.accessor("core.user_results.result.core.name",{size:184,minSize:144,meta:{exportKey:"name",exportHeader:"Profile Name"},header:()=>d(pt,{i18nKey:"Profile Name"}),cell:e=>d("p",{class:"w-32",children:e.getValue()})}),dn.accessor("core.user_results.result.avatar.image_url",{size:96,minSize:84,meta:{exportKey:"profile_image_url",exportHeader:"Profile Image"},header:()=>d(pt,{i18nKey:"Profile Image"}),cell:e=>d("div",{class:"cursor-pointer",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(_d(e.getValue()))},children:d("img",{class:"w-12 h-12 rounded",src:e.getValue(),loading:"lazy",decoding:"async"})})}),dn.accessor("core.user_results.result.rest_id",{size:112,minSize:112,meta:{exportKey:"user_id",exportHeader:"User ID"},header:()=>d(pt,{i18nKey:"User ID"}),cell:e=>d("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),dn.accessor("legacy.in_reply_to_screen_name",{size:144,minSize:120,meta:{exportKey:"in_reply_to",exportHeader:"Replying To",exportValue:e=>e.original.legacy.in_reply_to_status_id_str},header:()=>d(pt,{i18nKey:"Replying To"}),cell:e=>d("p",{class:"whitespace-pre",children:e.row.original.legacy.in_reply_to_status_id_str?d("a",{class:"link",target:"_blank",href:Ok(e.row.original),children:["@",e.getValue()]}):"N/A"})}),dn.accessor(nT,{id:"rt_source",size:144,minSize:120,meta:{exportKey:"retweeted_status",exportHeader:"RT Source",exportValue:e=>{var t;return (t=Va(e.original))==null?void 0:t.rest_id}},header:()=>d(pt,{i18nKey:"RT Source"}),cell:e=>{const t=qn(e.row.original).retweetedTweet;return d("p",{class:"whitespace-pre",children:t?d("a",{class:"link",target:"_blank",href:Go(t),children:["@",e.getValue()]}):"N/A"})}}),dn.accessor(rT,{id:"quote_source",size:144,minSize:120,meta:{exportKey:"quoted_status",exportHeader:"Quote Source",exportValue:e=>{var t;return (t=yd(e.original))==null?void 0:t.rest_id}},header:()=>d(pt,{i18nKey:"Quote Source"}),cell:e=>{const t=qn(e.row.original).quotedTweet;return d("p",{class:"whitespace-pre",children:t?d("a",{class:"link",target:"_blank",href:Go(t),children:["@",e.getValue()]}):"N/A"})}}),dn.display({id:"media_tags",size:184,minSize:144,meta:{exportKey:"media_tags",exportHeader:"Media Tags",exportValue:e=>qn(e.original).mediaTags},header:()=>d(pt,{i18nKey:"Media Tags"}),cell:e=>d("p",{children:qn(e.row.original).mediaTags.length?qn(e.row.original).mediaTags.map(t=>d("a",{class:"link inline-block",target:"_blank",href:vi(t.screen_name),children:["@",t.screen_name]})):"N/A"})}),dn.accessor("legacy.favorite_count",{size:96,minSize:88,meta:{exportKey:"favorite_count",exportHeader:"Favorites"},header:()=>d(pt,{i18nKey:"Favorites"}),cell:e=>d("p",{children:e.getValue()})}),dn.accessor("legacy.retweet_count",{size:96,minSize:88,meta:{exportKey:"retweet_count",exportHeader:"Retweets"},header:()=>d(pt,{i18nKey:"Retweets"}),cell:e=>d("p",{children:e.getValue()})}),dn.accessor("legacy.bookmark_count",{size:104,minSize:96,meta:{exportKey:"bookmark_count",exportHeader:"Bookmarks"},header:()=>d(pt,{i18nKey:"Bookmarks"}),cell:e=>d("p",{children:e.getValue()})}),dn.accessor("legacy.quote_count",{size:88,minSize:80,meta:{exportKey:"quote_count",exportHeader:"Quotes"},header:()=>d(pt,{i18nKey:"Quotes"}),cell:e=>d("p",{children:e.getValue()})}),dn.accessor("legacy.reply_count",{size:88,minSize:80,meta:{exportKey:"reply_count",exportHeader:"Replies"},header:()=>d(pt,{i18nKey:"Replies"}),cell:e=>d("p",{children:e.getValue()})}),dn.accessor("views.count",{size:88,minSize:80,meta:{exportKey:"views_count",exportHeader:"Views",exportValue:e=>{var t;return typeof((t=e.original.views)==null?void 0:t.count)>"u"?null:+e.original.views.count}},header:()=>d(pt,{i18nKey:"Views"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),dn.accessor("legacy.favorited",{size:104,minSize:96,meta:{exportKey:"favorited",exportHeader:"Favorited"},header:()=>d(pt,{i18nKey:"Favorited"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),dn.accessor("legacy.retweeted",{size:104,minSize:96,meta:{exportKey:"retweeted",exportHeader:"Retweeted"},header:()=>d(pt,{i18nKey:"Retweeted"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),dn.accessor("legacy.bookmarked",{size:112,minSize:104,meta:{exportKey:"bookmarked",exportHeader:"Bookmarked"},header:()=>d(pt,{i18nKey:"Bookmarked"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),dn.accessor(pp,{id:"bookmark_folder_name",size:184,minSize:152,meta:{exportKey:"bookmark_folder_name",exportHeader:"Bookmark Folder",exportValue:e=>pp(e.original)},header:()=>d(pt,{i18nKey:"Bookmark Folder"}),cell:e=>{const t=e.getValue();return t?d("p",{class:"w-36 truncate",title:String(t),children:t}):d("p",{class:"text-gray-400",children:"—"})}}),dn.accessor(mp,{id:"bookmark_folder_id",size:168,minSize:144,meta:{exportKey:"bookmark_folder_id",exportHeader:"Bookmark Folder ID",exportValue:e=>mp(e.original)},header:()=>d("span",{children:"Bookmark Folder ID"}),cell:e=>{const t=e.getValue();return t?d("p",{class:"w-32 break-all font-mono text-xs",children:t}):d("p",{class:"text-gray-400",children:"—"})}}),dn.display({id:"url",size:64,minSize:56,maxSize:72,meta:{exportKey:"url",exportHeader:"URL",exportValue:e=>Go(e.original)},header:()=>d(pt,{i18nKey:"URL"}),cell:e=>d("a",{href:Go(e.row.original),target:"_blank",children:d(Am,{})})}),dn.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>d(pt,{i18nKey:"Actions"}),cell:e=>d("div",{class:"flex flex-row items-start space-x-1",children:d("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:d(pt,{i18nKey:"Details"})})})})],ln=Ed(),zy=[ln.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>{var t,n,r,o;return d("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:((n=(t=e.options.meta)==null?void 0:t.isAllResultRowsSelected)==null?void 0:n.call(t))??e.getIsAllRowsSelected(),indeterminate:((o=(r=e.options.meta)==null?void 0:r.isSomeResultRowsSelected)==null?void 0:o.call(r))??e.getIsSomeRowsSelected(),onChange:()=>{var a;if((a=e.options.meta)!=null&&a.toggleAllResultRowsSelected){e.options.meta.toggleAllResultRowsSelected();return}e.toggleAllRowsSelected();}})},cell:({row:e,table:t})=>{var n,r;return d("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:((r=(n=t.options.meta)==null?void 0:n.isResultRowSelected)==null?void 0:r.call(n,e.id))??e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:()=>{var o;if((o=t.options.meta)!=null&&o.toggleResultRowSelected){t.options.meta.toggleResultRowSelected(e.id);return}e.toggleSelected();}})}}),ln.accessor("rest_id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>d(pt,{i18nKey:"ID"}),cell:e=>d("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),ln.accessor("core.screen_name",{size:144,minSize:120,meta:{exportKey:"screen_name",exportHeader:"Screen Name"},header:()=>d(pt,{i18nKey:"Screen Name"}),cell:e=>d("p",{class:"whitespace-pre",children:d("a",{class:"link",target:"_blank",href:vi(e.row.original),children:["@",e.getValue()]})})}),ln.accessor("core.name",{size:184,minSize:144,meta:{exportKey:"name",exportHeader:"Profile Name"},header:()=>d(pt,{i18nKey:"Profile Name"}),cell:e=>d("p",{class:"w-32",children:e.getValue()})}),ln.accessor("legacy.description",{size:336,minSize:260,maxSize:520,meta:{exportKey:"description",exportHeader:"Description"},header:()=>d(pt,{i18nKey:"Description"}),cell:e=>{var t;return d("p",{class:"w-52 break-words",dangerouslySetInnerHTML:{__html:tl(e.row.original.legacy.description||"N/A",(t=e.row.original.legacy.entities)==null?void 0:t.description.urls)}})}}),ln.accessor("avatar.image_url",{size:104,minSize:92,meta:{exportKey:"profile_image_url",exportHeader:"Profile Image"},header:()=>d(pt,{i18nKey:"Profile Image"}),cell:e=>d("div",{class:"cursor-pointer",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(_d(e.getValue()))},children:d("img",{class:"w-12 h-12 rounded",src:e.getValue(),loading:"lazy",decoding:"async"})})}),ln.accessor("legacy.profile_banner_url",{size:184,minSize:160,meta:{exportKey:"profile_banner_url",exportHeader:"Profile Banner"},header:()=>d(pt,{i18nKey:"Profile Banner"}),cell:e=>d("div",{class:"cursor-pointer w-36 h-12",onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setMediaPreview(e.getValue()??"")},children:e.getValue()?d("img",{class:"w-auto h-12 rounded",src:`${e.getValue()}/600x200`,loading:"lazy",decoding:"async"}):d("span",{class:"leading-[48px]",children:"N/A"})})}),ln.accessor("legacy.followers_count",{size:104,minSize:96,meta:{exportKey:"followers_count",exportHeader:"Followers"},header:()=>d(pt,{i18nKey:"Followers"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("legacy.friends_count",{size:120,minSize:104,meta:{exportKey:"friends_count",exportHeader:"FollowingCount"},header:()=>d(pt,{i18nKey:"FollowingCount"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("legacy.statuses_count",{size:104,minSize:96,meta:{exportKey:"statuses_count",exportHeader:"Statuses"},header:()=>d(pt,{i18nKey:"Statuses"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("legacy.favourites_count",{size:112,minSize:104,meta:{exportKey:"favourites_count",exportHeader:"Favourites"},header:()=>d(pt,{i18nKey:"Favourites"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("legacy.listed_count",{size:88,minSize:80,meta:{exportKey:"listed_count",exportHeader:"Listed"},header:()=>d(pt,{i18nKey:"Listed"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("location.location",{size:176,minSize:136,meta:{exportKey:"location",exportHeader:"Location"},header:()=>d(pt,{i18nKey:"Location"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("legacy.url",{size:220,minSize:160,meta:{exportKey:"website",exportHeader:"Website"},header:()=>d(pt,{i18nKey:"Website"}),cell:e=>{var t,n;return d("p",{dangerouslySetInnerHTML:{__html:tl(e.row.original.legacy.url||"N/A",(n=(t=e.row.original.legacy.entities)==null?void 0:t.url)==null?void 0:n.urls)}})}}),ln.accessor("legacy_extended_profile.birthdate",{size:120,minSize:104,meta:{exportKey:"birthdate",exportHeader:"Birthdate",exportValue:e=>{var t;return Bf((t=e.original.legacy_extended_profile)==null?void 0:t.birthdate)}},header:()=>d(pt,{i18nKey:"Birthdate"}),cell:e=>d("p",{children:Bf(e.getValue())??"N/A"})}),ln.accessor("verification.verified_type",{size:128,minSize:112,meta:{exportKey:"verified_type",exportHeader:"Verified Type"},header:()=>d(pt,{i18nKey:"Verified Type"}),cell:e=>d("p",{children:e.getValue()??"N/A"})}),ln.accessor("is_blue_verified",{size:128,minSize:112,meta:{exportKey:"is_blue_verified",exportHeader:"Blue Verified"},header:()=>d(pt,{i18nKey:"Blue Verified"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),ln.accessor("relationship_perspectives.following",{size:112,minSize:104,meta:{exportKey:"following",exportHeader:"Following"},header:()=>d(pt,{i18nKey:"Following"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),ln.accessor("relationship_perspectives.followed_by",{size:112,minSize:104,meta:{exportKey:"followed_by",exportHeader:"Follows You"},header:()=>d(pt,{i18nKey:"Follows You"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),ln.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.relation_types)==null?void 0:n.join(", "))||""},{id:"relation_types",size:160,minSize:128,meta:{exportKey:"relation_types",exportHeader:"Relation Types"},header:()=>d(pt,{i18nKey:"Relation Types"}),cell:e=>d("p",{children:e.getValue()||"N/A"})}),ln.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.subject_screen_names)==null?void 0:n.join(", "))||""},{id:"subject_screen_names",size:192,minSize:160,meta:{exportKey:"subject_screen_names",exportHeader:"Subject Accounts"},header:()=>d(pt,{i18nKey:"Subject Accounts"}),cell:e=>d("p",{class:"w-40 break-words",children:e.getValue()||"N/A"})}),ln.accessor(e=>{var t,n;return ((n=(t=e.twe_relationship_fields)==null?void 0:t.subject_user_ids)==null?void 0:n.join(", "))||""},{id:"subject_user_ids",size:152,minSize:136,meta:{exportKey:"subject_user_ids",exportHeader:"Subject User IDs"},header:()=>d(pt,{i18nKey:"Subject User IDs"}),cell:e=>d("p",{class:"w-28 break-all font-mono text-xs",children:e.getValue()||"N/A"})}),ln.accessor(e=>{var t;return ((t=e.twe_relationship_fields)==null?void 0:t.last_observed_at)||0},{id:"last_observed_at",size:136,minSize:128,meta:{exportKey:"last_observed_at",exportHeader:"Last Observed At",exportValue:e=>{var t;return (t=e.original.twe_relationship_fields)!=null&&t.last_observed_at?Ir(e.original.twe_relationship_fields.last_observed_at,ut.get("dateTimeFormat")):""}},header:()=>d(pt,{i18nKey:"Last Observed At"}),cell:e=>d("p",{class:"w-24",children:e.getValue()?Ir(e.getValue(),ut.get("dateTimeFormat")):"N/A"})}),ln.accessor("dm_permissions.can_dm",{size:88,minSize:80,meta:{exportKey:"can_dm",exportHeader:"Can DM"},header:()=>d(pt,{i18nKey:"Can DM"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),ln.accessor("privacy.protected",{size:104,minSize:96,meta:{exportKey:"protected",exportHeader:"Protected"},header:()=>d(pt,{i18nKey:"Protected"}),cell:e=>d("p",{children:e.getValue()?"YES":"NO"})}),ln.accessor(e=>+Na(e.core.created_at),{id:"created_at",size:136,minSize:128,meta:{exportKey:"created_at",exportHeader:"Created At",exportValue:e=>Ir(Na(e.original.core.created_at),ut.get("dateTimeFormat"))},header:()=>d(pt,{i18nKey:"Created At"}),cell:e=>d("p",{class:"w-24",children:e.getValue()?Ir(e.getValue(),ut.get("dateTimeFormat")):"N/A"})}),ln.display({id:"url",size:64,minSize:56,maxSize:72,meta:{exportKey:"url",exportHeader:"URL",exportValue:e=>vi(e.original)},header:()=>d(pt,{i18nKey:"URL"}),cell:e=>d("a",{href:vi(e.row.original),target:"_blank",children:d(Am,{})})}),ln.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>d(pt,{i18nKey:"Actions"}),cell:e=>d("div",{class:"flex flex-row items-start space-x-1",children:d("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:d(pt,{i18nKey:"Details"})})})})],ci=42,oT=24,aT=900,iT=320,sT=264,lT=228,cT=196,uT=16,dT=14,gp=360,fT=48,hT=160,pT=42,Rs=144,mT=8,mi=new Map;function yp(e){return mi.get(e)??null}function Jc(e,t){var r;if(t.updatedAt=Date.now(),mi.set(e,t),mi.size<=mT)return;const n=(r=[...mi.entries()].sort((o,a)=>o[1].updatedAt-a[1].updatedAt)[0])==null?void 0:r[0];n&&mi.delete(n);}function _p(e){return {items:[],nextRowIndex:0,scannedRows:0,exhausted:false,totalCount:e,updatedAt:Date.now()}}function gT(e){return Va(e)?[]:lo(e).filter(n=>n.type==="photo"||n.type==="video"||n.type==="animated_gif")}function yT(e){const t=e;return t.__bookmark_folder_name_source==="api"&&typeof t.__bookmark_folder_name=="string"?t.__bookmark_folder_name.trim():""}function _T(e){return e.type==="photo"?Ua(e.media_url_https,"large"):Ua(e.media_url_https,"medium")}function wT(e){var r,o,a,i,s,l,c,h,f,m;const t=((r=e.original_info)==null?void 0:r.width)||((a=(o=e.sizes)==null?void 0:o.large)==null?void 0:a.w)||((s=(i=e.sizes)==null?void 0:i.medium)==null?void 0:s.w)||1,n=((l=e.original_info)==null?void 0:l.height)||((h=(c=e.sizes)==null?void 0:c.large)==null?void 0:h.h)||((m=(f=e.sizes)==null?void 0:f.medium)==null?void 0:m.h)||1;return Math.max(.56,Math.min(1.8,t/n))}function bT(e,t){if(!e.trim())return 0;const n=t==="compact"?34:42;return Math.max(1,Math.min(t==="compact"?3:4,Math.ceil(e.trim().length/n)))}function vT(e,t,n){const r=t/Math.max(.56,e.aspectRatio||1),a=bT(e.fullText,n)*20,i=n==="compact"?96:108,s=34,l=e.bookmarkFolderName?22:0,c=e.durationLabel?4:0,h=n==="compact"?24:30;return r+i+s+l+a+c+h}function kT(e,t,n,r){const o=Math.max(1,t),a=Array.from({length:o},()=>({items:[],estimatedHeight:0}));for(const i of e){let s=0;for(let l=1;l<a.length;l+=1)a[l].estimatedHeight<a[s].estimatedHeight&&(s=l);a[s].items.push(i),a[s].estimatedHeight+=vT(i,n,r);}return a}function eu(e){const t=gT(e);if(!t.length)return [];const n=Rl(e),r=Il(e).trim(),o=Ir(Qo(e),ut.get("dateTimeFormat")),a=Go(e),i=yT(e);return t.map((s,l)=>{var c,h,f,m,g;return {id:`${e.rest_id}:${s.media_key||s.id_str||l}`,tweet:e,media:s,screenName:n,fullText:r,createdAtLabel:o,tweetUrl:a,previewUrl:_T(s),originalUrl:Zo(s),aspectRatio:wT(s),bookmarkFolderName:i,favoriteCount:Number(((c=e.legacy)==null?void 0:c.favorite_count)||0),retweetCount:Number(((h=e.legacy)==null?void 0:h.retweet_count)||0),bookmarkCount:Number(((f=e.legacy)==null?void 0:f.bookmark_count)||0),replyCount:Number(((m=e.legacy)==null?void 0:m.reply_count)||0),durationLabel:s.type==="photo"?"":Xm((g=s.video_info)==null?void 0:g.duration_millis)}})}function Ky({records:e,scrollParentRef:t,onOpenMedia:n,storageKey:r,fullscreen:o,sourceMode:a,sourceTotalCount:i=0,streamSourceRows:s,mediaSourceKey:l,mediaSourceTotalCount:c,getMediaWindow:h,streamMediaRows:f,onDiagnosticsChange:m}){var ot;const{t:g}=Qn(),_=kt(null),b=kt(""),C=kt(null),v=kt(0),T=kt(false),R=kt(false),P=kt(0),L=kt([]),D=kt(""),[O,B]=Ne(ci),[I,x]=Ne("comfortable"),[F,U]=Ne(0),[Ce,X]=Ne([]),[re,Z]=Ne(0),[ce,he]=Ne(false),[fe,me]=Ne(false),z=f??s,ue=c??i,Ae=Tt(()=>[r||"media-masonry",l||"stream-source",i].join(":"),[l,i,r]),ie=!!(a&&(h||z));it(()=>{try{if(typeof localStorage>"u"||!r)return;const $e=localStorage.getItem(`${r}:density`);($e==="compact"||$e==="comfortable")&&x($e);}catch{}},[r]),it(()=>{try{if(typeof localStorage>"u"||!r)return;localStorage.setItem(`${r}:density`,I);}catch{}},[I,r]);const Oe=Tt(()=>e.flatMap($e=>eu($e)),[e]),Le=ie?Ce:Oe;it(()=>{L.current=Ce;},[Ce]);const ee=async $e=>{if(!ie||!z&&!h||T.current||R.current||L.current.length>=$e)return;T.current=true,he(true);const be=v.current,ge=P.current,M=D.current||Ae,k=yp(M)??_p(ue);let A=0,H=0;try{const K=[];if(h)for(;L.current.length+K.length<$e&&A<gp&&!k.exhausted;){if(v.current!==be)return;const Te=k.nextRowIndex<=0?fT:hT,le=await h(k.nextRowIndex,Te);if(v.current!==be)return;A+=le.rows.length,k.nextRowIndex+=le.rows.length,P.current=Math.max(P.current,k.nextRowIndex),Z(P.current);for(const Ke of le.rows){const De=eu(Ke);De.length&&(K.push(...De),H+=De.length);}if(k.totalCount=le.totalCount||ue,!le.hasAfter||!le.rows.length){k.exhausted=!0,R.current=!0,me(!0);break}}else if(z){const Te=C.current??z()[Symbol.asyncIterator]();for(C.current=Te;L.current.length+K.length<$e&&A<gp;){if(v.current!==be)return;const le=await Te.next();if(v.current!==be)return;if(le.done){k.exhausted=!0,R.current=!0,me(!0);break}A+=1,k.nextRowIndex+=1,P.current+=1,A%12===0&&Z(P.current);const Ke=eu(le.value);Ke.length&&(K.push(...Ke),H+=Ke.length);}}K.length?X(Te=>{if(v.current!==be)return Te;const le=new Set(Te.map(lt=>lt.id)),Ke=K.filter(lt=>le.has(lt.id)?!1:(le.add(lt.id),!0));if(!Ke.length)return Te;const De=[...Te,...Ke];return k.items=De,k.scannedRows=P.current,k.exhausted=R.current,Jc(M,k),L.current=De,De}):(k.items=L.current,k.scannedRows=P.current,k.exhausted=R.current,Jc(M,k));}finally{v.current===be&&(T.current=false,Z(P.current),he(false)),Be({kind:"viewer",name:"media-source-scan",value:H,tags:{scannedRows:A,scannedRowsTotal:P.current,scannedRowsBefore:ge,mediaItems:L.current.length+H,targetMediaCount:$e,exhausted:R.current,sourceTotalCount:ue,windowBacked:!!h}});}};it(()=>{if(v.current+=1,C.current=null,T.current=false,he(false),D.current=Ae,!ie){R.current=false,P.current=0,L.current=[],X([]),Z(0),me(false);return}const $e=yp(Ae);if($e){R.current=$e.exhausted,P.current=$e.scannedRows,L.current=$e.items,X($e.items),Z($e.scannedRows),me($e.exhausted);return}const be=_p(ue);Jc(Ae,be),R.current=false,P.current=0,L.current=[],X([]),Z(0),me(false);},[ue,Ae,ie]),it(()=>{ie&&ee(pT);},[ue,Ae,Ce.length,ie]);const ne=((ot=Le[0])==null?void 0:ot.id)||"";it(()=>{B($e=>b.current!==ne?(b.current=ne,Math.min(ci,Math.max(0,Le.length))):Le.length<=ci?Math.min(ci,Math.max(0,Le.length)):$e>Le.length?Le.length:Math.max($e,Math.min(ci,Le.length)));},[ne,Le.length]),it(()=>{const $e=t.current;if(!$e)return;const be=()=>{if($e.scrollHeight-($e.scrollTop+$e.clientHeight)<=aT){const M=Math.min(Le.length,O+oT);B(M),ie&&!fe&&Le.length<=M+Rs&&ee(M+Rs);}};return be(),$e.addEventListener("scroll",be,{passive:true}),()=>$e.removeEventListener("scroll",be)},[Le.length,t,fe,ie,O]),it(()=>{!ie||fe||Le.length<=O+Rs&&ee(O+Rs);},[Le.length,fe,ie,O]),Fw(()=>{const $e=_.current,be=t.current;if(!$e&&!be)return;const ge=()=>{const k=($e==null?void 0:$e.clientWidth)||0,A=(be==null?void 0:be.clientWidth)||0;U(Math.max(k,A,0));};ge();const M=new ResizeObserver(()=>ge());return $e&&M.observe($e),be&&be!==$e&&M.observe(be),()=>M.disconnect()},[t]);const V=Le.slice(0,O),se=I==="compact"?dT:uT,_e=!o,ke=I==="compact"?_e?cT:sT:_e?lT:iT,Ze=Math.max(1,F?Math.floor((F+se)/(ke+se)):1),Je=!o&&F>=520?2:1,bt=Math.max(Je,Math.min(o?6:4,Ze)),Nt=F>0?(F-se*Math.max(0,bt-1))/bt:ke,Kt=Tt(()=>kT(V,bt,Nt,I),[bt,Nt,I,V]),qt=V.length,Mt=qt?1:0,Ue=ce?"loading":fe?"complete":"idle",Ye=ue||"?",wt=ie?ce?g("loading source {{scanned}}/{{total}}",{scanned:re,total:Ye}):g("source {{status}} {{scanned}}/{{total}}",{status:g(Ue),scanned:re,total:Ye}):g("media {{count}}",{count:Le.length}),Re=Tt(()=>d("div",{class:"join",children:[d("button",{class:`btn join-item btn-xs ${I==="comfortable"?"btn-primary":"btn-ghost"}`,onClick:()=>x("comfortable"),title:g("Comfortable density"),children:d(Ps,{size:14})}),d("button",{class:`btn join-item btn-xs ${I==="compact"?"btn-primary":"btn-ghost"}`,onClick:()=>x("compact"),title:g("Compact density"),children:d(bw,{size:14})})]}),[I,g]),gt=Tt(()=>({primary:wt,details:[{key:"rendered",label:g("rendered {{rendered}}/{{total}} (window {{start}}-{{end}})",{rendered:V.length,total:Le.length,start:Mt,end:qt}),minWidth:"sm"},{key:"loaded-media",label:g("loaded media {{count}}",{count:Le.length}),minWidth:"md"},{key:"source-rows",label:ie?g("source rows {{scanned}}/{{total}} {{status}}",{scanned:re,total:Ye,status:g(Ue)}):g("source rows {{count}}",{count:e.length}),minWidth:"lg"},{key:"layout",label:g("layout {{columns}} cols @ {{width}}px",{columns:bt,width:Math.round(Nt)}),minWidth:"xl"},{key:"scope",label:g("original tweet attachments only"),minWidth:"xl"}],actions:Re}),[bt,Nt,Re,Le.length,wt,e.length,qt,Mt,re,Ue,Ye,g,ie,V.length]);return it(()=>{m==null||m(gt);},[gt,m]),it(()=>()=>m==null?void 0:m(null),[m]),Le.length?d("div",{ref:_,class:"w-full min-w-0 px-3 py-3",children:d("div",{class:"flex items-start",style:{gap:`${se}px`},children:Kt.map(($e,be)=>d("div",{class:"min-w-0 flex-1",children:$e.items.map(ge=>d("article",{class:`overflow-hidden rounded-[20px] border border-base-300 bg-gradient-to-b from-base-100 to-base-200/80 shadow-md ${I==="compact"?"mb-3":"mb-4"}`,children:[d("button",{class:"group relative block w-full bg-base-300 text-left",onClick:()=>n(ge.originalUrl),children:[d("div",{class:"w-full overflow-hidden",style:{aspectRatio:`${ge.aspectRatio}`},children:d("img",{class:"h-full w-full object-cover transition duration-300 group-hover:scale-[1.02]",src:ge.previewUrl,loading:"lazy",decoding:"async"})}),d("div",{class:"pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between bg-gradient-to-t from-black/70 via-black/20 to-transparent px-3 pb-3 pt-8 text-white",children:[d("div",{class:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.08em]",children:[ge.media.type==="photo"?d(kw,{size:14}):d(Pw,{size:14}),d("span",{children:ge.media.type==="photo"?g("Photo"):g("Video")})]}),ge.durationLabel?d("div",{class:"rounded-full bg-black/40 px-2 py-1 text-[10px] font-semibold",children:ge.durationLabel}):null]})]}),d("div",{class:`space-y-2 px-3 ${I==="compact"?"py-2.5":"py-3"}`,children:[d("div",{class:"flex items-start justify-between gap-2",children:[d("div",{class:"min-w-0",children:[d("div",{class:"truncate text-sm font-semibold",children:["@",ge.screenName]}),d("div",{class:"text-[11px] opacity-60",children:ge.createdAtLabel})]}),d("a",{class:"btn btn-ghost btn-xs",href:ge.tweetUrl,target:"_blank",rel:"noreferrer",title:g("Open tweet"),children:d(yw,{size:14})})]}),ge.bookmarkFolderName?d("div",{class:"badge badge-outline badge-sm",children:ge.bookmarkFolderName}):null,ge.fullText?d("p",{class:`text-xs leading-5 opacity-80 ${I==="compact"?"line-clamp-3":"line-clamp-4"}`,children:ge.fullText}):null,d("div",{class:"flex flex-wrap items-center gap-2 pt-1 text-[10px] font-semibold uppercase tracking-[0.08em] opacity-65",children:[d("span",{class:"inline-flex items-center gap-1",children:[d(ww,{size:12}),ge.favoriteCount]}),d("span",{class:"inline-flex items-center gap-1",children:[d(Sw,{size:12}),ge.retweetCount]}),d("span",{class:"inline-flex items-center gap-1",children:[d(fw,{size:12}),ge.bookmarkCount]}),d("span",{children:["Replies ",ge.replyCount]})]})]})]},ge.id))},`column-${be}`))})}):d("div",{ref:_,class:"w-full min-w-0 px-3 py-3",children:d("div",{class:"flex h-[320px] items-center justify-center text-sm opacity-60",children:ce?d("span",{class:"inline-flex items-center gap-2",children:[d("span",{class:"loading loading-spinner loading-sm"}),g("Loading media.")]}):g("No media available.")})})}const xT=160,wp=320,ST=960;function CT(e){return e.name.toLowerCase().endsWith(".zip")||e.type==="application/zip"}function bp(e){if(e&&typeof e=="object"){const t=e.message;if(typeof t=="string"&&t.trim())return t}return String(e)}function vp(e){var t,n,r,o;return !e||(n=(t=e.manifest)==null?void 0:t.counts)!=null&&n.tweets?"tweet":(o=(r=e.manifest)==null?void 0:r.counts)!=null&&o.users?"user":"tweet"}function TT(e){const t=co(),[n,r]=Ne([]),o=nr(async()=>{r(await We.bundleList()??[]);},[]);return it(()=>{e&&o();},[t,o,e]),{bundles:n,refresh:o}}function MT(e,t){const n=co(),[r,o]=Ne([]);return it(()=>{let a=false;if(!e){o([]);return}return We.searchDocumentsForSource(`bundle:${e}`,t).then(i=>{a||o(i??[]);}).catch(()=>{a||o([]);}),()=>{a=true;}},[e,t,n]),r}function RT(e,t){const n=co(),[r,o]=Ne({records:[],loading:false,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false}),a=kt(0),i=kt([]),s=kt(false),l=nr(g=>Bx(g,t),[t]),c=nr(async g=>{const _=(await We.bundleGetSnapshotsByIds(g)??[]).filter(b=>b.kind===t);return l(_)},[t,l]),h=nr(async(g,_)=>{const b=await We.bundleGetSnapshotPage(e,{kind:t,offset:g,limit:_,order:"newest"})??[];return l(b)},[e,t,l]),f=nr(async()=>{if(!(!e||s.current)&&!(r.totalCount>0&&a.current>=r.totalCount)){s.current=true,o(g=>({...g,loadingMore:true}));try{const g=await h(a.current,wp),_=[...i.current,...g];a.current+=g.length,i.current=_,o(b=>({records:_,loading:!1,loadingMore:!1,loadedCount:_.length,totalCount:Math.max(b.totalCount,_.length),hasMore:g.length>=wp}));}finally{s.current=false,o(g=>({...g,loadingMore:false}));}}},[e,h,r.totalCount]),m=nr(async()=>{for(;r.hasMore&&a.current<r.totalCount;){const g=a.current;if(await f(),a.current===g)break}},[f,r.hasMore,r.totalCount]);return it(()=>{let g=false;if(a.current=0,i.current=[],!e){o({records:[],loading:false,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false});return}return (async()=>{o({records:[],loading:true,loadingMore:false,loadedCount:0,totalCount:0,hasMore:false});const[b,C]=await Promise.all([We.bundleGetSnapshotCount(e,t),h(0,xT)]);g||(a.current=C.length,i.current=C,o({records:C,loading:false,loadingMore:false,loadedCount:C.length,totalCount:b??C.length,hasMore:C.length<(b??C.length)}));})(),()=>{g=true;}},[e,t,h,n]),it(()=>{if(r.loading||r.loadingMore||!r.hasMore||r.loadedCount>=ST)return;const g=globalThis.setTimeout(()=>{f();},120);return ()=>globalThis.clearTimeout(g)},[f,r.hasMore,r.loadedCount,r.loading,r.loadingMore]),{...r,loadMore:f,loadAll:m,hydrateRecordsBySnapshotIds:c}}function IT(){const{t:e}=Qn(),[t,n]=ir(false),[r,o]=Ne(false),[a,i]=Ne(""),[s,l]=Ne("tweet"),[c,h]=Ne("Idle"),[f,m]=Ne(false),{bundles:g,refresh:_}=TT(t),b=g.find(D=>D.id===a)??null,C=MT(a,s),v=RT(a,s),T=Tt(()=>{const D=new Map;for(const O of C){const B=String(O.folder_id||"").trim();if(!B)continue;const I=String(O.folder_name||"").trim(),x=D.get(B);x?x.count+=1:D.set(B,{label:I||`Folder ${B}`,count:1});}return [...D.entries()].sort((O,B)=>B[1].count!==O[1].count?B[1].count-O[1].count:O[1].label.localeCompare(B[1].label)).map(([O,B])=>({value:O,label:`${B.label} (${B.count})`}))},[C]);it(()=>{if(!t||a||!g.length)return;const D=g.find(O=>O.status==="ready")??g[0];D&&(i(D.id),l(vp(D)));},[g,a,t]);const R=async D=>{if(!D||f)return;const O=D.name||"selected bundle";m(true),h(`Importing ${O}...`);let B="";try{const I=CT(D)?await Ig(We,D):await Dg(We,D);B=I.bundleId,h(`Imported ${I.recordsImported}/${I.recordsSeen} records from ${O}`);}catch(I){h(`Import failed: ${bp(I)}`),m(false);return}try{await _(),i(B);}catch(I){h(`Imported ${O}, but refresh failed: ${bp(I)}`);}finally{m(false);}},P=b?`${e("Bundle Viewer")}: ${b.title}`:e("Bundle Viewer"),L=g.length>0;return d(qi,{title:e("Bundle Viewer"),description:e("{{count}} imported bundles",{count:g.length}),active:L,onClick:n,indicatorColor:"bg-accent",panelClass:"my-1 rounded-box-half border border-accent/40 bg-accent/10 px-2 shadow-sm",buttonClass:"btn-accent",children:d(sr,{class:r?"h-screen max-h-screen max-w-none":"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm h-[82vh] max-h-[calc(100vh-4rem)]",title:e("Bundle Viewer"),show:t,fullscreen:r,onClose:()=>{o(false),n();},children:d("div",{class:"flex min-h-0 grow flex-col gap-2",children:[d("section",{class:"rounded-box-half border border-base-300 bg-base-200 px-2 py-1.5",children:d("div",{class:"flex flex-wrap items-center gap-2",children:[d("label",{class:"btn btn-sm btn-outline",children:[d(mw,{size:16}),"Import Bundle",d("input",{type:"file",accept:".zip,.json,.jsonl,application/zip,application/json,application/x-ndjson",class:"hidden",disabled:f,onChange:D=>{var B;const O=D.target;R((B=O.files)==null?void 0:B[0]),O.value="";}})]}),d("select",{class:"select select-bordered select-sm min-w-56",value:a,onChange:D=>{const O=D.target.value,B=g.find(I=>I.id===O)??null;i(O),l(vp(B));},children:[d("option",{value:"",children:"Select imported bundle"}),g.map(D=>d("option",{value:D.id,children:[D.title," (",D.recordCount,")"]},D.id))]}),d("select",{class:"select select-bordered select-sm",value:s,onChange:D=>l(D.target.value),children:[d("option",{value:"tweet",children:"Tweets"}),d("option",{value:"user",children:"Users"})]}),d("button",{class:"btn btn-sm btn-ghost",onClick:()=>void _(),children:[d(xw,{size:16}),"Refresh"]}),b?d("button",{class:"btn btn-sm btn-error btn-outline",onClick:async()=>{confirm(`Delete imported bundle "${b.title}"?`)&&(await We.bundleDelete(b.id),i(""),await _());},children:[d(Ew,{size:16}),"Delete"]}):null,d("span",{class:"font-mono text-[10px] opacity-70",children:[f?"busy: ":"",c]})]})}),a?s==="tweet"?d(Bi,{title:P,viewStateKey:`bundle:${a}:tweet`,fullscreen:r,onFullscreenChange:o,loading:v.loading,loadingMore:v.loadingMore,loadedCount:v.loadedCount,totalCount:v.totalCount,hasMore:v.hasMore,loadMore:v.loadMore,loadAll:v.loadAll,hydrateRecordsByIds:v.hydrateRecordsBySnapshotIds,records:v.records,searchDocuments:C,columns:Vy,clear:()=>{},showClearButton:false,alternateViews:[{id:"media-masonry",label:"Media masonry",icon:"grid",component:Ky}],bookmarkFolderOptions:T,renderActions:()=>d("span",{class:"badge badge-outline badge-sm font-mono",children:["imported bundle: ",(b==null?void 0:b.recordCount)??0," records"]})}):d(Bi,{title:P,viewStateKey:`bundle:${a}:user`,fullscreen:r,onFullscreenChange:o,loading:v.loading,loadingMore:v.loadingMore,loadedCount:v.loadedCount,totalCount:v.totalCount,hasMore:v.hasMore,loadMore:v.loadMore,loadAll:v.loadAll,hydrateRecordsByIds:v.hydrateRecordsBySnapshotIds,records:v.records,searchDocuments:C,columns:zy,clear:()=>{},showClearButton:false,renderActions:()=>d("span",{class:"badge badge-outline badge-sm font-mono",children:["imported bundle: ",(b==null?void 0:b.recordCount)??0," records"]})}):d("div",{class:"flex grow items-center justify-center rounded-box-half border border-base-300 bg-base-200 text-sm opacity-70",children:"Import or select a bundle to open it in the explorer."})]})})})}const ET={BookmarksModule:10,TweetIndexModule:20,UserDetailModule:30,UserTweetsModule:40,UserMediaModule:50,LikesModule:60,QuotesModule:70,TweetDetailModule:80,SearchTimelineModule:90,FollowersModule:120,FollowingModule:130,RetweetersModule:140,HomeTimelineModule:220,ListTimelineModule:230,CommunityTimelineModule:240,ListMembersModule:320,ListSubscribersModule:330,CommunityMembersModule:340,DirectMessagesModule:420,LocalSearchModule:9e3,InteractionEventsModule:9010,RuntimeLogsModule:9990},AT={BookmarksModule:"Bookmarks",TweetIndexModule:"Tweets",UserDetailModule:"Users",UserTweetsModule:"User Tweets",UserMediaModule:"User Media",TweetDetailModule:"Tweet Details",SearchTimelineModule:"Search Timeline",HomeTimelineModule:"Home Timeline",ListTimelineModule:"List Timeline",CommunityTimelineModule:"Community Timeline",CommunityMembersModule:"Community Members",ListMembersModule:"List Members",ListSubscribersModule:"List Subscribers",DirectMessagesModule:"Direct Messages",InteractionEventsModule:"Interaction Events",LocalSearchModule:"Local Search",RuntimeLogsModule:"Runtime Logs"},DT={BookmarksModule:{indicatorColor:"bg-warning",panelClass:"border-l-2 border-warning/60 pl-2"},TweetIndexModule:{indicatorColor:"bg-info",panelClass:"border-l-2 border-info/50 pl-2"},UserDetailModule:{indicatorColor:"bg-success",panelClass:"border-l-2 border-success/50 pl-2"},UserTweetsModule:{indicatorColor:"bg-info"},UserMediaModule:{indicatorColor:"bg-info"},TweetDetailModule:{indicatorColor:"bg-info"},SearchTimelineModule:{indicatorColor:"bg-info"},LikesModule:{indicatorColor:"bg-secondary"},QuotesModule:{indicatorColor:"bg-secondary"},RetweetersModule:{indicatorColor:"bg-secondary"},FollowersModule:{indicatorColor:"bg-success"},FollowingModule:{indicatorColor:"bg-success"},HomeTimelineModule:{indicatorColor:"bg-primary"},ListTimelineModule:{indicatorColor:"bg-primary"},CommunityTimelineModule:{indicatorColor:"bg-primary"},ListMembersModule:{indicatorColor:"bg-success"},ListSubscribersModule:{indicatorColor:"bg-success"},CommunityMembersModule:{indicatorColor:"bg-success"},DirectMessagesModule:{indicatorColor:"bg-accent"},LocalSearchModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"},InteractionEventsModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"},RuntimeLogsModule:{indicatorColor:"bg-neutral",panelClass:"opacity-90"}};function PT(e){return e===_t.TWEET?{indicatorColor:"bg-info"}:e===_t.USER?{indicatorColor:"bg-success"}:e===_t.CUSTOM?{indicatorColor:"bg-accent"}:{indicatorColor:"bg-neutral"}}function hl(e){const t=DT[e.name]??PT(e.type);return {rank:ET[e.name]??5e3,titleKey:AT[e.name],...t}}function FT(e,t){const n=hl(e).rank,r=hl(t).rank;return n!==r?n-r:e.name.localeCompare(t.name)}function kp(e){return hl(e).rank>=9e3}function OT(){const{t:e}=Qn(),{extensions:t,resolvedTheme:n,showControlPanel:r,hookStats:o,runtimeModes:a,rawCaptureStats:i,toggleControlPanel:s}=bk(e("Open Control Panel")),l=C=>e(typeof C=="boolean"?C?"on":"off":String(C||"unknown")),c=C=>C===null?"":e("{{seconds}}s ago",{seconds:C}),h=(()=>{const C=o.value;if(!C)return e("Hooks: {{status}}",{status:e("unknown")});const v=C.lastAt?Math.max(0,Math.floor((Date.now()-C.lastAt)/1e3)):null;let T=C.lastUrl||"";try{const P=new URL(T);T=`${P.hostname}${P.pathname}`;}catch{}T.length>48&&(T=T.slice(0,45)+"...");const R=c(v);return C.lastUrl?e("Hooks: xhr {{xhr}}, fetch {{fetch}}, last {{url}} ({{age}})",{xhr:C.xhrMessages,fetch:C.fetchMessages,url:T,age:R}):e("Hooks: xhr {{xhr}}, fetch {{fetch}}",{xhr:C.xhrMessages,fetch:C.fetchMessages})})(),f=(()=>{const C=a.value,v=i.value,T=l(C==null?void 0:C.safeMode),R=l(C==null?void 0:C.hookMode),P=l(C==null?void 0:C.repairMode),L=Number((v==null?void 0:v.total)||0),D=Number((v==null?void 0:v.spool_count)||0),O=l(v==null?void 0:v.daemon_online),B=l(v==null?void 0:v.monitor_role),I=v!=null&&v.last_at?Math.max(0,Math.floor((Date.now()-v.last_at)/1e3)):null,x=c(I);return x?e("Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}, raw {{age}}",{safe:T,hook:R,repair:P,raw:L,spool:D,daemon:O,monitor:B,age:x}):e("Mode: safe {{safe}}, hook {{hook}}, repair {{repair}} | raw {{raw}}, spool {{spool}}, daemon {{daemon}}, monitor {{monitor}}",{safe:T,hook:R,repair:P,raw:L,spool:D,daemon:O,monitor:B})})(),m=t.value.slice().sort(FT),g=m.filter(C=>!kp(C)),_=m.filter(kp),b=C=>{const v=C.render();return C.enabled&&v?d(_i,{children:d(v,{extension:C})},C.name):null};return d(fr,{children:[d(kk,{currentTheme:n.value,onToggle:s}),d(gS,{currentTheme:n.value,show:!!r.value,title:"Scrollmark",byline:"By Kyle McCleary",description:e("Browse around to capture more data."),hookLine:h,healthLine:f,onToggle:s,children:d(_i,{children:[g.map(b),d(_i,{children:d(IT,{})}),_.length?d("div",{class:"divider mb-0 mt-1 opacity-60"}):null,_.map(b)]})})]})}const Yu="BookmarksModule",Ti="SyntheticUsersModule",LT="twe_enable_synthetic_db_tools_v1",xp=2500,Sp=1e4,Cp=1e3,NT=5e3,BT=1e4,UT=85e3,$T=87500,Gy=997,HT={"1k":{count:1e3,folderDistribution:"mixed"},"10k":{count:1e4,folderDistribution:"mixed"},"50k":{count:5e4,folderDistribution:"mixed"},"100k":{count:1e5,folderDistribution:"mixed"},"250k":{count:25e4,folderDistribution:"mixed"},hugeFolder100k:{count:1e5,folderDistribution:"one-huge"},manyFolders100k:{count:1e5,folderDistribution:"many-small"},noFolders10k:{count:1e4,folderDistribution:"none"},captureScroll100k:{count:1e5,folderDistribution:"none",includeSearchDocuments:false}};function Wy(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Math.abs(t).toString(36)}function Yy(e,t){if(t==="none")return {};if(t==="one-huge")return {id:"synthetic-folder-huge",name:"Synthetic Huge Folder",nameSource:"api"};const r=e%(t==="many-small"?2e3:48);return t==="mixed"&&e%7===0?{}:t==="mixed"&&e%5===0?{id:`synthetic-folder-${r}`}:{id:`synthetic-folder-${r}`,name:`Synthetic Folder ${r}`,nameSource:"api"}}function jT(e,t){const n=String(9e12+e);return {__typename:"User",id:n,rest_id:n,affiliates_highlighted_label:{},has_graduated_access:true,is_blue_verified:e%11===0,profile_image_shape:"Circle",legacy:{default_profile:false,default_profile_image:false,description:`Synthetic researcher ${e} writing about local archives, search, and browser performance.`,entities:{description:{urls:[]},url:{urls:[]}},fast_followers_count:e%1e3,favourites_count:e*3,followers_count:100+e*2,friends_count:50+e,has_custom_timelines:false,is_translator:false,listed_count:e%40,media_count:e%70,normal_followers_count:100+e*2,pinned_tweet_ids_str:[],possibly_sensitive:false,profile_interstitial_type:"",statuses_count:1e3+e,translator_type:"none",want_retweets:true,withheld_in_countries:[]},avatar:{image_url:`https://example.invalid/avatar-${e}.jpg`},core:{created_at:new Date(t-e*864e5).toUTCString(),name:`Synthetic Researcher ${e}`,screen_name:`synthetic_researcher_${e}`},dm_permissions:{can_dm:false},location:{location:"Synthetic Lab"},media_permissions:{can_media_tag:false},privacy:{protected:false},verification:{verified:e%13===0},relationship_perspectives:{following:false,followed_by:false},twe_private_fields:{created_at:t-e*864e5,updated_at:t}}}function qT(e,t,n,r,o){const a=String(8e12+e),i=n-e*6e4,s=Yy(e,r),l=["local-first archive scaling","IndexedDB cursor pagination","advanced phrase search quality","bookmark folder recovery","virtual table row measurement","streaming export reliability"][e%6],c=o==="variable-heights"&&e%9===0?[`Synthetic bookmark ${e} about ${l}.`,`Exact phrase checkpoint ${e%97}.`,"This intentionally long row repeats enough local-archive context to force wrapped table content across several lines.","It exercises estimated source heights, measured row-height cache updates, translated header labels, and scroll spacer correction without requiring a full dataset load.","The row should remain readable and must not overlap adjacent rows when the virtual window moves."].join(" "):"",h=o==="variable-heights"&&e%7===0||o==="sparse-media"&&e%Gy===0||o==="dense-media"?[{id_str:`synthetic-media-${e}`,media_key:`3_${8e12+e}`,type:"photo",media_url_https:`https://example.invalid/synthetic-media-${e}.jpg`,ext_alt_text:`Synthetic media thumbnail ${e}`,indices:[0,10]}]:[],f={__typename:"Tweet",rest_id:a,core:{user_results:{result:t}},edit_control:{edit_tweet_ids:[a],editable_until_msecs:String(i+36e5),is_edit_eligible:false,edits_remaining:"0"},is_translatable:false,views:{count:String(e%1e4),state:"EnabledWithCount"},source:"Scrollmark synthetic fixture",legacy:{bookmark_count:e%200,bookmarked:true,created_at:new Date(i).toUTCString(),conversation_id_str:a,display_text_range:[0,140],entities:{hashtags:[{indices:[0,9],text:"scrollmark"},{indices:[10,18],text:`topic${e%17}`}],media:h,symbols:[],timestamps:[],urls:[],user_mentions:[]},favorite_count:e%5e3,favorited:e%9===0,full_text:c||`Synthetic bookmark ${e} about ${l}. Exact phrase checkpoint ${e%97}. This row exists to test large local table performance.`,is_quote_status:false,lang:"en",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:e%30,reply_count:e%80,retweet_count:e%500,retweeted:false,user_id_str:t.rest_id,id_str:a},twe_private_fields:{created_at:i,updated_at:n,media_count:h.length||(e%3===0?1:0)}},m=f;return s.id&&(m.__bookmark_folder_id=s.id,m.__bookmark_folder_url=`https://x.com/i/bookmarks/${s.id}`),s.name&&(m.__bookmark_folder_name=s.name,m.__bookmark_folder_name_source=s.nameSource),f}function VT(e,t,n){const r=t,o=typeof r.__bookmark_folder_id=="string"?r.__bookmark_folder_id:"",a=typeof r.__bookmark_folder_name=="string"?r.__bookmark_folder_name:"",i=t.core.user_results.result,s=i.core.screen_name.toLowerCase(),l=[t.legacy.full_text,s,i.core.name,o,a].filter(Boolean).join(" "),c=lo(t).length;return {id:`live:${e}:tweet:${t.rest_id}`,source_key:`live:${e}`,source_kind:"live",entity_type:"tweet",entity_id:t.rest_id,extension_name:e,updated_at_ms:n,created_at_ms:t.twe_private_fields.created_at,observed_at_ms:n,primary_text:l,author_screen_name:s,author_id:i.rest_id,folder_id:o||void 0,folder_name:a||void 0,media_flag:c>0?1:0,route_type:"synthetic",lang:"en",flags_json:{has_media:c>0},exact_json:{author:[s,`@${s}`],folder:[o,a].filter(Boolean)},numeric_json:{favorite_count:t.legacy.favorite_count,retweet_count:t.legacy.retweet_count,reply_count:t.legacy.reply_count,bookmark_count:t.legacy.bookmark_count,media_count:c},raw_ref_table:"tweets",raw_ref_key:t.rest_id,doc_hash:Wy(l)}}function zT(e,t,n){const r=[t.core.screen_name,t.core.name,t.legacy.description].filter(Boolean).join(" ");return {id:`live:${e}:user:${t.rest_id}`,source_key:`live:${e}`,source_kind:"live",entity_type:"user",entity_id:t.rest_id,extension_name:e,updated_at_ms:n,created_at_ms:t.twe_private_fields.created_at,observed_at_ms:n,primary_text:r,author_screen_name:t.core.screen_name.toLowerCase(),author_id:t.rest_id,flags_json:{is_blue_verified:t.is_blue_verified},exact_json:{author:[t.core.screen_name.toLowerCase(),`@${t.core.screen_name}`]},raw_ref_table:"users",raw_ref_key:t.rest_id,doc_hash:Wy(r)}}function KT(e,t,n,r){return {id:`${e}-${t.rest_id}`,extension:e,type:_t.TWEET,data_key:t.rest_id,created_at:r-n*6e4}}function GT(e,t,n){return {id:`${Ti}-${e.rest_id}`,extension:Ti,type:_t.USER,data_key:e.rest_id,created_at:n-t*864e5}}async function WT(){await new Promise(e=>globalThis.setTimeout(e,0));}function Tp(e,t,n,r){n<Sp&&t<n||t!==n&&t%Sp!==0||console.info(`[scrollmark-synthetic-seed] ${e} ${t}/${n} elapsedMs=${Math.round(performance.now()-r)}`);}function YT(e,t,n,r){return n==="complete"||e<Cp||r==="dense-media"||r==="sparse-media"&&e%Gy===0?true:t==="one-huge"?e%BT<NT||e>=UT&&e<$T:t==="many-small"?Yy(e,t).id==="synthetic-folder-0"&&e/2e3<Cp:false}function XT(e={}){const t=Math.max(0,Math.floor(Number(e.count??1e4)));return {count:t,folderDistribution:e.folderDistribution??"mixed",rawRecordMode:e.rawRecordMode??"complete",contentProfile:e.contentProfile??"default",includeSearchDocuments:e.includeSearchDocuments??true,extensionName:e.extensionName||Yu,clearFirst:e.clearFirst??true,userCount:Math.max(1,Math.floor(Number(e.userCount??Math.min(500,t/10))))}}async function QT(e={}){const t=performance.now(),{count:n,folderDistribution:r,rawRecordMode:o,contentProfile:a,includeSearchDocuments:i,extensionName:s,userCount:l,clearFirst:c}=XT(e),h=Date.now();let f=0;const m=[];c&&await We.clear();const g=Array.from({length:l},(C,v)=>jT(v,h)),_=g.map((C,v)=>GT(C,v,h)),b=i?g.map((C,v)=>zT(Ti,C,h-v)):[];await We.putSyntheticSeedRows({users:g,captures:_,searchDocuments:b}),Tp("users",g.length,g.length,t);for(let C=0;C<n;C+=xp){const v=Math.min(n,C+xp),T=[],R=[],P=[];for(let L=C;L<v;L+=1){const D=qT(L,g[L%g.length],h,r,a);YT(L,r,o,a)&&(T.push(D),f+=1);const O=KT(s,D,L,h);R.push(O),m.push(O),i&&P.push(VT(s,D,h-L));}await We.putSyntheticSeedRows({tweets:T,captures:R,searchDocuments:P}),Tp("tweets",v,n,t),await WT();}return await We.publishKnownCaptureCountSnapshot(s,n),await We.publishKnownCaptureCountSnapshot(Ti,_.length),await We.extPutCaptureIndexPagesFromOrderedCaptures(s,_t.TWEET,m,n,"newest"),In({extension:s,operation:"seedSyntheticBookmarks",count:n,keys:Array.from({length:Math.min(20,n)},(C,v)=>String(8e12+v))}),In({extension:Ti,operation:"seedSyntheticUsers",count:l,keys:g.slice(0,20).map(C=>C.rest_id)}),{ok:true,extensionName:s,tweetCount:n,userCount:g.length,storedTweetCount:f,captureCount:n+_.length,searchDocumentCount:i?n+b.length:0,folderDistribution:r,rawRecordMode:o,contentProfile:a,includeSearchDocuments:i,elapsedMs:Number((performance.now()-t).toFixed(2))}}async function ZT(){return await We.clear(),In({operation:"clearSyntheticDatabase"}),{ok:true}}async function JT(e){const t=performance.now();let n={completedRows:0,completedTables:0,totalTables:0};const r=await We.import(e,{progressCallback:s=>(n={completedRows:Number(s.completedRows||0),totalRows:typeof s.totalRows=="number"?Number(s.totalRows||0):void 0,completedTables:Number(s.completedTables||0),totalTables:Number(s.totalTables||0),done:!!s.done},(n.done||n.completedRows===0||n.completedRows%2500===0)&&console.info(`[scrollmark-synthetic-import] rows=${n.completedRows}/${n.totalRows??"?"} tables=${n.completedTables}/${n.totalTables} elapsedMs=${Math.round(performance.now()-t)}`),true)}),o=await We.count(),a=await We.extGetCaptureCount(Yu,_t.TWEET),i=await We.extGetSearchDocumentCount(Yu,{entityType:"tweet"});return {ok:true,counts:o,bookmarkCaptureCount:a,bookmarkSearchDocumentCount:i,importResult:r,progress:n,elapsedMs:Number((performance.now()-t).toFixed(2))}}function eM(){try{if(typeof location<"u"&&`${location.search} ${location.hash}`.includes("scrollmarkSyntheticDb=1"))return !0;if(typeof localStorage<"u")return localStorage.getItem(LT)==="1"}catch{return false}return false}function tM(){if(!eM())return false;const e={seedBookmarks:QT,importDbExport:JT,clearAll:ZT,presets:HT};return globalThis.__scrollmarkSyntheticDb=e,true}const Xy={id:{description:"The tweet ID",extractor:e=>e.rest_id},screen_name:{description:"The username of tweet author",extractor:e=>e.core.user_results.result.core.screen_name},name:{description:"The profile name of tweet author",extractor:e=>e.core.user_results.result.core.name},index:{description:"The media index in tweet (start from 0)",extractor:(e,t)=>String(Jf(e,t))},num:{description:"The order of media in tweet (1/2/3/4)",extractor:(e,t)=>String(Jf(e,t)+1)},date:{description:"The post date in YYYYMMDD format",extractor:e=>Ir(Qo(e),"YYYYMMDD")},time:{description:"The post time in HHmmss format",extractor:e=>Ir(Qo(e),"HHmmss")},type:{description:"The media type (photo/video/animated_gif)",extractor:(e,t)=>t.type},ext:{description:"The file extension of media (jpg/png/mp4)",extractor:(e,t)=>Su(Zo(t))}},nM=["photo","video","animated_gif"];function Mp(e,t,n){var o;const r=new Map;for(const a of e){if(a.__typename==="Tweet"||typeof a.__typename>"u"&&"core"in a){if(!t&&((o=a.legacy)!=null&&o.retweeted_status_result))continue;const i=lo(a).map(s=>{let l=n;for(const[c,h]of Object.entries(Xy))l=l.replace(`{${c}}`,h.extractor(a,s));return {filename:l,type:s.type,url:Zo(s)}});for(const s of i)r.set(s.filename,s);}if(a.__typename==="User"){if(a.avatar.image_url){const i=Su(a.avatar.image_url),s=`${a.core.screen_name}_profile_image.${i}`;r.set(s,{filename:s,type:"photo",url:_d(a.avatar.image_url)});}if(a.legacy.profile_banner_url){const i=Su(a.legacy.profile_banner_url),s=`${a.core.screen_name}_profile_banner.${i}`;r.set(s,{filename:s,type:"photo",url:a.legacy.profile_banner_url});}}}return Array.from(r.values())}function Rp(e){if(e==null||typeof e!="object")return e;if(typeof structuredClone=="function")try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Ip({title:e,resultRecords:t,selectedRecords:n,streamResultMediaRows:r,resultMediaSourceCount:o,selectionExcludedRecordIds:a=[],resultSetSnapshot:i,selectionMode:s,isTweet:l,show:c,onClose:h}){const{t:f}=Qn("exporter"),[m,g]=$n(false),[_,b]=$n(false),[C,v]=ir(false),[T,R]=Ne("75"),[P,L]=Ne("10"),[D,O]=Ne("8"),[B,I]=Ne("3"),[x,F]=Ne("3"),[U,Ce]=$n(ut.get("filenamePattern")),[X,re]=$n(0),[Z,ce]=$n(0),[he,fe]=$n(0),[me,z]=$n("result_set"),[ue,Ae]=Ne([]),[ie,Oe]=Ne([]),[Le,ee]=Ne([]),[ne,V]=Ne(false),[se,_e]=Ne(0),[ke,Ze]=Ne(null),Je=rn({}),Me=kt(false),bt=kt(0),[Nt,Kt]=$n([...nM,...l?["retweet"]:[]]),qt=Nt.includes("retweet"),Mt=!!r,Ue=Tt(()=>me==="selected"?ie:ue,[me,ue,ie]),Ye=Tt(()=>(me==="result_set"&&Mt?Le:Mp(Ue,qt,U??"")).filter(ge=>Nt.includes(ge.type)),[Ue,me,U,Nt,qt,Mt,Le]),wt=Tt(()=>Ye.slice(0,250),[Ye]),Re=Tt(()=>new Set(wt.map(be=>be.filename)),[wt]);it(()=>{if(!c){Me.current=false,ee([]),V(false),_e(0);return}if(Me.current)return;Me.current=true;const be=s==="all"&&a.length?new Set(a):null;Ae(t.filter((ge,M)=>!(be!=null&&be.has(So(ge,M)))).map(ge=>Rp(ge))),Oe(n.map(ge=>Rp(ge))),Ze({...i,ids:[...i.ids],warnings:[...i.warnings]}),z(n.length>0&&s==="explicit"?"selected":"result_set"),re(0),ce(0),fe(0),Je.value={};},[t,i,n,a,s,re,z,ce,fe,c,Je]),it(()=>{if(!c||!r){ee([]),V(false),_e(0);return}let be=false;const ge=ze(),M=new Map;let k=0;const A=()=>{be||(ee([...M.values()]),_e(k));};return (async()=>{V(true),ee([]),_e(0);try{for await(const K of r()){if(be)return;k+=1;for(const Te of Mp([K],qt,U??""))M.set(Te.filename,Te);k%200===0&&(A(),await new Promise(Te=>globalThis.setTimeout(Te,0)));}A(),Be({kind:"export",name:"media-export-source-scan",durationMs:ze()-ge,value:M.size,tags:{rowsScanned:k,sourceRows:o??0,includeRetweets:qt}});}finally{be||V(false);}})().catch(K=>{be||V(false),Be({kind:"export",name:"media-export-source-scan-error",durationMs:ze()-ge,tags:{error:K instanceof Error?K.message:String(K),rowsScanned:k}});}),()=>{be=true;}},[U,qt,o,c,r]);const gt=(be,ge,M)=>{const k=Date.now();if((be===ge||k-bt.current>120)&&(bt.current=k,re(be),ce(ge)),M!=null&&M.filename&&Re.has(M.filename)){const A={...Je.value,[M.filename]:100};Je.value=A;}},ot=async()=>{try{const be={minDelayBetweenStartsMs:Math.max(0,parseInt(T,10)||0),globalConcurrency:Math.max(1,parseInt(P,10)||1),perHostConcurrency:Math.max(1,parseInt(D,10)||1),videoConcurrency:Math.max(1,parseInt(B,10)||1),maxRetries:Math.max(0,parseInt(x,10)||0),onZipProgress:ge=>fe(ge)};g(!0),bt.current=0,re(0),ce(Ye.length),fe(0),await i0(`twitter-${e}-${me==="selected"?"selected":"results"}-${Date.now()}-media.zip`,Ye,gt,be),g(!1);}catch(be){g(false),Ie.error(f("Failed to export media. Open DevTools for more details."),be);}},$e=(be=false)=>{const ge=Ye.map(M=>C?`${M.url}
out=${M.filename}`:M.url).join(`
`);try{if(be){Ni(new Blob([ge],{type:"text/plain;charset=utf-8"}),"media-urls.txt");return}navigator.clipboard.writeText(ge),b(!0),setTimeout(()=>b(!1),2e3);}catch(M){Ie.error(f("Failed to copy media URLs. Open DevTools for more details."),M);}};return d(sr,{class:"max-w-sm md:max-w-screen-sm sm:max-w-screen-sm max-h-full",title:`${e} ${f("Media")}`,show:c,onClose:h,children:[d("div",{class:"px-4 text-base overflow-y-scroll overscroll-none",children:[d("p",{class:"text-base-content text-opacity-60 leading-5 text-sm",children:f("Download and save media files from captured data. This may take a while depending on the amount of data. Media that will be downloaded includes: profile images, profile banners (for users), images, videos (for tweets).")}),d("div",{role:"alert",class:"alert text-sm py-2 mt-2 mb-2 grid-cols-[auto_minmax(auto,1fr)]",children:[d(Em,{size:24}),d("span",{children:f("Browser ZIP export now uses bounded parallel downloads. For very large video-heavy jobs, URL or aria2 export is still the safest low-memory path.")})]}),d("div",{class:"flex items-center gap-4 mb-1",children:[d("p",{class:"leading-8",children:f("Export scope:")}),d("label",{class:"label cursor-pointer gap-2 py-0",children:[d("input",{type:"radio",name:"media-export-scope",class:"radio radio-sm",checked:me==="result_set",onChange:()=>z("result_set")}),d("span",{children:f("All current results")}),d("span",{class:"font-mono opacity-60",children:["(",(ke==null?void 0:ke.totalMatches)??ue.length,")"]})]}),d("label",{class:an("label cursor-pointer gap-2 py-0",!ie.length&&"opacity-50"),children:[d("input",{type:"radio",name:"media-export-scope",class:"radio radio-sm",checked:me==="selected",disabled:!ie.length,onChange:()=>z("selected")}),d("span",{children:f("Selected rows")}),d("span",{class:"font-mono opacity-60",children:["(",ie.length,")"]})]})]}),Mt&&me==="result_set"?d("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5 mb-2",children:[d("div",{class:"font-semibold",children:f("Source-backed media")}),d("div",{children:[f("rows scanned:")," ",d("span",{class:"font-mono",children:[se,o?`/${o}`:""]})]}),d("div",{children:[f("media URLs:")," ",d("span",{class:"font-mono",children:[Ye.length,ne?` ${f("loading")}`:""]})]})]}):null,ke?d("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 text-xs leading-5 mb-2",children:[d("div",{class:"font-semibold",children:f("Pinned result set")}),d("div",{class:"font-mono opacity-70",children:ke.resultSetId}),d("div",{children:[f("Query"),":"," ",d("span",{class:"font-mono",children:ke.queryText||"-"})]}),d("div",{children:[f("Sort"),": ",d("span",{class:"font-mono",children:ke.sort})]})]}):null,l&&d("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[d("p",{class:"leading-8",children:f("Filename template:")}),d("div",{class:"tooltip tooltip-bottom col-span-3 before:whitespace-pre-line before:max-w-max","data-tip":Object.entries(Xy).map(([be,ge])=>`{${be}} - ${f(ge.description)}`).reduce((be,ge)=>be+ge+`
`,""),children:d("input",{type:"text",class:"input input-bordered input-sm w-full",value:U,onChange:be=>{var M;const ge=(M=be==null?void 0:be.target)==null?void 0:M.value;Ce(ge),ut.set("filenamePattern",ge);}})})]}),d("div",{class:"rounded-box-half border border-base-300 bg-base-200/60 px-3 py-2 mt-2 mb-2",children:[d("div",{class:"mb-1 flex items-center justify-between gap-2",children:[d("p",{class:"font-semibold text-sm",children:f("Download scheduler")}),d("span",{class:"font-mono text-[10px] opacity-60",children:f("Faster defaults are intended for bulk CDN transfer.")})]}),d("div",{class:"grid grid-cols-2 sm:grid-cols-5 gap-2",children:[d("label",{class:"form-control",children:[d("span",{class:"label-text text-xs",children:f("Start delay (ms)")}),d("input",{type:"number",min:"0",class:"input input-bordered input-sm",value:T,onInput:be=>R(be.currentTarget.value)})]}),d("label",{class:"form-control",children:[d("span",{class:"label-text text-xs",children:f("Global parallel")}),d("input",{type:"number",min:"1",max:"32",class:"input input-bordered input-sm",value:P,onInput:be=>L(be.currentTarget.value)})]}),d("label",{class:"form-control",children:[d("span",{class:"label-text text-xs",children:f("Per host")}),d("input",{type:"number",min:"1",max:"32",class:"input input-bordered input-sm",value:D,onInput:be=>O(be.currentTarget.value)})]}),d("label",{class:"form-control",children:[d("span",{class:"label-text text-xs",children:f("Videos")}),d("input",{type:"number",min:"1",max:"16",class:"input input-bordered input-sm",value:B,onInput:be=>I(be.currentTarget.value)})]}),d("label",{class:"form-control",children:[d("span",{class:"label-text text-xs",children:f("Retries")}),d("input",{type:"number",min:"0",max:"8",class:"input input-bordered input-sm",value:x,onInput:be=>F(be.currentTarget.value)})]})]})]}),d("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[d("p",{class:"leading-8 col-span-1 whitespace-nowrap sm:pl-2",children:f("Use aria2 format:")}),d("div",{class:"col-span-1 flex items-center",children:[d("input",{type:"checkbox",class:"toggle toggle-primary",checked:C,onChange:v}),d("a",{href:"https://aria2.github.io/manual/en/html/aria2c.html#input-file",target:"_blank",rel:"noopener noreferrer",class:"tooltip tooltip-bottom before:max-w-40 ml-1","data-tip":f("Click for more information. Each URL will be on a new line, with its filename on the next line. This format is compatible with aria2."),children:d(Sa,{size:20})})]})]}),d("div",{class:"flex flex-wrap sm:grid grid-cols-4 sm:gap-2 items-center sm:h-9",children:[d("p",{class:"leading-8",children:f("Media Filter:")}),d(fg,{class:"col-span-3",options:[{label:f("filter.photo"),value:"photo"},{label:f("filter.video"),value:"video"},{label:f("filter.animated_gif"),value:"animated_gif"},...l?[{label:f("filter.retweet"),value:"retweet"}]:[]],selected:Nt,onChange:Kt})]}),d("div",{class:"my-3 overflow-x-scroll",children:[d("table",{class:"table table-xs table-zebra",children:[d("thead",{children:d("tr",{children:[d("th",{}),d("th",{children:"#"}),d("th",{children:f("File Name")}),d("th",{children:f("Media Type")}),d("th",{children:f("Download URL")})]})}),d("tbody",{children:wt.map((be,ge)=>d("tr",{children:[d("td",{children:Je.value[be.filename]?d(hw,{class:"text-success",size:14}):d(pw,{size:14})}),d("th",{children:ge+1}),d("td",{children:be.filename}),d("td",{children:f(`filter.${be.type}`)}),d("td",{children:d("a",{class:"link whitespace-nowrap",href:be.url,target:"_blank",rel:"noopener noreferrer",children:be.url})})]}))})]}),Ye.length>250?d("div",{class:"px-2 py-1 text-xs opacity-60",children:f("Preview limited to first 250 media items.")}):null,Ye.length>0?null:d("div",{class:"flex items-center justify-center h-28 w-full",children:d("p",{class:"text-base-content text-opacity-50",children:f(ne?"Loading media...":"No media selected.")})})]}),d("div",{class:"flex flex-col mt-6",children:[d("progress",{class:"progress progress-secondary w-full",value:X/(Z||1)*100,max:"100"}),d("span",{class:"text-sm h-4 leading-none mt-2 text-base-content text-opacity-60",children:he?`${f("Zipping")}: ${he}/${Ye.length}`:`${X}/${Ye.length}`})]})]}),d("div",{class:"flex space-x-2 mt-2",children:[d("span",{class:"flex-grow"}),d("button",{class:"btn",onClick:h,children:f("Cancel")}),d("div",{class:"join",children:[d("button",{class:an("btn join-item pr-2",ne&&"btn-disabled"),onClick:()=>$e(),disabled:ne,children:f(_?"Copied!":"Copy URLs")}),d("button",{class:an("btn join-item pl-2",ne&&"btn-disabled"),onClick:()=>$e(true),disabled:ne,children:d(_w,{})})]}),d("button",{class:an("btn btn-secondary",(m||ne||Ye.length===0)&&"btn-disabled"),onClick:ot,disabled:m||ne||Ye.length===0,children:[m&&d("span",{class:"loading loading-spinner"}),f("Start Export")]})]})]})}/**
* Modified from `dexie-react-hooks` with some lines removed. The modified version
* is specifically designed for `Observable` and `liveQuery` from Dexie.js.
*
* @license Apache-2.0
* @see https://dexie.org/docs/dexie-react-hooks/useObservable()
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/libs/dexie-react-hooks/src/useObservable.ts
* @param observableFactory Function that returns an observable.
* @param deps The observableFactory function will be re-executed if deps change.
* @param defaultResult Result returned on initial render.
* @returns The current result of the observable.
*/function rM(e,t,n){const r=kt({hasResult:false,result:n,error:null}),[,o]=Pm(i=>i+1,0),a=Tt(()=>{const i=e();if(!i||typeof i.subscribe!="function")throw new TypeError("Observable factory given to useObservable() did not return a valid observable.");return r.current.hasResult||(typeof i.hasValue!="function"||i.hasValue())&&typeof i.getValue=="function"&&(r.current.result=i.getValue(),r.current.hasResult=true),i},t);if(it(()=>{const i=a.subscribe(s=>{const l=r.current;(l.error!==null||l.result!==s)&&(l.error=null,l.result=s,l.hasResult=true,o(1));},s=>{r.current.error!==s&&(r.current.error=s,o(1));});return i.unsubscribe.bind(i)},t),r.current.error)throw r.current.error;return r.current.result}/**
* A hook that subscribes to a live query and returns the current result.
* Copied from `dexie-react-hooks` with some function overloads removed.
*
* @license Apache-2.0
* @see https://dexie.org/docs/dexie-react-hooks/useLiveQuery()
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/libs/dexie-react-hooks/src/useLiveQuery.ts
* @see https://github.com/dexie/Dexie.js/blob/v4.0.4/src/live-query/live-query.ts
* @param querier Function that returns a final result (Promise).
* @param deps Variables that querier is dependent on.
* @param defaultResult Result returned on initial render.
* @returns The current result of the live query.
*/function Qy(e,t,n){return rM(()=>u0(e),t||[],n)}const Zy=80,Jy=48,e_=240,pl=5e4,t_="twe_allow_large_search_corpus_v1",oM="twe_search_document_full_load_count_override_v1",aM="twe_source_window_request_delay_ms_v1",iM=5e3,sM=12e3;function n_(){try{return localStorage.getItem(t_)==="1"}catch{return false}}function Ep(){try{const e=localStorage.getItem(oM);if(!e)return null;const t=Number(e);return !Number.isFinite(t)||t<=0?null:Math.floor(t)}catch{return null}}function lM(){try{const e=localStorage.getItem(aM);if(!e)return 0;const t=Number(e);return !Number.isFinite(t)||t<=0?0:Math.min(iM,Math.floor(t))}catch{return 0}}async function r_(){const e=lM();e<=0||await new Promise(t=>globalThis.setTimeout(t,e));}function cM(e){return e<=pl||n_()?null:`Search corpus has ${e.toLocaleString()} indexed documents. Full in-memory search is blocked above ${pl.toLocaleString()} documents; normal high-count search should use chunked DB-to-worker preparation instead. Set localStorage.${t_} = "1" to force the legacy path for local diagnostics.`}function Ap(e){return e===_t.USER?"user":"tweet"}function uM(e,t){const n=co(e),r=Tt(()=>rS({extensionName:e,extensionType:t}),[e,n,t]),o=kt(""),a=kt(false),i=kt(null),[s,l]=Ne({records:[],loading:true,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0}),c=nr(async(m,g,_=false)=>{const b=Math.max(0,Math.floor(Number(m)||0)),C=Math.max(b+1,Math.floor(Number(g)||0)),v=Math.min(e_,Math.max(Jy,C-b)),T=`${n}:${b}:${v}`;if(o.current===T)return;if(o.current=T,a.current&&!_){i.current={startIndex:b,endIndex:C},Be({kind:"viewer",name:"source-window-request-coalesced",value:v,tags:{mode:"captures",extName:e,type:t,startIndex:b,limit:v}});return}a.current=true;const R=ze();l(P=>({...P,loading:_?true:P.loading,loadingWindow:!_}));try{await r_();const P=await r.getWindow({startIndex:b,limit:v});if(o.current!==T){Be({kind:"viewer",name:"source-window-stale-ignored",durationMs:ze()-R,value:P.rows.length,tags:{mode:"captures",extName:e,type:t,startIndex:b,limit:v,totalCount:P.totalCount,initial:_}});return}l({records:P.rows,loading:!1,loadingWindow:!1,loadedCount:P.rows.length,totalCount:P.totalCount,hasMore:P.hasAfter,windowStartIndex:b}),Be({kind:"viewer",name:"db-backed-capture-window",durationMs:ze()-R,value:P.rows.length,tags:{extName:e,type:t,startIndex:b,limit:v,totalCount:P.totalCount,initial:_}});}finally{a.current=false;const P=i.current;i.current=null,P&&(o.current="",c(P.startIndex,P.endIndex,false).catch(L=>{Ie.warn("DB-backed queued capture window load failed",L),l(D=>({...D,loading:false,loadingWindow:false}));}));}},[e,n,r,t]),h=nr(async()=>{o.current="",await c(0,Zy,true);},[c]);it(()=>{h();},[h]);const f=nr((m,g)=>{c(m,g,false).catch(_=>{Ie.warn("DB-backed capture window load failed",_),l(b=>({...b,loading:false,loadingWindow:false}));});},[c]);return {sourceKey:r.key,sourceDescriptor:r.descriptor,...s,requestWindow:f,reload:h,streamRows:()=>r.streamRows()}}function dM(e,t,n,r,o){const a=co(e),i=Tt(()=>[...new Set((Array.isArray(n)?n:n?[n]:[]).map(v=>v.trim()).filter(Boolean))].sort(),[n]),s=i.join(","),l=Tt(()=>!r||!i.length?null:Lh({extensionName:e,entityType:Ap(t),folderIds:i,knownTotalCount:o}),[r,e,o,a,i,t]),c=kt(""),h=kt(false),f=kt(null),[m,g]=Ne({records:[],loading:false,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0}),_=nr(async(v,T,R=false)=>{if(!l||!r||!i.length)return;const P=Math.max(0,Math.floor(Number(v)||0)),L=Math.max(P+1,Math.floor(Number(T)||0)),D=Math.min(e_,Math.max(Jy,L-P)),O=`${a}:${s}:${P}:${D}`;if(c.current===O)return;if(c.current=O,h.current&&!R){f.current={startIndex:P,endIndex:L},Be({kind:"viewer",name:"source-window-request-coalesced",value:D,tags:{mode:"folder",extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:D}});return}h.current=true;const B=ze();g(I=>({...I,loading:R?true:I.loading,loadingWindow:!R}));try{await r_();const I=await l.getWindow({startIndex:P,limit:D});if(c.current!==O){Be({kind:"viewer",name:"source-window-stale-ignored",durationMs:ze()-B,value:I.rows.length,tags:{mode:"folder",extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:D,totalCount:I.totalCount,initial:R}});return}g({records:I.rows,loading:!1,loadingWindow:!1,loadedCount:I.rows.length,totalCount:I.totalCount,hasMore:I.hasAfter,windowStartIndex:P}),Be({kind:"viewer",name:"db-backed-folder-window",durationMs:ze()-B,value:I.rows.length,tags:{extName:e,type:t,folderId:s,folderCount:i.length,startIndex:P,limit:D,totalCount:I.totalCount,initial:R}});}finally{h.current=false;const I=f.current;f.current=null,I&&(c.current="",_(I.startIndex,I.endIndex,false).catch(x=>{Ie.warn("DB-backed queued folder window load failed",x),g(F=>({...F,loading:false,loadingWindow:false}));}));}},[r,e,a,i.length,s,l,t]),b=nr(async()=>{if(c.current="",!l||!r||!i.length){g({records:[],loading:false,loadingWindow:false,loadedCount:0,totalCount:0,hasMore:false,windowStartIndex:0});return}await _(0,Zy,true);},[r,_,i.length,l]);it(()=>{b();},[b]);const C=nr((v,T)=>{!l||!r||!i.length||_(v,T,false).catch(R=>{Ie.warn("DB-backed folder window load failed",R),g(P=>({...P,loading:false,loadingWindow:false}));});},[r,_,i.length,l]);return {sourceKey:(l==null?void 0:l.key)??"",sourceDescriptor:(l==null?void 0:l.descriptor)??Lh({extensionName:e,entityType:Ap(t),folderIds:i.length?i:["__inactive__"]}).descriptor,...m,active:!!(l&&r&&i.length),folderId:s,requestWindow:C,reload:b,streamRows:()=>(l==null?void 0:l.streamRows())??hM()}}function fM(e,t,n){const r=co(e),o=Tt(()=>[...new Set((t??[]).map(c=>c.trim()).filter(Boolean))].sort(),[t]),a=o.join(","),i=Tt(()=>n?oS({extensionName:e,folderIds:o}):null,[n,e,r,o]),[s,l]=Ne(0);return it(()=>{let c=false,h=null;if(!i){l(0);return}return h=globalThis.setTimeout(()=>{i.totalCount().then(f=>{c||l(f);});},sM),()=>{c=true,h!==null&&globalThis.clearTimeout(h);}},[a,i]),i?{sourceKey:i.key,sourceDescriptor:i.descriptor,totalCount:s,getWindow:async(c,h)=>{const f=await i.getWindow({startIndex:c,limit:h});return l(m=>Math.max(m,f.totalCount)),f},streamRows:()=>i.streamRows()}:null}async function*hM(){}function o_(e){const t=co(e),n=Qy(async()=>(await We.whenReady(),Math.max(0,Math.floor(Number(await We.extGetCaptureCount(e)||0)))),[e,t],0);return Math.max(0,Math.floor(Number(n)||0))}function pM(e,t,n=true){const r=co(e),[o,a]=Ne({documents:[],loading:n,loaded:false,totalCount:0}),i=kt(""),s=kt(null),l=kt(""),c=kt(0),h=nr(async()=>{if(s.current)return s.current;const m=`${r}:${e}:${t}:${c.current+1}`;c.current+=1,l.current=m,a(_=>({..._,loading:true}));const g=We.extGetSearchDocumentCount(e,{type:t}).then(async _=>{if(l.current!==m)return [];const b=Number(_)||0,C=Ep()??b;if(cM(C))return l.current===m&&a({documents:[],loading:false,loaded:true,totalCount:C}),Be({kind:"search",name:"large-corpus-chunked-load-required",value:C,tags:{extName:e,type:t,limit:pl}}),[];const[T,R]=await Promise.all([We.extGetSearchDocuments(e,t),We.extGetCaptureCount(e,t)]);if(l.current!==m)return [];const P=T??[];a({documents:P,loading:false,loaded:true,totalCount:C||P.length});const L=R??0,D=`${e}:${t}:${L}:${P.length}`,O=Math.max(50,Math.ceil(L*.02));return L>0&&P.length+O<L&&i.current!==D&&(i.current=D,We.extBackfillSearchDocuments(e,t).catch(B=>{Ie.warn("Search document backfill failed",B);})),P}).catch(_=>l.current!==m?[]:(Ie.warn("Search documents load failed",_),a({documents:[],loading:false,loaded:true,totalCount:0}),[])).finally(()=>{l.current===m&&(s.current=null);});return s.current=g,g},[e,r,t]),f=nr(async m=>{var P,L;const g=ze(),_=Math.max(100,Math.min(5e3,Math.floor(m.chunkSize||1e3))),b=Number(await We.extGetSearchDocumentCount(e,{type:t}))||0,C=Ep()??b;let v=0,T=0,R=false;try{for(;T<b;){if((P=m.isCancelled)!=null&&P.call(m)){R=!0;break}const D=await We.extGetSearchDocumentPage(e,{type:t,offset:T,limit:_});if((L=m.isCancelled)!=null&&L.call(m)){R=!0;break}const O=D.documents??[];if(!O.length||(v+=O.length,m.onChunk(O,{loaded:v,totalCount:C}),Be({kind:"search",name:"search-document-chunk-loaded",value:v,tags:{extName:e,type:t,chunkSize:_,chunkRows:O.length,totalCount:C,offset:T}}),T+=O.length,!D.hasAfter))break;await new Promise(B=>globalThis.setTimeout(B,0));}}finally{a(D=>({...D,documents:C>pl&&!n_()?[]:D.documents,loading:false,loaded:D.loaded||!R,totalCount:C,blockedReason:void 0}));}return Be({kind:"search",name:R?"search-document-chunk-load-cancelled":"search-document-chunk-load-complete",durationMs:ze()-g,value:v,tags:{extName:e,type:t,chunkSize:_,totalCount:C}}),{loaded:v,totalCount:C,cancelled:R}},[e,t]);return it(()=>{return s.current=null,l.current="",a({documents:[],loading:n,loaded:false,totalCount:0}),n&&h().then(()=>{}),()=>{}},[n,e,h,r,t]),{...o,load:h,loadChunks:f}}function mM(e,t,n=true){const r=co(e),[o,a]=Ne({summary:null,loading:n});return it(()=>{let i=false;if(!n){a({summary:null,loading:false});return}return a(s=>({...s,loading:true})),We.extGetSearchDocumentFolderFacets(e,{type:t}).then(s=>{i||a({summary:s,loading:false});}).catch(s=>{i||(Ie.warn("Search document folder facets failed",s),a({summary:null,loading:false}));}),()=>{i=true;}},[n,e,r,t]),o}function gM(e){return async()=>(Ie.debug("Clearing captures for extension:",e),We.extClearCaptures(e))}async function*Dp(){}function Pp(e){const t=e,n=t==null?void 0:t.__bookmark_folder_name,r=t==null?void 0:t.__bookmark_folder_name_source,o=t==null?void 0:t.__bookmark_folder_id;return r==="api"&&typeof n=="string"&&n.trim().length>0?"api-name":typeof o=="string"&&o.trim().length>0?"id-only":"none"}function yM(e){const{isBookmarksModule:t,records:n,summary:r}=e,[o,a]=Ne({latestStatus:"none",counts:{"api-name":0,"id-only":0,none:0}}),[i,s]=Ne([]);return it(()=>{if(!t){a({latestStatus:"none",counts:{"api-name":0,"id-only":0,none:0}}),s([]);return}let l=false,c=0,h=null;const f=()=>{if(l)return;const m=n??[],g={"api-name":0,"id-only":0,none:0},_=new Map;if(r){g["api-name"]=r.statusCounts["api-name"],g["id-only"]=r.statusCounts["id-only"],g.none=r.statusCounts.none;for(const b of r.facets)_.set(b.folderId,{label:b.label,count:b.count});}else for(const b of m){if(g[Pp(b)]++,!b||typeof b!="object")continue;const C=b,v=typeof C.__bookmark_folder_id=="string"?C.__bookmark_folder_id:"";if(!v.trim())continue;const T=C.__bookmark_folder_name_source==="api"&&typeof C.__bookmark_folder_name=="string"?C.__bookmark_folder_name.trim():"",R=_.get(v);R?R.count+=1:_.set(v,{label:T?`${T}`:`Folder ${v}`,count:1});}a({latestStatus:r?g["api-name"]>0?"api-name":g["id-only"]>0?"id-only":"none":m.length>0?Pp(m[m.length-1]):"none",counts:g}),s([..._.entries()].sort((b,C)=>C[1].count!==b[1].count?C[1].count-b[1].count:b[1].label.localeCompare(C[1].label)).map(([b,C])=>({value:b,label:`${C.label} (${C.count})`})));};return typeof window<"u"&&"requestIdleCallback"in window?c=window.requestIdleCallback(()=>f()):h=globalThis.setTimeout(f,80),()=>{l=true,c&&typeof window<"u"&&"cancelIdleCallback"in window&&window.cancelIdleCallback(c),h!==null&&globalThis.clearTimeout(h);}},[t,n,r]),{bookmarkStatus:o,bookmarkFolderOptions:i}}function _M({title:e,extension:t,fullscreen:n,onFullscreenChange:r}){return d(wM,{title:e,extension:t,fullscreen:n,onFullscreenChange:r})}function wM({title:e,extension:t,fullscreen:n,onFullscreenChange:r}){const{t:o}=Qn(),{name:a,type:i}=t,s=uM(a,i),l=pM(a,i,false),c=mM(a,i,a==="BookmarksModule"&&i===_t.TWEET),h=gM(a),f=a==="BookmarksModule"&&i===_t.TWEET,[m,g]=Ne([]),_=f&&m.length>0?m:void 0,b=Tt(()=>{if(!(_!=null&&_.length)||!c.summary)return;const x=new Map(c.summary.facets.map(F=>[F.folderId,F.count]));return _.reduce((F,U)=>F+(Number(x.get(U))||0),0)},[c.summary,_]),C=dM(a,i,_,!!(_!=null&&_.length),b),v=fM(a,_,i===_t.TWEET),T=C.active?C:s,R=T.records,{bookmarkStatus:P,bookmarkFolderOptions:L}=yM({isBookmarksModule:f,records:R,summary:c.summary}),[D,O]=ir(),B=[{id:"media-masonry",label:"Media masonry",icon:"grid",sourceBacked:true,component:Ky}],I=(x,F)=>{const U=f&&F.totalCount>1e4&&F.resultRecords.length<F.totalCount&&!v;return d("div",{class:"flex items-center gap-2",children:[F.loading?d("span",{class:"font-mono text-[10px] opacity-60",children:o("loading {{loaded}}/{{total}}",{loaded:F.loadedCount,total:F.totalCount})}):null,F.loadingMore?d("span",{class:"font-mono text-[10px] opacity-60",children:o("loading more {{loaded}}/{{total}}",{loaded:F.loadedCount,total:F.totalCount})}):null,f&&d("button",{class:"btn btn-sm btn-accent btn-outline",onClick:()=>{const Ce=Id("bookmarks");dy({exported_at_ms:Date.now(),exported_at_iso:new Date().toISOString(),scope:"bookmarks",count:Ce.length,history:Ce},`twe-bookmarks-search-history-${Date.now()}.json`);},title:o("Export persisted bookmark search history"),children:o("Export Search History")}),f&&d("span",{class:"badge badge-outline badge-sm font-mono tooltip before:whitespace-pre-line before:max-w-40","data-tip":o(`latest: {{latest}}
api-name: {{apiName}}
id-only: {{idOnly}}
none: {{none}}`,{latest:o(P.latestStatus),apiName:P.counts["api-name"],idOnly:P.counts["id-only"],none:P.counts.none}),children:o("folder metadata: {{status}}",{status:o(P.latestStatus)})}),d("button",{class:"btn btn-sm btn-secondary",onClick:O,disabled:F.loading||U,title:F.loading?o("Wait for records to finish loading before exporting."):U?o("Media export is disabled for large result sets until media export has a source-backed stream."):void 0,children:o("Export Media")})]})};return i===_t.TWEET?d(Bi,{title:e,viewStateKey:`${a}:${i}`,searchHistoryScope:f?"bookmarks":void 0,fullscreen:n,onFullscreenChange:r,loading:T.loading,loadingMore:T.loadingWindow,loadedCount:T.loadedCount,totalCount:T.totalCount,hasMore:T.hasMore,sourceMode:true,sourceModeFiltersActive:C.active,sourceWindowStartIndex:T.windowStartIndex,resultSourceDescriptor:T.sourceDescriptor,resultEntityType:"tweet",onSourceWindowChange:T.requestWindow,streamSourceRows:()=>T.streamRows(),streamMediaRows:()=>(v==null?void 0:v.streamRows())??Dp(),mediaSourceKey:v==null?void 0:v.sourceKey,mediaSourceTotalCount:(v==null?void 0:v.totalCount)??void 0,getMediaWindow:v?(x,F)=>v.getWindow(x,F):void 0,onBookmarkFolderSelectionChange:g,hydrateRecordsByIds:x=>We.extGetTweetsByIds(x),records:R??[],searchDocuments:l.documents,searchDocumentsLoading:l.loading,searchDocumentsLoaded:l.loaded,searchDocumentTotalCount:l.totalCount,searchDocumentsBlockedReason:l.blockedReason,loadSearchDocuments:l.load,loadSearchDocumentChunks:l.loadChunks,columns:Vy,clear:h,alternateViews:B,bookmarkFolderOptions:L,renderActions:I,renderExtra:(x,F)=>d(Ip,{title:e,resultRecords:F.resultRecords,selectedRecords:F.selectedRecords,streamResultMediaRows:()=>(v==null?void 0:v.streamRows())??Dp(),resultMediaSourceCount:(v==null?void 0:v.totalCount)??void 0,selectionExcludedRecordIds:F.selectionExcludedRecordIds,resultSetSnapshot:F.resultSetSnapshot,selectionMode:F.selectionMode,isTweet:true,show:D,onClose:O})}):d(Bi,{title:e,viewStateKey:`${a}:${i}`,searchHistoryScope:f?"bookmarks":void 0,fullscreen:n,onFullscreenChange:r,loading:T.loading,loadingMore:T.loadingWindow,loadedCount:T.loadedCount,totalCount:T.totalCount,hasMore:T.hasMore,sourceMode:true,sourceModeFiltersActive:C.active,sourceWindowStartIndex:T.windowStartIndex,resultSourceDescriptor:T.sourceDescriptor,resultEntityType:"user",onSourceWindowChange:T.requestWindow,streamSourceRows:()=>T.streamRows(),onBookmarkFolderSelectionChange:g,hydrateRecordsByIds:x=>We.extGetUsersByIds(x),records:R??[],searchDocuments:l.documents,searchDocumentsLoading:l.loading,searchDocumentsLoaded:l.loaded,searchDocumentTotalCount:l.totalCount,searchDocumentsBlockedReason:l.blockedReason,loadSearchDocuments:l.load,loadSearchDocumentChunks:l.loadChunks,columns:zy,clear:h,bookmarkFolderOptions:L,renderActions:I,renderExtra:(x,F)=>d(Ip,{title:e,resultRecords:F.resultRecords,selectedRecords:F.selectedRecords,selectionExcludedRecordIds:F.selectionExcludedRecordIds,resultSetSnapshot:F.resultSetSnapshot,selectionMode:F.selectionMode,isTweet:false,show:D,onClose:O})})}function jn({extension:e}){const{t}=Qn(),[n,r]=ir(),[o,a]=Ne(false),i=o_(e.name);if(e.type!==_t.TWEET&&e.type!==_t.USER)throw new Error("Incorrect use of CommonModuleUI component.");const s=hl(e),l=s.titleKey??e.name.replace("Module",""),c=t(l);return d(qi,{title:c,description:`${t("Captured:")} ${i}`,active:!!i&&i>0,onClick:r,indicatorColor:s.indicatorColor,panelClass:s.panelClass,children:d(sr,{class:o?"h-screen max-h-screen max-w-none":"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm h-[82vh] max-h-[calc(100vh-4rem)]",title:c,show:n,fullscreen:o,onClose:()=>{a(false),r();},children:d(_M,{title:c,extension:e,fullscreen:o,onFullscreenChange:a})})})}const bM="UserMediaModule";function vM(e,t){return e===bM||!Array.isArray(t)||!t.length?[]:t.filter(n=>Dk(n)).map(n=>String(n.rest_id||"").trim()).filter(Boolean)}const Fp="TweetIndexModule";async function Yr(e,t){const n=Array.isArray(t)?t:[];await We.extAddTweets(e,n);const r=n.map(a=>String((a==null?void 0:a.rest_id)||"").trim()).filter(Boolean);e!==Fp&&r.length&&await We.extAddTweetCaptureIds(Fp,r);const o=vM(e,n);return o.length&&await We.extAddTweetCaptureIds("UserMediaModule",o),{kind:"tweets",count:n.length}}async function Ki(e,t){const n=Array.isArray(t)?t:[];return await We.extAddUsers(e,n),{kind:"users",count:n.length}}async function a_(e,t,n){const r=Array.isArray(t)?t:[];return await We.extAddUsers(e,r),n.length&&await We.extAddSocialEdges(e,n),{kind:"users",count:r.length}}function i_(e,t){Ie.info(`${e}: ${t} items received`);}function s_(e,t,n,r){Ie.debug(t.method,t.url,n.status,n.responseText),Ie.errorWithBanner(`${e}: Failed to parse API response`,r);}function zn(e){return (t,n,r)=>{if(e.match(t,n))try{const o=e.parse(t,n,r),a=e.count?e.count(o):Array.isArray(o)?o.length:0,i=e.project?e.project(r.name,o,t,n):{kind:"none",count:a},s=l=>{var h;const c=l&&typeof l=="object"?l:{kind:"none",count:a};i_(e.moduleName,a),(h=e.onSuccess)==null||h.call(e,o,{ext:r,req:t,res:n,projection:c,count:a});};i&&typeof i.then=="function"?i.then(l=>s(l)).catch(l=>{Ie.errorWithBanner(`${e.moduleName}: Failed to write API response projection`,l instanceof Error?l:new Error(String(l)));}):s(i);}catch(o){s_(e.moduleName,t,n,o instanceof Error?o:new Error(String(o)));}}}const l_="twe_bookmark_folder_name_cache_v1",c_=260,kM=1800,Xu=new Set,tu=new Set;function xM(){try{if(typeof localStorage>"u")return new Map;const e=localStorage.getItem(l_);if(!e)return new Map;const t=JSON.parse(e);if(!Array.isArray(t))return new Map;const n=[];for(const r of t)Array.isArray(r)&&r.length===2&&typeof r[0]=="string"&&typeof r[1]=="string"&&n.push([r[0],r[1]]);return new Map(n)}catch{return new Map}}function SM(e){try{if(typeof localStorage>"u")return;localStorage.setItem(l_,JSON.stringify([...e.entries()]));}catch{}}function CM(e){const t=[];for(const n of e){if(!n||typeof n!="object")continue;const r=String(n.rest_id||"").trim();if(r&&(t.push(r),t.length>=c_))break}return t}function TM(e){for(const t of e){const n=String(t||"").trim();n&&Xu.add(n);}}function MM(e,t,n){if(!t||!Xu.has(t)||tu.has(t))return;const r=Mi.get(t);if(!r)return;const o=CM(n);tu.add(t),We.extBackfillRecentBookmarkFolderName(e,t,r,{candidateTweetIds:o,candidateLimit:c_,recentCaptureScanLimit:kM}).then(a=>{((a==null?void 0:a.inspected)||0)>0&&Xu.delete(t),((a==null?void 0:a.updated)||0)>0&&Ie.info(`Bookmarks: folder-name backfill updated ${a.updated} rows for folder ${t}`);}).catch(()=>{}).finally(()=>{tu.delete(t);});}const Mi=xM();function RM(e){if(!e||typeof e!="object")return false;const t=e.timeline;if(!t||typeof t!="object")return false;const n=t.instructions;return Array.isArray(n)}function Qu(e,t=0,n=new Set){var o;if(!e||typeof e!="object"||t>5)return null;if(Array.isArray(e)){for(const a of e){const i=Qu(a,t+1,n);if(i)return i}return null}if(RM(e))return ((o=e.timeline)==null?void 0:o.instructions)||null;const r=e;if(n.has(r))return null;n.add(r);for(const a of Object.keys(r)){const i=Qu(r[a],t+1,n);if(i)return i}return null}function ml(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return /^\d+$/.test(n)?n:null}if(typeof e!="string")return null;const t=e.trim();return /^\d+$/.test(t)?t:null}function IM(e){const t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return /^(bookmarkcollectionid|bookmarkfolderid|bookmarkcollection|folderid|collectionid|folder)$/.test(t)}function ea(e){const t=new Set;function n(r,o){const a=o&&IM(o)?ml(r):null;if(a)return a;if(!r||typeof r!="object")return null;if(Array.isArray(r)){for(const s of r){const l=n(s);if(l)return l}return null}const i=r;if(t.has(i))return null;t.add(i);for(const[s,l]of Object.entries(i)){const c=n(l,s);if(c)return c}return null}return n(e)}function EM(e){var r,o,a,i,s,l;const t=((o=(r=e.data)==null?void 0:r.bookmark_timeline_v2)==null?void 0:o.timeline)||((i=(a=e.data)==null?void 0:a.bookmark_timeline)==null?void 0:i.timeline)||((l=(s=e.data)==null?void 0:s.bookmark_collection_timeline)==null?void 0:l.timeline)||e.timeline;if(t&&Array.isArray(t.instructions))return t.instructions;const n=Qu(e.data,0,new Set);if(n)return n;throw new Error("Bookmarks response missing timeline instructions")}const AM="__twe_bookmark_context_v1",DM="__twe_bookmark_strict_folder_id_v1",PM="twe_bookmark_strict_folder_id_v1",FM="__twe_bookmark_strict_mode_v1",OM="twe_bookmark_strict_mode_v1",LM="__twe_hook_stats_v1",NM="__twe_runtime_v1";function Is(e){const t=n=>{if(!n||typeof n!="object")return;const r=n,o=Number(r[e]);r[e]=Number.isFinite(o)?o+1:1;};try{const n=globalThis;t(n[LM]),t(n[NM]);}catch{}}function gl(e){try{return JSON.parse(e)}catch{return null}}function BM(e){try{return new URLSearchParams(e)}catch{return null}}function Od(e){if(typeof e>"u"||e===null)return null;if(typeof e=="string"){let t=gl(e);if(t!==null)return t;const n=BM(e);if(n){const r=n.get("variables");if(r&&(t=gl(r),t!==null))return t;const o=n.get("bookmark_collection_id")??n.get("folder_id");if(o)return {bookmark_collection_id:o,folder_id:o}}return null}if(typeof Blob<"u"&&e instanceof Blob)return null;if(typeof FormData<"u"&&e instanceof FormData)try{const t=new URLSearchParams;for(const[n,r]of e.entries())typeof r=="string"?t.set(n,r):t.set(n,String(r));return Od(t.toString())}catch{return null}return null}function nu(e){if(!e)return null;if(typeof e=="string"){const t=e.trim();if(!t)return null;if(/^\d+$/.test(t))return t;const n=no(t);if(n)return n;const r=gl(t);return r?ea(r):null}if(typeof e=="object"&&e!==null){const t=e;if(typeof t.folderId=="string"&&/^\d+$/.test(t.folderId))return t.folderId;if(typeof t.folderId=="number"&&Number.isFinite(t.folderId))return String(Math.trunc(t.folderId));if(typeof t.folder_id=="string"&&/^\d+$/.test(t.folder_id))return t.folder_id;if(typeof t.folder_id=="number"&&Number.isFinite(t.folder_id))return String(Math.trunc(t.folder_id));const n=ea(e);if(n)return n;const r=[t.pageUrl,t.url,t.location,t.currentUrl,t.folderUrl].find(o=>typeof o=="string");if(typeof r=="string"){const o=no(r);if(o)return o}}return null}function ru(){try{return globalThis[AM]??null}catch{return null}}function UM(){try{const e=globalThis;if(e[FM]===!1)return null;const t=ml(e[DM]);if(t)return t}catch{}try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(OM);if(e&&/^(0|false|off|no)$/i.test(e.trim()))return null;const t=ml(localStorage.getItem(PM));if(t)return t}catch{}return null}function $M(e){const t=u_(e.url);if(t)return t;if(e.body){const n=Od(e.body);if(n){const r=ea(n);if(r)return r}}return null}function HM(e){if(!e)return null;const t=gl(e);return t?ea(t):null}function no(e){try{const t=new URL(e,"https://x.com"),n=["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"],r=t.pathname.match(/\/bookmarks\/(\d+)/)||t.pathname.match(/\/bookmarks\/folders\/(\d+)/)||t.pathname.match(/\/bookmarks\/folder\/(\d+)/)||t.pathname.match(/\/bookmark_folders\/(\d+)/);if(r&&r[1])return r[1];for(const o of n){const a=t.searchParams.get(o);if(a&&/^\d+$/.test(a))return a}for(const[o,a]of t.searchParams.entries())if(/folder/i.test(o)&&/^\d+$/.test(a))return a;return null}catch{return null}}function u_(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;let r;try{r=JSON.parse(decodeURIComponent(n));}catch{try{r=JSON.parse(n);}catch{return null}}const o=ea(r);if(o)return o;if(r&&typeof r=="object"){const a=r;for(const i of ["bookmark_collection_id","bookmarkcollectionid","bookmarkCollectionId","folder_id","folderid","folderId","collection_id","collectionid","collectionId"]){const s=a[i],l=ml(s);if(l)return l}}}catch{return null}return null}function jM(e){const t={folder_id:null,folder_name:null,folder_url:typeof location<"u"?location.href:""};if(!t.folder_id)try{const n=new URL(e.url,"https://x.com"),r=u_(e.url);if(r)t.folder_id=r;else {const o=no(n.href);if(o)t.folder_id=o;else {const a=n.searchParams.get("variables");if(a){let i;try{i=JSON.parse(decodeURIComponent(a));}catch{i=JSON.parse(a);}const s=ea(i);s&&(t.folder_id=s);}}}}catch{}if(!t.folder_id&&e.body){const n=Od(e.body);if(n){const r=ea(n);r&&(t.folder_id=r);}}if(!t.folder_id){const n=nu(e.bookmarkContext);n&&(t.folder_id=n);}if(!t.folder_id){const n=nu(ru());n&&(t.folder_id=n);}if(!t.folder_id&&e.bookmarkContext&&typeof e.bookmarkContext=="object"){const n=e.bookmarkContext,r=[n.folderUrl,n.pageUrl,n.url,n.location,n.currentUrl].filter(o=>typeof o=="string"&&o.length>0).map(o=>no(o)).find(o=>!!o);r&&(t.folder_id=r);}if(e.bookmarkContext&&typeof e.bookmarkContext=="object"){const n=e.bookmarkContext;typeof n.folderUrl=="string"?t.folder_url=n.folderUrl:typeof n.pageUrl=="string"?t.folder_url=n.pageUrl:typeof n.url=="string"?t.folder_url=n.url:typeof n.location=="string"?t.folder_url=n.location:typeof n.currentUrl=="string"&&(t.folder_url=n.currentUrl);}else {const n=ru();if(n&&typeof n=="object"){const r=n;typeof r.folderUrl=="string"?t.folder_url=r.folderUrl:typeof r.pageUrl=="string"?t.folder_url=r.pageUrl:typeof r.url=="string"?t.folder_url=r.url:typeof r.location=="string"?t.folder_url=r.location:typeof r.currentUrl=="string"&&(t.folder_url=r.currentUrl);}}if(!t.folder_id){const n=typeof location<"u"?location.href:"";if(n){const r=no(n);r&&(t.folder_id=r,t.folder_url=n);}}if(!t.folder_id&&e.responseText){const n=HM(e.responseText);n&&(t.folder_id=n);}if(!t.folder_id){const n=nu(ru());n&&(t.folder_id=n);}if(!t.folder_id&&typeof document<"u"&&(t.folder_id=no(document.URL)),!t.folder_id&&typeof document<"u"){const n=document.querySelector('link[rel="canonical"]');n!=null&&n.href&&(t.folder_id=no(n.href));}if(!t.folder_id&&typeof document<"u"){const n=document.querySelector('meta[property="og:url"]'),r=(n==null?void 0:n.content)??"";r&&(t.folder_id=no(r));}if(t.folder_id){try{const r=new URL(t.folder_url||"","https://x.com");/\/i\/bookmarks\/?$/.test(r.pathname)&&(t.folder_url=`https://x.com/i/bookmarks/${t.folder_id}`);}catch{(!t.folder_url||/\/i\/bookmarks\/?$/.test(t.folder_url))&&(t.folder_url=`https://x.com/i/bookmarks/${t.folder_id}`);}const n=Mi.get(t.folder_id);n&&(t.folder_name=n);}return t}function qM(e){var n,r,o,a,i;const t=new Set;try{const l=((i=(a=(o=(r=(n=JSON.parse(e).data)==null?void 0:n.viewer)==null?void 0:r.user_results)==null?void 0:o.result)==null?void 0:a.bookmark_collections_slice)==null?void 0:i.items)??[];let c=!1;for(const h of l)h.id&&typeof h.name=="string"&&Mi.get(h.id)!==h.name&&(Mi.set(h.id,h.name),t.add(h.id),c=!0);c&&SM(Mi);}catch{}return t}function VM(e){try{const n=new URL(e,"https://x.com").pathname.toLowerCase().match(/\/graphql\/[^/]+\/([^/?#]+)/),r=String((n==null?void 0:n[1])||"").toLowerCase();return r?r==="bookmarks"||r==="bookmarktimeline"||r==="bookmarkfoldertimeline"||r==="bookmarkcollectiontimeline"||r==="bookmarkcollectionstimeline"||r==="bookmarkfoldersslice"||r==="bookmarkfolderslice"||r==="bookmarkcollectionslice"||r==="bookmarkslice":!1}catch{return false}}const zM=(e,t,n)=>{if(/\/graphql\/.+\/BookmarkFoldersSlice/.test(e.url)){const r=typeof t.responseText=="string"?t.responseText:"";if(r){const o=qM(r);o.size>0&&TM(o);}return}if(VM(e.url))try{const r=$M(e),o=typeof location<"u"?no(location.href):null;if(o&&r&&r!==o){Is("bookmarkDropsCrossFolder"),Ie.debug(`Bookmarks: skip cross-folder request pageFolder=${o}, requestFolder=${r}`);return}const a=jM({...e,responseText:t.responseText}),i=UM();if(i){const c=r||o||a.folder_id||null,h=r?"request":o?"page":a.folder_id?"context":"none";if(!c){Is("bookmarkDropsStrictNoExplicitFolder"),Ie.debug(`Bookmarks(strict): skip request without folder evidence: ${e.url}`);return}if(c!==i){Is("bookmarkDropsStrictFolderMismatch"),Ie.debug(`Bookmarks(strict): skip folder mismatch source=${h} candidateFolder=${c}, strictFolder=${i}`);return}!r&&h!=="none"&&Ie.debug(`Bookmarks(strict): allowing request without explicit folder id via ${h} context`),a.folder_id!==i&&(a.folder_id=i,a.folder_url=`https://x.com/i/bookmarks/${i}`);}a.folder_id||Is("bookmarkContextUnresolved");const s=na(t,EM,c=>Hn(c.content.itemContent));for(const c of s)if(c&&typeof c=="object"){const h=c;a.folder_id&&(h.__bookmark_folder_id=a.folder_id),a.folder_name&&(h.__bookmark_folder_name=a.folder_name),a.folder_id&&(h.__bookmark_folder_name_source=a.folder_name?"api":"id-only"),a.folder_url&&(h.__bookmark_folder_url=a.folder_url);}const l=`Bookmarks${a.folder_id?` (folder: ${a.folder_name??a.folder_id})`:""}`;Yr(n.name,s).then(()=>{MM(n.name,a.folder_id,s),i_(l,s.length);}).catch(c=>{Ie.errorWithBanner(`${l}: Failed to write API response projection`,c instanceof Error?c:new Error(String(c)));});}catch(r){s_("Bookmarks",e,t,r);}};class Op extends wn{constructor(){super(...arguments);Ve(this,"name","BookmarksModule");Ve(this,"type",_t.TWEET);}intercept(){return zM}render(){return jn}}const KM=zn({moduleName:"CommunityMembers",match:e=>/\/graphql\/.+\/(members|moderators)SliceTimeline_Query/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.communityResults.result;return (r.members_slice??r.moderators_slice).items_results.map(o=>o.result).filter(o=>o.__typename==="User")},project:(e,t)=>Ki(e,t)});class GM extends wn{constructor(){super(...arguments);Ve(this,"name","CommunityMembersModule");Ve(this,"type",_t.USER);}intercept(){return KM}render(){return jn}}const WM=zn({moduleName:"CommunityTimeline",match:e=>/\/graphql\/.+\/Community(Tweets|Media)Timeline/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.communityResults.result,a=(r.ranked_community_timeline??r.community_media_timeline).timeline.instructions,i=[],s=a.find(h=>h.type==="TimelineAddEntries"),l=(s==null?void 0:s.entries)??[];for(const h of l){if(Wo(h)){const f=Hn(h.content.itemContent);f&&i.push(f);}if(Ik(h)){const f=h.content.items.map(m=>Hn(m.item.itemContent)).filter(m=>!!m);i.push(...f);}}const c=a.find(h=>h.type==="TimelineAddToModule");if(c!=null&&c.moduleItems){const h=c.moduleItems.map(f=>Hn(f.item.itemContent)).filter(f=>!!f);i.push(...h);}return i},project:(e,t)=>Yr(e,t)});class YM extends wn{constructor(){super(...arguments);Ve(this,"name","CommunityTimelineModule");Ve(this,"type",_t.TWEET);}intercept(){return WM}render(){return jn}}const Ri=Ha([]),d_=new Map,f_=new Map,Lp=[{test:e=>/\/dm\/inbox_initial_state\.json/.test(e),parse:e=>({entries:e.inbox_initial_state.entries,conversations:Object.values(e.inbox_initial_state.conversations),users:Object.values(e.inbox_initial_state.users)})},{test:e=>/\/dm\/inbox_timeline\/trusted\.json/.test(e),parse:e=>({entries:e.inbox_timeline.entries,conversations:Object.values(e.inbox_timeline.conversations),users:Object.values(e.inbox_timeline.users)})},{test:e=>/\/dm\/conversation\/\d+-?\d+\.json/.test(e),parse:e=>({entries:e.conversation_timeline.entries,conversations:Object.values(e.conversation_timeline.conversations),users:Object.values(e.conversation_timeline.users)})}],XM=zn({moduleName:"DirectMessages",match:e=>Lp.some(t=>t.test(e.url)),parse:(e,t)=>{const n=Lp.find(l=>l.test(e.url));if(!n)return {messages:[],conversations:[],users:[]};const r=JSON.parse(t.responseText),{entries:o,conversations:a,users:i}=n.parse(r);return {messages:o.map(l=>l.message).filter(l=>!!l),conversations:a,users:i}},count:e=>e.messages.length,onSuccess:e=>{Ri.value=[...Ri.value,...e.messages],e.conversations.filter(Boolean).forEach(t=>d_.set(t.conversation_id,t)),e.users.filter(Boolean).forEach(t=>f_.set(t.id_str,t));}});function Np(e){const t=e?f_.get(e):null;return t?t.screen_name:""}function QM(e){const t=e?d_.get(e):null;return t?t.type:""}function Bp(e){var t,n,r;return [(t=e.message_data.attachment)==null?void 0:t.photo,(n=e.message_data.attachment)==null?void 0:n.video,(r=e.message_data.attachment)==null?void 0:r.animated_gif].filter(o=>!!o)}const Hr=Ed(),ZM=[Hr.display({id:"select",size:48,minSize:48,maxSize:48,meta:{exportable:false},header:({table:e})=>d("input",{type:"checkbox",class:"checkbox checkbox-sm align-middle",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>d("input",{type:"checkbox",class:"checkbox checkbox-sm",checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()})}),Hr.accessor("id",{size:112,minSize:112,meta:{exportKey:"id",exportHeader:"ID"},header:()=>d(pt,{i18nKey:"ID"}),cell:e=>d("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),Hr.accessor("time",{size:136,minSize:128,meta:{exportKey:"time",exportHeader:"Date",exportValue:e=>Ir(Fi(+e.original.time),ut.get("dateTimeFormat"))},header:()=>d(pt,{i18nKey:"Date"}),cell:e=>d("p",{class:"w-24",children:Ir(+e.getValue(),ut.get("dateTimeFormat"))})}),Hr.accessor("message_data.text",{size:360,minSize:280,maxSize:520,meta:{exportKey:"text",exportHeader:"Content"},header:()=>d(pt,{i18nKey:"Content"}),cell:e=>{var t;return d("div",{children:d("p",{class:"w-60 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:tl(e.row.original.message_data.text,(t=e.row.original.message_data.entities)==null?void 0:t.urls)}})})}}),Hr.accessor(e=>Bp(e),{id:"media",size:176,minSize:136,meta:{exportKey:"media",exportHeader:"Media",exportValue:e=>Bp(e.original).map(t=>({type:t.type,url:t.url,thumbnail:Ua(t.media_url_https,"thumb"),original:Zo(t),ext_alt_text:t.ext_alt_text}))},header:()=>d(pt,{i18nKey:"Media"}),cell:e=>d(hg,{data:e.getValue().filter(t=>!!t),onClick:t=>{var n;return (n=e.table.options.meta)==null?void 0:n.setMediaPreview(Zo(t))}})}),Hr.accessor(e=>Np(e.message_data.sender_id),{id:"sender",size:144,minSize:120,meta:{exportKey:"sender",exportHeader:"Sender"},header:()=>d(pt,{i18nKey:"Sender"}),cell:e=>d("p",{class:"whitespace-pre",children:d("a",{class:"link",target:"_blank",href:`https://twitter.com/${e.getValue()}`,children:["@",e.getValue()]})})}),Hr.accessor(e=>Np(e.message_data.recipient_id),{id:"recipient",size:144,minSize:120,meta:{exportKey:"recipient",exportHeader:"Recipient"},header:()=>d(pt,{i18nKey:"Recipient"}),cell:e=>d("p",{class:"whitespace-pre",children:e.getValue()?d("a",{class:"link",target:"_blank",href:`https://twitter.com/${e.getValue()}`,children:["@",e.getValue()]}):"N/A"})}),Hr.accessor("conversation_id",{size:144,minSize:128,meta:{exportKey:"conversation_id",exportHeader:"Conversation ID"},header:()=>d(pt,{i18nKey:"Conversation ID"}),cell:e=>d("p",{class:"w-20 break-all font-mono text-xs",children:e.getValue()})}),Hr.accessor(e=>QM(e.conversation_id),{id:"conversation_type",size:160,minSize:136,meta:{exportKey:"conversation_type",exportHeader:"Conversation Type"},header:()=>d(pt,{i18nKey:"Conversation Type"}),cell:e=>d("p",{class:"whitespace-pre",children:e.getValue()})}),Hr.display({id:"actions",size:112,minSize:104,meta:{exportable:false},header:()=>d(pt,{i18nKey:"Actions"}),cell:e=>d("div",{class:"flex flex-row items-start space-x-1",children:d("button",{onClick:()=>{var t;return (t=e.table.options.meta)==null?void 0:t.setRawDataPreview(e.row.original)},class:"btn btn-xs btn-neutral whitespace-nowrap",children:d(pt,{i18nKey:"Details"})})})})];function JM(){const{t:e}=Qn(),[t,n]=ir(),r=e("DirectMessages"),o=Ri.value.length;return d(qi,{title:r,description:`${e("Captured:")} ${o}`,active:!!o&&o>0,onClick:n,indicatorColor:"bg-accent",panelClass:"border-l-2 border-accent/50 pl-2",children:d(sr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[512px]",title:r,show:t,onClose:n,children:d(Bi,{title:r,records:Ri.value,columns:ZM,clear:()=>Ri.value=[]})})})}class eR extends wn{constructor(){super(...arguments);Ve(this,"name","DirectMessagesModule");Ve(this,"type",_t.CUSTOM);}intercept(){return XM}render(){return JM}}function tR(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;try{return JSON.parse(decodeURIComponent(n))}catch{return JSON.parse(n)}}catch{return null}}function nR(e){const t=tR(e.url),n=String((t==null?void 0:t.userId)||(t==null?void 0:t.user_id)||(t==null?void 0:t.rest_id)||(t==null?void 0:t.profileUserId)||"").trim(),r=String((t==null?void 0:t.screen_name)||(t==null?void 0:t.screenName)||(t==null?void 0:t.userScreenName)||"").trim();return {rest_id:n||void 0,screen_name:r||void 0}}function rR(e,t){var f,m,g,_,b,C;const n=JSON.parse(t.responseText),r=(m=(f=n==null?void 0:n.data)==null?void 0:f.user)==null?void 0:m.result,o=(_=(g=r==null?void 0:r.timeline)==null?void 0:g.timeline)==null?void 0:_.instructions;if(!Array.isArray(o))throw new Error("Followers response missing timeline instructions");const a=[];for(const v of o){if(v.type==="TimelineAddEntries")for(const T of v.entries||[]){if(md(T)){const R=Gr(T.content.itemContent);R&&a.push(R);continue}if(Po(T))for(const R of T.content.items||[]){if(R.item.itemContent.__typename!=="TimelineUser")continue;const P=Gr(R.item.itemContent);P&&a.push(P);}}if(v.type==="TimelineAddToModule")for(const T of v.moduleItems||[]){if(T.item.itemContent.__typename!=="TimelineUser")continue;const R=Gr(T.item.itemContent);R&&a.push(R);}}const i=nR(e),s=r&&r.__typename==="User"?{...r,rest_id:String(r.rest_id||i.rest_id||"").trim(),core:{...r.core,screen_name:String(((b=r.core)==null?void 0:b.screen_name)||i.screen_name||"").trim()}}:null,l=String((s==null?void 0:s.rest_id)||i.rest_id||"").trim(),c=String(((C=s==null?void 0:s.core)==null?void 0:C.screen_name)||i.screen_name||"").trim(),h=l?a.map(v=>{var T;return {id:`FollowersModule-follower-${l}-${v.rest_id}`,extension:"FollowersModule",relation_type:"follower",subject_user_id:l,subject_screen_name:c||void 0,related_user_id:v.rest_id,related_screen_name:(T=v.core)==null?void 0:T.screen_name,observed_at:Date.now(),provenance_surface:"followers"}}):[];return {subject:s,users:a,edges:h}}const oR=zn({moduleName:"Followers",match:e=>/\/graphql\/.+\/(BlueVerified)*Followers/.test(e.url),parse:(e,t)=>rR(e,t),count:e=>e.users.length,project:(e,t)=>a_(e,t.users,t.edges)});class aR extends wn{constructor(){super(...arguments);Ve(this,"name","FollowersModule");Ve(this,"type",_t.USER);}intercept(){return oR}render(){return jn}}function iR(e){try{const n=new URL(e,"https://x.com").searchParams.get("variables");if(!n)return null;try{return JSON.parse(decodeURIComponent(n))}catch{return JSON.parse(n)}}catch{return null}}function sR(e){const t=iR(e.url),n=String((t==null?void 0:t.userId)||(t==null?void 0:t.user_id)||(t==null?void 0:t.rest_id)||(t==null?void 0:t.profileUserId)||"").trim(),r=String((t==null?void 0:t.screen_name)||(t==null?void 0:t.screenName)||(t==null?void 0:t.userScreenName)||"").trim();return {rest_id:n||void 0,screen_name:r||void 0}}function lR(e,t){var f,m,g,_,b,C;const n=JSON.parse(t.responseText),r=(m=(f=n==null?void 0:n.data)==null?void 0:f.user)==null?void 0:m.result,o=(_=(g=r==null?void 0:r.timeline)==null?void 0:g.timeline)==null?void 0:_.instructions;if(!Array.isArray(o))throw new Error("Following response missing timeline instructions");const a=[];for(const v of o){if(v.type==="TimelineAddEntries")for(const T of v.entries||[]){if(md(T)){const R=Gr(T.content.itemContent);R&&a.push(R);continue}if(Po(T))for(const R of T.content.items||[]){if(R.item.itemContent.__typename!=="TimelineUser")continue;const P=Gr(R.item.itemContent);P&&a.push(P);}}if(v.type==="TimelineAddToModule")for(const T of v.moduleItems||[]){if(T.item.itemContent.__typename!=="TimelineUser")continue;const R=Gr(T.item.itemContent);R&&a.push(R);}}const i=sR(e),s=r&&r.__typename==="User"?{...r,rest_id:String(r.rest_id||i.rest_id||"").trim(),core:{...r.core,screen_name:String(((b=r.core)==null?void 0:b.screen_name)||i.screen_name||"").trim()}}:null,l=String((s==null?void 0:s.rest_id)||i.rest_id||"").trim(),c=String(((C=s==null?void 0:s.core)==null?void 0:C.screen_name)||i.screen_name||"").trim(),h=l?a.map(v=>{var T;return {id:`FollowingModule-following-${l}-${v.rest_id}`,extension:"FollowingModule",relation_type:"following",subject_user_id:l,subject_screen_name:c||void 0,related_user_id:v.rest_id,related_screen_name:(T=v.core)==null?void 0:T.screen_name,observed_at:Date.now(),provenance_surface:"following"}}):[];return {subject:s,users:a,edges:h}}const cR=zn({moduleName:"Following",match:e=>/\/graphql\/.+\/Following/.test(e.url),parse:(e,t)=>lR(e,t),count:e=>e.users.length,project:(e,t)=>a_(e,t.users,t.edges)});class uR extends wn{constructor(){super(...arguments);Ve(this,"name","FollowingModule");Ve(this,"type",_t.USER);}intercept(){return cR}render(){return jn}}const dR=zn({moduleName:"HomeTimeline",match:e=>/\/graphql\/.+\/Home(Latest)?Timeline/.test(e.url),parse:(e,t)=>na(t,n=>n.data.home.home_timeline_urt.instructions,n=>Hn(n.content.itemContent)),project:(e,t)=>Yr(e,t)});class fR extends wn{constructor(){super(...arguments);Ve(this,"name","HomeTimelineModule");Ve(this,"type",_t.TWEET);}intercept(){return dR}render(){return jn}}function hR(e){if(!(e instanceof HTMLElement))return false;const t=e.getBoundingClientRect();return t.width>0&&t.height>0&&t.bottom>0&&t.top<window.innerHeight}function h_(e){const t=new Set,n=[];for(const r of e){const o=String(r||"").trim();o&&(t.has(o)||(t.add(o),n.push(o)));}return n}function Zu(e){return String(e||"").replace(/\s+/g," ").replace(/\u00a0/g," ").trim()}function pR(e){if(typeof document>"u"||!e)return null;const t=[...document.querySelectorAll(`a[href*="/status/${e}"]`)],n=t.map(o=>o.closest("article")).find(o=>hR(o));if(n instanceof HTMLElement)return n;const r=t.map(o=>o.closest("article")).find(Boolean);return r instanceof HTMLElement?r:null}function mR(e,t){const n=e.querySelector(`a[href*="/status/${t}"]`),o=((n==null?void 0:n.getAttribute("href"))||"").match(/^\/([^/?#]+)\/status\//);return (o==null?void 0:o[1])||"unknown"}function gR(e,t){var o;const n=((o=e.querySelector('[data-testid="User-Name"] span'))==null?void 0:o.textContent)||"",r=Zu(n);return r?r.replace(/^@/,""):t}function yR(e){const t=h_([...e.querySelectorAll('[data-testid="tweetText"], div[lang]')].map(r=>Zu(r.textContent||"")));return t.length?t.join(`
`):Zu(e.innerText||e.textContent||"")}function _R(e){if(!e)return new Date().toUTCString();const t=Date.parse(e);return Number.isFinite(t)?new Date(t).toUTCString():new Date().toUTCString()}function wR(e){const t=[...e.querySelectorAll("img")].find(n=>{const r=n.getAttribute("src")||"";return /profile_images/.test(r)});return (t==null?void 0:t.getAttribute("src"))||""}function bR(e,t){const n=[...e.querySelectorAll("img")].map(o=>({src:o.getAttribute("src")||"",width:o.naturalWidth||o.clientWidth||0,height:o.naturalHeight||o.clientHeight||0,alt:o.getAttribute("alt")||""})).filter(({src:o,alt:a})=>!o||/profile_images/.test(o)||/emoji/.test(o)||!/twimg\.com\//.test(o)?false:a==="Image"?true:/\/media\//.test(o)||/name=/.test(o));return h_(n.map(o=>o.src)).slice(0,8).map((o,a)=>{const i=n.find(s=>s.src===o);return {type:"photo",media_url_https:o,media_url:o,id_str:`${t}${a}`,media_key:`dom:${t}:${a}`,indices:[0,0],url:o,display_url:o,expanded_url:o,sizes:{medium:{w:(i==null?void 0:i.width)||1200,h:(i==null?void 0:i.height)||675,resize:"fit"},large:{w:(i==null?void 0:i.width)||1200,h:(i==null?void 0:i.height)||675,resize:"fit"},small:{w:(i==null?void 0:i.width)||680,h:(i==null?void 0:i.height)||382,resize:"fit"},thumb:{w:150,h:150,resize:"crop"}},original_info:{width:(i==null?void 0:i.width)||1200,height:(i==null?void 0:i.height)||675},features:{}}})}function vR(e,t,n){return {__typename:"User",id:e||"unknown",rest_id:e||"unknown",affiliates_highlighted_label:null,has_graduated_access:false,is_blue_verified:false,profile_image_shape:"Circle",legacy:{default_profile:false,default_profile_image:!n,description:"",entities:{description:{urls:[]}},fast_followers_count:0,favourites_count:0,followers_count:0,friends_count:0,has_custom_timelines:false,is_translator:false,listed_count:0,media_count:0,normal_followers_count:0,pinned_tweet_ids_str:[],possibly_sensitive:false,profile_interstitial_type:"",statuses_count:0,translator_type:"",want_retweets:true,withheld_in_countries:[]},avatar:{image_url:n},core:{name:t||e||"unknown",screen_name:e||"unknown",created_at:new Date(0).toUTCString()},dm_permissions:{can_dm:false},location:{location:""},media_permissions:{can_media_tag:false},privacy:{protected:false},verification:{verified:false},relationship_perspectives:{following:false,followed_by:false},twe_private_fields:{created_at:0,updated_at:Date.now()}}}function kR(e){var g;const t=String(e.tweetId||"").trim();if(!t)return null;const n=pR(t);if(!n)return null;const r=mR(n,t),o=gR(n,r),a=yR(n),i=((g=n.querySelector("time"))==null?void 0:g.getAttribute("datetime"))||null,s=_R(i),l=wR(n),c=bR(n,t),h=e.bookmarkFolderId?String(e.bookmarkFolderId):"",f=e.bookmarkFolderName?String(e.bookmarkFolderName).trim():"";return {__typename:"Tweet",rest_id:t,core:{user_results:{result:vR(r,o,l)}},edit_control:{edit_tweet_ids:[t],editable_until_msecs:"0",is_edit_eligible:false,edits_remaining:"0"},is_translatable:false,views:{count:"0",state:"Enabled"},source:"dom-snapshot",legacy:{bookmark_count:0,bookmarked:e.bookmarked===true,created_at:s,conversation_id_str:t,display_text_range:[0,a.length],entities:{media:c.length?c:void 0,user_mentions:[],urls:[],hashtags:[],symbols:[],timestamps:[]},extended_entities:c.length?{media:c}:void 0,favorite_count:0,favorited:false,full_text:a,is_quote_status:false,lang:"",possibly_sensitive:false,possibly_sensitive_editable:false,quote_count:0,reply_count:0,retweet_count:0,retweeted:false,user_id_str:r||"unknown",id_str:t},twe_private_fields:{created_at:Date.parse(s)||Date.now(),updated_at:Date.now(),media_count:c.length},...h?{__bookmark_folder_id:h,__bookmark_folder_url:`https://x.com/i/bookmarks/${h}`,__bookmark_folder_name_source:f?"api":"id-only",...f?{__bookmark_folder_name:f}:{}}:{}}}const xR=/\/graphql\/[^/]+\/([^/?#]+)/i,Up=/^\d{5,25}$/,SR=new Set(["tweetid","tweetidstr","statusid","statusidstr","id","restid"]),CR=new Set(["userid","targetuserid","useridstr","sourceuserid"]),TR=new Set(["bookmarkcollectionid","bookmarkfolderid","bookmarkcollection","bookmarkfolder","folderid","collectionid"]),$s="BookmarksModule",$p="LikesModule",Hp="FollowingModule",MR="twe_bookmark_folder_name_cache_v1";function RR(e){return String(e||"").toLowerCase().replace(/[^a-z0-9]/g,"")}function jp(e){if(typeof e=="number"&&Number.isFinite(e)){const n=String(Math.trunc(e));return Up.test(n)?n:null}const t=String(e??"").trim();return t&&Up.test(t)?t:null}function p_(e){const t=String(e||"").match(xR);return (t==null?void 0:t[1])||""}function IR(e){const t=String(e||"").toLowerCase(),n=p_(e).toLowerCase(),r=`${t} ${n}`;return /(bookmarktweettofolder|addbookmarktofolder|createbookmarktofolder|bookmarktofolder)/.test(r)?{kind:"bookmark_folder_add",targetType:"folder"}:/(createbookmark|addbookmark|bookmarkcreate|bookmark\/entries\/add)/.test(r)?{kind:"bookmark_add",targetType:"tweet"}:/(deletebookmark|removebookmark|destroybookmark|bookmark\/entries\/(remove|delete|destroy))/.test(r)?{kind:"bookmark_remove",targetType:"tweet"}:/(favoritetweet|createfavorite|like(add|tweet)?\b)/.test(r)?{kind:"like_add",targetType:"tweet"}:/(unfavoritetweet|deletefavorite|destroyfavorite|unlike(tweet)?\b)/.test(r)?{kind:"like_remove",targetType:"tweet"}:/(followuser|createfollow|friendships\/create(\.json)?\b)/.test(r)?{kind:"follow_add",targetType:"user"}:/(unfollowuser|destroyfollow|friendships\/destroy(\.json)?\b)/.test(r)?{kind:"follow_remove",targetType:"user"}:/(createretweet|statuses\/retweet\/)/.test(r)?{kind:"retweet_add",targetType:"tweet"}:/(deleteretweet|unretweet|statuses\/unretweet\/)/.test(r)?{kind:"retweet_remove",targetType:"tweet"}:null}function qp(e){try{return JSON.parse(e)}catch{return null}}function ER(e){if(!e)return {};const t=e.trim();if(!t)return {};if(t.startsWith("{")||t.startsWith("[")){const r=qp(t);return r&&typeof r=="object"?r:{}}const n={};try{const r=new URLSearchParams(t);for(const[o,a]of r.entries()){const i=a.startsWith("{")||a.startsWith("[")?qp(a)??a:a;if(o in n){const s=n[o];Array.isArray(s)?s.push(i):n[o]=[s,i];}else n[o]=i;}}catch{return {}}return n}function Ii(e,t,n,r=0,o=new Set){if(r>8||!e)return;if(Array.isArray(e)){for(const i of e)Ii(i,t,n,r+1,o);return}if(typeof e!="object")return;const a=e;if(!o.has(a)){o.add(a);for(const[i,s]of Object.entries(a)){const l=RR(i);if(t(l))if(Array.isArray(s))for(const c of s){const h=jp(c);h&&n.add(h);}else {const c=jp(s);c&&n.add(c);}Ii(s,t,n,r+1,o);}}}function AR(e,t){const n=new Set,r=new Set,o=new Set;Ii(e,s=>SR.has(s),n),Ii(e,s=>CR.has(s),r),Ii(e,s=>TR.has(s),o);const i=String(t||"").match(/\/(?:retweet|unretweet)\/(\d{5,25})/i);return i!=null&&i[1]&&n.add(i[1]),{tweetIds:[...n],userIds:[...r],folderIds:[...o]}}function DR(e,t){return e.targetType==="tweet"&&t.tweetIds.length?t.tweetIds:e.targetType==="user"&&t.userIds.length?t.userIds:e.targetType==="folder"&&t.folderIds.length?t.folderIds:t.tweetIds.length?t.tweetIds:t.userIds.length?t.userIds:t.folderIds.length?t.folderIds:["unknown"]}function ou(e){return e.replace(/[^a-zA-Z0-9:_-]/g,"_").slice(0,128)}function PR(e){if(!e)return null;try{if(typeof localStorage>"u")return null;const t=localStorage.getItem(MR);if(!t)return null;const n=JSON.parse(t);if(!Array.isArray(n))return null;for(const r of n)if(Array.isArray(r)&&r.length===2&&String(r[0]||"").trim()===e&&typeof r[1]=="string")return r[1]}catch{return null}return null}function ui(e,t){const n={...e,legacy:{...e.legacy}};return typeof t.bookmarked=="boolean"&&(n.legacy.bookmarked=t.bookmarked),typeof t.favorited=="boolean"&&(n.legacy.favorited=t.favorited),typeof t.retweeted=="boolean"&&(n.legacy.retweeted=t.retweeted),t.bookmarkFolderId!==void 0&&(t.bookmarkFolderId?(n.__bookmark_folder_id=t.bookmarkFolderId,n.__bookmark_folder_url=`https://x.com/i/bookmarks/${t.bookmarkFolderId}`,n.__bookmark_folder_name_source=t.bookmarkFolderName?"api":"id-only",t.bookmarkFolderName?n.__bookmark_folder_name=t.bookmarkFolderName:delete n.__bookmark_folder_name):(delete n.__bookmark_folder_id,delete n.__bookmark_folder_name,delete n.__bookmark_folder_name_source,delete n.__bookmark_folder_url)),n}function Vp(e,t){return {...e,relationship_perspectives:{...e.relationship_perspectives||{},following:t}}}async function zp(e,t){const n=e.filter(Boolean);if(!n.length)return {hydratedIds:[],tasks:[]};const r=[];for(const o of n){const a=kR({tweetId:o,bookmarked:t.bookmarked,bookmarkFolderId:t.bookmarkFolderId,bookmarkFolderName:t.bookmarkFolderName});a&&r.push(a);}return r.length?(await We.extAddTweets($s,r),{hydratedIds:r.map(o=>o.rest_id),tasks:[]}):{hydratedIds:[],tasks:[]}}async function FR(e,t){const n=t.folderIds[0]??null,r=PR(n);switch(e.kind){case "bookmark_add":if(!t.tweetIds.length)return [];{const o=await zp(t.tweetIds,{bookmarked:true}),a=t.tweetIds.filter(i=>!o.hydratedIds.includes(i));return [...o.tasks,...a.length?[We.extAddTweetCaptureIds($s,a,i=>ui(i,{bookmarked:true}))]:[]]}case "bookmark_folder_add":if(!t.tweetIds.length)return [];{const o=await zp(t.tweetIds,{bookmarked:true,bookmarkFolderId:n??void 0,bookmarkFolderName:r}),a=new Set(o.hydratedIds),i=t.tweetIds.filter(s=>!a.has(s));return [...o.tasks,...i.length?[We.extAddTweetCaptureIds($s,i,s=>ui(s,{bookmarked:true,bookmarkFolderId:n??void 0,bookmarkFolderName:r}))]:[]]}case "bookmark_remove":return t.tweetIds.length?[We.extRemoveTweetCaptureIds($s,t.tweetIds,o=>ui(o,{bookmarked:false,bookmarkFolderId:null}))]:[];case "like_add":return t.tweetIds.length?[We.extAddTweetCaptureIds($p,t.tweetIds,o=>ui(o,{favorited:true}))]:[];case "like_remove":return t.tweetIds.length?[We.extRemoveTweetCaptureIds($p,t.tweetIds,o=>ui(o,{favorited:false}))]:[];case "follow_add":return t.userIds.length?[We.extAddUserCaptureIds(Hp,t.userIds,o=>Vp(o,true))]:[];case "follow_remove":return t.userIds.length?[We.extRemoveUserCaptureIds(Hp,t.userIds,o=>Vp(o,false))]:[];default:return []}}const OR=(e,t,n)=>{const r=IR(e.url);if(!r||t.status<200||t.status>=300)return;const o=ER(e.body),a=AR(o,e.url),i=DR(r,a),s=p_(e.url)||"none",l=ou(e.requestId||`${Date.now()}-${Math.random().toString(36).slice(2,9)}`),c=Date.now(),h=i.map((m,g)=>{const _=ou(m||"unknown"),b=`${l}-${r.kind}-${g}`,C=`${r.kind}|target:${_}|type:${r.targetType}|op:${ou(s)}`;return {id:b,data_key:C,created_at:c}}),f=[We.extAddCustomCaptures(n.name,h)];Rb({ts:c,extension:n.name,kind:r.kind,target_type:r.targetType,operation:s,request_id:e.requestId,tweet_ids:a.tweetIds,user_ids:a.userIds,folder_ids:a.folderIds,targets:i,mirror_task_count:f.length}),FR(r,a).then(m=>Promise.allSettled([...f,...m])).then(m=>{for(const g of m)g.status==="rejected"&&Ie.warn("InteractionEvents: failed to mirror interaction state",g.reason);}),Ie.info(`InteractionEvents: ${h.length} items received`),Ie.debug(`InteractionEvents: kind=${r.kind} targetType=${r.targetType} op=${s}`);};function LR(e){return e.slice().sort((t,n)=>Number(n.created_at||0)-Number(t.created_at||0))}function NR(e){if(!Number.isFinite(e)||e<=0)return "-";try{return new Date(e).toLocaleString()}catch{return String(e)}}function BR(e){var a,i;const t=String(e||"").split("|"),n=t[0]||"unknown",r=((a=t.find(s=>s.startsWith("target:")))==null?void 0:a.slice(7))||"-",o=((i=t.find(s=>s.startsWith("op:")))==null?void 0:i.slice(3))||"-";return {kind:n,target:r,operation:o}}function UR({extension:e}){const{t}=Qn(),[n,r]=ir(),o=o_(e.name),a=Qy(()=>We.extGetCaptures(e.name),[e.name]),i=Array.isArray(a)?a:[],s=LR(i).slice(0,150);return d(qi,{title:t("Interaction Events"),description:`${t("Captured:")} ${o}`,active:o>0,onClick:r,indicatorColor:"bg-neutral",panelClass:"opacity-90",children:d(sr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[512px]",title:t("Interaction Events"),show:n,onClose:r,children:[d("div",{class:"text-xs text-base-content opacity-70 mb-2",children:["Captures request-level actions (like/bookmark/follow/repost). Showing latest"," ",s.length," events."]}),d("div",{class:"overflow-y-auto max-h-[460px] border rounded-box-half border-base-300",children:d("table",{class:"table table-xs w-full",children:[d("thead",{children:d("tr",{children:[d("th",{children:"Time"}),d("th",{children:"Action"}),d("th",{children:"Target"}),d("th",{children:"Op"})]})}),d("tbody",{children:s.map(l=>{const c=BR(l.data_key);return d("tr",{children:[d("td",{class:"font-mono",children:NR(Number(l.created_at||0))}),d("td",{class:"font-mono",children:c.kind}),d("td",{class:"font-mono break-all",children:c.target}),d("td",{class:"font-mono break-all",children:c.operation})]},l.id)})})]})})]})})}class $R extends wn{constructor(){super(...arguments);Ve(this,"name","InteractionEventsModule");Ve(this,"type",_t.CUSTOM);}intercept(){return OR}render(){return UR}}const HR=zn({moduleName:"Likes",match:e=>/\/graphql\/.+\/Likes/.test(e.url),parse:(e,t)=>na(t,n=>n.data.user.result.timeline.timeline.instructions,n=>Hn(n.content.itemContent)),project:(e,t)=>Yr(e,t)});class jR extends wn{constructor(){super(...arguments);Ve(this,"name","LikesModule");Ve(this,"type",_t.TWEET);}intercept(){return HR}render(){return jn}}const qR=zn({moduleName:"ListMembers",match:e=>/\/graphql\/.+\/ListMembers/.test(e.url),parse:(e,t)=>na(t,n=>n.data.list.members_timeline.timeline.instructions,n=>Gr(n.content.itemContent)),project:(e,t)=>Ki(e,t)});class VR extends wn{constructor(){super(...arguments);Ve(this,"name","ListMembersModule");Ve(this,"type",_t.USER);}intercept(){return qR}render(){return jn}}const zR=zn({moduleName:"ListSubscribers",match:e=>/\/graphql\/.+\/ListSubscribers/.test(e.url),parse:(e,t)=>na(t,n=>n.data.list.subscribers_timeline.timeline.instructions,n=>Gr(n.content.itemContent)),project:(e,t)=>Ki(e,t)});class KR extends wn{constructor(){super(...arguments);Ve(this,"name","ListSubscribersModule");Ve(this,"type",_t.USER);}intercept(){return zR}render(){return jn}}const GR=zn({moduleName:"ListTimeline",match:e=>/\/graphql\/.+\/ListLatestTweetsTimeline/.test(e.url),parse:(e,t)=>na(t,n=>n.data.list.tweets_timeline.timeline.instructions,n=>Hn(n.content.itemContent)),project:(e,t)=>Yr(e,t)});class WR extends wn{constructor(){super(...arguments);Ve(this,"name","ListTimelineModule");Ve(this,"type",_t.TWEET);}intercept(){return GR}render(){return jn}}const YR={info:"text-base-content",warn:"text-warning",error:"text-error"},XR=[{pattern:/^Database connected: (.+)$/,key:"Database connected: {{name}}",map:e=>({name:e[1]})},{pattern:/^App options migrated from v(.+) to v(.+)$/,key:"App options migrated from v{{oldVersion}} to v{{newVersion}}",map:e=>({oldVersion:e[1],newVersion:e[2]})},{pattern:/^Hooked into XMLHttpRequest \(installed=(true|false)\)$/,key:"Hooked into XMLHttpRequest (installed={{installed}})",map:e=>({installed:e[1]})},{pattern:/^Hook safe mode enabled \((.+)\)$/,key:"Hook safe mode enabled ({{reason}})",map:e=>({reason:e[1]})},{pattern:/^Hook repair failed \((\d+)\/(\d+)\)$/,key:"Hook repair failed ({{failures}}/{{limit}})",map:e=>({failures:e[1],limit:e[2]})},{pattern:/^Bookmark context tracking install failed; continuing without tracker \((.+)\)$/,key:"Bookmark context tracking install failed; continuing without tracker ({{details}})",map:e=>({details:e[1]})},{pattern:/^TWE_DIAG (.+)$/,key:"TWE_DIAG {{phase}}",map:e=>({phase:e[1]})},{pattern:/^([A-Za-z]+): (\d+) items received$/,key:"{{module}}: {{count}} items received",map:e=>({module:e[1],count:e[2]})},{pattern:/^Exporting to ZIP file: (.+)$/,key:"Exporting to ZIP file: {{filename}}",map:e=>({filename:e[1]})},{pattern:/^Exporting to (.+) file: (.+)$/,key:"Exporting to {{format}} file: {{filename}}",map:e=>({format:e[1],filename:e[2]})},{pattern:/^Streaming export to (.+) file: (.+)$/,key:"Streaming export to {{format}} file: {{filename}}",map:e=>({format:e[1],filename:e[2]})},{pattern:/^Migration completed: (\d+) users and (\d+) tweets updated\.$/,key:"Migration completed: {{users}} users and {{tweets}} tweets updated.",map:e=>({users:e[1],tweets:e[2]})},{pattern:/^TweetTombstone received \(Reason: (.+)\)$/,key:"TweetTombstone received (Reason: {{reason}})",map:e=>({reason:e[1]})}],m_="twe_raw_capture_daemon_url_v1",Kp="twe_raw_search_query_v1",Gp="twe_raw_search_sort_v1",Wp="twe_raw_search_limit_v1",g_="twe_raw_search_saved_v1",y_="twe_raw_search_ranking_v1";function QR({lines:e}){const{t}=Qn(),n=e.value.slice().reverse(),r=o=>{for(const a of XR){const i=o.match(a.pattern);if(i)return t(a.key,a.map(i))}return t(o)};return d("pre",{class:"leading-none text-xs max-h-48 bg-base-200 overflow-y-scroll m-0 px-1 py-2.5 no-scrollbar rounded-box-half",children:n.map(o=>d("span",{class:YR[o.type],children:["#",o.index," ",r(o.line),`
`]},o.index))})}function ZR(){const{t:e}=Qn(),[t,n]=Ne(()=>dl()),r=o=>e(typeof o=="boolean"?o?"online":"offline":String(o||"unknown"));return it(()=>{const o=()=>n(dl());o();let a=null;const i=()=>{const s=document.hidden?9e3:2500;a=window.setTimeout(()=>{o(),i();},s);};return i(),window.addEventListener("twe:raw-event-v1",o),window.addEventListener("twe:raw-spool-state-v1",o),window.addEventListener("twe:raw-monitor-role-v1",o),()=>{a!==null&&window.clearTimeout(a),window.removeEventListener("twe:raw-event-v1",o),window.removeEventListener("twe:raw-spool-state-v1",o),window.removeEventListener("twe:raw-monitor-role-v1",o);}},[]),d("div",{class:"text-[11px] leading-tight bg-base-200 rounded-box-half px-2 py-1.5 mb-1",children:[d("div",{children:e("raw events: {{total}} | dropped: {{dropped}}",{total:Number(t.total||0),dropped:Number(t.dropped||0)})}),d("div",{children:e("spool: {{queued}} queued / {{enqueued}} enq / {{flushed}} flushed / {{failed}} failed",{queued:Number(t.spool_count||0),enqueued:Number(t.spool_enqueued||0),flushed:Number(t.spool_flushed||0),failed:Number(t.spool_failed||0)})}),d("div",{children:e("spool overflow drops: {{drops}} | unavailable: {{unavailable}} | oldest pending: {{age}}ms",{drops:Number(t.spool_drop_overflow||0),unavailable:Number(t.spool_unavailable||0),age:Number(t.oldest_pending_age_ms||0)})}),d("div",{children:t.daemon_last_error?e("daemon: {{status}} | last error: {{error}}",{status:r(t.daemon_online),error:t.daemon_last_error}):e("daemon: {{status}}",{status:r(t.daemon_online)})}),d("div",{children:e("monitor: {{role}} | leader: {{leader}} | lease: {{lease}}",{role:r(t.monitor_role),leader:t.monitor_leader_tab_id||"-",lease:Number(t.monitor_last_heartbeat_ms||0)})}),d("div",{children:e("monitor ticks route/viewport: {{route}}/{{viewport}} | suppressed route/viewport: {{suppressedRoute}}/{{suppressedViewport}}",{route:Number(t.monitor_ticks_route||0),viewport:Number(t.monitor_ticks_viewport||0),suppressedRoute:Number(t.monitor_suppressed_route||0),suppressedViewport:Number(t.monitor_suppressed_viewport||0)})})]})}function JR(){const{t:e}=Qn(),[t,n]=Ne(false),[r,o]=Ne(()=>kr());it(()=>{const i=()=>o(kr());return window.addEventListener(Nf.eventName,i),()=>window.removeEventListener(Nf.eventName,i)},[]);const a=async()=>{if(!t){n(true);try{await Td();}finally{n(false);}}};return d("div",{class:"mb-1 grid min-w-0 grid-cols-2 items-center gap-2",children:[d("label",{class:"label min-w-0 cursor-pointer gap-2 py-0",children:[d("span",{class:"text-[11px]",children:e("Diagnostic capture")}),d("input",{type:"checkbox",class:"toggle toggle-xs",checked:r,onChange:i=>{const s=i.target.checked;Km(s),o(s);}})]}),d("button",{class:"btn btn-xs h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight",onClick:()=>{Gm();},children:e("Clear Buffers")}),d("button",{class:"btn btn-xs col-span-2 h-auto min-h-6 max-w-full whitespace-normal break-words text-center leading-tight",disabled:t,onClick:a,children:e(t?"Preparing diagnostics...":"Export Diagnostics Bundle")})]})}const Hs={bm25:"",lexical:"",cover_density:"",recency:"",term_match:"",phrase_match:"",cover_bigram:"",cover_trigram:""};function Fa(e){try{return localStorage.getItem(e)}catch{return null}}function Ia(e,t){try{localStorage.setItem(e,t);}catch{}}function eI(){try{const e=Fa(g_);if(!e)return [];const t=JSON.parse(e);if(!Array.isArray(t))return [];const n=[];for(const r of t){if(!r||typeof r!="object")continue;const o=r,a=String(o.id||"").trim(),i=String(o.name||"").trim(),s=String(o.query||"").trim();!a||!i||n.push({id:a,name:i,query:s});}return n.slice(0,30)}catch{return []}}function tI(e){try{const t=JSON.stringify(e.slice(0,30));Ia(g_,t);}catch{}}function nI(){try{const e=Fa(y_);if(!e)return {...Hs};const t=JSON.parse(e);if(!t||typeof t!="object")return {...Hs};const n=t;return {bm25:String(n.bm25||"").trim(),lexical:String(n.lexical||"").trim(),cover_density:String(n.cover_density||"").trim(),recency:String(n.recency||"").trim(),term_match:String(n.term_match||"").trim(),phrase_match:String(n.phrase_match||"").trim(),cover_bigram:String(n.cover_bigram||"").trim(),cover_trigram:String(n.cover_trigram||"").trim()}}catch{return {...Hs}}}function rI(e){try{Ia(y_,JSON.stringify({bm25:String(e.bm25||"").trim(),lexical:String(e.lexical||"").trim(),cover_density:String(e.cover_density||"").trim(),recency:String(e.recency||"").trim(),term_match:String(e.term_match||"").trim(),phrase_match:String(e.phrase_match||"").trim(),cover_bigram:String(e.cover_bigram||"").trim(),cover_trigram:String(e.cover_trigram||"").trim()}));}catch{}}function oI(e){const t=String(e||"").trim();if(!t)return "";const n=Number(t);return Number.isFinite(n)?String(n):""}function Yp(e){const t={};for(const n of Object.keys(Hs)){const r=oI(e[n]);r&&(t[n]=Number(r));}return t}function yl(e){const t=String(e||"").trim();return t?t.replace(/\/+$/g,""):""}function au(){const e=ut.get("rawCaptureDaemonUrl",""),t=yl(String(e||""));if(t)return t;const n=yl(Fa(m_)||"");return n||"http://127.0.0.1:8754"}function di(e,t){const n=String(e||"").trim(),r=String(t||"").trim();return r?n?`${n} ${r}`:r:n}function aI(){return `saved-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function iI(e){const t=n=>{const r=new Map;for(const o of n){const a=String(o||"").trim();a&&r.set(a,(r.get(a)||0)+1);}return [...r.entries()].sort((o,a)=>a[1]!==o[1]?a[1]-o[1]:o[0].localeCompare(a[0])).slice(0,6).map(([o,a])=>({value:o,count:a}))};return {authors:t(e.map(n=>n.author_screen_name||"")),routes:t(e.map(n=>n.route_type||"")),folders:t(e.map(n=>n.bookmark_folder_id||""))}}function iu(e,t){const n=[],r=String(e||"").trim();return r&&n.push(r),t.fromUser.trim()&&n.push(`from:${t.fromUser.trim().replace(/^@+/,"")}`),t.toUser.trim()&&n.push(`to:${t.toUser.trim().replace(/^@+/,"")}`),t.folderIdOrName.trim()&&n.push(`bookmark_folder:${t.folderIdOrName.trim()}`),t.sourceContains.trim()&&n.push(`source:${t.sourceContains.trim()}`),t.cardName.trim()&&n.push(`card_name:${t.cardName.trim()}`),t.bookmarkedOnly&&n.push("is:bookmarked"),t.likedOnly&&n.push("is:liked"),t.mediaOnly&&n.push("filter:media"),t.repliesOnly&&n.push("filter:replies"),t.excludeRetweets&&n.push("-filter:retweets"),t.verifiedOnly&&n.push("filter:verified"),t.blueVerifiedOnly&&n.push("filter:blue_verified"),n.join(" ").trim()}const sI=["filter:replies","-filter:replies","filter:media","-filter:retweets","id:","from_id:","in_reply_to_id:","domain:x.com","is:bookmarked","is:liked","filter:verified","filter:blue_verified","source:iphone","card_name:summary_large_image","min_faves:100","lang:en","since:2026-01-01","until:2026-12-31","OR"],Xp=["AND","OR","NOT","from:","from_id:","author_id:","to:","to_id:","in_reply_to_id:","id:","lang:","route:","bookmark_folder:","conversation_id:","source:","card_name:","url:","domain:","filter:replies","filter:retweets","-filter:retweets","filter:media","filter:links","filter:verified","filter:blue_verified","is:bookmarked","is:liked","is:verified","is:blue_verified","has:links","has:hashtags","has:mentions","has:cashtags","min_faves:","min_likes:","min_retweets:","min_replies:","min_bookmarks:","since:","until:"],lI="search.export.v1";function cI(e){const t=String(e||"");if(!t.trim())return "";const n=t.split(/\s+/g);return String(n[n.length-1]||"").trim()}function uI(e,t){const n=String(t||"").trim();if(!n)return String(e||"");const r=String(e||"");return r.trim()?/\s$/.test(r)?`${r}${n}`:r.replace(/\S+$/,n).trim():n}function dI(e){const t=cI(e).toLowerCase();return t?Xp.filter(n=>n.toLowerCase().startsWith(t)||n.toLowerCase().includes(t)).slice(0,10):Xp.slice(0,10)}function fI(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hI(e,t){const n=String(e),r=[...new Set(t.map(i=>String(i||"").trim().toLowerCase()))].filter(i=>i.length>=2).sort((i,s)=>s.length-i.length).slice(0,24);if(!n||!r.length)return d(fr,{children:n});const o=new RegExp(`(${r.map(i=>fI(i)).join("|")})`,"ig"),a=n.split(o);return d(fr,{children:a.map((i,s)=>{const l=i.toLowerCase();return r.includes(l)?d("mark",{class:"bg-warning/30 px-[1px] rounded-[2px]",children:i},`hl-${s}`):d(fr,{children:i},`txt-${s}`)})})}function pI(e){const t=[];return e.author_screen_name&&t.push(`from:${e.author_screen_name}`),e.route_type&&t.push(`route:${e.route_type}`),e.bookmark_folder_id&&t.push(`bookmark_folder:${e.bookmark_folder_id}`),e.has_media&&t.push("filter:media"),e.has_links&&t.push("has:links"),e.bookmarked&&t.push("is:bookmarked"),e.favorited&&t.push("is:liked"),e.author_verified&&t.push("is:verified"),e.author_blue_verified&&t.push("is:blue_verified"),[...new Set(t)].slice(0,8)}function mI(e){const t=Date.now();return {schema_version:lI,generated_at_ms:t,generated_at_iso:new Date(t).toISOString(),producer:{name:"twitter-web-exporter.local-search",version:"1"},source:{daemon_base_url:e.daemonBaseUrl,page_url:typeof location<"u"?location.href:""},request:{query:e.effectiveQuery,sort:e.sort,limit:e.limit,offset:e.offset,ranking:e.ranking},response:e.payload}}function gI(){var we,mt,It,$t,Et,Yt;const[e,t]=Ne(()=>au()),[n,r]=Ne(()=>Fa(Kp)||""),[o,a]=Ne(()=>{const j=Fa(Gp);return j==="newest"||j==="oldest"||j==="relevance"?j:"relevance"}),[i,s]=Ne(()=>{const j=Number(Fa(Wp)||"50");return Number.isFinite(j)&&j>0&&j<=500?Math.floor(j):50}),[l,c]=Ne(0),[h,f]=Ne(()=>eI()),[m,g]=Ne(""),[_,b]=Ne(""),[C,v]=Ne(""),[T,R]=Ne(""),[P,L]=Ne(""),[D,O]=Ne(""),[B,I]=Ne(""),[x,F]=Ne(false),[U,Ce]=Ne(false),[X,re]=Ne(false),[Z,ce]=Ne(false),[he,fe]=Ne(false),[me,z]=Ne(false),[ue,Ae]=Ne(false),[ie,Oe]=Ne(""),[Le,ee]=Ne(""),[ne,V]=Ne(""),[se,_e]=Ne(""),[ke,Ze]=Ne(""),[Je,Me]=Ne(""),[bt,Nt]=Ne(""),[Kt,qt]=Ne(""),[Mt,Ue]=Ne(false),[Ye,wt]=Ne(""),[Re,gt]=Ne(null),[ot,$e]=Ne("");it(()=>{const j=nI();Oe(j.bm25),ee(j.lexical),V(j.cover_density),_e(j.recency),Ze(j.term_match),Me(j.phrase_match),Nt(j.cover_bigram),qt(j.cover_trigram);},[]),it(()=>{Ia(Kp,n);},[n]),it(()=>{Ia(Gp,o);},[o]),it(()=>{Ia(Wp,String(i));},[i]),it(()=>{tI(h);},[h]),it(()=>{rI({bm25:ie,lexical:Le,cover_density:ne,recency:se,term_match:ke,phrase_match:Je,cover_bigram:bt,cover_trigram:Kt});},[ie,Le,ne,se,ke,Je,bt,Kt]);const be=async(j=l)=>{if(Mt)return;const Xe=yl(e||au());if(!Xe){wt("Missing recorder daemon URL.");return}Ue(true),wt("");try{const vt=iu(n,{fromUser:C,toUser:T,folderIdOrName:P,sourceContains:D,cardName:B,bookmarkedOnly:x,likedOnly:U,mediaOnly:X,repliesOnly:Z,excludeRetweets:he,verifiedOnly:me,blueVerifiedOnly:ue}),Qe=new URLSearchParams;vt.trim()&&Qe.set("q",vt.trim()),Qe.set("sort",o),Qe.set("limit",String(i)),Qe.set("offset",String(Math.max(0,j)));const Fe=Yp({bm25:ie,lexical:Le,cover_density:ne,recency:se,term_match:ke,phrase_match:Je,cover_bigram:bt,cover_trigram:Kt});for(const[Pe,At]of Object.entries(Fe))Qe.set(`rank_${Pe}`,String(At));const ft=await fetch(`${Xe}/query/search?${Qe.toString()}`),He=await ft.json();if(!ft.ok||!(He!=null&&He.ok)||!He.query)throw new Error((He==null?void 0:He.error)||`HTTP ${ft.status}`);gt(He.query),c(Math.max(0,j)),$e(vt);}catch(vt){wt(vt instanceof Error?vt.message:String(vt)),gt(null);}finally{Ue(false);}},ge=j=>{const Xe=String(j||"").trim();if(!Xe)return;const vt=`https://x.com/i/web/status/${Xe}`;window.open(vt,"_blank","noopener,noreferrer");},M=()=>{const j=Math.max(0,l-i);be(j);},k=()=>{const j=l+i;be(j);},A=!!Re&&l+i<Re.total_matches,H=iI((Re==null?void 0:Re.rows)||[]),K=()=>{const j=iu(n,{fromUser:C,toUser:T,folderIdOrName:P,sourceContains:D,cardName:B,bookmarkedOnly:x,likedOnly:U,mediaOnly:X,repliesOnly:Z,excludeRetweets:he,verifiedOnly:me,blueVerifiedOnly:ue}).trim();if(!j)return;const Xe=m.trim()||`Saved ${new Date().toLocaleString()}`;f(vt=>[{id:aI(),name:Xe,query:j},...vt.filter(Fe=>Fe.query!==j)].slice(0,30)),g("");},Te=j=>{const Xe=h.find(vt=>vt.id===j);Xe&&(r(Xe.query),b(j));},le=()=>{const j=_.trim();j&&(f(Xe=>Xe.filter(vt=>vt.id!==j)),b(""));},Ke=()=>{if(!Re)return;const j=mI({daemonBaseUrl:yl(e||au()),effectiveQuery:ot||iu(n,{fromUser:C,toUser:T,folderIdOrName:P,sourceContains:D,cardName:B,bookmarkedOnly:x,likedOnly:U,mediaOnly:X,repliesOnly:Z,excludeRetweets:he,verifiedOnly:me,blueVerifiedOnly:ue}),payload:Re,sort:o,limit:i,offset:l,ranking:Yp({bm25:ie,lexical:Le,cover_density:ne,recency:se,term_match:ke,phrase_match:Je,cover_bigram:bt,cover_trigram:Kt})});dy(j,`twe-search-export-${Date.now()}.json`);},De=dI(n),lt=((we=Re==null?void 0:Re.parsed)==null?void 0:we.positive_terms)||[];return d("div",{class:"text-[11px] leading-tight bg-base-200 rounded-box-half px-2 py-1.5 mb-1",children:[d("div",{class:"font-semibold mb-1",children:"Local Recorder Search"}),d("div",{class:"mb-1",children:[d("label",{class:"text-[10px] opacity-70",children:"Daemon URL"}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono mt-0.5",value:e,onInput:j=>{const Xe=j.target.value;t(Xe),Ia(m_,Xe),ut.set("rawCaptureDaemonUrl",Xe);}})]}),d("div",{class:"mb-1",children:[d("label",{class:"text-[10px] opacity-70",children:"Query (Twitter-style operators)"}),d("textarea",{class:"textarea textarea-bordered w-full min-h-16 mt-0.5 font-mono text-[11px]",value:n,onInput:j=>r(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),be(0));}})]}),d("div",{class:"flex flex-wrap gap-1 mb-1",children:De.map(j=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono opacity-80",onClick:()=>r(Xe=>uI(Xe,j)),children:j},`suggest-${j}`))}),d("details",{class:"mb-1",children:[d("summary",{class:"cursor-pointer text-[10px] opacity-70",children:"operator quick reference"}),d("div",{class:"text-[10px] font-mono mt-0.5 opacity-80 leading-tight",children:"boolean: `AND` `OR` `NOT` `(...)` | filters: global `AND` semantics"}),d("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"core: `from:` `from_id:` `to:` `to_id:` `id:` `domain:` `filter:*` `is:*` `has:*` `lang:` `since:` `until:`"}),d("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"ranking params: `rank_bm25` `rank_lexical` `rank_cover_density` `rank_recency`"}),d("div",{class:"text-[10px] font-mono opacity-80 leading-tight",children:"phrase/density: `rank_term_match` `rank_phrase_match` `rank_cover_bigram` `rank_cover_trigram`"})]}),d("div",{class:"flex flex-wrap gap-1 mb-1",children:sI.map(j=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Xe=>di(Xe,j)),children:j},j))}),d("div",{class:"flex flex-wrap items-center gap-1 mb-1",children:[d("select",{class:"select select-bordered select-xs flex-1 min-w-44",value:_,onChange:j=>Te(j.target.value),children:[d("option",{value:"",children:"saved searches"}),h.map(j=>d("option",{value:j.id,children:j.name},j.id))]}),d("input",{type:"text",class:"input input-bordered input-xs w-32",placeholder:"save name",value:m,onInput:j=>g(j.target.value)}),d("button",{class:"btn btn-ghost btn-xs",onClick:K,children:"Save"}),d("button",{class:"btn btn-ghost btn-xs",disabled:!_,onClick:le,children:"Delete"})]}),d("div",{class:"grid grid-cols-2 gap-1 mb-1",children:[d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"from user (alice)",value:C,onInput:j=>v(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"to user (bob)",value:T,onInput:j=>R(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono col-span-2",placeholder:"bookmark folder id/name",value:P,onInput:j=>L(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"source contains (iphone)",value:D,onInput:j=>O(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"card name (summary_large_image)",value:B,onInput:j=>I(j.target.value)})]}),d("div",{class:"flex flex-wrap items-center gap-2 mb-1",children:[d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:x,onChange:j=>F(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"bookmarked"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:U,onChange:j=>Ce(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"liked"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:X,onChange:j=>re(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"media"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:Z,onChange:j=>ce(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"replies"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:he,onChange:j=>fe(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"exclude retweets"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:me,onChange:j=>z(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"verified"})]}),d("label",{class:"label cursor-pointer p-0 gap-1",children:[d("input",{type:"checkbox",class:"checkbox checkbox-xs",checked:ue,onChange:j=>Ae(j.target.checked)}),d("span",{class:"label-text text-[10px]",children:"blue verified"})]})]}),d("div",{class:"flex flex-wrap items-center gap-1 mb-1",children:[d("select",{class:"select select-bordered select-xs w-24",value:o,onChange:j=>a(j.target.value),children:[d("option",{value:"relevance",children:"relevance"}),d("option",{value:"newest",children:"newest"}),d("option",{value:"oldest",children:"oldest"})]}),d("select",{class:"select select-bordered select-xs w-20",value:String(i),onChange:j=>s(Number(j.target.value)),children:[d("option",{value:"25",children:"25"}),d("option",{value:"50",children:"50"}),d("option",{value:"100",children:"100"}),d("option",{value:"200",children:"200"})]}),d("button",{class:"btn btn-primary btn-xs",disabled:Mt,onClick:()=>void be(0),children:Mt?"Searching...":"Search"}),d("button",{class:"btn btn-ghost btn-xs",disabled:!Re,onClick:Ke,children:"Export Blob"}),d("button",{class:"btn btn-ghost btn-xs",disabled:Mt,onClick:M,children:"Prev"}),d("button",{class:"btn btn-ghost btn-xs",disabled:Mt||!A,onClick:k,children:"Next"})]}),d("details",{class:"mb-1",children:[d("summary",{class:"cursor-pointer text-[10px] opacity-70",children:"ranking overrides (blank = daemon defaults)"}),d("div",{class:"grid grid-cols-2 gap-1 mt-1",children:[d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"bm25",value:ie,onInput:j=>Oe(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"lexical",value:Le,onInput:j=>ee(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_density",value:ne,onInput:j=>V(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"recency",value:se,onInput:j=>_e(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"term_match",value:ke,onInput:j=>Ze(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"phrase_match",value:Je,onInput:j=>Me(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_bigram",value:bt,onInput:j=>Nt(j.target.value)}),d("input",{type:"text",class:"input input-bordered input-xs w-full font-mono",placeholder:"cover_trigram",value:Kt,onInput:j=>qt(j.target.value)})]})]}),d("div",{class:"text-[10px] opacity-70 mb-1",children:Re?`rows ${Re.count} / total ${Re.total_matches} (offset ${Re.offset}, sort ${Re.sort})`:"No results yet."}),ot?d("div",{class:"text-[10px] font-mono opacity-70 mb-1",children:["effective: ",ot]}):null,(mt=Re==null?void 0:Re.parsed)!=null&&mt.lexical_expression?d("div",{class:"text-[10px] font-mono opacity-70 mb-1",children:["parse: ",Re.parsed.lexical_expression,Re.parsed.filter_boolean_semantics?` | filters=${Re.parsed.filter_boolean_semantics}`:""]}):null,Re!=null&&Re.ranking?d("div",{class:"text-[10px] font-mono opacity-70 mb-1 leading-tight",children:["weights bm25=",Number(Re.ranking.bm25||0).toFixed(2)," lexical=",Number(Re.ranking.lexical||0).toFixed(2)," density=",Number(Re.ranking.cover_density||0).toFixed(2)," recency=",Number(Re.ranking.recency||0).toFixed(2),d("br",{}),"term=",Number(Re.ranking.term_match||0).toFixed(2)," phrase=",Number(Re.ranking.phrase_match||0).toFixed(2)," bigram=",Number(Re.ranking.cover_bigram||0).toFixed(2)," trigram=",Number(Re.ranking.cover_trigram||0).toFixed(2)]}):null,Ye?d("div",{class:"text-error mb-1",children:["search error: ",Ye]}):null,(It=Re==null?void 0:Re.warning_objects)!=null&&It.length?d("div",{class:"text-warning mb-1 space-y-0.5",children:Re.warning_objects.map((j,Xe)=>d("div",{children:["[",j.code||"search_warning","] ",j.message||"search warning",j.token?` (${j.token})`:""]},`warn-${Xe}`))}):($t=Re==null?void 0:Re.warnings)!=null&&$t.length?d("div",{class:"text-warning mb-1",children:["warnings: ",Re.warnings.join(" | ")]}):null,(Et=Re==null?void 0:Re.rows)!=null&&Et.length?d("div",{class:"mb-1",children:[d("div",{class:"text-[10px] opacity-70 mb-0.5",children:"facets"}),d("div",{class:"flex flex-wrap gap-1 mb-0.5",children:H.authors.map(j=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Xe=>di(Xe,`from:${j.value}`)),children:["@",j.value," (",j.count,")"]},`author-${j.value}`))}),d("div",{class:"flex flex-wrap gap-1 mb-0.5",children:H.routes.map(j=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Xe=>di(Xe,`route:${j.value}`)),children:["route:",j.value," (",j.count,")"]},`route-${j.value}`))}),d("div",{class:"flex flex-wrap gap-1",children:H.folders.map(j=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(Xe=>di(Xe,`bookmark_folder:${j.value}`)),children:["folder:",j.value," (",j.count,")"]},`folder-${j.value}`))})]}):null,d("div",{class:"max-h-56 overflow-y-auto space-y-1",children:(Yt=Re==null?void 0:Re.rows)!=null&&Yt.length?Re.rows.map(j=>d("div",{class:"bg-base-100 rounded px-1.5 py-1",children:[d("div",{class:"flex items-center justify-between gap-1",children:[d("div",{class:"font-mono text-[10px]",children:["@",j.author_screen_name||"unknown"," · ",j.entity_id," · ",j.route_type]}),d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1",onClick:()=>ge(j.entity_id),children:"Open"})]}),d("div",{class:"text-[11px] whitespace-pre-line break-words",children:hI(j.text||"[no text available in snapshot]",lt)}),d("div",{class:"font-mono text-[10px] opacity-70 mt-0.5",children:["score=",Number(j.score||0).toFixed(3)," | fav=",Number(j.favorite_count||0)," ","rt=",Number(j.retweet_count||0)," rep=",Number(j.reply_count||0)," q=",Number(j.quote_count||0),j.bookmark_folder_id?` | folder=${j.bookmark_folder_id}`:"",j.source_text?` | src=${j.source_text}`:"",j.card_name?` | card=${j.card_name}`:"",j.author_verified?" | verified":"",j.author_blue_verified?" | blue":"",j.has_media?" | media":"",j.has_links?" | links":"",j.is_reply?" | reply":"",j.is_retweet?" | retweet":"",j.is_quote?" | quote":"",j.bookmarked?" | bookmarked":"",j.favorited?" | liked":""]}),d("div",{class:"flex flex-wrap gap-1 mt-0.5",children:pI(j).map(Xe=>d("button",{class:"btn btn-ghost btn-xs h-5 min-h-0 px-1 font-mono",onClick:()=>r(vt=>di(vt,Xe)),children:Xe},`${j.entity_id}-${Xe}`))})]},j.entity_id)):d("div",{class:"text-[10px] opacity-70",children:"Run a query to load rows."})})]})}function yI(){return d(fr,{children:[d("div",{class:"divider mt-0 mb-1"}),d(JR,{}),d(ZR,{}),d(QR,{lines:el})]})}function _I(){const{t:e}=Qn(),[t,n]=ir();return d(qi,{title:e("Local Search"),description:e("Search indexed tweets with Twitter-style operators"),active:true,onClick:n,indicatorColor:"bg-neutral",panelClass:"opacity-90",children:d(sr,{class:"max-w-4xl md:max-w-screen-md sm:max-w-screen-sm min-h-[560px]",title:e("Local Recorder Search"),show:t,onClose:n,children:d(gI,{})})})}class wI extends wn{constructor(){super(...arguments);Ve(this,"name","LocalSearchModule");Ve(this,"type",_t.CUSTOM);}render(){return _I}}const bI=zn({moduleName:"Retweeters",match:e=>/\/graphql\/.+\/Retweeters/.test(e.url),parse:(e,t)=>na(t,n=>n.data.retweeters_timeline.timeline.instructions,n=>Gr(n.content.itemContent)),project:(e,t)=>Ki(e,t)});class vI extends wn{constructor(){super(...arguments);Ve(this,"name","RetweetersModule");Ve(this,"type",_t.USER);}intercept(){return bI}render(){return jn}}class kI extends wn{constructor(){super(...arguments);Ve(this,"name","RuntimeLogsModule");}render(){return yI}}const xI={home:"public",bookmarks:"sensitive",tweet_detail:"public",notifications:"sensitive",search_top:"public",search_latest:"public",search_people:"public",search_media:"public",list:"public",list_members:"public",list_subscribers:"public",community:"public",community_members:"public",followers:"sensitive",following:"sensitive",user_profile_tweets:"public",user_profile_replies:"public",user_profile_media:"public",user_profile_likes:"sensitive",messages:"dm",unknown:"public"},SI={route_policies:xI},Qp=SI;function CI(e){return String(e||"").trim()||"unknown"}function __(e){var r,o;const t=CI(e),n=((r=Qp.route_policies)==null?void 0:r[t])||((o=Qp.route_policies)==null?void 0:o.unknown);return n==="dm"||n==="sensitive"||n==="public"?n:"public"}function TI(e,t){return __(e)==="dm"?!!t.dmCaptureAllowed:true}const Ld="twe.raw.v1",Zp="__twe_raw_events_v1",MI="twe:raw-event-v1",w_="__twe_raw_capture_stats_v1",Ju="__twe_route_epoch_v1",Nl="__twe_raw_capture_session_id_v1",oa="__twe_raw_capture_tab_id_v1",RI=1,II=48,EI=160,AI=4096,DI=32768,PI="twitter-web-exporter-raw-spool-v1",xr="events",b_=5e3,FI=50,OI=2500,LI=8,su="__twe_raw_spool_flush_timer_v1",NI="twe:raw-spool-state-v1",Jp="__twe_raw_spool_clear_v1",ed="__twe_raw_route_monitor_timer_v1",td="__twe_raw_viewport_monitor_timer_v1",nd="__twe_raw_monitor_coord_timer_v1",_l="__twe_raw_monitor_coordination_v1",v_="__twe_raw_monitor_metrics_v1",wl="__twe_raw_monitor_storage_listener_v1",bl="__twe_raw_monitor_beforeunload_v1",em="__twe_raw_monitor_tick_v1",BI="twe:raw-monitor-role-v1",UI=2500,$I=4e3,k_=6e4,HI=40,tm=48,x_=5e3,jI=2e4,qI="twe_raw_capture_daemon_url_v1",VI="twe_raw_capture_stream_enabled_v1",zI="twe_raw_capture_enabled_v1",KI="twe_raw_capture_encryption_ready_v1",S_="twe_raw_capture_dm_session_armed_until_ms_v1",nm=900*1e3,Bl="twe_raw_monitor_leader_v1",GI=new Set(["s","t","cn","ref_src","ref_url","utm_source","utm_medium","utm_campaign","utm_term","utm_content"]),WI=/(token|auth|authorization|cookie|csrf|sig|signature|bearer|session|oauth)/i;let rm=0,om="",ka=null,lu=false,am=0,xo=0,im="",sm="",Es="";const Ui=new Map;function bn(){return globalThis}function js(e){const t=bn(),n=t[e];if(typeof n=="number"||typeof n=="object"){try{clearInterval(n);}catch{}delete t[e];}}function YI(){const t=bn()[v_],n=t&&typeof t=="object"?t:{},r={};for(const[o,a]of Object.entries(n))r[o]=dt(a,0);return r}function Yo(e,t=1){if(!e)return;const n=bn(),r=YI();r[e]=dt(r[e],0)+Math.max(1,dt(t,1)),n[v_]=r;}function dt(e,t=0){const n=Number(e);return Number.isFinite(n)?n:t}function rd(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return `fnv1a32:${(t>>>0).toString(16)}`}function Ul(e){return rm+=1,`${e}-${Date.now().toString(36)}-${rm.toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Dr(e,t){const n=bn(),r=n[e];if(typeof r=="string"&&r.length>0)return r;const o=Ul(t);return n[e]=o,o}function lm(e,t){try{const n=new URL(e,location.href),r=new URL(n.toString()),o=[...r.searchParams.keys()];for(const i of o){if(WI.test(i)){r.searchParams.delete(i);continue}t&&GI.has(i.toLowerCase())&&r.searchParams.delete(i);}const a=[...r.searchParams.entries()].sort(([i,s],[l,c])=>i===l?s.localeCompare(c):i.localeCompare(l));r.search="";for(const[i,s]of a)r.searchParams.append(i,s);return r.toString()}catch{return e}}function C_(e){try{const t=new URLSearchParams(e||""),n=(t.get("f")||t.get("src")||"").toLowerCase();if(n.includes("live")||n.includes("latest"))return "latest";if(n.includes("user")||n.includes("people"))return "people";if(n.includes("image")||n.includes("media"))return "media";if(n.includes("top"))return "top"}catch{}return "top"}function $l(e,t=""){if(/^\/home\/?$/.test(e))return "home";if(/^\/i\/bookmarks(\/|$)/.test(e))return "bookmarks";if(/\/status\/\d+/.test(e))return "tweet_detail";if(/^\/notifications(\/|$)/.test(e))return "notifications";if(/^\/search\/?$/.test(e)){const n=C_(t);return n==="latest"?"search_latest":n==="people"?"search_people":n==="media"?"search_media":"search_top"}return /^\/i\/lists\/\d+\/(members)(\/|$)/.test(e)?"list_members":/^\/i\/lists\/\d+\/(followers|subscribers)(\/|$)/.test(e)?"list_subscribers":/^\/i\/lists\//.test(e)?"list":/^\/i\/communities\/\d+\/(members)(\/|$)/.test(e)?"community_members":/^\/i\/communities\//.test(e)?"community":/^\/[A-Za-z0-9_]+\/(followers)(\/|$)/.test(e)?"followers":/^\/[A-Za-z0-9_]+\/(following)(\/|$)/.test(e)?"following":/^\/[A-Za-z0-9_]+\/(with_replies)(\/|$)/.test(e)?"user_profile_replies":/^\/[A-Za-z0-9_]+\/(media)(\/|$)/.test(e)?"user_profile_media":/^\/[A-Za-z0-9_]+\/(likes)(\/|$)/.test(e)?"user_profile_likes":/^\/messages(\/|$)/.test(e)?"messages":/^\/[A-Za-z0-9_]+\/?$/.test(e)?"user_profile_tweets":"unknown"}function Nd(e,t=""){const n={},r=new Set(["home","search","notifications","messages","explore","i"]),o=e.match(/\/status\/(\d+)/);o!=null&&o[1]&&(n.tweetId=o[1]);const a=e.match(/\/i\/bookmarks\/(\d+)/);a!=null&&a[1]&&(n.folderId=a[1]);const i=e.match(/\/i\/lists\/(\d+)/);i!=null&&i[1]&&(n.listId=i[1]);const s=e.match(/\/i\/communities\/(\d+)/);s!=null&&s[1]&&(n.communityId=s[1]);const l=e.match(/^\/([A-Za-z0-9_]+)\/(with_replies|media|likes|followers|following)(\/|$)/);l!=null&&l[1]&&(n.screenName=l[1]),l!=null&&l[2]&&(n.profileTab=l[2]);const c=e.match(/^\/([A-Za-z0-9_]+)\/?$/);return c!=null&&c[1]&&!r.has(String(c[1]).toLowerCase())&&(n.screenName=c[1]),/^\/search\/?$/.test(e)&&(n.searchMode=C_(t)),Object.keys(n).length?n:void 0}function XI(e){const t=e.trim();return t&&(t.startsWith("{")||t.startsWith("["))?"application/json":"text/plain"}function Bd(){const e=za(Bl);if(!e)return null;try{const t=JSON.parse(e);if(!t||typeof t!="object")return null;const n=typeof t.tab_id=="string"?t.tab_id:"";if(!n)return null;const r=dt(t.heartbeat_ms,0),o=dt(t.acquired_ms,0);return {tab_id:n,session_id:typeof t.session_id=="string"?t.session_id:void 0,heartbeat_ms:r,acquired_ms:o}}catch{return null}}function cm(e){try{if(typeof localStorage>"u")return null;localStorage.setItem(Bl,JSON.stringify(e));}catch{return null}return Bd()}function T_(e){if(e)try{if(typeof localStorage>"u")return;const t=Bd();if(!t||t.tab_id!==e)return;localStorage.removeItem(Bl);}catch{}}function M_(e){const t=Pn();Sr({...t,...e});}function cu(e,t,n){const r=bn(),o={role:e,tab_id:Dr(oa,"tab"),leader_tab_id:t||void 0,lease_heartbeat_ms:n||0,updated_at_ms:Date.now()};r[_l]=o,M_({monitor_role:e,monitor_leader_tab_id:t||void 0,monitor_last_heartbeat_ms:n||0});const a=`${o.role}|${o.tab_id}|${o.leader_tab_id||""}|${o.lease_heartbeat_ms||0}`;if(a!==sm&&(sm=a,typeof window<"u"&&typeof window.dispatchEvent=="function"))try{window.dispatchEvent(new CustomEvent(BI,{detail:o}));}catch{}}function qs(e=false){const t=Dr(oa,"tab"),n=Dr(Nl,"session"),r=Date.now();let o=Bd();if(!o){const c=cm({tab_id:t,session_id:n,heartbeat_ms:r,acquired_ms:r});if(!c){cu("single",t,r);return}o=c;}const a=dt(o.heartbeat_ms,0)<=0||r-dt(o.heartbeat_ms,0)>jI,i=o.tab_id===t;if((a||i)&&(e||!i||r-dt(o.heartbeat_ms,0)>=Math.floor(x_/2))){const c={tab_id:t,session_id:n,acquired_ms:i?dt(o.acquired_ms,r):r,heartbeat_ms:r},h=cm(c);if((h==null?void 0:h.tab_id)===t){cu("leader",t,dt(h.heartbeat_ms,r));return}o=h||o;}const s=typeof o.tab_id=="string"?o.tab_id:"";cu("follower",s,dt(o.heartbeat_ms,0));}function R_(){const e=bn(),t=e.__twe_raw_monitor_force_leader_v1;if(typeof t=="boolean")return t;const n=e[_l],r=n&&typeof n=="object"?n:void 0;if(!r||typeof r.role!="string"){qs(true);const o=e[_l],a=o&&typeof o=="object"?o:void 0;return (a==null?void 0:a.role)==="leader"||(a==null?void 0:a.role)==="single"}return r.role==="leader"||r.role==="single"}function Ud(){const e=bn(),t=Pn(),n=e.__twe_runtime_modes_v1,r=e.__twe_runtime_v1,o=n&&typeof n=="object"?n:void 0,a=r&&typeof r=="object"?r:void 0,i=dt(a==null?void 0:a.revision,0)||dt(a==null?void 0:a.rev,0)||void 0,s=a==null?void 0:a.capabilities,l=s&&typeof s=="object"?s:void 0;return {recorder_rev:RI,hook_rev:i,modes:{safeMode:!!(o!=null&&o.safeMode),hookMode:typeof(o==null?void 0:o.hookMode)=="string"?o.hookMode:void 0,repairMode:typeof(o==null?void 0:o.repairMode)=="string"?o.repairMode:void 0},capabilities:{hasExportFunction:!!(l!=null&&l.hasExportFunction),hasWrappedJSObject:!!(l!=null&&l.hasWrappedJSObject)},spool:{queued:dt(t.spool_count,0),enqueued_total:dt(t.spool_enqueued,0),flushed_total:dt(t.spool_flushed,0),failed_total:dt(t.spool_failed,0),oldest_pending_age_ms:dt(t.oldest_pending_age_ms,0)},coordination:{role:t.monitor_role==="leader"||t.monitor_role==="follower"||t.monitor_role==="single"?t.monitor_role:void 0,leader_tab_id:typeof t.monitor_leader_tab_id=="string"?t.monitor_leader_tab_id:void 0,lease_heartbeat_ms:dt(t.monitor_last_heartbeat_ms,0)||void 0}}}function I_(){const e=bn(),t=dt(e[Ju],0)+1;return e[Ju]=t,t}function $d(e,t,n){const r=om||void 0,o=rd(`${r||""}|${e}|${t}|${n}`);return om=o,{prevHash:r,eventHash:o}}function Hd(){const e=bn().__META_DATA__,t=e&&typeof e=="object"?e:void 0,n=typeof(t==null?void 0:t.userId)=="string"?t.userId:void 0;return n?{user_rest_id:n}:void 0}function QI(e,t){const n=Date.now(),r=typeof performance<"u"?Number(performance.now()):0,o=typeof location<"u"?location.href:"",a=typeof location<"u"?location.pathname:"",i=typeof location<"u"?location.search:"",s=typeof e.body=="string"&&e.body?rd(e.body):void 0,l=typeof t.responseText=="string"?t.responseText:"",c=rd(l),h=ZI(),f=l.length>h,m=f?l.slice(0,h):l,g=e.requestId&&e.requestId.length>0?e.requestId:Ul("evt"),{prevHash:_,eventHash:b}=$d(g,n,`${e.method}|${e.url}|${t.status}|${c}`);return {schema:Ld,event_id:g,prev_event_hash:_,event_hash:b,wall_time_ms:n,mono_time_ms:r,tz_offset_min:new Date().getTimezoneOffset(),page_url:o,route_type:$l(a,i),route_params:Nd(a,i),route_epoch:I_(),kind:"net",session_id:Dr(Nl,"session"),tab_id:Dr(oa,"tab"),account_hint:Hd(),net:{transport:e.method.toUpperCase()==="GET"?"xhr":"fetch",phase:"response",method:e.method.toUpperCase(),url_raw_redacted:lm(e.url,false),url_norm:lm(e.url,true),status:t.status,req_body_hash:s,resp_content_type:XI(l),resp_body_ref:`sha:${c}`,resp_body_hash:c,resp_body_size:l.length,resp_truncated:f,resp_body_sample:m},recorder:Ud()}}function ZI(){return kr()||aa()?DI:AI}function JI(){return kr()||aa()?EI:II}function um(e){const t=Date.now(),n=typeof performance<"u"?Number(performance.now()):0,r=typeof location<"u"?location.href:"",o=typeof location<"u"?location.pathname:"",a=typeof location<"u"?location.search:"",i=typeof location<"u"?location.hash:"",s=Ul("route"),{prevHash:l,eventHash:c}=$d(s,t,`route|${e}|${r}|${o}|${a}|${i}`);return {schema:Ld,event_id:s,prev_event_hash:l,event_hash:c,wall_time_ms:t,mono_time_ms:n,tz_offset_min:new Date().getTimezoneOffset(),page_url:r,route_type:$l(o,a),route_params:Nd(o,a),route_epoch:I_(),kind:"route",session_id:Dr(Nl,"session"),tab_id:Dr(oa,"tab"),account_hint:Hd(),route:{source:e,pathname:o,search:a,hash:i},recorder:Ud()}}function eE(e,t="dom-scan"){const n=Date.now(),r=typeof performance<"u"?Number(performance.now()):0,o=typeof location<"u"?location.href:"",a=typeof location<"u"?location.pathname:"",i=typeof location<"u"?location.search:"",s=Ul("vp"),{prevHash:l,eventHash:c}=$d(s,n,`viewport|${t}|${e}|${o}|${a}`);return {schema:Ld,event_id:s,prev_event_hash:l,event_hash:c,wall_time_ms:n,mono_time_ms:r,tz_offset_min:new Date().getTimezoneOffset(),page_url:o,route_type:$l(a,i),route_params:Nd(a,i),route_epoch:dt(bn()[Ju],0),kind:"viewport",session_id:Dr(Nl,"session"),tab_id:Dr(oa,"tab"),account_hint:Hd(),viewport:{tweet_id:e,source:t},recorder:Ud()}}function Pn(){const t=bn()[w_];if(!t||typeof t!="object")return {total:0,emitted:0,dropped:0,last_at:0,spool_count:0,spool_enqueued:0,spool_flushed:0,spool_failed:0,spool_drop_overflow:0,spool_unavailable:0,oldest_pending_age_ms:0,daemon_online:false,monitor_role:"single",monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:0,monitor_ticks_route:0,monitor_ticks_viewport:0,monitor_suppressed_route:0,monitor_suppressed_viewport:0};const n=t;return {total:dt(n.total,0),emitted:dt(n.emitted,0),dropped:dt(n.dropped,0),last_at:dt(n.last_at,0),last_event_id:typeof n.last_event_id=="string"?n.last_event_id:void 0,last_event_hash:typeof n.last_event_hash=="string"?n.last_event_hash:void 0,spool_count:dt(n.spool_count,0),spool_enqueued:dt(n.spool_enqueued,0),spool_flushed:dt(n.spool_flushed,0),spool_failed:dt(n.spool_failed,0),spool_drop_overflow:dt(n.spool_drop_overflow,0),spool_unavailable:dt(n.spool_unavailable,0),oldest_pending_age_ms:dt(n.oldest_pending_age_ms,0),daemon_online:!!n.daemon_online,daemon_last_flush_at:dt(n.daemon_last_flush_at,0)||void 0,daemon_last_error:typeof n.daemon_last_error=="string"?n.daemon_last_error:void 0,monitor_role:n.monitor_role==="leader"||n.monitor_role==="follower"||n.monitor_role==="single"?n.monitor_role:void 0,monitor_leader_tab_id:typeof n.monitor_leader_tab_id=="string"?n.monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:dt(n.monitor_last_heartbeat_ms,0),monitor_ticks_route:dt(n.monitor_ticks_route,0),monitor_ticks_viewport:dt(n.monitor_ticks_viewport,0),monitor_suppressed_route:dt(n.monitor_suppressed_route,0),monitor_suppressed_viewport:dt(n.monitor_suppressed_viewport,0)}}function Sr(e){const t=bn();t[w_]=e;const n=[dt(e.spool_count,0),dt(e.spool_enqueued,0),dt(e.spool_flushed,0),dt(e.spool_failed,0),dt(e.spool_drop_overflow,0),dt(e.spool_unavailable,0),dt(e.oldest_pending_age_ms,0),e.daemon_online?1:0].join("|");if(n!==im&&(im=n,typeof window<"u"&&typeof window.dispatchEvent=="function"))try{window.dispatchEvent(new CustomEvent(NI,{detail:{stats:e}}));}catch{}}function ur(e){const t=Pn();Sr({...t,...e});}function E_(e){const t=bn(),n=t[Zp],r=Array.isArray(n)?n:[];r.push(e);let o=0;const a=JI();r.length>a&&(o=r.length-a),o>0&&r.splice(0,o),t[Zp]=r;const i=Pn();if(Sr({...i,total:i.total+1,emitted:i.emitted+1,dropped:i.dropped+o,last_at:Date.now(),last_event_id:e.event_id,last_event_hash:e.event_hash}),typeof window<"u"&&typeof window.dispatchEvent=="function")try{window.dispatchEvent(new CustomEvent(MI,{detail:e}));}catch{}}function od(e){E_(e),aa()&&(F_(e),Vd());}function jd(){return !qd()||typeof document<"u"&&document.visibilityState==="hidden"?false:aa()||kr()||A_()}function uu(){if(!jd()||typeof document<"u"&&document.visibilityState==="hidden")return;if(!R_()){Yo("route_suppressed_checks",1);const n=Pn();Sr({...n,monitor_suppressed_route:dt(n.monitor_suppressed_route,0)+1});return}const e=Pn();Sr({...e,monitor_ticks_route:dt(e.monitor_ticks_route,0)+1}),Yo("route_leader_checks",1);const t=typeof location<"u"?location.href:"";if(t){if(!Es){Es=t,od(um("bootstrap")),Yo("route_emits",1);return}t!==Es&&(Es=t,od(um("poll")),Yo("route_emits",1));}}function tE(e){const t=e.match(/\/status\/(\d+)/);return t!=null&&t[1]?t[1]:null}function nE(e){if(!(e instanceof Element))return false;const t=e.getBoundingClientRect();return !(t.width<=0||t.height<=0||t.bottom<tm||t.top>window.innerHeight-tm)}function rE(e=HI){if(typeof document>"u")return [];const t=[],n=new Set,r=document.querySelectorAll('article a[href*="/status/"]');for(const o of r){if(t.length>=e)break;if(!(o instanceof HTMLAnchorElement)||!nE(o))continue;const a=tE(o.getAttribute("href")||"");!a||n.has(a)||(n.add(a),t.push(a));}return t}function oE(e){for(const[t,n]of Ui.entries())e-n>k_&&Ui.delete(t);}function dm(){if(!jd()||typeof document<"u"&&document.visibilityState==="hidden")return;if(!R_()){Yo("viewport_suppressed_checks",1);const r=Pn();Sr({...r,monitor_suppressed_viewport:dt(r.monitor_suppressed_viewport,0)+1});return}const e=Pn();Sr({...e,monitor_ticks_viewport:dt(e.monitor_ticks_viewport,0)+1}),Yo("viewport_leader_checks",1);const t=Date.now();oE(t);const n=rE();for(const r of n){const o=dt(Ui.get(r),0);o>0&&t-o<k_||(Ui.set(r,t),od(eE(r)),Yo("viewport_emits",1));}}function qd(){const t=bn().__twe_raw_capture_enabled_v1;if(typeof t=="boolean")return t;const n=ut.get("rawCaptureEnabled",true);if(typeof n=="boolean")return n;const r=za(zI);return r?r!=="0"&&r!=="false":true}function A_(){return bn().__twe_raw_capture_dev_utils_v1===true?true:!!ut.get("debug",false)}function aE(e){const t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="::1"?true:t.endsWith(".localhost")}function iE(e){if(!e)return false;try{const t=new URL(e,location.href),n=new URL(P_(),location.href);return t.origin===n.origin&&/^\/(?:ingest|health|stats|query)(\/|$)/.test(t.pathname)?!0:aE(t.hostname)&&/^\/(?:ingest|health|stats|query)(\/|$)/.test(t.pathname)}catch{return false}}function fm(){return ut.get("directMessagesCaptureEnabled",false)===true&&sE()&&lE()}function sE(){if(bn().__twe_raw_capture_encryption_ready_v1===true||ut.get("rawCaptureEncryptedStorageReady",false)===true)return true;const n=za(KI);if(!n)return false;const r=n.trim().toLowerCase();return r==="1"||r==="true"||r==="yes"||r==="on"}function lE(){const e=bn(),t=dt(e.__twe_raw_capture_dm_session_armed_until_ms_v1,0),n=Date.now();if(t>n)return true;const r=za(S_);return dt(r,0)>n}function hm(e){const t=bn();t.__twe_raw_capture_dm_session_armed_until_ms_v1=e;try{localStorage.setItem(S_,String(e));}catch{}}function cE(e){return e==="sensitive"?ut.get("rawCapturePolicySensitiveEnabled",true)!==false:e==="dm"?ut.get("rawCapturePolicyDmEnabled",true)!==false:ut.get("rawCapturePolicyPublicEnabled",true)!==false}function uE(){let e="unknown";if(fm())return {blocked:false,routeType:e,policyClass:"dm"};try{e=$l(location.pathname||"/",location.search||"");const t=__(e);return cE(t)?{blocked:!TI(e,{dmCaptureAllowed:fm()}),routeType:e,policyClass:t}:{blocked:!0,routeType:e,policyClass:t}}catch{return {blocked:false,routeType:"unknown",policyClass:"public"}}}function dE(e,t){if(!e.url||!qd()||iE(e.url))return false;const n=uE();if(n.blocked){const i=Pn();return ur({dm_policy_blocks:dt(i.dm_policy_blocks,0)+1,dm_policy_last_route_type:n.routeType,dm_policy_last_policy_class:n.policyClass}),false}return !(!/\/graphql\/|\/api\/1\.1\//.test(e.url)||!String(t.responseText||""))}function Fo(){return Date.now()<xo?Promise.reject(new Error("raw spool unavailable")):typeof indexedDB>"u"?(xo=Date.now()+6e4,ur({spool_unavailable:dt(Pn().spool_unavailable,0)+1,daemon_last_error:"raw-spool-indexeddb-unavailable"}),Promise.reject(new Error("indexeddb unavailable"))):ka||(ka=new Promise((e,t)=>{let n;try{n=indexedDB.open(PI,1);}catch(r){ka=null,xo=Date.now()+6e4,ur({spool_unavailable:dt(Pn().spool_unavailable,0)+1,daemon_last_error:`raw-spool-open-failed:${ta(r)}`}),t(r);return}n.onupgradeneeded=()=>{const r=n.result;if(!r.objectStoreNames.contains(xr)){const o=r.createObjectStore(xr,{keyPath:"event_id"});o.createIndex("created_at","created_at",{unique:false}),o.createIndex("next_retry_at","next_retry_at",{unique:false}),o.createIndex("wall_time_ms","wall_time_ms",{unique:false});}},n.onsuccess=()=>{xo=0,e(n.result);},n.onerror=()=>{ka=null,xo=Date.now()+6e4,ur({spool_unavailable:dt(Pn().spool_unavailable,0)+1,daemon_last_error:`raw-spool-open-error:${ta(n.error??new Error("failed to open raw spool db"))}`}),t(n.error??new Error("failed to open raw spool db"));};}),ka)}function Hl(e,t,n,r){return new Promise((o,a)=>{const i=e.transaction([xr],t),s=i.objectStore(xr);i.oncomplete=()=>{try{o(r());}catch(l){a(l);}},i.onerror=()=>a(i.error??new Error("raw spool transaction failed")),i.onabort=()=>a(i.error??new Error("raw spool transaction aborted")),n(s);})}async function fE(e){const t=await Fo();await Hl(t,"readwrite",n=>{n.put(e);},()=>{});}async function jl(){const e=await Fo();return await new Promise(t=>{const o=e.transaction([xr],"readonly").objectStore(xr).count();o.onsuccess=()=>t(dt(o.result,0)),o.onerror=()=>t(0);})}async function hE(){const e=await Fo();return await new Promise(t=>{const a=e.transaction([xr],"readonly").objectStore(xr).index("created_at").openCursor();a.onsuccess=()=>{const i=a.result;if(!i){t(0);return}const s=i.value;t(dt(s.created_at,0));},a.onerror=()=>t(0);})}async function D_(e){const t=await Fo(),n=await jl();if(n<=e)return 0;const r=n-e;return await new Promise((o,a)=>{const i=t.transaction([xr],"readwrite"),s=i.objectStore(xr),l=s.index("created_at"),c=[],h=l.openCursor();h.onsuccess=()=>{const f=h.result;if(!f||c.length>=r){for(const m of c)s.delete(m);return}c.push(f.primaryKey),f.continue();},h.onerror=()=>a(h.error??new Error("cursor read failed")),i.oncomplete=()=>o(c.length),i.onerror=()=>a(i.error??new Error("prune tx failed")),i.onabort=()=>a(i.error??new Error("prune tx aborted"));})}async function pE(e,t){const n=await Fo();return await new Promise((r,o)=>{const a=n.transaction([xr],"readonly"),s=a.objectStore(xr).index("created_at"),l=[],c=s.openCursor();c.onsuccess=()=>{const h=c.result;if(!h||l.length>=t){r(l);return}const f=h.value;dt(f.next_retry_at,0)<=e&&l.push(f),h.continue();},c.onerror=()=>o(c.error??new Error("list batch failed")),a.onerror=()=>o(a.error??new Error("list batch tx failed"));})}async function mE(e){if(!e.length)return;const t=await Fo();await Hl(t,"readwrite",n=>{for(const r of e)n.delete(r);},()=>{});}async function pm(e){if(!e.length)return;const t=await Fo();await Hl(t,"readwrite",n=>{for(const r of e)n.put(r);},()=>{});}async function gE(){const e=await Fo();return await Hl(e,"readwrite",t=>{t.clear();},()=>{}),await jl()}async function Ea(e=0){try{const t=await jl(),n=await hE(),r=n?Math.max(0,Date.now()-n):0,o=Pn();Sr({...o,spool_count:t,oldest_pending_age_ms:r,dropped:o.dropped+Math.max(0,e),spool_drop_overflow:dt(o.spool_drop_overflow,0)+Math.max(0,e)});}catch{}}async function yE(){if(Date.now()<xo){ur({spool_count:0,oldest_pending_age_ms:0});return}try{const e=await D_(b_);await Ea(e);}catch{}}function mm(e){const t=Math.max(0,Math.min(6,e));return Math.min(6e4,1e3*2**t)}function za(e){try{return typeof localStorage>"u"?null:localStorage.getItem(e)}catch{return null}}function aa(){const t=bn().__twe_raw_capture_stream_enabled_v1;if(typeof t=="boolean")return t;const n=ut.get("rawCaptureStreamEnabled",false);if(typeof n=="boolean")return n;const r=za(VI);return r?r==="1"||r==="true":false}function P_(){const t=bn().__twe_raw_capture_daemon_url_v1,n=ut.get("rawCaptureDaemonUrl","http://127.0.0.1:8754");return (typeof t=="string"&&t.trim().length>0?t.trim():typeof n=="string"&&n.trim().length>0?n.trim():za(qI)||"http://127.0.0.1:8754").replace(/\/+$/,"")}async function F_(e){if(Date.now()<xo){ur({spool_unavailable:dt(Pn().spool_unavailable,0)+1});return}try{const t=Date.now(),n={event_id:e.event_id,wall_time_ms:e.wall_time_ms,created_at:t,attempts:0,next_retry_at:t,payload:e};await fE(n);const r=await D_(b_),o=Pn();Sr({...o,spool_enqueued:dt(o.spool_enqueued,0)+1,dropped:o.dropped+Math.max(0,r),spool_drop_overflow:dt(o.spool_drop_overflow,0)+Math.max(0,r)}),await Ea();}catch(t){ur({spool_unavailable:dt(Pn().spool_unavailable,0)+1,daemon_last_error:`spool-enqueue-error:${ta(t)}`});}}function _E(){const e=bn();js(nd),js(ed),js(td),Ui.clear();const t=e[wl];if(typeof t=="function"&&typeof window<"u")try{window.removeEventListener("storage",t);}catch{}delete e[wl];const n=e[bl];if(typeof n=="function"&&typeof window<"u")try{window.removeEventListener("beforeunload",n);}catch{}delete e[bl];try{const r=Dr(oa,"tab");T_(r);}catch{}delete e[_l],M_({monitor_role:void 0,monitor_leader_tab_id:void 0,monitor_last_heartbeat_ms:0});}function wE(){if(aa()){const e=bn(),t=e[su];if(!(typeof t=="number"||typeof t=="object")){const n=setInterval(()=>{am+=1,am%LI===0&&yE(),Vd();},OI);e[su]=n;}return}js(su);}function bE(){const e=bn();if(A_()&&typeof e[Jp]!="function"&&(e[Jp]=async()=>{try{const t=await gE(),n=Pn();return Sr({...n,spool_count:t,oldest_pending_age_ms:0}),{ok:!0,remaining:t}}catch(t){const n=ta(t);return ur({daemon_last_error:`spool-clear-error:${n}`}),{ok:false,error:n}}}),typeof e[em]!="function"&&(e[em]=(t="both")=>{try{return (t==="both"||t==="route")&&uu(),(t==="both"||t==="viewport")&&dm(),{ok:!0}}catch(n){return {ok:false,error:ta(n)}}}),typeof e.__twe_arm_dm_capture_v1!="function"&&(e.__twe_arm_dm_capture_v1=(t=nm)=>{const r=Date.now()+Math.max(3e4,dt(t,nm));return hm(r),{ok:true,armed_until_ms:r}}),typeof e.__twe_disarm_dm_capture_v1!="function"&&(e.__twe_disarm_dm_capture_v1=()=>(hm(0),{ok:true,armed_until_ms:0})),jd()){if(qs(true),typeof e[wl]!="function"){const o=a=>{if(a.key===Bl)try{qs(!0);}catch{}};if(e[wl]=o,typeof window<"u"&&typeof window.addEventListener=="function")try{window.addEventListener("storage",o);}catch{}}if(typeof e[bl]!="function"){const o=()=>{try{const a=Dr(oa,"tab");T_(a);}catch{}};if(e[bl]=o,typeof window<"u"&&typeof window.addEventListener=="function")try{window.addEventListener("beforeunload",o);}catch{}}const t=e[nd];if(!(typeof t=="number"||typeof t=="object")){const o=setInterval(()=>{if(!(typeof document<"u"&&document.visibilityState==="hidden"))try{qs(!0);}catch{}},x_);e[nd]=o;}const n=e[ed];if(!(typeof n=="number"||typeof n=="object")){const o=setInterval(()=>{try{uu();}catch{}},UI);e[ed]=o;try{uu();}catch{}}const r=e[td];if(!(typeof r=="number"||typeof r=="object")){const o=setInterval(()=>{try{dm();}catch{}},$I);e[td]=o;}}else _E();wE();}function ta(e){return e instanceof Error?`${e.name}: ${e.message}`:String(e)}async function vE(e){const t=P_(),n=await fetch(`${t}/ingest/events`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({events:e.map(a=>a.payload)})});if(!n.ok)throw new Error(`daemon-response-${n.status}`);let r=null;try{r=await n.json();}catch{return e.map(a=>a.event_id)}const o=r&&typeof r=="object"&&Array.isArray(r.accepted_ids)?r.accepted_ids.map(a=>typeof a=="string"?a:"").filter(a=>!!a):null;return !o||!o.length?e.map(a=>a.event_id):o}async function Vd(){if(!lu){lu=true;try{if(Date.now()<xo){ur({spool_count:0,oldest_pending_age_ms:0,daemon_online:!1});return}const e=await jl();if(await Ea(),!aa()){ur({daemon_online:!1});return}if(e<=0){ur({daemon_online:!0,daemon_last_flush_at:Date.now(),oldest_pending_age_ms:0});return}const t=Date.now(),n=await pE(t,FI);if(!n.length){ur({daemon_online:!0}),await Ea();return}try{const r=await vE(n),o=new Set(r),a=n.filter(s=>!o.has(s.event_id));if(r.length&&await mE(r),a.length){const s=Date.now(),l=a.map(c=>{const h=dt(c.attempts,0)+1;return {...c,attempts:h,next_retry_at:s+mm(h)}});await pm(l);}const i=Pn();Sr({...i,spool_flushed:dt(i.spool_flushed,0)+r.length,daemon_online:!0,daemon_last_flush_at:Date.now(),daemon_last_error:void 0}),await Ea();}catch(r){const o=Date.now(),a=n.map(s=>{const l=dt(s.attempts,0)+1;return {...s,attempts:l,next_retry_at:o+mm(l)}});await pm(a);const i=Pn();Sr({...i,spool_failed:dt(i.spool_failed,0)+n.length,daemon_online:!1,daemon_last_error:ta(r)}),await Ea();}}catch(e){ur({daemon_last_error:`flush-error:${ta(e)}`});}finally{lu=false;}}}const kE=(e,t)=>{try{if(!qd())return;const n={method:typeof e.method=="string"&&e.method?e.method:"GET",url:typeof e.url=="string"?e.url:"",body:typeof e.body=="string"?e.body:void 0,requestId:typeof e.requestId=="string"?e.requestId:void 0},r={status:Number(t.status??0),responseText:String(t.responseText||"")};if(!dE(n,r))return;bE();const o=QI(n,r);E_(o),aa()&&(F_(o),Vd());}catch{}};class xE extends wn{constructor(){super(...arguments);Ve(this,"name","RawCaptureModule");Ve(this,"type",_t.CUSTOM);}intercept(){return kE}}function SE(e){try{const n=new URL(e.url).searchParams.get("variables");if(!n)return null;const r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function O_(e){const t=SE(e),n=String((t==null?void 0:t.rawQuery)||"").trim().toLowerCase(),r=String((t==null?void 0:t.querySource)||"").trim().toLowerCase();return n.startsWith("quoted_tweet_id:")||r==="tdqt"}function L_(e){const n=JSON.parse(e.responseText).data.search_by_raw_query.search_timeline.timeline.instructions,r=[],o=[],a=[],i=n.find(c=>c.type==="TimelineAddEntries"),s=n.find(c=>c.type==="TimelineAddToModule"),l=(i==null?void 0:i.entries)??[];for(const c of l){if(pd(c)){const h=Hn(c.content.itemContent);h&&r.push(h);}if(Mk(c)){const h=c.content.items.map(f=>Hn(f.item.itemContent)).filter(f=>!!f);r.push(...h);}if(md(c)){const h=Gr(c.content.itemContent);h&&o.push(h);}if(Rk(c)){const h=c.content.items.map(f=>f.item.itemContent.list);a.push(...h);}}if(s){const c=s.moduleItems.map(m=>m.item.itemContent),h=c.filter(m=>m.__typename==="TimelineTweet").map(m=>Hn(m)).filter(m=>!!m);r.push(...h);const f=c.filter(m=>m.__typename==="TimelineTwitterList").map(m=>m.list);a.push(...f);}return {tweets:r,users:o,lists:a}}const CE=zn({moduleName:"SearchTimeline",match:e=>/\/graphql\/.+\/SearchTimeline/.test(e.url)&&!O_(e),parse:(e,t)=>L_(t),count:e=>e.tweets.length,project:(e,t)=>Yr(e,t.tweets),onSuccess:e=>{e.lists.length>0&&Ie.warn(`SearchList: ${e.lists.length} lists received but ignored (Reason: not implemented)`,e.lists),e.users.length>0&&Ie.warn(`SearchUser: ${e.users.length} users received but ignored (Reason: not implemented)`,e.users);}}),TE=zn({moduleName:"Quotes",match:e=>/\/graphql\/.+\/SearchTimeline/.test(e.url)&&O_(e),parse:(e,t)=>({tweets:L_(t).tweets}),count:e=>e.tweets.length,project:(e,t)=>Yr(e,t.tweets),onSuccess:e=>{Ie.debug(`Quotes: projected ${e.tweets.length} quote-tweet rows`);}});class ME extends wn{constructor(){super(...arguments);Ve(this,"name","QuotesModule");Ve(this,"type",_t.TWEET);}intercept(){return TE}render(){return jn}}class RE extends wn{constructor(){super(...arguments);Ve(this,"name","SearchTimelineModule");Ve(this,"type",_t.TWEET);}intercept(){return CE}render(){return jn}}const IE="TweetIndexModule";class EE extends wn{constructor(){super(...arguments);Ve(this,"name",IE);Ve(this,"type",_t.TWEET);}setup(){We.extBackfillTweetCapturesFromAllTweets(this.name);}render(){return jn}}const AE=zn({moduleName:"TweetDetail",match:e=>/\/graphql\/.+\/TweetDetail/.test(e.url)||/\/graphql\/.+\/ModeratedTimeline/.test(e.url),parse:(e,t)=>{const n=/\/graphql\/.+\/TweetDetail/.test(e.url),r=/\/graphql\/.+\/ModeratedTimeline/.test(e.url),o=JSON.parse(t.responseText);let a=[];n?a=o.data.threaded_conversation_with_injections_v2.instructions:r&&(a=o.data.tweet.result.timeline_response.timeline.instructions);const i=[],s=a.find(h=>h.type==="TimelineAddEntries"),l=(s==null?void 0:s.entries)??[];for(const h of l){if(pd(h)){const f=Hn(h.content.itemContent);f&&i.push(f);}if(n&&Sk(h)){const f=h.content.items.map(m=>{if(m.entryId.includes("-tweet-"))return Hn(m.item.itemContent)});i.push(...f.filter(m=>!!m));}}const c=a.find(h=>h.type==="TimelineAddToModule");if(c){const h=c.moduleItems.map(f=>Hn(f.item.itemContent)).filter(f=>!!f);i.push(...h);}return i},project:(e,t)=>Yr(e,t)});class DE extends wn{constructor(){super(...arguments);Ve(this,"name","TweetDetailModule");Ve(this,"type",_t.TWEET);}intercept(){return AE}render(){return jn}}const PE=zn({moduleName:"UserDetail",match:e=>/\/graphql\/.+\/UserByScreenName/.test(e.url),parse:(e,t)=>[JSON.parse(t.responseText).data.user.result],project:(e,t)=>Ki(e,t)});class FE extends wn{constructor(){super(...arguments);Ve(this,"name","UserDetailModule");Ve(this,"type",_t.USER);}intercept(){return PE}render(){return jn}}const OE=zn({moduleName:"UserMedia",match:e=>/\/graphql\/.+\/UserMedia/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.user.result.timeline.timeline.instructions,o=[],a=r.find(l=>l.type==="TimelineAddEntries"),i=(a==null?void 0:a.entries)??[];for(const l of i)if(Tk(l)){const c=l.content.items.map(h=>Hn(h.item.itemContent)).filter(h=>!!h);o.push(...c);}const s=r.find(l=>l.type==="TimelineAddToModule");if(s){const l=s.moduleItems.map(c=>Hn(c.item.itemContent)).filter(c=>!!c);o.push(...l);}return o},project:(e,t)=>Yr(e,t)});class LE extends wn{constructor(){super(...arguments);Ve(this,"name","UserMediaModule");Ve(this,"type",_t.TWEET);}intercept(){return OE}render(){return jn}}const NE=zn({moduleName:"UserTweets",match:e=>/\/graphql\/.+\/UserTweets/.test(e.url),parse:(e,t)=>{const r=JSON.parse(t.responseText).data.user.result.timeline.timeline.instructions,o=[],a=r.find(l=>l.type==="TimelinePinEntry");if(a){const l=Hn(a.entry.content.itemContent);l&&o.push(l);}const i=r.find(l=>l.type==="TimelineAddEntries"),s=(i==null?void 0:i.entries)??[];for(const l of s){if(pd(l)){const c=Hn(l.content.itemContent);c&&o.push(c);}if(Ck(l)){const c=l.content.items.map(h=>Hn(h.item.itemContent)).filter(h=>!!h);o.push(...c);}}return o},project:(e,t)=>Yr(e,t)});class BE extends wn{constructor(){super(...arguments);Ve(this,"name","UserTweetsModule");Ve(this,"type",_t.TWEET);}intercept(){return NE}render(){return jn}}const gm="twe-root",du="__twe_root_mounted_v1",fu=globalThis;function xa(e){const t=String(e??"");return t.includes("Twitter Web Exporter")||t.includes("Twitter%20Web%20Exporter")||t.includes("Scrollmark")||t.includes("twitter-web-exporter")||t.includes("moz-extension://")}function UE(){try{window.addEventListener("error",e=>{var t;try{if(!(xa(e.filename)||xa(e.message)||xa((t=e.error)==null?void 0:t.stack)))return;console.error("[twitter-web-exporter] suppressed global error",e.error||e.message),e.preventDefault(),e.stopImmediatePropagation();}catch{}},!0);}catch{}try{window.addEventListener("unhandledrejection",e=>{try{const t=e.reason;if(!(xa(t==null?void 0:t.stack)||xa(t==null?void 0:t.message)||xa(t)))return;console.error("[twitter-web-exporter] suppressed rejection",t),e.preventDefault(),e.stopImmediatePropagation();}catch{}},!0);}catch{}}function yn(e,t){try{e.add(t);}catch(n){console.error("[twitter-web-exporter] Failed to add extension",t==null?void 0:t.name,n);}}function ym(){try{const e=document.getElementById(gm);if(fu[du]){if(e)return;fu[du]=!1;}const t=e??document.createElement("div");e||(t.id=gm,document.body.append(t)),fu[du]=!0,iw(d(OT,{}),t);}catch(e){console.error("[twitter-web-exporter] mountApp failed",e);}}function $E(){UE(),D0(),tM();try{const e=il();yn(e,aR),yn(e,uR),yn(e,FE),yn(e,VR),yn(e,KR),yn(e,GM),yn(e,vI),yn(e,fR),yn(e,WR),yn(e,YM),yn(e,Op),yn(e,ME),yn(e,jR),yn(e,EE),yn(e,BE),yn(e,LE),yn(e,DE),yn(e,RE),yn(e,$R),ut.get("directMessagesCaptureEnabled",!1)&&yn(e,eR),yn(e,wI),yn(e,kI),ut.get("rawCaptureEnabled",!0)&&yn(e,xE),er.start();}catch(e){console.error("[twitter-web-exporter] bootstrap failed",e),setTimeout(()=>{try{const t=il();yn(t,Op),er.start();}catch(t){console.error("[twitter-web-exporter] bootstrap retry failed",t);}},250);}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ym):ym();}$E();
})();