@orbit-software/sdk 1.92.0 → 1.92.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--spacing-safe-area-inset-bottom:max(var(--tg-safe-area-inset-bottom),16px);--spacing-tg-safe-area-inset-bottom:var(--tg-safe-area-inset-bottom);--color-primary:var(--tg-theme-button-color);--color-text:var(--tg-theme-text-color);--color-link:var(--tg-theme-link-color);--color-hint:var(--tg-theme-hint-color);--color-background:var(--tg-theme-bg-color);--color-border:#00000026;--color-button:var(--tg-theme-button-color);--color-button-foreground:var(--tgui--button_text_color);--color-secondary-bg-color:var(--tg-theme-secondary-bg-color);--color-section-bg-color:var(--tg-theme-section-bg-color);--color-section-header-text-color:var(--tg-theme-section-header-text-color);--color-destructive-text-color:var(--tg-theme-destructive-text-color);--color-secondary-fill:var(--tgui--secondary_fill);--color-tgui-bg:var(--tgui--bg_color);--color-tgui-secondary-bg:var(--tgui--secondary_bg_color);--color-tgui-section-bg:var(--tgui--section_bg_color);--color-tgui-surface-primary:var(--tgui--surface_primary);--color-tgui-text:var(--tgui--text_color);--color-tgui-subtitle-text:var(--tgui--subtitle_text_color);--color-tgui-link:var(--tgui--link_color);--color-tgui-hint:var(--tgui--hint_color);--color-custom-green:#1ec948;--font-headline:-apple-system-headline,BlinkMacSystemFont,sans-serif;--shadow-top-divider:0 calc(var(--retina-separator-width,1px)*-1)0 var(--tgui--divider);--shadow-card:0 5px 6px 0 #0000000f,0 0 2px 1px #00000005}#overlay-root *,#overlay-root :after,#overlay-root :before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,#overlay-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}#overlay-root hr{height:0;color:inherit;border-top-width:1px}#overlay-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#overlay-root h1,#overlay-root h2,#overlay-root h3,#overlay-root h4,#overlay-root h5,#overlay-root h6{font-size:inherit;font-weight:inherit}#overlay-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}#overlay-root b,#overlay-root strong{font-weight:bolder}#overlay-root code,#overlay-root kbd,#overlay-root samp,#overlay-root pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}#overlay-root small{font-size:80%}#overlay-root sub,#overlay-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}#overlay-root sub{bottom:-.25em}#overlay-root sup{top:-.5em}#overlay-root table{text-indent:0;border-color:inherit;border-collapse:collapse}#overlay-root :-moz-focusring{outline:auto}#overlay-root progress{vertical-align:baseline}#overlay-root summary{display:list-item}#overlay-root ol,#overlay-root ul,#overlay-root menu{list-style:none}#overlay-root img,#overlay-root svg,#overlay-root video,#overlay-root canvas,#overlay-root audio,#overlay-root iframe,#overlay-root embed,#overlay-root object{vertical-align:middle;display:block}#overlay-root img,#overlay-root video{max-width:100%;height:auto}#overlay-root button,#overlay-root input,#overlay-root select,#overlay-root optgroup,#overlay-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}#overlay-root :where(select:is([multiple],[size])) optgroup{font-weight:bolder}#overlay-root :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}#overlay-root textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}#overlay-root :-moz-ui-invalid{box-shadow:none}#overlay-root button,#overlay-root input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}#overlay-root [hidden]:where(:not([hidden=until-found])){display:none!important}#overlay-root .pointer-events-auto{pointer-events:auto}#overlay-root .pointer-events-none{pointer-events:none}#overlay-root .collapse{visibility:collapse}#overlay-root .invisible{visibility:hidden}#overlay-root .visible{visibility:visible}#overlay-root .sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}#overlay-root .not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}#overlay-root .absolute{position:absolute}#overlay-root .fixed{position:fixed}#overlay-root .relative{position:relative}#overlay-root .static{position:static}#overlay-root .sticky{position:sticky}#overlay-root .-inset-1{inset:calc(var(--spacing)*-1)}#overlay-root .inset-0{inset:calc(var(--spacing)*0)}#overlay-root .top-1\\/2{top:50%}#overlay-root .top-3{top:calc(var(--spacing)*3)}#overlay-root .top-17{top:calc(var(--spacing)*17)}#overlay-root .-right-4{right:calc(var(--spacing)*-4)}#overlay-root .-right-8{right:calc(var(--spacing)*-8)}#overlay-root .right-0{right:calc(var(--spacing)*0)}#overlay-root .right-2{right:calc(var(--spacing)*2)}#overlay-root .right-6{right:calc(var(--spacing)*6)}#overlay-root .-bottom-2{bottom:calc(var(--spacing)*-2)}#overlay-root .-bottom-15{bottom:calc(var(--spacing)*-15)}#overlay-root .bottom-0{bottom:calc(var(--spacing)*0)}#overlay-root .bottom-1{bottom:calc(var(--spacing)*1)}#overlay-root .bottom-2{bottom:calc(var(--spacing)*2)}#overlay-root .bottom-3{bottom:calc(var(--spacing)*3)}#overlay-root .bottom-4{bottom:calc(var(--spacing)*4)}#overlay-root .bottom-6{bottom:calc(var(--spacing)*6)}#overlay-root .bottom-7{bottom:calc(var(--spacing)*7)}#overlay-root .bottom-8{bottom:calc(var(--spacing)*8)}#overlay-root .bottom-10{bottom:calc(var(--spacing)*10)}#overlay-root .bottom-11{bottom:calc(var(--spacing)*11)}#overlay-root .bottom-12{bottom:calc(var(--spacing)*12)}#overlay-root .bottom-13{bottom:calc(var(--spacing)*13)}#overlay-root .-left-3{left:calc(var(--spacing)*-3)}#overlay-root .-left-6{left:calc(var(--spacing)*-6)}#overlay-root .left-0{left:calc(var(--spacing)*0)}#overlay-root .left-1\\/2{left:50%}#overlay-root .left-2{left:calc(var(--spacing)*2)}#overlay-root .left-4{left:calc(var(--spacing)*4)}#overlay-root .left-7{left:calc(var(--spacing)*7)}#overlay-root .left-8{left:calc(var(--spacing)*8)}#overlay-root .left-10{left:calc(var(--spacing)*10)}#overlay-root .isolate{isolation:isolate}#overlay-root .isolation-auto{isolation:auto}#overlay-root .z-0{z-index:0}#overlay-root .z-1{z-index:1}#overlay-root .z-10{z-index:10}#overlay-root .z-\\[-1\\]{z-index:-1}#overlay-root .z-\\[-2\\]{z-index:-2}#overlay-root .order-123{order:123}#overlay-root .\\!container{width:100%!important}@media (width>=40rem){#overlay-root .\\!container{max-width:40rem!important}}@media (width>=48rem){#overlay-root .\\!container{max-width:48rem!important}}@media (width>=64rem){#overlay-root .\\!container{max-width:64rem!important}}@media (width>=80rem){#overlay-root .\\!container{max-width:80rem!important}}@media (width>=96rem){#overlay-root .\\!container{max-width:96rem!important}}#overlay-root .container{width:100%}@media (width>=40rem){#overlay-root .container{max-width:40rem}}@media (width>=48rem){#overlay-root .container{max-width:48rem}}@media (width>=64rem){#overlay-root .container{max-width:64rem}}@media (width>=80rem){#overlay-root .container{max-width:80rem}}@media (width>=96rem){#overlay-root .container{max-width:96rem}}#overlay-root .mx-auto{margin-inline:auto}#overlay-root .-mt-1\\.5{margin-top:calc(var(--spacing)*-1.5)}#overlay-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}#overlay-root .mt-5{margin-top:calc(var(--spacing)*5)}#overlay-root .mb-2{margin-bottom:calc(var(--spacing)*2)}#overlay-root .-ml-3{margin-left:calc(var(--spacing)*-3)}#overlay-root .block{display:block}#overlay-root .contents{display:contents}#overlay-root .flex{display:flex}#overlay-root .flow-root{display:flow-root}#overlay-root .grid{display:grid}#overlay-root .hidden{display:none}#overlay-root .inline{display:inline}#overlay-root .inline-block{display:inline-block}#overlay-root .inline-flex{display:inline-flex}#overlay-root .inline-grid{display:inline-grid}#overlay-root .inline-table{display:inline-table}#overlay-root .list-item{display:list-item}#overlay-root .table{display:table}#overlay-root .table-caption{display:table-caption}#overlay-root .table-cell{display:table-cell}#overlay-root .table-column{display:table-column}#overlay-root .table-column-group{display:table-column-group}#overlay-root .table-footer-group{display:table-footer-group}#overlay-root .table-header-group{display:table-header-group}#overlay-root .table-row{display:table-row}#overlay-root .table-row-group{display:table-row-group}#overlay-root .aspect-square{aspect-ratio:1}#overlay-root .size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}#overlay-root .size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}#overlay-root .size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}#overlay-root .size-18{width:calc(var(--spacing)*18);height:calc(var(--spacing)*18)}#overlay-root .size-24{width:calc(var(--spacing)*24);height:calc(var(--spacing)*24)}#overlay-root .size-\\[25px\\]{width:25px;height:25px}#overlay-root .\\!h-7{height:calc(var(--spacing)*7)!important}#overlay-root .h-12{height:calc(var(--spacing)*12)}#overlay-root .h-12\\.5{height:calc(var(--spacing)*12.5)}#overlay-root .h-18{height:calc(var(--spacing)*18)}#overlay-root .h-\\[30px\\]{height:30px}#overlay-root .h-\\[100dvh\\]{height:100dvh}#overlay-root .h-\\[var\\(--tabbar-current-height\\)\\]{height:var(--tabbar-current-height)}#overlay-root .h-\\[var\\(--tg-safe-area-inset-bottom\\)\\]{height:var(--tg-safe-area-inset-bottom)}#overlay-root .h-auto{height:auto}#overlay-root .h-full{height:100%}#overlay-root .max-h-12\\.5{max-height:calc(var(--spacing)*12.5)}#overlay-root .max-h-\\[calc\\(95dvh-var\\(--tg-safe-area-inset-top\\)-var\\(--tg-safe-area-inset-bottom\\)\\)\\]{max-height:calc(95dvh - var(--tg-safe-area-inset-top) - var(--tg-safe-area-inset-bottom))}#overlay-root .min-h-0{min-height:calc(var(--spacing)*0)}#overlay-root .min-h-\\[96px\\]{min-height:96px}#overlay-root .min-h-\\[calc\\(95dvh-var\\(--tg-safe-area-inset-top\\)-var\\(--tg-safe-area-inset-bottom\\)\\)\\]{min-height:calc(95dvh - var(--tg-safe-area-inset-top) - var(--tg-safe-area-inset-bottom))}#overlay-root .w-12{width:calc(var(--spacing)*12)}#overlay-root .w-16{width:calc(var(--spacing)*16)}#overlay-root .w-\\[130px\\]{width:130px}#overlay-root .w-\\[210px\\]{width:210px}#overlay-root .w-fit{width:fit-content}#overlay-root .w-full{width:100%}#overlay-root .max-w-20{max-width:calc(var(--spacing)*20)}#overlay-root .min-w-\\[96px\\]{min-width:96px}#overlay-root .flex-1{flex:1}#overlay-root .flex-\\[0\\.2\\]{flex:.2}#overlay-root .flex-shrink-0{flex-shrink:0}#overlay-root .shrink{flex-shrink:1}#overlay-root .shrink-0{flex-shrink:0}#overlay-root .flex-grow,#overlay-root .grow{flex-grow:1}#overlay-root .border-collapse{border-collapse:collapse}#overlay-root .origin-center{transform-origin:50%}#overlay-root .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}#overlay-root .translate-none{translate:none}#overlay-root .scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}#overlay-root .scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}#overlay-root .-rotate-3{rotate:-3deg}#overlay-root .-rotate-4{rotate:-4deg}#overlay-root .-rotate-5{rotate:-5deg}#overlay-root .-rotate-6{rotate:-6deg}#overlay-root .-rotate-8{rotate:-8deg}#overlay-root .-rotate-12{rotate:-12deg}#overlay-root .-rotate-15{rotate:-15deg}#overlay-root .-rotate-90{rotate:-90deg}#overlay-root .rotate-3{rotate:3deg}#overlay-root .rotate-5{rotate:5deg}#overlay-root .rotate-10{rotate:10deg}#overlay-root .rotate-11{rotate:11deg}#overlay-root .\\!transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)!important}#overlay-root .transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}#overlay-root .animate-pulse{animation:var(--animate-pulse)}#overlay-root .animate-spin{animation:var(--animate-spin)}#overlay-root .cursor-pointer{cursor:pointer}#overlay-root .touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}#overlay-root .resize{resize:both}#overlay-root .auto-cols-max{grid-auto-columns:max-content}#overlay-root .grid-flow-col{grid-auto-flow:column}#overlay-root .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}#overlay-root .grid-cols-\\[minmax\\(0\\,1fr\\)_max-content\\]{grid-template-columns:minmax(0,1fr) max-content}#overlay-root .flex-col{flex-direction:column}#overlay-root .flex-row{flex-direction:row}#overlay-root .flex-wrap{flex-wrap:wrap}#overlay-root .items-center{align-items:center}#overlay-root .items-start{align-items:flex-start}#overlay-root .justify-between{justify-content:space-between}#overlay-root .justify-center{justify-content:center}#overlay-root .justify-start{justify-content:flex-start}#overlay-root .justify-items-center{justify-items:center}#overlay-root .gap-0{gap:calc(var(--spacing)*0)}#overlay-root .gap-0\\.5{gap:calc(var(--spacing)*.5)}#overlay-root .gap-1{gap:calc(var(--spacing)*1)}#overlay-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}#overlay-root .gap-2{gap:calc(var(--spacing)*2)}#overlay-root .gap-2\\.5{gap:calc(var(--spacing)*2.5)}#overlay-root .gap-3{gap:calc(var(--spacing)*3)}#overlay-root .gap-4{gap:calc(var(--spacing)*4)}#overlay-root .gap-6{gap:calc(var(--spacing)*6)}#overlay-root .gap-\\[5px\\]{gap:5px}#overlay-root .gap-\\[6px\\]{gap:6px}#overlay-root .gap-\\[10px\\]{gap:10px}#overlay-root .gap-x-\\[10px\\]{column-gap:10px}#overlay-root :where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}#overlay-root .gap-y-\\[30px\\]{row-gap:30px}#overlay-root :where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}#overlay-root :where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}#overlay-root :where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}#overlay-root :where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}#overlay-root .self-stretch{align-self:stretch}#overlay-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#overlay-root .overflow-hidden{overflow:hidden}#overlay-root .overflow-visible{overflow:visible}#overlay-root .rounded{border-radius:.25rem}#overlay-root .rounded-\\[20px\\]{border-radius:20px}#overlay-root .rounded-\\[40px\\]{border-radius:40px}#overlay-root .rounded-full{border-radius:3.40282e38px}#overlay-root .rounded-lg{border-radius:var(--radius-lg)}#overlay-root .rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}#overlay-root .rounded-ss{border-start-start-radius:.25rem}#overlay-root .rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}#overlay-root .rounded-se{border-start-end-radius:.25rem}#overlay-root .rounded-ee{border-end-end-radius:.25rem}#overlay-root .rounded-es{border-end-start-radius:.25rem}#overlay-root .rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}#overlay-root .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}#overlay-root .rounded-tl{border-top-left-radius:.25rem}#overlay-root .rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}#overlay-root .rounded-tr{border-top-right-radius:.25rem}#overlay-root .rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}#overlay-root .rounded-br{border-bottom-right-radius:.25rem}#overlay-root .rounded-bl{border-bottom-left-radius:.25rem}#overlay-root .border{border-style:var(--tw-border-style);border-width:1px}#overlay-root .border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}#overlay-root .border-y{border-block-style:var(--tw-border-style);border-block-width:1px}#overlay-root .border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}#overlay-root .border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}#overlay-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}#overlay-root .border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}#overlay-root .border-r{border-right-style:var(--tw-border-style);border-right-width:1px}#overlay-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}#overlay-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}#overlay-root .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}#overlay-root .bg-\\[var\\(--tgui--plain_background\\)\\]{background-color:var(--tgui--plain_background)}#overlay-root .bg-tgui-section-bg{background-color:var(--tgui--section_bg_color)}#overlay-root .bg-white{background-color:var(--color-white)}#overlay-root .bg-center{background-position:50%}#overlay-root .bg-no-repeat{background-repeat:no-repeat}#overlay-root .bg-repeat{background-repeat:repeat}#overlay-root .object-contain{object-fit:contain}#overlay-root .object-cover{object-fit:cover}#overlay-root .p-0{padding:calc(var(--spacing)*0)}#overlay-root .p-4{padding:calc(var(--spacing)*4)}#overlay-root .p-\\[10px_10px_14px_10px\\]{padding:10px 10px 14px}#overlay-root .px-1{padding-inline:calc(var(--spacing)*1)}#overlay-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}#overlay-root .px-4{padding-inline:calc(var(--spacing)*4)}#overlay-root .px-\\[6px\\]{padding-inline:6px}#overlay-root .px-\\[9px\\]{padding-inline:9px}#overlay-root .px-\\[12px\\]{padding-inline:12px}#overlay-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}#overlay-root .py-\\[3px\\]{padding-block:3px}#overlay-root .py-\\[5px\\]{padding-block:5px}#overlay-root .pt-1{padding-top:calc(var(--spacing)*1)}#overlay-root .pt-7\\.5{padding-top:calc(var(--spacing)*7.5)}#overlay-root .pr-1\\.5{padding-right:calc(var(--spacing)*1.5)}#overlay-root .pr-\\[7px\\]{padding-right:7px}#overlay-root .pb-0{padding-bottom:calc(var(--spacing)*0)}#overlay-root .pb-2{padding-bottom:calc(var(--spacing)*2)}#overlay-root .pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}#overlay-root .pb-3{padding-bottom:calc(var(--spacing)*3)}#overlay-root .pb-6{padding-bottom:calc(var(--spacing)*6)}#overlay-root .pb-6505{padding-bottom:calc(var(--spacing)*6505)}#overlay-root .pb-\\[calc\\(var\\(--tg-safe-area-inset-bottom\\)\\+6px\\)\\]{padding-bottom:calc(var(--tg-safe-area-inset-bottom) + 6px)}#overlay-root .pl-2\\.5{padding-left:calc(var(--spacing)*2.5)}#overlay-root .text-center{text-align:center}#overlay-root .text-left{text-align:left}#overlay-root .text-\\[3em\\]{font-size:3em}#overlay-root .text-\\[4em\\]{font-size:4em}#overlay-root .text-\\[6em\\]{font-size:6em}#overlay-root .text-\\[10px\\]{font-size:10px}#overlay-root .text-\\[13px\\]{font-size:13px}#overlay-root .text-\\[16px\\]{font-size:16px}#overlay-root .text-\\[24px\\]{font-size:24px}#overlay-root .leading-\\[13px\\]{--tw-leading:13px;line-height:13px}#overlay-root .leading-\\[16px\\]{--tw-leading:16px;line-height:16px}#overlay-root .font-\\[400\\]{--tw-font-weight:400;font-weight:400}#overlay-root .font-\\[590\\]{--tw-font-weight:590;font-weight:590}#overlay-root .font-\\[800\\]{--tw-font-weight:800;font-weight:800}#overlay-root .text-wrap{text-wrap:wrap}#overlay-root .text-clip{text-overflow:clip}#overlay-root .text-ellipsis{text-overflow:ellipsis}#overlay-root .whitespace-nowrap{white-space:nowrap}#overlay-root .\\!text-black{color:var(--color-black)!important}#overlay-root .\\!text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)!important}#overlay-root .\\!text-gray-900{color:var(--color-gray-900)!important}#overlay-root .\\!text-white{color:var(--color-white)!important}#overlay-root .text-\\[var\\(--tgui--button_color\\)\\]{color:var(--tgui--button_color)}#overlay-root .text-black{color:var(--color-black)}#overlay-root .text-button-foreground{color:var(--tgui--button_text_color)}#overlay-root .text-gray-900{color:var(--color-gray-900)}#overlay-root .text-hint{color:var(--tg-theme-hint-color)}#overlay-root .text-inherit{color:inherit}#overlay-root .text-red-500{color:var(--color-red-500)}#overlay-root .text-white{color:var(--color-white)}#overlay-root .capitalize{text-transform:capitalize}#overlay-root .lowercase{text-transform:lowercase}#overlay-root .normal-case{text-transform:none}#overlay-root .uppercase{text-transform:uppercase}#overlay-root .italic{font-style:italic}#overlay-root .not-italic{font-style:normal}#overlay-root .diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .normal-nums{font-variant-numeric:normal}#overlay-root .oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .line-through{text-decoration-line:line-through}#overlay-root .no-underline{text-decoration-line:none}#overlay-root .overline{text-decoration-line:overline}#overlay-root .underline{text-decoration-line:underline}#overlay-root .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#overlay-root .subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}#overlay-root .opacity-0{opacity:0}#overlay-root .opacity-40{opacity:.4}#overlay-root .opacity-70{opacity:.7}#overlay-root .opacity-100{opacity:1}#overlay-root .mix-blend-overlay{mix-blend-mode:overlay}#overlay-root .inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .shadow-\\[0_0_10px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 10px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}#overlay-root .blur{--tw-blur:blur(8px);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,)}#overlay-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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,)}#overlay-root .grayscale{--tw-grayscale:grayscale(100%);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,)}#overlay-root .invert{--tw-invert:invert(100%);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,)}#overlay-root .sepia{--tw-sepia:sepia(100%);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,)}#overlay-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,)}#overlay-root .backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#overlay-root .backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#overlay-root .backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#overlay-root .backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#overlay-root .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#overlay-root .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .duration-200{--tw-duration:.2s;transition-duration:.2s}#overlay-root .duration-300{--tw-duration:.3s;transition-duration:.3s}#overlay-root .duration-400{--tw-duration:.4s;transition-duration:.4s}#overlay-root .ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}#overlay-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}#overlay-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}#overlay-root .will-change-transform{will-change:transform}#overlay-root :where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}#overlay-root .ring-inset{--tw-ring-inset:inset}#overlay-root .before\\:hidden:before{content:var(--tw-content);display:none}div#overlay-root [vaul-overlay]{background:var(--tgui--overlay_bg_color)!important}div#overlay-root div[vaul-overlay]{background:#0006!important}.box-opening-modal-drawer[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transition:none!important;animation:none!important;transform:none!important}.box-opening-modal-drawer[vaul-drawer],.box-opening-modal-drawer[vaul-drawer]>*,.box-opening-modal-drawer[vaul-drawer] [role=dialog],.box-opening-modal-drawer[vaul-drawer] [data-vaul-drawer-wrapper]{background:0 0!important}.box-opening-modal-drawer header,.box-opening-modal-drawer [class*=ModalHeader]{z-index:999!important}#overlay-root div#root{z-index:0;position:relative}div#overlay-root{overscroll-behavior:none;scroll-behavior:smooth;pointer-events:none;width:100vw;height:100vh;position:fixed;z-index:9999!important}div#overlay-root.cssdk-overlay-hidden{visibility:hidden;pointer-events:none!important}div#overlay-root.cssdk-overlay-hidden .cssdk-orientation-check{visibility:visible;pointer-events:auto}div#overlay-root div[class*=flex]{display:flex!important}div#overlay-root div[class*=grid]{display:grid!important}div#overlay-root div[class*=inline]{display:inline!important}div#overlay-root div[class*=inline-block]{display:inline-block!important}div#overlay-root div[class*=inline-flex]{display:inline-flex!important}div#overlay-root .flex{display:flex!important}div#overlay-root .inline-flex{display:inline-flex!important}div#overlay-root .grid{display:grid!important}div#overlay-root .inline-grid{display:inline-grid!important}div#overlay-root .block{display:block!important}div#overlay-root .inline-block{display:inline-block!important}div#overlay-root .inline{display:inline!important}div#overlay-root *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:#0000;-webkit-user-select:none;user-select:none;-ms-overflow-style:none;scrollbar-width:none}div#overlay-root ::-webkit-scrollbar{display:none}div#overlay-root img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}div#overlay-root button[class^=tgui]:after{border-radius:inherit}.cssdk-text-rounded{font-family:-apple-system-rounded,Arial Rounded MT,ui-rounded,system-ui,sans-serif!important}.cssdk-page-container{--container-padding:16px;--floating-profile-area-height:0px;--container-padding-top:calc(var(--container-padding) + var(--tg-safe-area-inset-top,0px));--container-padding-bottom:calc(var(--container-bottom-padding,var(--container-padding)) + var(--floating-profile-area-height,0) + var(--tg-safe-area-inset-bottom,0px));--container-padding-left:calc(var(--container-padding) + var(--tg-safe-area-inset-left,0px));--container-padding-right:calc(var(--container-padding) + var(--tg-safe-area-inset-right,0px));padding:var(--container-padding-top)var(--container-padding-right)var(--container-padding-bottom)var(--container-padding-left);box-sizing:border-box;overscroll-behavior:none;background-color:var(--tgui--secondary_bg_color);height:auto;min-height:100dvh;max-height:100dvh;overflow:hidden scroll}.cssdk-floating-profile{box-sizing:border-box;z-index:1;background:var(--tgui--bg_color,#282e33);cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--tg-theme-text-color,#f5f5f5);overscroll-behavior:none;will-change:box-shadow;border:none;font-family:system-ui,-apple-system,BlinkMacSystemFont,Roboto,Apple Color Emoji,Helvetica Neue,sans-serif;transition:box-shadow .3s ease-in-out}.cssdk-floating-profile:hover{cursor:grab}.cssdk-floating-profile:active{cursor:grabbing}.cssdk-floating-profile.cssdk-floating-profile--light{color:var(--tgui--text_color,#f5f5f5);background:var(--tgui--bg_color);box-shadow:var(--floating-profile-shadow)}.cssdk-floating-profile.cssdk-floating-profile--dark{--floating-profile-shadow:0px 0px 1px 1px #ffffff1a,0px 32px 64px 0px #ffffff1a;--floating-profile-shadow-active:0px 0px 1px 1px #ffffff0d,0px 4px 16px 0px #ffffff0d;color:#fff;box-shadow:var(--floating-profile-shadow);background:#000}.cssdk-floating-profile.cssdk-floating-profile--translucent{color:#fff;background:#ffffff26}.cssdk-close-btn{cursor:pointer;color:var(--tgui--hint_color)!important;padding:0!important}.cssdk-close-btn:hover{filter:brightness(1.2)}.cssdk-close-btn:active{filter:brightness(.6)}.cssdk-floating-profile:not(.cssdk-floating-profile--expanded):active{box-shadow:var(--floating-profile-shadow-active)}.cssdk-floating-profile:focus-visible,.cssdk-floating-profile:focus-within{outline:none}.cssdk-profile-modal{max-height:60dvh!important}.cssdk-profile-modal .cssdk-page-container{min-height:0!important;max-height:60dvh!important}@media (orientation:landscape){.cssdk-profile-modal{width:410px!important;max-height:100dvh!important;top:0!important;left:unset!important}.cssdk-profile-modal .cssdk-page-container{min-height:100dvh!important;max-height:100dvh!important}}.cssdk-balance-section{will-change:transform;-webkit-tap-highlight-color:transparent;flex-direction:column;align-items:center;width:100%;display:flex;transform:scale(1);cursor:pointer!important}.cssdk-balance-section:active{transition:transform .2s cubic-bezier(.34,1.56,.64,1);transform:scale(.95)!important}.tmanetwork_close+iframe{z-index:1;position:relative}.cssdk-banner-container{pointer-events:none;justify-content:center;align-items:center;transition:opacity .3s ease-in-out,transform .3s ease-in-out;display:flex;position:fixed;left:0;right:0}.cssdk-banner-top{top:var(--tg-safe-area-inset-top,0px);height:var(--banner-top-height,0px);background:0 0;transform:translateY(-100%)}.cssdk-banner-bottom{bottom:var(--tg-safe-area-inset-bottom,0px);height:var(--banner-bottom-height,0px);background:0 0;transform:translateY(100%)}.cssdk-banner-container:not(:empty){pointer-events:auto}.cssdk-banner-top.cssdk-banner-show,.cssdk-banner-bottom.cssdk-banner-show{transform:translateY(0)}.cssdk-banner-top.cssdk-banner-hide{transform:translateY(-100%)}.cssdk-banner-bottom.cssdk-banner-hide{transform:translateY(100%)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}#overlay-root .tgui-f23c0e195677169c{background:var(--tgui--bg_color);overflow:hidden}#overlay-root .tgui-947b927060015de8{max-height:0;transition:max-height .1s ease-in-out}#overlay-root .tgui-60e7968097edfa6f{color:var(--tgui--link_color);transition:transform .15s ease-out}#overlay-root .tgui-c900ecbd6d8d6d5e{transform:rotate(180deg)}#overlay-root .tgui-b8dfba0b5c3d054c{--tgui--cell--middle--padding:16px 0;align-items:center;display:flex;gap:24px;padding:0 24px}#overlay-root .tgui-7b5bccbb645b495f{gap:16px}#overlay-root .tgui-7edaaf0c57797623{background:var(--tgui--tertiary_bg_color)}#overlay-root .tgui-56b2e897ed7ccb22,#overlay-root .tgui-aaa795d78c356ac1{align-items:center;display:flex;justify-content:center}#overlay-root .tgui-8735a62be5a8b8a7{display:flex;flex-direction:column;flex-grow:1;gap:2px;max-width:100%;min-width:0;padding:var(--tgui--cell--middle--padding)}#overlay-root .tgui-1c6d7865a76a19bc,#overlay-root .tgui-8735a62be5a8b8a7>*{overflow:hidden;text-overflow:ellipsis}#overlay-root .tgui-b8dfba0b5c3d054c:not(.tgui-6c49dadccf648a5b) .tgui-1c6d7865a76a19bc,#overlay-root .tgui-b8dfba0b5c3d054c:not(.tgui-6c49dadccf648a5b) .tgui-8735a62be5a8b8a7>*{white-space:nowrap}#overlay-root .tgui-46dd90b57ffed25f{color:var(--tgui--subtitle_text_color)}#overlay-root .tgui-a894f59f4c5ad72f{align-items:center;display:inline-flex;gap:4px}#overlay-root .tgui-bb909928b48f948b,#overlay-root .tgui-d528ef65a8b76273,#overlay-root .tgui-fc059ed3ac5799a6{color:var(--tgui--hint_color)}#overlay-root .tgui-7b5bccbb645b495f{--tgui--cell--middle--padding:12px 0;padding:0 16px}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-b8dfba0b5c3d054c:hover{background:var(--tgui--tertiary_bg_color)}}#overlay-root .tgui-b5d680db78c4cc2e{cursor:pointer;isolation:isolate;position:relative;transition:opacity .15s ease-out}#overlay-root .tgui-b5d680db78c4cc2e[readonly]{cursor:default;pointer-events:visible}#overlay-root .tgui-b5d680db78c4cc2e[disabled]{cursor:default;opacity:.35}#overlay-root .tgui-34eb6f8b96874d40:active,#overlay-root .tgui-7c5d6c1f6bbe3eaf:active{opacity:.65}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-34eb6f8b96874d40:hover,#overlay-root .tgui-7c5d6c1f6bbe3eaf:hover{opacity:.85}}#overlay-root .tgui-8071f6e38c77bc0b{border-radius:inherit;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;transition:background-color .15s ease-out}#overlay-root .tgui-e156954daf886976{animation:tgui-81605f53eca39186 .3s cubic-bezier(.3,.3,.5,1);background:var(--tgui--outline);border-radius:50%;content:"";height:24px;margin:-12px 0;opacity:0;position:absolute;width:24px}@keyframes tgui-81605f53eca39186{0%{opacity:1;transform:scale(1)}30%{opacity:1}to{opacity:0;transform:scale(8)}}#overlay-root .tgui-30064fce0d501f17{font-size:var(--tgui--subheadline1--font_size);line-height:var(--tgui--subheadline1--line_height)}#overlay-root .tgui-8f63cd31b2513281{font-size:var(--tgui--subheadline2--font_size);line-height:var(--tgui--subheadline2--line_height)}#overlay-root .tgui-c3e2e598bd70eee6{font-family:var(--tgui--font-family)}#overlay-root .tgui-080a44e6ac3f4d27{margin:0}#overlay-root .tgui-5c92f90c2701fa17{font-weight:var(--tgui--font_weight--accent1)}#overlay-root .tgui-809f1f8a3f64154d{font-weight:var(--tgui--font_weight--accent2)}#overlay-root .tgui-5b8bdfbd2af10f59{font-weight:var(--tgui--font_weight--accent3)}#overlay-root .tgui-c602097b30e4ede9{text-transform:uppercase}#overlay-root .tgui-2916d621b0ea5857{font-size:var(--tgui--caption1--font_size);line-height:var(--tgui--caption1--line_height)}#overlay-root .tgui-937d123c23df98b3{font-size:var(--tgui--caption2--font_size);line-height:var(--tgui--caption2--line_height)}#overlay-root .tgui-65c206f0fd891b6b{font-size:var(--tgui--text--font_size);line-height:var(--tgui--text--line_height)}#overlay-root .tgui-91c5537b51b490a7{border-radius:50%}#overlay-root .tgui-305551eb3f5abb68.tgui-305551eb3f5abb68{background-color:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-30d8642662534eb5{align-items:center;background-color:var(--tgui--tertiary_bg_color);box-shadow:0 0 0 1px var(--tgui--outline);display:flex;justify-content:center;position:relative}#overlay-root .tgui-1191c597a64dbd25{border-radius:inherit;display:block;height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;visibility:hidden;width:100%}#overlay-root .tgui-72bd4140eca37f53 .tgui-1191c597a64dbd25{visibility:visible}#overlay-root .tgui-5ee2f1c6e1da49b5{align-items:center;display:flex;justify-content:center;position:absolute}#overlay-root .tgui-e3bcc434a6ee9317{position:absolute;right:-12px;top:-12px}#overlay-root .tgui-562f7459d74103ea{align-items:center;border-radius:20px;box-sizing:border-box;display:inline-flex;height:20px;justify-content:center;margin:0 6px;min-width:20px;padding:0 5px}#overlay-root .tgui-c1a5e9170826a773{height:24px;padding:0 6px}#overlay-root .tgui-4f69ed647e40e245{border-radius:50%;display:inline-block;height:6px;margin:7px;width:6px}#overlay-root .tgui-6e63faaa2b33f4ae{background:var(--tgui--button_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-4b52474c713ffa7c{background:var(--tgui--destructive_text_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-0278f262d68294f0{background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-0883e451f3707277{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-6b3dbcedd9052940{background:var(--tgui--white);color:var(--tgui--link_color)}#overlay-root .tgui-e05fce4753086879{font-size:var(--tgui--headline--font_size);line-height:var(--tgui--headline--line_height)}#overlay-root .tgui-c6d7432a5c12debe{font-size:var(--tgui--large_title--font_size);line-height:var(--tgui--large_title--line_height)}#overlay-root .tgui-2fc52ee93e8068a6{font-size:var(--tgui--title1--font_size);line-height:var(--tgui--title1--line_height)}#overlay-root .tgui-72c2a480384c4fb1{font-size:var(--tgui--title2--font_size);line-height:var(--tgui--title2--line_height)}#overlay-root .tgui-45c5f45d3e9105f4{font-size:var(--tgui--title3--font_size);line-height:var(--tgui--title3--line_height)}#overlay-root .tgui-54214e0db34f53c3{position:absolute;right:-12px;top:0}#overlay-root .tgui-28e0a2576155be01{display:flex}#overlay-root .tgui-28e0a2576155be01>:not(:first-child){margin-left:-12px}#overlay-root .tgui-28e0a2576155be01>*{box-shadow:0 0 0 3px var(--tgui--bg_color)}#overlay-root .tgui-c3d21871b48e0ba3{background:var(--tgui--bg_color);display:flex;gap:20px;overflow:hidden;padding:16px 20px;position:relative}#overlay-root .tgui-7b260d7ad33f3ba0:not(.tgui-f80265c401d577b0){box-shadow:var(--tgui--base--section--box_shadow)}#overlay-root .tgui-cefdf70a2d9648ea{border-radius:16px}#overlay-root .tgui-f80265c401d577b0{padding:20px}#overlay-root .tgui-f80265c401d577b0 .tgui-2646957e5c9379f3{color:var(--tgui--white)}#overlay-root .tgui-f80265c401d577b0 .tgui-62a759a0c54c3667{color:var(--tgui--white);opacity:.8}#overlay-root .tgui-d67d90bbcab86e14{background:var(--tgui--bg_color)}#overlay-root .tgui-7b260d7ad33f3ba0.tgui-d67d90bbcab86e14{border:1px solid var(--tgui--outline);border-radius:16px;box-shadow:none;margin:8px 20px}#overlay-root .tgui-cefdf70a2d9648ea.tgui-d67d90bbcab86e14{background:var(--tgui--quartenary_bg_color);margin:8px 16px}#overlay-root .tgui-11921b54915b369c{bottom:0;left:0;position:absolute;right:0;top:0}#overlay-root .tgui-a04b768cea14d789{display:flex;flex:1 1 0;flex-direction:column;gap:2px;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-62a759a0c54c3667{color:var(--tgui--subtitle_text_color)}#overlay-root .tgui-1e638bcb841cdfbc{color:var(--tgui--hint_color)}#overlay-root .tgui-5e0d89b3bc8342d8{display:flex;gap:4px;margin-top:10px}#overlay-root .tgui-fa2f2ea4a4ffc035{border-radius:50%;height:28px}#overlay-root .tgui-79024fcb6d81ad79{background:var(--tgui--secondary_fill);border-left:3px solid var(--tgui--link_color);border-radius:4px;padding:6px 28px 8px 12px;position:relative}#overlay-root .tgui-16ed20e7a6e2daa0{color:var(--tgui--text_color)}#overlay-root .tgui-bd5b6cd161834705{display:block;position:absolute;right:6px;top:4px}#overlay-root .tgui-6c9b3f1fd52a3108{color:var(--tgui--link_color)}#overlay-root .tgui-117e77cd385a9c8d{align-items:center;border:none;border-radius:8px;box-sizing:border-box;display:inline-flex;justify-content:center;max-width:100%;min-width:80px;text-decoration:none}#overlay-root .tgui-726846958fe7f4a0{flex-grow:1;width:100%}#overlay-root .tgui-117e77cd385a9c8d:after{background:var(--tgui--bg_color);bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .15s ease-out}#overlay-root .tgui-06cc94d03a7c4dd7,#overlay-root .tgui-8310172a5320ab71{align-items:center;display:flex;justify-content:center}#overlay-root .tgui-5f6014c0f063b6de{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-014f2b7d196b090d.tgui-014f2b7d196b090d{align-items:center;background:inherit;border-radius:inherit;color:var(--tgui--button--spinner-color);cursor:auto;display:flex;height:100%;justify-content:center;position:absolute;width:100%}#overlay-root .tgui-13f23a224303ddaa{border-radius:20px;gap:6px;height:36px;min-width:34px;padding:8px 12px}#overlay-root .tgui-1a16a49d89076ff4{gap:8px;height:42px;min-width:42px;padding:8px 14px}#overlay-root .tgui-9cef742a22f195c9{gap:10px;height:50px;padding:10px 20px}#overlay-root .tgui-8a1ca9efa24f4809{--tgui--button--hovered-opacity:.15;--tgui--button--spinner-color:var(--tgui--button_text_color);background:var(--tgui--button_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-91bda9a36246a33c{--tgui--button--hovered-opacity:.07;--tgui--button--spinner-color:var(--tgui--link_color);background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-48956537c34690db{--tgui--button--hovered-opacity:.03;--tgui--button--spinner-color:var(--tgui--plain_foreground);background:transparent;color:var(--tgui--link_color)}#overlay-root .tgui-93106efd6b6d66ee{background:var(--tgui--plain_background)}#overlay-root .tgui-93106efd6b6d66ee,#overlay-root .tgui-e884e36ff1faa596{--tgui--button--hovered-opacity:.5;--tgui--button--spinner-color:var(--tgui--plain_foreground);color:var(--tgui--plain_foreground)}#overlay-root .tgui-e884e36ff1faa596{background:inherit;box-shadow:0 0 0 1px var(--tgui--outline)}#overlay-root .tgui-ba6d30cc81e39ae5{--tgui--button--hovered-opacity:.5;--tgui--button--spinner-color:var(--tgui--surface_dark);background:var(--tgui--white)}#overlay-root .tgui-55e8aa7f5cea2280.tgui-1a16a49d89076ff4{border-radius:12px}#overlay-root .tgui-55e8aa7f5cea2280:after{content:unset}#overlay-root .tgui-490cb0f5ec4998f3 .tgui-06cc94d03a7c4dd7,#overlay-root .tgui-490cb0f5ec4998f3 .tgui-5f6014c0f063b6de,#overlay-root .tgui-490cb0f5ec4998f3 .tgui-8310172a5320ab71{opacity:0}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-117e77cd385a9c8d:hover:after{opacity:var(--tgui--button--hovered-opacity)}}#overlay-root .tgui-0ac8c3540e603b63{color:var(--tgui--link_color)}#overlay-root .tgui-562a3eae646b486d{color:var(--tgui--hint_color)}#overlay-root .tgui-dbf261f4b3046bb3{background:var(--tgui--tertiary_bg_color);border-radius:20px;box-shadow:0 32px 64px #0000000a,0 0 2px 1px #00000005;display:inline-block;overflow:hidden;position:relative}#overlay-root .tgui-c6ad96fdf8ce4b28{background:var(--tgui--plain_foreground)}#overlay-root .tgui-80c6a0ba7b3c11fd{--tgui--cell--middle--padding:16px 0;background:var(--tgui--card_bg_color);padding:0 20px}#overlay-root .tgui-814d1971a92687e3{--tgui--text_color:var(--tgui--white);--tgui--hint_color:hsla(0,0%,100%,.75);background:linear-gradient(180deg,transparent 0,var(--tgui--black) 100%);bottom:0;left:0;padding-top:48px;position:absolute;right:0}#overlay-root .tgui-422c21c917cc0873{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:break-spaces}#overlay-root .tgui-27c5a061c5f35c04{font-weight:var(--tgui--font_weight--accent2)}#overlay-root .tgui-814d1971a92687e3 .tgui-27c5a061c5f35c04{color:var(--tgui--white)}#overlay-root .tgui-79efb12936705a6f{position:absolute;right:16px;top:16px}#overlay-root .tgui-6372c64c79ad2959{align-items:center;border-radius:10px;box-sizing:border-box;display:inline-flex;gap:8px;justify-content:center;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}#overlay-root .tgui-b8b077d7e3491b30{background:var(--tgui--surface_primary);box-shadow:0 12px 24px #0000000d}#overlay-root .tgui-ccc3e4a302799418{background:var(--tgui--plain_background)}#overlay-root .tgui-fdfccf8f92c11530{border-radius:10px;box-shadow:0 0 0 1px var(--tgui--outline)}#overlay-root .tgui-9c7ff8cd23a6ea9a{color:var(--tgui--plain_foreground);flex:1 1 0;overflow:hidden;text-overflow:ellipsis}#overlay-root .tgui-0d7ce20ebc0fc7aa{margin-right:2px}#overlay-root .tgui-67f596882eb2b6ab{align-items:center;color:var(--tgui--secondary_hint_color);display:flex;margin-top:1.5px}#overlay-root .tgui-a8ce18a8594cea9b{align-items:center;background:transparent;border:none;color:var(--tgui--link_color);display:flex;gap:24px;height:48px;padding:10px 24px;width:100%}#overlay-root .tgui-6e7ca796043fe6ca{color:var(--tgui--destructive_text_color)}#overlay-root .tgui-f464dba82cb8b46e{gap:18px;height:44px;padding:8px 18px}#overlay-root .tgui-c5be765fabc1327f{text-align:right}#overlay-root .tgui-437ab2028f14c95c{align-items:center;color:var(--tgui--secondary_hint_color);display:flex;gap:12px}#overlay-root .tgui-4af039094fb946b4{color:var(--tgui--hint_color);margin:2px 0 0}#overlay-root .tgui-97dd747d03e9d3e0{align-items:center;color:var(--tgui--hint_color);display:flex;gap:8px}#overlay-root .tgui-64a5a0dc5509605e{flex-grow:1;overflow-wrap:anywhere}#overlay-root .tgui-3b026a2674eb3f4c{flex-shrink:0}#overlay-root .tgui-dda0e80fdf796ba5{border:none;border-radius:12px;display:inline-flex;padding:8px}#overlay-root .tgui-b92d762e02762017{border-radius:50%;padding:6px}#overlay-root .tgui-93cba8aff2e72079{background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-08ef1486bc111162{background:transparent;color:var(--tgui--link_color)}#overlay-root .tgui-2250ff52f0b5cf71{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-53781f3cf83e8be1{background:inherit;box-shadow:0 0 0 1px var(--tgui--outline);color:var(--tgui--plain_foreground)}#overlay-root .tgui-39e9f02ce4b4b950{display:flex;gap:12px}#overlay-root .tgui-b3d7f75461a64b76{gap:8px}#overlay-root .tgui-c5545e0bc6105e48{align-items:center;background:transparent;border:none;border-radius:12px;box-sizing:border-box;color:var(--tgui--link_color);display:flex;flex:1 0 0;flex-direction:column;gap:3px;justify-content:center;max-width:100%;min-height:60px;min-width:64px;padding:0 12px}#overlay-root .tgui-bf32cd3c110b8729{gap:4px;min-height:64px;min-width:72px}#overlay-root .tgui-99a630d0096f2169{background:var(--tgui--secondary_fill)}#overlay-root .tgui-30bf4976f818e8bf{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-c0c9bf3b1a53a8a4{max-width:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-389a43acd684137a>:not(:last-child){margin-bottom:12px}#overlay-root .tgui-cfed40fe81d34ad5{box-sizing:border-box;padding:10px 18px}#overlay-root .tgui-e5c3a5b87f8b1f46{align-items:center;display:flex;flex-direction:column;gap:24px;justify-content:center;overflow:hidden;padding:32px}#overlay-root .tgui-9c3dbc0ef84585d4{margin:0;overflow-wrap:anywhere;text-align:center}#overlay-root .tgui-87cd6af55f73428d{color:var(--tgui--hint_color)}#overlay-root .tgui-87cd6af55f73428d:not(:first-child){margin-top:8px}#overlay-root .tgui-8e15431b81f6601e .tgui-db9be63c4fecf79b{background:var(--tgui--section_bg_color);box-shadow:0 1px 2px #0000001a}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e{background:var(--tgui--section_bg_color);border-radius:12px}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:first-child{border-radius:12px 12px 0 0}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:last-child{border-radius:0 0 12px 12px}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:only-child{border-radius:12px}#overlay-root .tgui-8af0d10d5540c6cc{border-top:none;border-color:var(--tgui--outline);border-width:var(--tgui--border--width);margin:0}#overlay-root .tgui-dbb364e8ced00cc8{padding:12px 24px}#overlay-root .tgui-8c4c6f82ba895475{padding:8px 16px 0}#overlay-root .tgui-8ebba379083b615a{padding:16px 24px 20px;text-align:center}#overlay-root .tgui-8c4c6f82ba895475.tgui-8ebba379083b615a{padding:16px 16px 0}#overlay-root .tgui-67471b69da3e3062{color:var(--tgui--section_header_text_color)}#overlay-root .tgui-d0251b46536ac046{color:var(--tgui--link_color);padding:20px 24px 4px 22px}#overlay-root .tgui-34fd1a25cc171439{color:var(--tgui--text_color);padding-left:24px}#overlay-root .tgui-b7217abb24e8763a{color:var(--tgui--section_header_text_color);padding:16px 16px 8px}#overlay-root .tgui-b7217abb24e8763a.tgui-34fd1a25cc171439{color:var(--tgui--text_color);padding:0 0 12px}#overlay-root .tgui-f492b616576c67fb{display:flex;gap:9px;padding:12px}#overlay-root .tgui-d45985ba4cb27e5f{background:var(--tgui--tertiary_bg_color);border-radius:2px;height:3px;min-width:3px;width:100%}#overlay-root .tgui-352b8d247f473986{background:var(--tgui--link_color)}#overlay-root .tgui-b53f1370d519b689{display:flex;flex-direction:column;gap:24px;margin:0;padding:32px 44px}#overlay-root .tgui-732e8859c58ffb77{flex-direction:row}#overlay-root .tgui-4614301efc783534{display:flex;overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:none}#overlay-root .tgui-4e145f66199825da::-webkit-scrollbar{display:none}#overlay-root .tgui-caaaa27ccfa566b7{--tgui--timeline--item--thickness:4px;--tgui--timeline--item--size:12px;display:flex;gap:32px}#overlay-root .tgui-caaaa27ccfa566b7:last-child .tgui-3fc2f0d7045d23d8{display:none}#overlay-root .tgui-0f46575488c31b93{min-width:var(--tgui--timeline--item--size);position:relative}#overlay-root .tgui-d7ba9c56743387af{border-radius:50%;height:var(--tgui--timeline--item--size);left:0;top:4px;width:var(--tgui--timeline--item--size)}#overlay-root .tgui-3fc2f0d7045d23d8,#overlay-root .tgui-d7ba9c56743387af{background:var(--tgui--quartenary_bg_color);position:absolute}#overlay-root .tgui-3fc2f0d7045d23d8{border-radius:2px;bottom:0;height:calc(100% - 4px);left:50%;top:24px;transform:translate(-50%);width:var(--tgui--timeline--item--thickness)}#overlay-root .tgui-bf9f87dd32ecad81{overflow:hidden}#overlay-root .tgui-2b850faa8f3a520a{display:inline-block;margin-bottom:4px}#overlay-root .tgui-b9a4d9afcd70e355{color:var(--tgui--hint_color)}#overlay-root .tgui-581d134185fd28b4 .tgui-d7ba9c56743387af,#overlay-root .tgui-dcd66bc07faad440 .tgui-3fc2f0d7045d23d8,#overlay-root .tgui-dcd66bc07faad440 .tgui-d7ba9c56743387af{background:var(--tgui--link_color)}#overlay-root .tgui-566b727e7a35e935 .tgui-0f46575488c31b93{--tgui--timeline--item--size:16px}#overlay-root .tgui-566b727e7a35e935 .tgui-d7ba9c56743387af{top:6px}#overlay-root .tgui-566b727e7a35e935 .tgui-3fc2f0d7045d23d8{height:calc(100% + 26px);top:6px}#overlay-root .tgui-f461f2eeb28c21d0{flex-direction:column;gap:24px}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-0f46575488c31b93{align-items:center;display:flex;height:var(--tgui--timeline--item--size)}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-d7ba9c56743387af{top:0}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-3fc2f0d7045d23d8{height:var(--tgui--timeline--item--thickness);left:0;top:50%;transform:translateY(-50%);width:calc(100% + 36px)}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-2b850faa8f3a520a{white-space:nowrap}#overlay-root .tgui-81a5164cd16c05d5{stroke:var(--tgui--link_color);transform:rotate(-90deg)}#overlay-root .tgui-ced47fd163a53511{border-radius:2px;height:4px;overflow:hidden;position:relative}#overlay-root .tgui-44060f289fdbdb84:after{bottom:0;content:"";left:0;opacity:.4;right:0;top:0}#overlay-root .tgui-027278a6d6708965,#overlay-root .tgui-44060f289fdbdb84:after{background:var(--tgui--link_color);position:absolute}#overlay-root .tgui-027278a6d6708965{border-radius:inherit;height:100%;transition:width .2s ease;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97f2df57786b02dc{position:relative}#overlay-root .tgui-3eb6091f664c15d6:after,#overlay-root .tgui-3eb6091f664c15d6:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97f2df57786b02dc:before{background:var(--tgui--secondary_bg_color)}#overlay-root .tgui-97f2df57786b02dc:not(.tgui-ecf101b3117a96c8):after{animation:tgui-3a837cc9661e7502 1.8s linear infinite;background-color:var(--tgui--bg_color);z-index:var(--tgui--z-index--skeleton)}@keyframes tgui-3a837cc9661e7502{0%,to{opacity:.4}50%{opacity:.7}}#overlay-root .tgui-bed09b0692380ce7{animation:tgui-738ce40067f9bb6e .34s cubic-bezier(.3,.3,.5,1);bottom:10px;box-sizing:border-box;left:10px;max-width:460px;position:fixed;right:10px;transition:transform .32s cubic-bezier(.3,.3,.5,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}#overlay-root .tgui-a869502f11f22b6c{align-items:center;-webkit-backdrop-filter:blur(28px);backdrop-filter:blur(28px);background:var(--tgui--surface_dark);border-radius:10px;bottom:0;box-sizing:border-box;display:flex;gap:12px;left:0;padding:10px 16px 10px 10px;position:sticky;right:0;top:0;width:100%}#overlay-root .tgui-a1e25a2488982fc5{transform:translate3d(0,140%,0)}#overlay-root .tgui-c2ca59c94a46245e{bottom:16px}#overlay-root .tgui-c2ca59c94a46245e .tgui-a869502f11f22b6c{border-radius:14px}#overlay-root .tgui-093aea87229643ac,#overlay-root .tgui-229bfa1a0a8ac43f{align-items:center;color:var(--tgui--toast_accent_color);display:flex}#overlay-root .tgui-7d8f183ba67229e9{color:var(--tgui--white);display:flex;flex:1 1 0;flex-direction:column;gap:1px}@keyframes tgui-738ce40067f9bb6e{0%{transform:translate3d(0,140%,0)}to{transform:translateZ(0)}}#overlay-root .tgui-4d26fba7185ffa9f{background:transparent;border:none;color:var(--tgui--toast_accent_color);padding:0}#overlay-root .tgui-86f452d8e92a2075{display:table;position:relative}#overlay-root .tgui-86f452d8e92a2075:before{background-color:var(--tgui--bg_color);background-image:url("data:image/svg+xml,%3csvg%20width='72'%20height='66'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23a)'%20filter='url(%23b)'%20fill='%23000'%3e%3ccircle%20opacity='.75'%20cx='37.5'%20cy='8.5'%20r='.5'/%3e%3ccircle%20cx='4'%20cy='36'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='51.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20cx='63.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='43.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='41'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='34.5'%20cy='11.5'%20r='1.5'/%3e%3ccircle%20cx='20'%20cy='17'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='29.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20cx='14.5'%20cy='1.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='68.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20cx='35'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='35'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='68'%20cy='40'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='4.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='28.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='67.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='43.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='9.5'%20r='.5'/%3e%3ccircle%20cx='36.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20cx='54.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='18.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='3.5'%20cy='63.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='70.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='57.5'%20cy='31.5'%20r='.5'/%3e%3ccircle%20cx='34'%20cy='17'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='45'%20cy='31'%20r='1'/%3e%3ccircle%20cx='44.5'%20cy='46.5'%20r='1.5'/%3e%3ccircle%20cx='33'%20cy='36'%20r='1'/%3e%3ccircle%20cx='28.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='43.5'%20r='.5'/%3e%3ccircle%20cx='54.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='64'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='.5'%20r='.5'/%3e%3ccircle%20cx='5.5'%20cy='50.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='35.5'%20r='1.5'/%3e%3ccircle%20cx='30'%20cy='60'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='57'%20cy='33'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='8'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11.5'%20cy='54.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='46.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20cx='19'%20cy='13'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='5.5'%20cy='14.5'%20r='1.5'/%3e%3ccircle%20cx='3.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='29'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='43'%20cy='25'%20r='1'/%3e%3ccircle%20cx='4.5'%20cy='6.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='12'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='18.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='3.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='68.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='42.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20cx='65.5'%20cy='46.5'%20r='1.5'/%3e%3ccircle%20cx='62.5'%20cy='65.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='63.5'%20r='.5'/%3e%3ccircle%20cx='19.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='9.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='27'%20cy='3'%20r='1'/%3e%3ccircle%20cx='40'%20cy='48'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='9'%20cy='7'%20r='1'/%3e%3ccircle%20cx='52.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71'%20cy='15'%20r='1'/%3e%3ccircle%20cx='11.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20cx='31.5'%20cy='16.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='53.5'%20r='.5'/%3e%3ccircle%20cx='41.5'%20cy='55.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='52.5'%20cy='62.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='27'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20cx='50'%20cy='62'%20r='1'/%3e%3ccircle%20cx='47'%20cy='1'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='54.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='38'%20cy='21'%20r='1'/%3e%3ccircle%20cx='59'%20cy='62'%20r='1'/%3e%3ccircle%20cx='54.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11'%20cy='9'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='15.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='41.5'%20r='1.5'/%3e%3ccircle%20cx='67.5'%20cy='22.5'%20r='1.5'/%3e%3ccircle%20cx='12.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='17'%20cy='31'%20r='1'/%3e%3ccircle%20cx='14.5'%20cy='58.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='69'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='57'%20cy='46'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='25'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='32'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='26'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='55'%20cy='57'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='9.5'%20cy='6.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='35.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='65.5'%20cy='23.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='38.5'%20cy='23.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='22'%20cy='3'%20r='1'/%3e%3ccircle%20cx='18.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='54.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='69.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20cx='6.5'%20cy='34.5'%20r='1.5'/%3e%3ccircle%20cx='60'%20cy='4'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35'%20cy='34'%20r='1'/%3e%3ccircle%20cx='43.5'%20cy='64.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71.5'%20cy='14.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='66'%20cy='33'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='41'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='7'%20cy='13'%20r='1'/%3e%3ccircle%20cx='47.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='13'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='51.5'%20cy='8.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='45.5'%20cy='6.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='4'%20cy='59'%20r='1'/%3e%3ccircle%20cx='15'%20cy='23'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='63'%20cy='47'%20r='1'/%3e%3ccircle%20cx='7'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='12'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='35.5'%20r='.5'/%3e%3ccircle%20cx='12'%20cy='35'%20r='1'/%3e%3ccircle%20cx='22.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='60.5'%20cy='53.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='68.5'%20cy='64.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='18.5'%20cy='37.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='48.5'%20cy='46.5'%20r='.5'/%3e%3ccircle%20cx='60.5'%20cy='1.5'%20r='1.5'/%3e%3ccircle%20cx='11.5'%20cy='62.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='47.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='1.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20cx='40.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='9.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='66.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='16'%20cy='39'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='44'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='28.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='41.5'%20cy='4.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='27.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20cx='63.5'%20cy='56.5'%20r='.5'/%3e%3ccircle%20cx='34.5'%20cy='45.5'%20r='.5'/%3e%3ccircle%20cx='10.5'%20cy='50.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='17'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='60.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='49.5'%20cy='34.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='41'%20cy='39'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='32.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20cx='25.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='36.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='28'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='27'%20cy='41'%20r='1'/%3e%3ccircle%20cx='2.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='40.5'%20cy='19.5'%20r='.5'/%3e%3ccircle%20cx='11.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='65.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='19.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='17'%20cy='15'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='16.5'%20cy='11.5'%20r='1.5'/%3e%3ccircle%20cx='20.5'%20cy='9.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='36.5'%20cy='4.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='40'%20cy='50'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='22.5'%20cy='37.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='47'%20cy='51'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='61.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20cx='70.5'%20cy='34.5'%20r='.5'/%3e%3ccircle%20cx='14'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='20'%20cy='33'%20r='1'/%3e%3ccircle%20cx='7.5'%20cy='17.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='14.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='69'%20cy='63'%20r='1'/%3e%3ccircle%20cx='25'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='43'%20cy='32'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='5.5'%20cy='44.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='29.5'%20cy='14.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='42.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='42'%20cy='42'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='57.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='19.5'%20cy='29.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='20.5'%20cy='34.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='17.5'%20r='.5'/%3e%3ccircle%20cx='13'%20cy='61'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='23.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='69.5'%20cy='10.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='15'%20cy='60'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='54'%20cy='53'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='10'%20cy='57'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='45.5'%20cy='10.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='67.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='60.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='40'%20cy='26'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='38.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='54.5'%20cy='26.5'%20r='1.5'/%3e%3ccircle%20cx='52.5'%20cy='5.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='37.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='64.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='61'%20cy='7'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='24.5'%20cy='19.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='4'%20cy='59'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='51.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='42.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20cx='33'%20cy='61'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='70.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='36.5'%20cy='18.5'%20r='1.5'/%3e%3ccircle%20cx='61.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='43'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='50'%20cy='11'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='20.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='40.5'%20cy='58.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='44.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='23.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='36'%20cy='1'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='28.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='11.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='38'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='68'%20cy='50'%20r='1'/%3e%3ccircle%20cx='44.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='17.5'%20cy='27.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='23'%20cy='37'%20r='1'/%3e%3ccircle%20cx='-.5'%20cy='60.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='19'%20cy='26'%20r='1'/%3e%3ccircle%20cx='57.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11.5'%20cy='13.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='56.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='29'%20cy='53'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='3'%20cy='22'%20r='1'/%3e%3ccircle%20cx='8.5'%20cy='63.5'%20r='.5'/%3e%3ccircle%20cx='57.5'%20cy='4.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='4.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20cx='41.5'%20cy='16.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='40.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='60'%20cy='22'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='15'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='16.5'%20cy='24.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='64.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='58'%20cy='51'%20r='1'/%3e%3ccircle%20cx='69'%20cy='12'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='39'%20cy='52'%20r='1'/%3e%3ccircle%20cx='51.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='38.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='63'%20cy='13'%20r='1'/%3e%3ccircle%20cx='39.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='46'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='40.5'%20cy='13.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='33.5'%20cy='50.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20cx='15.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20cx='40.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='45.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20cx='53.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='28'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='42.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='63.5'%20cy='45.5'%20r='.5'/%3e%3ccircle%20cx='56.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20cx='53.5'%20cy='60.5'%20r='1.5'/%3e%3ccircle%20cx='9.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='68'%20cy='61'%20r='1'/%3e%3ccircle%20cx='31.5'%20cy='14.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='55.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='39.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='13'%20cy='48'%20r='1'/%3e%3ccircle%20cx='40'%20cy='22'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='23'%20r='1'/%3e%3ccircle%20cx='16.5'%20cy='42.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='17.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='63'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='65'%20cy='12'%20r='1'/%3e%3ccircle%20cx='13.5'%20cy='3.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='3.5'%20cy='17.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='60.5'%20cy='47.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='13.5'%20cy='45.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='31.5'%20r='.5'/%3e%3ccircle%20cx='64'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='19.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='52'%20cy='22'%20r='1'/%3e%3ccircle%20cx='2'%20cy='6'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='54'%20r='1'/%3e%3ccircle%20cx='57.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='30.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='38.5'%20cy='60.5'%20r='.5'/%3e%3ccircle%20cx='65.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20cx='60'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='47.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='58.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='62'%20r='1'/%3e%3ccircle%20cx='52.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20cx='70.5'%20cy='49.5'%20r='1.5'/%3e%3ccircle%20cx='62.5'%20cy='64.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='48'%20cy='41'%20r='1'/%3e%3ccircle%20cx='21.5'%20cy='62.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='64'%20cy='15'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='49'%20cy='5'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='37.5'%20cy='41.5'%20r='1.5'/%3e%3ccircle%20cx='49.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='42.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='30.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20cx='8.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20cx='17.5'%20cy='55.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='25'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='64'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='26'%20cy='62'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='63.5'%20cy='5.5'%20r='.5'/%3e%3ccircle%20cx='29.5'%20cy='27.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='56.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='2.5'%20cy='26.5'%20r='1.5'/%3e%3ccircle%20cx='18.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='4.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='2.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='30.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='56.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20cx='26.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='22'%20cy='26'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='61.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20cx='56.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='15'%20cy='30'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='15.5'%20cy='61.5'%20r='.5'/%3e%3ccircle%20cx='67'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='26'%20cy='37'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='17'%20cy='2'%20r='1'/%3e%3ccircle%20cx='50.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='49.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='29'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='66.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='31.5'%20cy='48.5'%20r='1.5'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h72v66H0z'/%3e%3c/clipPath%3e%3cfilter%20id='b'%20x='0'%20y='0'%20width='72'%20height='66'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='arithmetic'%20k2='-1'%20k3='1'/%3e%3cfeColorMatrix%20values='0%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%201%200'/%3e%3cfeBlend%20in2='shape'%20result='effect1_innerShadow_379_752'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e");bottom:0;content:"";left:0;position:absolute;right:0;top:0;transition:.4s ease;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-aff2a6268e887037:before{opacity:0}#overlay-root .tgui-abbb25a9ce45033e{cursor:pointer;position:relative}#overlay-root .tgui-6e9776e8c33b2626{cursor:default;opacity:.3}#overlay-root .tgui-21b20ecaad17ccf9{color:var(--tgui--outline);display:block}#overlay-root .tgui-bca5056bf34297b0{color:var(--tgui--link_color);opacity:0;position:absolute;top:0;transition:opacity .15s ease-out}#overlay-root .tgui-60cf4cc79ba44c4f:checked~.tgui-bca5056bf34297b0{opacity:1}#overlay-root .tgui-b9fd8cdf929947df{height:1px;margin:-1px;padding:0;position:absolute;white-space:nowrap;width:1px;clip:rect(0,0,0,0);border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);opacity:0;overflow:hidden}#overlay-root .tgui-a03137b1ed760aaf{display:flex;gap:10px;min-height:48px;padding:10px 12px 10px 16px}#overlay-root .tgui-ca1c0e2d013ae260{min-height:50px;padding:10px 16px}#overlay-root .tgui-f3ab78c8048cb9dc{align-items:center;background:conic-gradient(from 0deg at 50% 50%,#0c28ff,#03ffff,#24d627,#fdff22,#ff2227,#fe2df6,#7122ff 1turn);border-radius:50%;display:flex;height:24px;justify-content:center;position:relative;width:24px}#overlay-root .tgui-93beab8699996b1e{border-radius:50%;height:16px;width:16px}#overlay-root .tgui-93beab8699996b1e:after,#overlay-root .tgui-93beab8699996b1e:before{border-radius:inherit;content:"";position:absolute}#overlay-root .tgui-93beab8699996b1e:before{background:var(--tgui--bg_color);bottom:2px;left:2px;right:2px;top:2px}#overlay-root .tgui-93beab8699996b1e:after{background:inherit;bottom:4px;left:4px;right:4px;top:4px}#overlay-root .tgui-21dba5277ef0ddd7{flex:1 1 0}#overlay-root .tgui-8ca550c2fc85eff5{background:var(--tgui--bg_color);padding:20px 22px 16px;position:relative}#overlay-root .tgui-8ca550c2fc85eff5 .tgui-9f9a52f695b85cc9{background:var(--tgui--bg_color);border-radius:5px;color:var(--tgui--secondary_hint_color);left:32px;max-width:calc(100% - 86px);overflow:hidden;padding:0 6px;position:absolute;text-overflow:ellipsis;top:6px;white-space:nowrap}#overlay-root .tgui-4a83fef1f04acb0e{pointer-events:none;position:relative}#overlay-root .tgui-7707c5d942b7b9af.tgui-4a83fef1f04acb0e{opacity:.35}#overlay-root .tgui-8ca550c2fc85eff5.tgui-4a83fef1f04acb0e:after{background:var(--tgui--bg_color);bottom:0;content:"";left:0;opacity:.5;position:absolute;right:0;top:0}#overlay-root .tgui-0f5050defacbf813{align-items:center;box-sizing:border-box;display:flex}#overlay-root .tgui-16b3783d394bc7db,#overlay-root .tgui-8f04eff653cfa5e5{display:flex}#overlay-root .tgui-8ca550c2fc85eff5 .tgui-0f5050defacbf813{border-radius:14px;box-shadow:0 0 0 2px var(--tgui--outline)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-41b168516bddcf4b .tgui-9f9a52f695b85cc9{color:var(--tgui--destructive_text_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-41b168516bddcf4b .tgui-0f5050defacbf813{box-shadow:0 0 0 2px var(--tgui--destructive_text_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-89277928456f0e30 .tgui-9f9a52f695b85cc9{color:var(--tgui--link_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-89277928456f0e30 .tgui-0f5050defacbf813{box-shadow:0 0 0 2px var(--tgui--link_color)}#overlay-root .tgui-7707c5d942b7b9af .tgui-0f5050defacbf813{background:var(--tgui--bg_color);border-radius:12px}#overlay-root .tgui-7707c5d942b7b9af.tgui-41b168516bddcf4b .tgui-0f5050defacbf813{box-shadow:0 0 0 1.5px var(--tgui--destructive_text_color)}#overlay-root .tgui-d9de1f32aee12a15{gap:12px;padding:12px 16px}#overlay-root .tgui-9b2ad13855aef059{min-height:48px}#overlay-root .tgui-c4863cd4c893a047{background:transparent;border:0;box-sizing:border-box;color:var(--tgui--text_color);display:block;margin:0;outline:0;padding:0;resize:none;text-overflow:ellipsis;width:100%}#overlay-root .tgui-c4863cd4c893a047::-webkit-inner-spin-button,#overlay-root .tgui-c4863cd4c893a047::-webkit-outer-spin-button{-webkit-appearance:none}#overlay-root .tgui-c4863cd4c893a047::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-c4863cd4c893a047::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-6cca8a28a056cc34{--tgui--multiselect--min-height:52px;min-height:var(--tgui--multiselect--min-height);position:relative;width:100%}#overlay-root .tgui-1ed7193796bd9fff.tgui-1ed7193796bd9fff{min-height:var(--tgui--multiselect--min-height);padding-right:48px}#overlay-root .tgui-e9b05eb8feaa0359{color:var(--tgui--secondary_hint_color);position:absolute;right:16px}#overlay-root .tgui-c56e136f855e5144{--tgui--multiselect--gap:8px;box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:1;flex-wrap:wrap;gap:var(--tgui--multiselect--gap);margin:0;max-width:100%;overflow:hidden;padding:8px;position:relative}#overlay-root .tgui-991d85450550abb9{max-width:calc(100% - var(--tgui--multiselect--gap));padding:6px 12px}#overlay-root .tgui-41e02fd2529dfbd2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;box-shadow:none;color:var(--tgui--text_color);display:flex;flex:1;flex-direction:column;justify-content:center;outline:none;padding:0 8px;position:relative;width:100%}#overlay-root .tgui-41e02fd2529dfbd2::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-41e02fd2529dfbd2::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-41e02fd2529dfbd2[readonly]{cursor:default}#overlay-root .tgui-ac1d436c45aafe04 .tgui-41e02fd2529dfbd2{text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-0b4134fd8d5c05ac{color:var(--tgui--hint_color);display:flex}#overlay-root .tgui-70d34454bcf3c3e4{background:var(--tgui--bg_color);border-radius:12px;box-shadow:0 32px 64px #0000000a,0 0 2px 1px #00000005;box-sizing:border-box;margin-top:8px;max-height:168px;overflow-y:scroll;width:100%}#overlay-root .tgui-6a25d2bd42bb932c{color:var(--tgui--hint_color)}#overlay-root .tgui-15f9ec3c119467a6{height:48px;padding:0 16px}#overlay-root .tgui-e3f4e376df0c272c{color:var(--tgui--link_color)}#overlay-root .tgui-e9c83f4f150e5513{z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97a62789a70393d0{position:absolute}#overlay-root .tgui-6ae8c47f9448321b{content:"";display:block;transform:translateY(1px)}#overlay-root .tgui-6c3deae89ec68e99{transform:rotate(90deg) translate(50%,-50%);transform-origin:right}#overlay-root .tgui-fed67e27ad8cb75f{transform:rotate(180deg)}#overlay-root .tgui-b27d1c4f6222569e{transform:rotate(-90deg) translate(-50%,-50%);transform-origin:left}#overlay-root .tgui-9bfdebc3fdae031b{cursor:pointer;position:relative}#overlay-root .tgui-55c1caaee1c1e33e{cursor:default;opacity:.25}#overlay-root .tgui-18734a5360b84fba{color:var(--tgui--outline);display:block}#overlay-root .tgui-1ec4b447aa5cf66a{color:var(--tgui--link_color);opacity:0;position:absolute;top:0}#overlay-root .tgui-18734a5360b84fba,#overlay-root .tgui-1ec4b447aa5cf66a{transition:opacity .15s ease-out}#overlay-root .tgui-7cd9bbef46d9194c:checked~.tgui-18734a5360b84fba{opacity:0}#overlay-root .tgui-7cd9bbef46d9194c:checked~.tgui-1ec4b447aa5cf66a{opacity:1}#overlay-root .tgui-a641ca1e63331268{background:var(--tgui--bg_color);bottom:0;box-sizing:border-box;left:0;padding:32px 20px;position:fixed;right:0;top:0}#overlay-root .tgui-a40b67b8ec9e3a49,#overlay-root .tgui-a641ca1e63331268{align-items:center;display:flex;flex-direction:column;justify-content:center;overflow:hidden}#overlay-root .tgui-a40b67b8ec9e3a49{flex:1 1 0;max-width:100%;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-bf64531d065e1bd9 .tgui-a40b67b8ec9e3a49{flex:unset}#overlay-root .tgui-7df9ee9d6d6586de,#overlay-root .tgui-a40b67b8ec9e3a49{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-7df9ee9d6d6586de{max-width:100%;text-align:center}#overlay-root .tgui-36c453f0a9d51371{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;margin-top:20px}#overlay-root .tgui-0e77c7f1a1b82c84{--tgui--pin_input--buttons-gap:12px;--tgui--pin_input--button-width:33.3%;display:flex;flex-direction:column;flex-wrap:wrap;gap:var(--tgui--pin_input--buttons-gap);margin-top:52px;width:100%}#overlay-root .tgui-bf64531d065e1bd9 .tgui-0e77c7f1a1b82c84{--tgui--pin_input--button-width:76px}#overlay-root .tgui-49b69c407401f76c{display:flex;gap:var(--tgui--pin_input--buttons-gap);justify-content:center}#overlay-root .tgui-49b69c407401f76c:last-child{justify-content:flex-end;margin-left:calc(var(--tgui--pin_input--buttons-gap) * 2)}#overlay-root .tgui-bf64531d065e1bd9 .tgui-49b69c407401f76c:last-child{justify-content:center;margin-left:calc(var(--tgui--pin_input--button-width) + var(--tgui--pin_input--buttons-gap))}#overlay-root .tgui-14d79626209a204a{color:var(--tgui--link_color);display:block;margin:auto}#overlay-root .tgui-6eaa561b38208c72{background:var(--tgui--tertiary_bg_color);border:none;border-radius:16px;color:var(--tgui--text_color);height:56px;padding:0;width:var(--tgui--pin_input--button-width)}#overlay-root .tgui-3bea52c968cee224{border-radius:50%;height:76px;width:76px}#overlay-root .tgui-bad1e0d3a612c110{align-items:center;background:var(--tgui--bg_color);border:2.5px solid var(--tgui--divider);border-radius:12px;display:flex;height:44px;justify-content:center;padding:0;transition:border-color .15s ease-out;width:40px}#overlay-root .tgui-b9a1527d00258387{background:var(--tgui--link_color);border:none;border-radius:50%;height:13px;opacity:.1;width:13px}#overlay-root .tgui-b9a1527d00258387.tgui-1d6fb1351888c5e0{opacity:1}#overlay-root .tgui-bad1e0d3a612c110:focus-within{border-color:var(--tgui--link_color)}#overlay-root .tgui-9fa4f4531187df59{background:var(--tgui--text_color);border-radius:50%;height:8px;width:8px}#overlay-root .tgui-de477a8e3910f19f{cursor:pointer;display:block;position:relative}#overlay-root .tgui-d5c5e7402bfd8c12{cursor:default;opacity:.25}#overlay-root .tgui-bfcd091645843388{color:var(--tgui--outline);display:block}#overlay-root .tgui-8d2d5ba97b4abd79{color:var(--tgui--link_color);opacity:0;position:absolute;top:0}#overlay-root .tgui-8d2d5ba97b4abd79,#overlay-root .tgui-bfcd091645843388{transition:opacity .15s ease-out}#overlay-root .tgui-743a4b0f25e5d51b:checked~.tgui-bfcd091645843388{opacity:0}#overlay-root .tgui-743a4b0f25e5d51b:checked~.tgui-8d2d5ba97b4abd79{opacity:1}#overlay-root .tgui-0487bdb4329cd879{display:flex;gap:4px;padding:12px;position:relative}#overlay-root .tgui-6169bc2e9d6fdeb8{color:var(--tgui--tertiary_bg_color);position:relative}#overlay-root .tgui-6169bc2e9d6fdeb8:focus-visible{outline:2px solid var(--tgui--link_color)}#overlay-root .tgui-f0faaa15f44569ba{color:var(--tgui--link_color);position:absolute}#overlay-root .tgui-52ba7059852e9950{bottom:0;margin:0;opacity:0;position:absolute;top:0}#overlay-root .tgui-919c5658483cae11{position:relative}#overlay-root .tgui-a0742fd4c73756f7{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border:none;border-radius:inherit;color:var(--tgui--text_color);outline:none;padding:12px 58px 12px 16px;width:100%}#overlay-root .tgui-025a45d791e466f6{color:var(--tgui--secondary_hint_color);pointer-events:none;position:absolute;right:16px;top:50%;transform:translateY(-50%)}#overlay-root .tgui-aa094d6480bfa32a{cursor:pointer;position:relative}#overlay-root .tgui-7d31e315f5cc4733{cursor:default;opacity:.25}#overlay-root .tgui-ad96577f259c5732{color:var(--tgui--link_color);display:block;opacity:0;transition:opacity .15s ease-out}#overlay-root .tgui-6988c618806a5171:checked~.tgui-ad96577f259c5732{opacity:1}#overlay-root .tgui-717c3649db8d5af2{--tgui--slider--thumb--size:12px;align-items:center;box-sizing:border-box;display:flex;gap:24px;min-height:52px;padding:16px 24px}#overlay-root .tgui-35faba867393ce37{border-radius:8px;cursor:pointer;height:var(--tgui--slider--thumb--size);position:relative;width:100%}#overlay-root .tgui-c591a831de13ba23{cursor:default;opacity:.35}#overlay-root .tgui-4de4feff2dcc975c,#overlay-root .tgui-e11a455378c63b15{border-radius:inherit;height:3px;left:0;margin-top:-1px;position:absolute;top:50%}#overlay-root .tgui-e11a455378c63b15{align-items:center;background-color:var(--tgui--tertiary_bg_color);box-sizing:border-box;display:flex;justify-content:space-between;width:100%}#overlay-root .tgui-4de4feff2dcc975c{background:var(--tgui--button_color);width:auto}#overlay-root .tgui-7fe9f0fbc9771947{height:100%;isolation:isolate;margin-left:calc(var(--tgui--slider--thumb--size) / 10);margin-right:calc(var(--tgui--slider--thumb--size) / 10);position:relative;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-6598607160233201,#overlay-root .tgui-a56564bcfd4b56e5{align-items:center;display:flex;justify-content:center;margin-top:3px}#overlay-root .tgui-d2e2a2e28ef0f746{--tgui--slider--thumb--size:24px;gap:20px;padding:20px}#overlay-root .tgui-d2e2a2e28ef0f746 .tgui-4de4feff2dcc975c,#overlay-root .tgui-d2e2a2e28ef0f746 .tgui-e11a455378c63b15{height:4px;margin-top:-2px}#overlay-root .tgui-b632646f586ff14d{background:var(--tgui--secondary_hint_color);border-radius:50%;height:2px;position:absolute;width:2px}#overlay-root .tgui-2b0a006b5a9ffd68{background:var(--tgui--secondary_hint_color);opacity:.35}#overlay-root .tgui-7951a89b824476b3{background:var(--tgui--tertiary_bg_color);border-radius:3px;height:20px;width:4px}#overlay-root .tgui-7951a89b824476b3.tgui-2b0a006b5a9ffd68{background:var(--tgui--button_color);opacity:1}#overlay-root .tgui-b632646f586ff14d:not(.tgui-7951a89b824476b3):first-child{transform:translate(50%)}#overlay-root .tgui-b632646f586ff14d:last-child{transform:translate(-150%)}#overlay-root .tgui-7951a89b824476b3:last-child{transform:translate(-100%)}#overlay-root .tgui-83b7253102c6addc{background:var(--tgui--button_color);border-radius:50%;height:var(--tgui--slider--thumb--size);position:absolute;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--tgui--slider--thumb--size);z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-96f5864d281f94a8{background:var(--tgui--white);box-shadow:0 6px 6.5px #0000001f,0 .5px 2px #0000001f}#overlay-root .tgui-abdeb837bfc726cb{height:100%;width:100%}#overlay-root .tgui-a1dc55b304d32032{align-items:center;border-radius:16px;cursor:pointer;display:flex;height:32px;overflow:hidden;position:relative;width:52px}#overlay-root .tgui-57a00e000de7483d{cursor:default;opacity:.4}#overlay-root .tgui-3acc6d0262399734:before{background:var(--tgui--secondary_bg_color);bottom:0;content:"";left:0;position:absolute;right:0;top:0}#overlay-root .tgui-2776944549f431fc .tgui-3acc6d0262399734:before{border:3px solid var(--tgui--secondary_hint_color);border-radius:16px}#overlay-root .tgui-3acc6d0262399734:after{border-radius:50%;content:"";position:absolute;top:50%;transform:translateY(-50%)}#overlay-root .tgui-2776944549f431fc .tgui-3acc6d0262399734:after{background:var(--tgui--secondary_hint_color);height:16px;margin-left:8px;width:16px}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:after{background:var(--tgui--white);box-shadow:0 3px 1px #0000000f,0 3px 8px #00000026,0 0 0 1px #0000000a;height:28px;margin-left:2px;width:28px}#overlay-root .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:before{background-color:var(--tgui--link_color);border-color:var(--tgui--link_color)}#overlay-root .tgui-2776944549f431fc .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{height:24px;width:24px}#overlay-root .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{transform:translate(20px) translateY(-50%)}#overlay-root .tgui-2776944549f431fc .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{background:var(--tgui--white);transform:translate(16px) translateY(-50%)}@media (prefers-reduced-motion:no-preference){#overlay-root .tgui-3acc6d0262399734:before{transition:background-color,border-color 67ms linear}#overlay-root .tgui-3acc6d0262399734:after{transition:transform .3s cubic-bezier(.175,.885,.32,1.275) 0s}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:before{transition:background-color .2s ease}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:after{transition:transform .2s cubic-bezier(.36,-.24,.26,1.32)}}#overlay-root .tgui-d40ec83150e66029{background:inherit;border:none;border-radius:inherit;color:var(--tgui--text_color);min-height:80px;outline:none;padding:12px 16px;resize:none;width:100%}#overlay-root .tgui-d40ec83150e66029::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-d40ec83150e66029::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-2453b62de8016bfa .tgui-d40ec83150e66029{min-height:84px;padding:16px}#overlay-root .tgui-7a5facec9dc28fae{left:0;position:fixed;right:0}#overlay-root .tgui-d83e15d73344cdc0{top:0}#overlay-root .tgui-01790b7e59088ea5{bottom:0;padding-bottom:var(--tgui--safe_area_inset_bottom)}#overlay-root .tgui-53cb2ebed0c3b08f{background:var(--tgui--surface_primary);box-shadow:0 -1px 0 var(--tgui--divider);display:flex;justify-items:stretch;padding:0 16px}#overlay-root .tgui-a2b4713d67582227{padding:0}#overlay-root .tgui-64cd0db020a9bacf{align-items:center;background:transparent;border:none;color:var(--tgui--secondary_hint_color);display:flex;flex:1 0 0;flex-direction:column;gap:6px;justify-content:center;margin:0;max-width:100%;min-width:0;padding:12px 16px 16px;transition:.15s ease-out}#overlay-root .tgui-ecbb746748ea4134{gap:4px;padding:8px 12px 4px}#overlay-root .tgui-e6658d0b8927f95e{color:var(--tgui--link_color)}#overlay-root .tgui-e6658d0b8927f95e:not(.tgui-ecbb746748ea4134) .tgui-44d48e11585af170{background:var(--tgui--secondary_fill)}#overlay-root .tgui-44d48e11585af170{border-radius:35px;display:flex;justify-content:center;min-width:64px;padding:2px 10px}#overlay-root .tgui-ecbb746748ea4134 .tgui-44d48e11585af170{padding:0}#overlay-root .tgui-aeab497081949a15{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-0eddcd83377979c2,#overlay-root .tgui-68fc52f1068b8e16{align-items:center;display:flex}#overlay-root .tgui-0eddcd83377979c2{color:var(--tgui--divider);height:20px;justify-content:center;margin:0 -6px;width:24px}#overlay-root .tgui-a9c3d618b6e43d64{color:var(--tgui--link_color)}#overlay-root .tgui-32fe6ce00169d72e{border-radius:8px;color:var(--tgui--hint_color);cursor:pointer;padding:8px 10px;text-decoration:none;transition:opacity .15s ease-out}#overlay-root .tgui-32fe6ce00169d72e:active{opacity:.5}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-32fe6ce00169d72e:hover{background:var(--tgui--tertiary_bg_color)}}#overlay-root .tgui-442a9579d6c19dc4{--tgui--compact_pagination--dot--opacity--selected:.1;--tgui--compact_pagination--dot--background--selected:var(--tgui--link_color);display:inline-flex;gap:8px;padding:4px}#overlay-root .tgui-15adbef8fe5efed9{backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);background:#00000040;border-radius:28px;padding:8px 9px}#overlay-root .tgui-15adbef8fe5efed9,#overlay-root .tgui-cdc228e9d92dac5b{--tgui--compact_pagination--dot--opacity--selected:.25;--tgui--compact_pagination--dot--background--selected:var(--tgui--white);gap:6px}#overlay-root .tgui-cdc228e9d92dac5b{padding:0}#overlay-root .tgui-747563e660315b07{background:var(--tgui--compact_pagination--dot--background--selected,var(--tgui--link_color));border:none;border-radius:50%;cursor:pointer;display:block;height:8px;opacity:var(--tgui--compact_pagination--dot--opacity--selected,.25);padding:0;transition:opacity .15s ease-in-out;width:8px}#overlay-root .tgui-6d14364fac453a65{opacity:1}#overlay-root .tgui-bfabaddd169233a9{color:var(--tgui--link_color);text-decoration:none}#overlay-root .tgui-38580a5c868cecc4{display:flex;gap:8px;padding:16px}#overlay-root .tgui-645f8efe8c9c3cc5{opacity:.35}#overlay-root .tgui-8dab5cf704c88e82{align-items:center;background:transparent;border:none;border-radius:12px;box-sizing:border-box;color:var(--tgui--hint_color);cursor:pointer;display:flex;height:44px;justify-content:center;min-width:44px;padding:0 10px}#overlay-root .tgui-64016be270020f33{background:var(--tgui--tertiary_bg_color);color:var(--textColor)}#overlay-root .tgui-a43e090d3501d4ca{cursor:default;opacity:.35}#overlay-root .tgui-670c6b2f3c8df445{cursor:default;opacity:1}#overlay-root .tgui-2636b28cb21c42cc{color:var(--tgui--link_color)}#overlay-root .tgui-71259e3311d7116e{background:var(--tgui--tertiary_bg_color);border-radius:44px;box-sizing:border-box;height:100%;overflow:hidden;padding:2px;width:100%}#overlay-root .tgui-b0a9057ab5d33005{align-content:stretch;align-items:center;border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}#overlay-root .tgui-31f461ccfea23ec3{background:var(--tgui--segmented_control_active_bg);border-radius:40px;bottom:0;box-sizing:border-box;left:0;position:absolute;right:0;top:0;transition:transform .15s;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-16c6b1986a48e2b5{background:var(--tgui--tertiary_bg_color);border-radius:9px}#overlay-root .tgui-16c6b1986a48e2b5 .tgui-31f461ccfea23ec3{border:var(--tgui--border--width) solid rgba(0,0,0,.04);border-radius:inherit;box-shadow:0 3px 1px #0000000a,0 3px 8px #0000001f}#overlay-root .tgui-bbfb272d22eb23e8{background:transparent;border:none;border-radius:inherit;color:var(--tgui--text_color);flex:1 1 0;max-width:100%;overflow:hidden;padding:10px 24px;text-overflow:ellipsis;white-space:nowrap;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-513fce1023cbbd63{padding:6px 24px}#overlay-root .tgui-89d3925598b8fd68{align-content:stretch;align-items:center;display:flex;gap:12px;height:100%;overflow:hidden;position:relative;width:100%}#overlay-root .tgui-8e986e14448c29e6{background:var(--tgui--button_color);border-radius:4px 4px 1px 1px;bottom:0;height:3px;left:0;position:absolute;right:0;transition:transform 125ms}#overlay-root .tgui-96892ceed80c1bf3{background:transparent;border:none;border-radius:inherit;color:var(--tgui--secondary_hint_color);flex:1 0 0;height:44px;max-width:100%;overflow:hidden;text-overflow:ellipsis;transition:color 125ms;white-space:nowrap}#overlay-root .tgui-44ea091aea23df33{color:var(--tgui--link_color)}#overlay-root .tgui-cc76354712c6e8d9{background-color:var(--tgui--bg_color);border-top-left-radius:16px;border-top-right-radius:16px;bottom:0;display:flex;flex-direction:column;left:0;max-height:96%;outline:none;position:fixed;right:0;z-index:var(--tgui--z-index--overlay)}#overlay-root .tgui-2c53ae2ef0209d4d{align-items:center;border-bottom:1px solid var(--tgui--divider);display:flex;justify-content:space-between;padding:16px}#overlay-root .tgui-5dc6ad1ca3ac3ed4{overflow-y:auto;padding-bottom:var(--tgui--safe_area_inset_bottom)}#overlay-root .tgui-f67c8fb3553eee55{align-items:center;box-sizing:border-box;display:flex;gap:12px;justify-content:space-between;padding:16px;position:relative}#overlay-root .tgui-f67c8fb3553eee55:before{background:var(--tgui--divider);border-radius:4px;content:"";height:4px;left:50%;position:absolute;top:8px;transform:translate(-50%);width:36px}#overlay-root .tgui-09b5f6cfd7ba56ab,#overlay-root .tgui-fe1d6742d85038d7{align-items:center;display:flex;flex:1 0 0}#overlay-root .tgui-09b5f6cfd7ba56ab{justify-content:flex-start}#overlay-root .tgui-fe1d6742d85038d7{justify-content:flex-end}#overlay-root .tgui-7ce1022bfdcb0ae3{--tgui--text--line_height:28px;display:block;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-3197096cb603b35a{bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--tgui--z-index--overlay)}#overlay-root .tgui-5638a4ef4e806d8c{background:var(--tgui--white);border-radius:12px;box-shadow:0 8px 24px #0000001a;color:var(--tgui--black);padding:10px}#overlay-root .tgui-bc60ca772e3ae3c6{background:var(--tooltip_background_dark);box-shadow:none}#overlay-root .tgui-5638a4ef4e806d8c .tgui-e0107e1e5ea5b9f3,#overlay-root .tgui-bc60ca772e3ae3c6{color:var(--tgui--white)}#overlay-root .tgui-bc60ca772e3ae3c6 .tgui-e0107e1e5ea5b9f3{color:var(--tooltip_background_dark)}#overlay-root .tgui-e37c114229ebfe85 .tgui-bc60ca772e3ae3c6{backdrop-filter:blur(50px);-webkit-backdrop-filter:blur(50px)}#overlay-root .tgui-6a12827a138e8827{--tgui--font-family:system-ui,-apple-system,BlinkMacSystemFont,"Roboto","Apple Color Emoji","Helvetica Neue",sans-serif;--tgui--font_weight--accent1:700;--tgui--font_weight--accent2:600;--tgui--font_weight--accent3:400;--tgui--large_title--font_size:34px;--tgui--large_title--line_height:42px;--tgui--title1--font_size:28px;--tgui--title1--line_height:36px;--tgui--title2--font_size:24px;--tgui--title2--line_height:32px;--tgui--title3--font_size:20px;--tgui--title3--line_height:24px;--tgui--headline--font_size:19px;--tgui--headline--line_height:28px;--tgui--text--font_size:17px;--tgui--text--line_height:26px;--tgui--subheadline1--font_size:16px;--tgui--subheadline1--line_height:24px;--tgui--subheadline2--font_size:15px;--tgui--subheadline2--line_height:22px;--tgui--caption1--font_size:13px;--tgui--caption1--line_height:20px;--tgui--caption2--font_size:11px;--tgui--caption2--line_height:16px;--tgui--border--width:1px;--tgui--base--section--box_shadow:0 1px 2px 0 rgba(0,0,0,.1);--tgui--bg_color:var(--tg-theme-bg-color,#fff);--tgui--text_color:var(--tg-theme-text-color,#000);--tgui--hint_color:var(--tg-theme-hint-color,#707579);--tgui--link_color:var(--tg-theme-link-color,#007aff);--tgui--button_color:var(--tg-theme-button-color,#007aff);--tgui--button_text_color:var(--tg-theme-button-text-color,#fff);--tgui--secondary_bg_color:var(--tg-theme-secondary-bg-color,#efeff4);--tgui--header_bg_color:var(--tg-theme-header-bg-color,#fff);--tgui--accent_text_color:var(--tg-theme-accent-text-color,#007aff);--tgui--section_bg_color:var(--tg-theme-section-bg-color,#fff);--tgui--section_header_text_color:var(--tg-theme-section-header-text-color,#707579);--tgui--subtitle_text_color:var(--tg-theme-subtitle-text-color,#707579);--tgui--destructive_text_color:var(--tg-theme-destructive-text-color,#e53935);--tgui--skeleton:hsla(0,0%,100%,.03);--tgui--divider:rgba(0,0,0,.15);--tgui--outline:rgba(0,0,0,.05);--tgui--surface_primary:hsla(0,0%,100%,.95);--tgui--tertiary_bg_color:#f4f4f7;--tgui--quartenary_bg_color:#f6f6fa;--tgui--segmented_control_active_bg:#fff;--tgui--card_bg_color:#fff;--tgui--secondary_hint_color:#a2acb0;--tgui--secondary_fill:rgba(67,120,255,.1);--tgui--green:#31d158;--tgui--destructive_background:#e53935;--tgui--primary_code_highlight:#4378ff;--tgui--secondary_code_highlight:#b00fb4;--tgui--tertiary_code_highlight:#3a9f20;--tgui--plain_background:rgba(0,0,0,.04);--tgui--plain_foreground:rgba(0,0,0,.8);--tgui--toast_accent_color:#55a6ff;--tgui--surface_dark:rgba(56,56,56,.85);--tooltip_background_dark:rgba(0,0,0,.85);--tgui--white:#fff;--tgui--black:#000;--tgui--z-index--simple:1;--tgui--z-index--skeleton:2;--tgui--z-index--overlay:3;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;color:var(--tgui--text_color)}#overlay-root .tgui-56dbb42c1dbd5e2b{--tgui--large_title--line_height:41px;--tgui--title1--line_height:34px;--tgui--title2--line_height:28px;--tgui--title3--line_height:25px;--tgui--headline--line_height:24px;--tgui--text--line_height:22px;--tgui--subheadline1--line_height:21px;--tgui--subheadline2--line_height:20px;--tgui--caption1--line_height:16px;--tgui--caption2--line_height:13px}#overlay-root .tgui-865b921add8ee075{--tgui--bg_color:var(--tg-theme-bg-color,#212121);--tgui--text_color:var(--tg-theme-text-color,#fff);--tgui--hint_color:var(--tg-theme-hint-color,#aaa);--tgui--link_color:var(--tg-theme-link-color,#2990ff);--tgui--button_color:var(--tg-theme-button-color,#2990ff);--tgui--button_text_color:var(--tg-theme-button-text-color,#fff);--tgui--secondary_bg_color:var(--tg-theme-secondary-bg-color,#0f0f0f);--tgui--header_bg_color:var(--tg-theme-header-bg-color,#212121);--tgui--accent_text_color:var(--tg-theme-accent-text-color,#007aff);--tgui--section_bg_color:var(--tg-theme-section-bg-color,#212121);--tgui--section_header_text_color:var(--tg-theme-section-header-text-color,#aaa);--tgui--subtitle_text_color:var(--tg-theme-subtitle-text-color,#aaa);--tgui--destructive_text_color:var(--tg-theme-destructive-text-color,#e53935);--tgui--skeleton:hsla(0,0%,100%,.03);--tgui--divider:hsla(0,0%,100%,.05);--tgui--outline:hsla(0,0%,100%,.1);--tgui--surface_primary:hsla(0,0%,9%,.95);--tgui--tertiary_bg_color:#2a2a2a;--tgui--quartenary_bg_color:#2f2f2f;--tgui--segmented_control_active_bg:#2f2f2f;--tgui--card_bg_color:#242424;--tgui--secondary_hint_color:#78797e;--tgui--secondary_fill:rgba(41,144,255,.15);--tgui--green:#32e55e;--tgui--destructive_background:rgba(255,35,35,.02);--tgui--primary_code_highlight:#2990ff;--tgui--secondary_code_highlight:#e937ed;--tgui--tertiary_code_highlight:#5ae536;--tgui--plain_background:hsla(0,0%,100%,.08);--tgui--plain_foreground:hsla(0,0%,100%,.95)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){#overlay-root .tgui-6a12827a138e8827{--tgui--border--width:.5px}}@supports (padding-top:constant(safe-area-inset-bottom)){#overlay-root .tgui-6a12827a138e8827{--tgui--safe_area_inset_bottom:constant(safe-area-inset-bottom)}}@supports (padding-top:env(safe-area-inset-bottom)){#overlay-root .tgui-6a12827a138e8827{--tgui--safe_area_inset_bottom:env(safe-area-inset-bottom)}}@supports (color:color-mix(in srgb,var(--tgui--accent_text_color ) 10%,transparent)){#overlay-root .tgui-6a12827a138e8827{--tgui--secondary_fill:color-mix(in srgb,var(--tgui--accent_text_color) 10%,transparent)}#overlay-root .tgui-865b921add8ee075{--tgui--secondary_fill:color-mix(in srgb,var(--tgui--accent_text_color) 15%,transparent)}}#overlay-root .ui-snackbar#snackbar{animation:tgui-738ce40067f9bb6e .34s cubic-bezier(.3,.3,.5,1);box-sizing:border-box;max-width:460px;position:fixed;transition:transform .32s cubic-bezier(.3,.3,.5,1);-webkit-user-select:none;user-select:none;z-index:4;bottom:calc(10px + var(--tg-safe-area-inset-bottom, 0px))!important;left:calc(10px + var(--tg-safe-area-inset-left, 0px));right:calc(10px + var(--tg-safe-area-inset-right, 0px))}#overlay-root .ui-snackbar#snackbar>div{align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:var(--tgui--surface_dark);bottom:0;box-sizing:border-box;display:flex;gap:12px;left:0;position:sticky;right:0;top:0;width:100%;padding:10px 14px;border-radius:14px}#overlay-root .ui-snackbar#snackbar .before,#overlay-root .ui-snackbar#snackbar .after{align-items:center;color:var(--tgui--toast_accent_color);display:flex}#overlay-root .ui-snackbar#snackbar .content{color:var(--tgui--white);display:flex;flex:1 1;flex-direction:column;gap:1px}#overlay-root .ui-snackbar#snackbar.enter{animation:slideInFromBottom .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar#snackbar.exit{animation:slideOutToBottom .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar--success_top#snackbar,#overlay-root .ui-snackbar--warning#snackbar,#overlay-root .ui-snackbar--error#snackbar{bottom:auto!important;top:calc(10px + var(--tg-safe-area-inset-top, 0px))!important}#overlay-root .ui-snackbar--success_top#snackbar.enter,#overlay-root .ui-snackbar--warning#snackbar.enter,#overlay-root .ui-snackbar--error#snackbar.enter{animation:slideInFromTop .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar--success_top#snackbar.exit,#overlay-root .ui-snackbar--warning#snackbar.exit,#overlay-root .ui-snackbar--error#snackbar.exit{animation:slideOutToTop .34s cubic-bezier(.3,.3,.5,1)}@keyframes slideInFromBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutToBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideOutToTop{0%{transform:translateY(0)}to{transform:translateY(-100%)}}#overlay-root .xs-button{height:28px!important;min-height:28px!important;max-height:28px!important;min-width:32px!important;gap:6px!important;padding:0 10px!important;border-radius:14px!important;min-inline-size:32px!important;display:flex!important;align-items:center!important;justify-content:center!important}#overlay-root .xs-button [role=status]{color:inherit!important}#overlay-root .xs-button h6{margin:0!important;padding:0!important;line-height:1!important;display:flex!important;align-items:center!important}#overlay-root .xs-button>div{display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(Le,Ve){typeof exports=="object"&&typeof module<"u"?Ve(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Ve):(Le=typeof globalThis<"u"?globalThis:Le||self,Ve(Le.OrbitSDK={},Le.React,Le.ReactDOM))})(this,function(exports,React,ReactDOM){"use strict";var Xr=Le=>{throw TypeError(Le)};var dr=(Le,Ve,Ze)=>Ve.has(Le)||Xr("Cannot "+Ze);var U=(Le,Ve,Ze)=>(dr(Le,Ve,"read from private field"),Ze?Ze.call(Le):Ve.get(Le)),we=(Le,Ve,Ze)=>Ve.has(Le)?Xr("Cannot add the same private member more than once"):Ve instanceof WeakSet?Ve.add(Le):Ve.set(Le,Ze),ge=(Le,Ve,Ze,lt)=>(dr(Le,Ve,"write to private field"),lt?lt.call(Le,Ze):Ve.set(Le,Ze),Ze),Me=(Le,Ve,Ze)=>(dr(Le,Ve,"access private method"),Ze);var cr=(Le,Ve,Ze,lt)=>({set _(dt){ge(Le,Ve,dt,Ze)},get _(){return U(Le,Ve,lt)}});var Le,Ve,Ze,lt,dt,Ut,xr,Gt,wt,zt,Sr,Ot,Er,kt,Wt,ct,Lt,Xe,er,Dt,ut,Et,wr,nt,De,tr,tt,Nt,Ht,yt,Ct,rr,qt,Kt,$t,Ft,Rt,Yt,je,or,hr,pr,mr,gr,vr,yr,_r,Jr,Cr,nr,ht,rt,jt,mt,Mt,Rr,_t,ft,ir,Tr,bt,Tt,it,xt,St,ur,br,Ar,gt,Ir,Ge,At,It,Xt,Jt,Pt,Qt,Zt,Pr,Mr,Or,kr,Lr;function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM),version="1.92.0";function getDefaultExportFromCjs$3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
2
+ (function(Le,Ve){typeof exports=="object"&&typeof module<"u"?Ve(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Ve):(Le=typeof globalThis<"u"?globalThis:Le||self,Ve(Le.OrbitSDK={},Le.React,Le.ReactDOM))})(this,function(exports,React,ReactDOM){"use strict";var Xr=Le=>{throw TypeError(Le)};var dr=(Le,Ve,Ze)=>Ve.has(Le)||Xr("Cannot "+Ze);var U=(Le,Ve,Ze)=>(dr(Le,Ve,"read from private field"),Ze?Ze.call(Le):Ve.get(Le)),we=(Le,Ve,Ze)=>Ve.has(Le)?Xr("Cannot add the same private member more than once"):Ve instanceof WeakSet?Ve.add(Le):Ve.set(Le,Ze),ge=(Le,Ve,Ze,lt)=>(dr(Le,Ve,"write to private field"),lt?lt.call(Le,Ze):Ve.set(Le,Ze),Ze),Me=(Le,Ve,Ze)=>(dr(Le,Ve,"access private method"),Ze);var cr=(Le,Ve,Ze,lt)=>({set _(dt){ge(Le,Ve,dt,Ze)},get _(){return U(Le,Ve,lt)}});var Le,Ve,Ze,lt,dt,Ut,xr,Gt,wt,zt,Sr,Ot,Er,kt,Wt,ct,Lt,Xe,er,Dt,ut,Et,wr,nt,De,tr,tt,Nt,Ht,yt,Ct,rr,qt,Kt,$t,Ft,Rt,Yt,je,or,hr,pr,mr,gr,vr,yr,_r,Jr,Cr,nr,ht,rt,jt,mt,Mt,Rr,_t,ft,ir,Tr,bt,Tt,it,xt,St,ur,br,Ar,gt,Ir,Ge,At,It,Xt,Jt,Pt,Qt,Zt,Pr,Mr,Or,kr,Lr;function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM),version="1.92.1";function getDefaultExportFromCjs$3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -65,7 +65,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
65
65
  ${g}px !important;
66
66
  top: ${h}px !important;
67
67
  }
68
- `),()=>{b.contains(v)&&b.removeChild(v)}},[t]),jsxRuntimeExports.jsx(PopChildMeasure,{isPresent:t,childRef:a,sizeRef:l,children:React__namespace.cloneElement(e,{ref:u})})}const PresenceChild=({children:e,initial:t,isPresent:i,onExitComplete:s,custom:o,presenceAffectsLayout:a,mode:l,anchorX:c,root:u})=>{const f=useConstant(newChildrenMap),d=React.useId();let h=!0,p=React.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:i,custom:o,onExitComplete:m=>{f.set(m,!0);for(const g of f.values())if(!g)return;s&&s()},register:m=>(f.set(m,!1),()=>f.delete(m))}),[i,f,s]);return a&&h&&(p={...p}),React.useMemo(()=>{f.forEach((m,g)=>f.set(g,!1))},[i]),React__namespace.useEffect(()=>{!i&&!f.size&&s&&s()},[i]),l==="popLayout"&&(e=jsxRuntimeExports.jsx(PopChild,{isPresent:i,anchorX:c,root:u,children:e})),jsxRuntimeExports.jsx(PresenceContext.Provider,{value:p,children:e})};function newChildrenMap(){return new Map}function usePresence(e=!0){const t=React.useContext(PresenceContext);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=t,a=React.useId();React.useEffect(()=>{if(e)return o(a)},[e]);const l=React.useCallback(()=>e&&s&&s(a),[a,s,e]);return!i&&s?[!1,l]:[!0]}const getChildKey=e=>e.key||"";function onlyElements(e){const t=[];return React.Children.forEach(e,i=>{React.isValidElement(i)&&t.push(i)}),t}const AnimatePresence=({children:e,custom:t,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",root:u})=>{const[f,d]=usePresence(l),h=React.useMemo(()=>onlyElements(e),[e]),p=l&&!f?[]:h.map(getChildKey),m=React.useRef(!0),g=React.useRef(h),v=useConstant(()=>new Map),[b,y]=React.useState(h),[E,S]=React.useState(h);useIsomorphicLayoutEffect(()=>{m.current=!1,g.current=h;for(let A=0;A<E.length;A++){const O=getChildKey(E[A]);p.includes(O)?v.delete(O):v.get(O)!==!0&&v.set(O,!1)}},[E,p.length,p.join("-")]);const w=[];if(h!==b){let A=[...h];for(let O=0;O<E.length;O++){const I=E[O],L=getChildKey(I);p.includes(L)||(A.splice(O,0,I),w.push(I))}return a==="wait"&&w.length&&(A=w),S(onlyElements(A)),y(h),null}const{forceRender:C}=React.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:E.map(A=>{const O=getChildKey(A),I=l&&!f?!1:h===E||p.includes(O),L=()=>{if(v.has(O))v.set(O,!0);else return;let $=!0;v.forEach(V=>{V||($=!1)}),$&&(C==null||C(),S(g.current),l&&(d==null||d()),s&&s())};return jsxRuntimeExports.jsx(PresenceChild,{isPresent:I,initial:!m.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:I?void 0:L,anchorX:c,children:A},O)})})},LazyContext=React.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const e in featureProps)featureDefinitions[e]={isEnabled:t=>featureProps[e].some(i=>!!t[i])};function loadFeatures(e){for(const t in e)featureDefinitions[t]={...featureDefinitions[t],...e[t]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||validMotionProps.has(e)}let shouldForward=e=>!isValidMotionProp(e);function loadExternalIsValidProp(e){typeof e=="function"&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):e(t))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(e,t,i){const s={};for(const o in e)o==="values"&&typeof e.values=="object"||(shouldForward(o)||i===!0&&isValidMotionProp(o)||!t&&!isValidMotionProp(o)||e.draggable&&o.startsWith("onDrag"))&&(s[o]=e[o]);return s}const MotionContext=React.createContext({});function isAnimationControls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function isVariantLabel(e){return typeof e=="string"||Array.isArray(e)}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(e){return isAnimationControls(e.animate)||variantProps.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function getCurrentTreeVariants(e,t){if(isControllingVariants(e)){const{initial:i,animate:s}=e;return{initial:i===!1||isVariantLabel(i)?i:void 0,animate:isVariantLabel(s)?s:void 0}}return e.inherit!==!1?t:{}}function useCreateMotionContext(e){const{initial:t,animate:i}=getCurrentTreeVariants(e,React.useContext(MotionContext));return React.useMemo(()=>({initial:t,animate:i}),[variantLabelsAsDependency(t),variantLabelsAsDependency(i)])}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(" "):e}const scaleCorrectors={};function addScaleCorrector(e){for(const t in e)scaleCorrectors[t]=e[t],isCSSVariableName(t)&&(scaleCorrectors[t].isCSSVariable=!0)}function isForcedMotionValue(e,{layout:t,layoutId:i}){return transformProps.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!scaleCorrectors[e]||e==="opacity")}const translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(e,t,i){let s="",o=!0;for(let a=0;a<numTransforms;a++){const l=transformPropOrder[a],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||i){const f=getValueAsType(c,numberValueTypes[l]);if(!u){o=!1;const d=translateAlias[l]||l;s+=`${d}(${f}) `}i&&(t[l]=f)}}return s=s.trim(),i?s=i(t,o?"":s):o&&(s="none"),s}function buildHTMLStyles(e,t,i){const{style:s,vars:o,transformOrigin:a}=e;let l=!1,c=!1;for(const u in t){const f=t[u];if(transformProps.has(u)){l=!0;continue}else if(isCSSVariableName(u)){o[u]=f;continue}else{const d=getValueAsType(f,numberValueTypes[u]);u.startsWith("origin")?(c=!0,a[u]=d):s[u]=d}}if(t.transform||(l||i?s.transform=buildTransform(t,e.transform,i):s.transform&&(s.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:d=0}=a;s.transformOrigin=`${u} ${f} ${d}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(e,t,i){for(const s in t)!isMotionValue(t[s])&&!isForcedMotionValue(s,i)&&(e[s]=t[s])}function useInitialMotionValues({transformTemplate:e},t){return React.useMemo(()=>{const i=createHtmlRenderState();return buildHTMLStyles(i,t,e),Object.assign({},i.vars,i.style)},[t])}function useStyle(e,t){const i=e.style||{},s={};return copyRawValuesOnly(s,i,e),Object.assign(s,useInitialMotionValues(e,t)),s}function useHTMLProps(e,t){const i={},s=useStyle(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=s,i}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(e,t,i=1,s=0,o=!0){e.pathLength=1;const a=o?dashKeys:camelKeys;e[a.offset]=px.transform(-s);const l=px.transform(t),c=px.transform(i);e[a.array]=`${l} ${c}`}function buildSVGAttrs(e,{attrX:t,attrY:i,attrScale:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,f,d){if(buildHTMLStyles(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),i!==void 0&&(h.y=i),s!==void 0&&(h.scale=s),o!==void 0&&buildSVGPath(h,o,a,l,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=e=>typeof e=="string"&&e.toLowerCase()==="svg";function useSVGProps(e,t,i,s){const o=React.useMemo(()=>{const a=createSvgRenderState();return buildSVGAttrs(a,t,isSVGTag(s),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};copyRawValuesOnly(a,e.style,e),o.style={...a,...o.style}}return o}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(e){return typeof e!="string"||e.includes("-")?!1:!!(lowercaseSVGElements.indexOf(e)>-1||/[A-Z]/u.test(e))}function useRender(e,t,i,{latestValues:s},o,a=!1){const c=(isSVGComponent(e)?useSVGProps:useHTMLProps)(t,s,o,e),u=filterProps(t,typeof e=="string",a),f=e!==React.Fragment?{...u,...c,ref:i}:{},{children:d}=t,h=React.useMemo(()=>isMotionValue(d)?d.get():d,[d]);return React.createElement(e,{...f,children:h})}function getValueState(e){const t=[{},{}];return e==null||e.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function resolveVariantFromProps(e,t,i,s){if(typeof t=="function"){const[o,a]=getValueState(s);t=t(i!==void 0?i:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,a]=getValueState(s);t=t(i!==void 0?i:e.custom,o,a)}return t}function resolveMotionValue(e){return isMotionValue(e)?e.get():e}function makeState({scrapeMotionValuesFromProps:e,createRenderState:t},i,s,o){return{latestValues:makeLatestValues(i,s,o,e),renderState:t()}}function makeLatestValues(e,t,i,s){const o={},a=s(e,{});for(const p in a)o[p]=resolveMotionValue(a[p]);let{initial:l,animate:c}=e;const u=isControllingVariants(e),f=isVariantNode(e);t&&f&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let d=i?i.initial===!1:!1;d=d||l===!1;const h=d?c:l;if(h&&typeof h!="boolean"&&!isAnimationControls(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=resolveVariantFromProps(e,p[m]);if(g){const{transitionEnd:v,transition:b,...y}=g;for(const E in y){let S=y[E];if(Array.isArray(S)){const w=d?S.length-1:0;S=S[w]}S!==null&&(o[E]=S)}for(const E in v)o[E]=v[E]}}}return o}const makeUseVisualState=e=>(t,i)=>{const s=React.useContext(MotionContext),o=React.useContext(PresenceContext),a=()=>makeState(e,t,s,o);return i?a():useConstant(a)};function scrapeMotionValuesFromProps$1(e,t,i){var a;const{style:s}=e,o={};for(const l in s)(isMotionValue(s[l])||t.style&&isMotionValue(t.style[l])||isForcedMotionValue(l,e)||((a=i==null?void 0:i.getValue(l))==null?void 0:a.liveStyle)!==void 0)&&(o[l]=s[l]);return o}const useHTMLVisualState=makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState});function scrapeMotionValuesFromProps(e,t,i){const s=scrapeMotionValuesFromProps$1(e,t,i);for(const o in e)if(isMotionValue(e[o])||isMotionValue(t[o])){const a=transformPropOrder.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[a]=e[o]}return s}const useSVGVisualState=makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function useMotionRef(e,t,i){return React.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),i&&(typeof i=="function"?i(s):isRefObject(i)&&(i.current=s))},[t])}const camelToDash=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),SwitchLayoutGroupContext=React.createContext({});function useVisualElement(e,t,i,s,o){var v,b;const{visualElement:a}=React.useContext(MotionContext),l=React.useContext(LazyContext),c=React.useContext(PresenceContext),u=React.useContext(MotionConfigContext).reducedMotion,f=React.useRef(null);s=s||l.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:a,props:i,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const d=f.current,h=React.useContext(SwitchLayoutGroupContext);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&createProjectionNode$1(f.current,i,o,h);const p=React.useRef(!1);React.useInsertionEffect(()=>{d&&p.current&&d.update(i,c)});const m=i[optimizedAppearDataAttribute],g=React.useRef(!!m&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return useIsomorphicLayoutEffect(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),React.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,m)}),g.current=!1),d.enteringChildren=void 0)}),d}function createProjectionNode$1(e,t,i,s){const{layoutId:o,layout:a,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:f,layoutCrossfade:d}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:getClosestProjectingNode(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!l||c&&isRefObject(c),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:u,layoutRoot:f})}function getClosestProjectingNode(e){if(e)return e.options.allowProjection!==!1?e.projection:getClosestProjectingNode(e.parent)}function createMotionComponent(e,{forwardMotionProps:t=!1}={},i,s){i&&loadFeatures(i);const o=isSVGComponent(e)?useSVGVisualState:useHTMLVisualState;function a(c,u){let f;const d={...React.useContext(MotionConfigContext),...c,layoutId:useLayoutId(c)},{isStatic:h}=d,p=useCreateMotionContext(c),m=o(c,h);if(!h&&isBrowser){useStrictMode();const g=getProjectionFunctionality(d);f=g.MeasureLayout,p.visualElement=useVisualElement(e,m,d,s,g.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:p,children:[f&&p.visualElement?jsxRuntimeExports.jsx(f,{visualElement:p.visualElement,...d}):null,useRender(e,c,useMotionRef(m,p.visualElement,u),m,h,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=React.forwardRef(a);return l[motionComponentSymbol]=e,l}function useLayoutId({layoutId:e}){const t=React.useContext(LayoutGroupContext).id;return t&&e!==void 0?t+"-"+e:e}function useStrictMode(e,t){React.useContext(LazyContext).strict}function getProjectionFunctionality(e){const{drag:t,layout:i}=featureDefinitions;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t!=null&&t.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function createMotionProxy(e,t){if(typeof Proxy>"u")return createMotionComponent;const i=new Map,s=(a,l)=>createMotionComponent(a,l,e,t),o=(a,l)=>s(a,l);return new Proxy(o,{get:(a,l)=>l==="create"?s:(i.has(l)||i.set(l,createMotionComponent(l,void 0,e,t)),i.get(l))})}function convertBoundingBoxToBox({top:e,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:e,max:s}}}function convertBoxToBoundingBox({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function transformBoxPoints(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function isIdentityScale(e){return e===void 0||e===1}function hasScale({scale:e,scaleX:t,scaleY:i}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(i)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){return is2DTranslate(e.x)||is2DTranslate(e.y)}function is2DTranslate(e){return e&&e!=="0%"}function scalePoint(e,t,i){const s=e-i,o=t*s;return i+o}function applyPointDelta(e,t,i,s,o){return o!==void 0&&(e=scalePoint(e,o,s)),scalePoint(e,i,s)+t}function applyAxisDelta(e,t=0,i=1,s,o){e.min=applyPointDelta(e.min,t,i,s,o),e.max=applyPointDelta(e.max,t,i,s,o)}function applyBoxDelta(e,{x:t,y:i}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,i.translate,i.scale,i.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(e,t,i,s=!1){const o=i.length;if(!o)return;t.x=t.y=1;let a,l;for(let c=0;c<o;c++){a=i[c],l=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,applyBoxDelta(e,l)),s&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues))}t.x<TREE_SCALE_SNAP_MAX&&t.x>TREE_SCALE_SNAP_MIN&&(t.x=1),t.y<TREE_SCALE_SNAP_MAX&&t.y>TREE_SCALE_SNAP_MIN&&(t.y=1)}function translateAxis(e,t){e.min=e.min+t,e.max=e.max+t}function transformAxis(e,t,i,s,o=.5){const a=mixNumber$1(e.min,e.max,o);applyAxisDelta(e,t,i,a,s)}function transformBox(e,t){transformAxis(e.x,t.x,t.scaleX,t.scale,t.originX),transformAxis(e.y,t.y,t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(transformBoxPoints(e.getBoundingClientRect(),t))}function measurePageBox(e,t,i){const s=measureViewportBox(e,i),{scroll:o}=t;return o&&(translateAxis(s.x,o.offset.x),translateAxis(s.y,o.offset.y)),s}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()}),prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>prefersReducedMotion.current=e.matches;e.addEventListener("change",t),t()}else prefersReducedMotion.current=!1}const visualElementStore=new WeakMap;function updateMotionValuesFromProps(e,t,i){for(const s in t){const o=t[s],a=i[s];if(isMotionValue(o))e.addValue(s,o);else if(isMotionValue(a))e.addValue(s,motionValue(o,{owner:e}));else if(a!==o)if(e.hasValue(s)){const l=e.getValue(s);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(s);e.addValue(s,motionValue(l!==void 0?l:o,{owner:e}))}}for(const s in i)t[s]===void 0&&e.removeValue(s);return t}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:a,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=time.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,frame.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=i.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(i),this.isVariantNode=isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(i,{},this);for(const p in h){const m=h[p];u[p]!==void 0&&isMotionValue(m)&&m.set(u[p])}}mount(t){var i;this.current=t,visualElementStore.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const s=this.features[i];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=transformProps.has(t);s&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&frame.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{o(),a&&a(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in featureDefinitions){const i=featureDefinitions[t];if(!i)continue;const{isEnabled:s,Feature:o}=i;if(!this.features[t]&&o&&s(this.props)&&(this.features[t]=new o(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<propEventHandlers.length;s++){const o=propEventHandlers[s];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const a="on"+o,l=t[a];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=motionValue(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(isNumericalString(s)||isZeroValueString(s))?s=parseFloat(s):!findValueType(s)&&complex.test(i)&&(s=getAnimatableNone(t,i)),this.setBaseTarget(t,isMotionValue(s)?s.get():s)),isMotionValue(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){var a;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const l=resolveVariantFromProps(this.props,i,(a=this.presenceContext)==null?void 0:a.custom);l&&(s=l[t])}if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!isMotionValue(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new SubscriptionManager),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){microtask.render(this.render)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function renderHTML(e,{style:t,vars:i},s,o){const a=e.style;let l;for(l in t)a[l]=t[l];o==null||o.applyProjectionStyles(a,s);for(l in i)a.setProperty(l,i[l])}function getComputedStyle$1(e){return window.getComputedStyle(e)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(t,i){var s;if(transformProps.has(i))return(s=this.projection)!=null&&s.isProjecting?defaultTransformValue(i):readTransformValue(t,i);{const o=getComputedStyle$1(t),a=(isCSSVariableName(i)?o.getPropertyValue(i):o[i])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:i}){return measureViewportBox(t,i)}build(t,i,s){buildHTMLStyles(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return scrapeMotionValuesFromProps$1(t,i,s)}}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(e,t,i,s){renderHTML(e,t,void 0,s);for(const o in t.attrs)e.setAttribute(camelCaseAttributes.has(o)?o:camelToDash(o),t.attrs[o])}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(transformProps.has(i)){const s=getDefaultValueType(i);return s&&s.default||0}return i=camelCaseAttributes.has(i)?i:camelToDash(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return scrapeMotionValuesFromProps(t,i,s)}build(t,i,s){buildSVGAttrs(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,o){renderSVG(t,i,s,o)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}}const createDomVisualElement=(e,t)=>isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==React.Fragment});function resolveVariant(e,t,i){const s=e.getProps();return resolveVariantFromProps(s,t,i!==void 0?i:s.custom,e)}const isKeyframesTarget=e=>Array.isArray(e);function setMotionValue(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,motionValue(i))}function resolveFinalValueInKeyframes(e){return isKeyframesTarget(e)?e[e.length-1]||0:e}function setTarget(e,t){const i=resolveVariant(e,t);let{transitionEnd:s={},transition:o={},...a}=i||{};a={...a,...s};for(const l in a){const c=resolveFinalValueInKeyframes(a[l]);setMotionValue(e,l,c)}}function isWillChangeMotionValue(e){return!!(isMotionValue(e)&&e.add)}function addValueToWillChange(e,t){const i=e.getValue("willChange");if(isWillChangeMotionValue(i))return i.add(t);if(!i&&MotionGlobalConfig.WillChange){const s=new MotionGlobalConfig.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function getOptimisedAppearId(e){return e.props[optimizedAppearDataAttribute]}const isNotNull=e=>e!==null;function getFinalKeyframe(e,{repeat:t,repeatType:i="loop"},s){const o=e.filter(isNotNull),a=t&&i!=="loop"&&t%2===1?0:o.length-1;return o[a]}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?keyframesTransition:transformProps.has(e)?e.startsWith("scale")?criticallyDampedSpring(t[1]):underDampedSpring:ease;function isTransitionDefined({when:e,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:o,repeat:a,repeatType:l,repeatDelay:c,from:u,elapsed:f,...d}){return!!Object.keys(d).length}const animateMotionValue=(e,t,i,s={},o,a)=>l=>{const c=getValueTransition$1(s,e)||{},u=c.delay||s.delay||0;let{elapsed:f=0}=s;f=f-secondsToMilliseconds(u);const d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:p=>{t.set(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:a?void 0:o};isTransitionDefined(c)||Object.assign(d,getDefaultTransition(e,d)),d.duration&&(d.duration=secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=secondsToMilliseconds(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(makeAnimationInstant(d),d.delay===0&&(h=!0)),(MotionGlobalConfig.instantAnimations||MotionGlobalConfig.skipAnimations)&&(h=!0,makeAnimationInstant(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,h&&!a&&t.get()!==void 0){const p=getFinalKeyframe(d.keyframes,c);if(p!==void 0){frame.update(()=>{d.onUpdate(p),d.onComplete()});return}}return c.isSync?new JSAnimation(d):new AsyncMotionValueAnimation(d)};function shouldBlockAnimation({protectedKeys:e,needsAnimating:t},i){const s=e.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function animateTarget(e,t,{delay:i=0,transitionOverride:s,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(a=s);const u=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const d in c){const h=e.getValue(d,e.latestValues[d]??null),p=c[d];if(p===void 0||f&&shouldBlockAnimation(f,d))continue;const m={delay:i,...getValueTransition$1(a||{},d)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=getOptimisedAppearId(e);if(y){const E=window.MotionHandoffAnimation(y,d,frame);E!==null&&(m.startTime=E,v=!0)}}addValueToWillChange(e,d),h.start(animateMotionValue(d,h,p,e.shouldReduceMotion&&positionalKeys.has(d)?{type:!1}:m,e,v));const b=h.animation;b&&u.push(b)}return l&&Promise.all(u).then(()=>{frame.update(()=>{l&&setTarget(e,l)})}),u}function calcChildStagger(e,t,i,s=0,o=1){const a=Array.from(e).sort((f,d)=>f.sortNodePosition(d)).indexOf(t),l=e.size,c=(l-1)*s;return typeof i=="function"?i(a,l):o===1?a*s:c-a*s}function animateVariant(e,t,i={}){var u;const s=resolveVariant(e,t,i.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(o=i.transitionOverride);const a=s?()=>Promise.all(animateTarget(e,s,i)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return animateChildren(e,t,f,d,h,p,i)}:()=>Promise.resolve(),{when:c}=o;if(c){const[f,d]=c==="beforeChildren"?[a,l]:[l,a];return f().then(()=>d())}else return Promise.all([a(),l(i.delay)])}function animateChildren(e,t,i=0,s=0,o=0,a=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(animateVariant(u,t,{...l,delay:i+(typeof s=="function"?0:s)+calcChildStagger(e.variantChildren,u,s,o,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function animateVisualElement(e,t,i={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const o=t.map(a=>animateVariant(e,a,i));s=Promise.all(o)}else if(typeof t=="string")s=animateVariant(e,t,i);else{const o=typeof t=="function"?resolveVariant(e,t,i.custom):t;s=Promise.all(animateTarget(e,o,i))}return s.then(()=>{e.notify("AnimationComplete",t)})}function shallowCompare(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let s=0;s<i;s++)if(t[s]!==e[s])return!1;return!0}const numVariantProps=variantProps.length;function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){const i=e.parent?getVariantContext(e.parent)||{}:{};return e.props.initial!==void 0&&(i.initial=e.props.initial),i}const t={};for(let i=0;i<numVariantProps;i++){const s=variantProps[i],o=e.props[s];(isVariantLabel(o)||o===!1)&&(t[s]=o)}return t}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(e){return t=>Promise.all(t.map(({animation:i,options:s})=>animateVisualElement(e,i,s)))}function createAnimationState(e){let t=animateList(e),i=createState(),s=!0;const o=u=>(f,d)=>{var p;const h=resolveVariant(e,d,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:g,...v}=h;f={...f,...v,...g}}return f};function a(u){t=u(e)}function l(u){const{props:f}=e,d=getVariantContext(e.parent)||{},h=[],p=new Set;let m={},g=1/0;for(let b=0;b<numAnimationTypes;b++){const y=reversePriorityOrder[b],E=i[y],S=f[y]!==void 0?f[y]:d[y],w=isVariantLabel(S),C=y===u?E.isActive:null;C===!1&&(g=b);let A=S===d[y]&&S!==f[y]&&w;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),E.protectedKeys={...m},!E.isActive&&C===null||!S&&!E.prevProp||isAnimationControls(S)||typeof S=="boolean")continue;const O=checkVariantsDidChange(E.prevProp,S);let I=O||y===u&&E.isActive&&!A&&w||b>g&&w,L=!1;const $=Array.isArray(S)?S:[S];let V=$.reduce(o(y),{});C===!1&&(V={});const{prevResolvedValues:W={}}=E,K={...W,...V},j=k=>{I=!0,p.has(k)&&(L=!0,p.delete(k)),E.needsAnimating[k]=!0;const T=e.getValue(k);T&&(T.liveStyle=!1)};for(const k in K){const T=V[k],P=W[k];if(m.hasOwnProperty(k))continue;let F=!1;isKeyframesTarget(T)&&isKeyframesTarget(P)?F=!shallowCompare(T,P):F=T!==P,F?T!=null?j(k):p.add(k):T!==void 0&&p.has(k)?j(k):E.protectedKeys[k]=!0}E.prevProp=S,E.prevResolvedValues=V,E.isActive&&(m={...m,...V}),s&&e.blockInitialAnimation&&(I=!1);const D=A&&O;I&&(!D||L)&&h.push(...$.map(k=>{const T={type:y};if(typeof k=="string"&&s&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,F=resolveVariant(P,k);if(P.enteringChildren&&F){const{delayChildren:N}=F.transition||{};T.delay=calcChildStagger(P.enteringChildren,e,N)}}return{animation:k,options:T}}))}if(p.size){const b={};if(typeof f.initial!="boolean"){const y=resolveVariant(e,Array.isArray(f.initial)?f.initial[0]:f.initial);y&&y.transition&&(b.transition=y.transition)}p.forEach(y=>{const E=e.getBaseTarget(y),S=e.getValue(y);S&&(S.liveStyle=!0),b[y]=E??null}),h.push({animation:b})}let v=!!h.length;return s&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!1,v?t(h):Promise.resolve()}function c(u,f){var h;if(i[u].isActive===f)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,f)}),i[u].isActive=f;const d=l(u);for(const p in i)i[p].protectedKeys={};return d}return{animateChanges:l,setActive:c,setAnimateFunction:a,getState:()=>i,reset:()=>{i=createState(),s=!0}}}function checkVariantsDidChange(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!shallowCompare(t,e):!1}function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(t){this.isMounted=!1,this.node=t}update(){}}class AnimationFeature extends Feature{constructor(t){super(t),t.animationState||(t.animationState=createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const o=this.node.animationState.setActive("exit",!t);i&&!t&&o.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(e,t,i,s={passive:!0}){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i)}function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}const addPointerInfo=e=>t=>isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addPointerEvent(e,t,i,s){return addDomEvent(e,t,addPointerInfo(i),s)}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(e){return e.max-e.min}function isNear(e,t,i){return Math.abs(e-t)<=i}function calcAxisDelta(e,t,i,s=.5){e.origin=s,e.originPoint=mixNumber$1(t.min,t.max,e.origin),e.scale=calcLength(i)/calcLength(t),e.translate=mixNumber$1(i.min,i.max,e.origin)-e.originPoint,(e.scale>=SCALE_MIN&&e.scale<=SCALE_MAX||isNaN(e.scale))&&(e.scale=1),(e.translate>=TRANSLATE_MIN&&e.translate<=TRANSLATE_MAX||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,i,s){calcAxisDelta(e.x,t.x,i.x,s?s.originX:void 0),calcAxisDelta(e.y,t.y,i.y,s?s.originY:void 0)}function calcRelativeAxis(e,t,i){e.min=i.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeBox(e,t,i){calcRelativeAxis(e.x,t.x,i.x),calcRelativeAxis(e.y,t.y,i.y)}function calcRelativeAxisPosition(e,t,i){e.min=t.min-i.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,i){calcRelativeAxisPosition(e.x,t.x,i.x),calcRelativeAxisPosition(e.y,t.y,i.y)}function eachAxis(e){return[e("x"),e("y")]}const getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,distance=(e,t)=>Math.abs(e-t);function distance2D(e,t){const i=distance(e.x,t.x),s=distance(e.y,t.y);return Math.sqrt(i**2+s**2)}class PanSession{constructor(t,i,{transformPagePoint:s,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=getPanInfo(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=distance2D(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=p,{timestamp:b}=frameData;this.history.push({...v,timestamp:b});const{onStart:y,onMove:E}=this.handlers;m||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=transformPoint(m,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=getPanInfo(p.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,y),v&&v(p,y)},!isPrimaryPointer(t))return;this.dragSnapToOrigin=a,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=l,this.contextWindow=o||window;const c=extractEventInfo(t),u=transformPoint(c,this.transformPagePoint),{point:f}=u,{timestamp:d}=frameData;this.history=[{...f,timestamp:d}];const{onSessionStart:h}=i;h&&h(t,getPanInfo(u,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,startDevicePoint(t)),velocity:getVelocity(t,.1)}}function startDevicePoint(e){return e[0]}function lastDevicePoint(e){return e[e.length-1]}function getVelocity(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,s=null;const o=lastDevicePoint(e);for(;i>=0&&(s=e[i],!(o.timestamp-s.timestamp>secondsToMilliseconds(t)));)i--;if(!s)return{x:0,y:0};const a=millisecondsToSeconds(o.timestamp-s.timestamp);if(a===0)return{x:0,y:0};const l={x:(o.x-s.x)/a,y:(o.y-s.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function applyConstraints(e,{min:t,max:i},s){return t!==void 0&&e<t?e=s?mixNumber$1(t,e,s.min):Math.max(e,t):i!==void 0&&e>i&&(e=s?mixNumber$1(i,e,s.max):Math.min(e,i)),e}function calcRelativeAxisConstraints(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function calcRelativeConstraints(e,{top:t,left:i,bottom:s,right:o}){return{x:calcRelativeAxisConstraints(e.x,i,o),y:calcRelativeAxisConstraints(e.y,t,s)}}function calcViewportAxisConstraints(e,t){let i=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,s]=[s,i]),{min:i,max:s}}function calcViewportConstraints(e,t){return{x:calcViewportAxisConstraints(e.x,t.x),y:calcViewportAxisConstraints(e.y,t.y)}}function calcOrigin(e,t){let i=.5;const s=calcLength(e),o=calcLength(t);return o>s?i=progress(t.min,t.max-s,e.min):s>o&&(i=progress(e.min,e.max-o,t.min)),clamp(0,1,i)}function rebaseAxisConstraints(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const defaultElastic=.35;function resolveDragElastic(e=defaultElastic){return e===!1?e=0:e===!0&&(e=defaultElastic),{x:resolveAxisElastic(e,"left","right"),y:resolveAxisElastic(e,"top","bottom")}}function resolveAxisElastic(e,t,i){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,i)}}function resolvePointElastic(e,t){return typeof e=="number"?e:e[t]||0}const elementDragControls=new WeakMap;class VisualElementDragControls{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const a=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(extractEventInfo(h).point)},l=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:v}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(y=>{let E=this.getAxisMotionValue(y).get()||0;if(percent.test(E)){const{projection:S}=this.visualElement;if(S&&S.layout){const w=S.layout.layoutBox[y];w&&(E=calcLength(w)*(parseFloat(E)/100))}}this.originPoint[y]=E}),v&&frame.postRender(()=>v(h,p)),addValueToWillChange(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:v,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(g&&this.currentDirection===null){this.currentDirection=getCurrentDirection(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),b&&b(h,p)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>eachAxis(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new PanSession(t,{onSessionStart:a,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:getContextWindow(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,o=i||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!s)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&frame.postRender(()=>c(s,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:o}=this.getProps();if(!s||!shouldDrag(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(l=applyConstraints(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,o=this.constraints;t&&isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=calcRelativeConstraints(s.layoutBox,t):this.constraints=!1,this.elastic=resolveDragElastic(i),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=rebaseAxisConstraints(s.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!isRefObject(t))return!1;const s=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=measurePageBox(s,o.root,this.visualElement.getTransformPagePoint());let l=calcViewportConstraints(o.layout.layoutBox,a);if(i){const c=i(convertBoxToBoundingBox(l));this.hasMutatedConstraints=!!c,c&&(l=convertBoundingBoxToBox(c))}return l}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:o,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},f=eachAxis(d=>{if(!shouldDrag(d,i,this.currentDirection))return;let h=u[d]||{};l&&(h={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(f).then(c)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return addValueToWillChange(this.visualElement,t),s.start(animateMotionValue(t,s,0,i,this.visualElement,!1))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eachAxis(t=>{var i;return(i=this.getAxisMotionValue(t).animation)==null?void 0:i.pause()})}getAnimationState(t){var i;return(i=this.getAxisMotionValue(t).animation)==null?void 0:i.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),o=s[i];return o||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(i=>{const{drag:s}=this.getProps();if(!shouldDrag(i,s,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(i);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[i];a.set(t[i]-mixNumber$1(l,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!isRefObject(i)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};eachAxis(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=calcOrigin({min:u,max:u},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),eachAxis(l=>{if(!shouldDrag(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:f}=this.constraints[l];c.set(mixNumber$1(u,f,o[l]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const t=this.visualElement.current,i=addPointerEvent(t,"pointerdown",u=>{const{drag:f,dragListener:d=!0}=this.getProps();f&&d&&this.start(u)}),s=()=>{const{dragConstraints:u}=this.getProps();isRefObject(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),frame.read(s);const l=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(eachAxis(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{l(),i(),a(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:l=defaultElastic,dragMomentum:c=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:o,dragConstraints:a,dragElastic:l,dragMomentum:c}}}function shouldDrag(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function getCurrentDirection(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}class DragGesture extends Feature{constructor(t){super(t),this.removeGroupControls=noop$2,this.removeListeners=noop$2,this.controls=new VisualElementDragControls(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$2}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=e=>(t,i)=>{e&&frame.postRender(()=>e(t,i))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$2}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(i),onMove:s,onEnd:(a,l)=>{delete this.session,o&&frame.postRender(()=>o(a,l))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const correctBorderRadius={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(px.test(e))e=parseFloat(e);else return e;const i=pixelsToPercent(e,t.target.x),s=pixelsToPercent(e,t.target.y);return`${i}% ${s}%`}},correctBoxShadow={correct:(e,{treeScale:t,projectionDelta:i})=>{const s=e,o=complex.parse(e);if(o.length>5)return s;const a=complex.createTransformer(e),l=typeof o[0]!="number"?1:0,c=i.x.scale*t.x,u=i.y.scale*t.y;o[0+l]/=c,o[1+l]/=u;const f=mixNumber$1(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=f),typeof o[3+l]=="number"&&(o[3+l]/=f),a(o)}};let hasTakenAnySnapshot=!1;class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:o}=this.props,{projection:a}=t;addScaleCorrector(defaultScaleCorrectors),a&&(i.group&&i.group.add(a),s&&s.register&&o&&s.register(a),hasTakenAnySnapshot&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:o,isPresent:a}=this.props,{projection:l}=s;return l&&(l.isPresent=a,hasTakenAnySnapshot=!0,o||t.layoutDependency!==i||i===void 0||t.isPresent!==a?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||frame.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),microtask.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:o}=t;hasTakenAnySnapshot=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function MeasureLayout(e){const[t,i]=usePresence(),s=React.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...e,layoutGroup:s,switchLayoutGroup:React.useContext(SwitchLayoutGroupContext),isPresent:t,safeToRemove:i})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(e,t,i){const s=isMotionValue(e)?e:motionValue(e);return s.start(animateMotionValue("",s,t,i)),s.animation}const compareByDepth=(e,t)=>e.depth-t.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){addUniqueItem(this.children,t),this.isDirty=!0}remove(t){removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}}function delay$1(e,t){const i=time.now(),s=({timestamp:o})=>{const a=o-i;a>=t&&(cancelFrame(s),e(a-t))};return frame.setup(s,!0),()=>cancelFrame(s)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=e=>typeof e=="string"?parseFloat(e):e,isPx=e=>typeof e=="number"||px.test(e);function mixValues(e,t,i,s,o,a){o?(e.opacity=mixNumber$1(0,i.opacity??1,easeCrossfadeIn(s)),e.opacityExit=mixNumber$1(t.opacity??1,0,easeCrossfadeOut(s))):a&&(e.opacity=mixNumber$1(t.opacity??1,i.opacity??1,s));for(let l=0;l<numBorders;l++){const c=`border${borders[l]}Radius`;let u=getRadius(t,c),f=getRadius(i,c);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||isPx(u)===isPx(f)?(e[c]=Math.max(mixNumber$1(asNumber(u),asNumber(f),s),0),(percent.test(f)||percent.test(u))&&(e[c]+="%")):e[c]=f}(t.rotate||i.rotate)&&(e.rotate=mixNumber$1(t.rotate||0,i.rotate||0,s))}function getRadius(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop$2);function compress(e,t,i){return s=>s<e?0:s>t?1:i(progress(e,t,s))}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function removePointDelta(e,t,i,s,o){return e-=t,e=scalePoint(e,1/i,s),o!==void 0&&(e=scalePoint(e,1/o,s)),e}function removeAxisDelta(e,t=0,i=1,s=.5,o,a=e,l=e){if(percent.test(t)&&(t=parseFloat(t),t=mixNumber$1(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=mixNumber$1(a.min,a.max,s);e===a&&(c-=t),e.min=removePointDelta(e.min,t,i,c,o),e.max=removePointDelta(e.max,t,i,c,o)}function removeAxisTransforms(e,t,[i,s,o],a,l){removeAxisDelta(e,t[i],t[s],t[o],t.scale,a,l)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(e,t,i,s){removeAxisTransforms(e.x,t,xKeys,i?i.x:void 0,s?s.x:void 0),removeAxisTransforms(e.y,t,yKeys,i?i.y:void 0,s?s.y:void 0)}function isAxisDeltaZero(e){return e.translate===0&&e.scale===1}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function boxEquals(e,t){return axisEquals(e.x,t.x)&&axisEquals(e.y,t.y)}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NodeStack{constructor(){this.members=[]}add(t){addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(o=>t===o);if(i===0)return!1;let s;for(let o=i;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(e,t,i){let s="";const o=e.x.translate/t.x,a=e.y.translate/t.y,l=(i==null?void 0:i.z)||0;if((o||a||l)&&(s=`translate3d(${o}px, ${a}px, ${l}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:f,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:g}=i;f&&(s=`perspective(${f}px) ${s}`),d&&(s+=`rotate(${d}deg) `),h&&(s+=`rotateX(${h}deg) `),p&&(s+=`rotateY(${p}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(s+=`scale(${c}, ${u})`),s||"none"}const transformAxes=["","X","Y","Z"],animationTarget=1e3;let id=0;function resetDistortingTransform(e,t,i,s){const{latestValues:o}=t;o[e]&&(i[e]=o[e],t.setStaticValue(e,0),s&&(s[e]=0))}function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",frame,!(o||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(s)}function createProjectionNode({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(l={},c=t==null?void 0:t()){this.id=id++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new SubscriptionManager),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=isSVGElement$1(l)&&!isSVGSVGElement(l),this.instance=l;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;frame.read(()=>{h=window.innerWidth}),e(l,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=delay$1(p,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=f.getProps(),y=!this.targetLayout||!boxEqualsRounded(this.targetLayout,m),E=!h&&p;if(this.options.layoutRoot||this.resumeFrom||E||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...getValueTransition$1(g,"layout"),onPlay:v,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,E)}else h||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(clearIsLayoutDirty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate)):this.nodes.forEach(clearIsLayoutDirty),this.clearAllSnapshots();const c=time.now();frameData.delta=clamp(0,1e3/60,c-frameData.timestamp),frameData.timestamp=c,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!calcLength(this.snapshot.measuredBox.x)&&!calcLength(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!isDeltaZero(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,d=f!==this.prevTransformTemplateValue;l&&this.instance&&(c||hasTransform(this.latestValues)||d)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),roundBox(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return createBox();const c=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:d}=this.root;d&&(translateAxis(c.x,d.offset.x),translateAxis(c.y,d.offset.y))}return c}removeElementScroll(l){var u;const c=createBox();if(copyBoxInto(c,l),(u=this.scroll)!=null&&u.wasRoot)return c;for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&copyBoxInto(c,l),translateAxis(c.x,h.offset.x),translateAxis(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=createBox();copyBoxInto(u,l);for(let f=0;f<this.path.length;f++){const d=this.path[f];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&transformBox(u,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),hasTransform(d.latestValues)&&transformBox(u,d.latestValues)}return hasTransform(this.latestValues)&&transformBox(u,this.latestValues),u}removeTransform(l){const c=createBox();copyBoxInto(c,l);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!hasTransform(f.latestValues))continue;hasScale(f.latestValues)&&f.updateSnapshot();const d=createBox(),h=f.measurePageBox();copyBoxInto(d,h),removeBoxTransforms(c,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,d)}return hasTransform(this.latestValues)&&removeBoxTransforms(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var p;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,m.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(u=!1),u)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=createBox());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(l,c=!1){const u=this.snapshot,f=u?u.latestValues:{},d={...this.latestValues},h=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const p=createBox(),m=u?u.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,b=this.getStack(),y=!b||b.members.length<=1,E=!!(v&&!y&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let S;this.mixTargetDelta=w=>{const C=w/1e3;mixAxisDelta(h.x,l.x,C),mixAxisDelta(h.y,l.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,p,C),S&&boxEquals(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=createBox()),copyBoxInto(S,this.relativeTarget)),v&&(this.animationValues=d,mixValues(d,f,this.latestValues,C,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,u,f;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(f=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||f.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=motionValue(0)),this.currentAnimation=animateSingleValue(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),l.onUpdate&&l.onUpdate(d)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:f,latestValues:d}=l;if(!(!c||!u||!f)){if(this!==l&&this.layout&&f&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||createBox();const h=calcLength(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+h;const p=calcLength(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+p}copyBoxInto(c,u),transformBox(c,d),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new NodeStack),this.sharedNodes.get(l).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const f={};u.z&&resetDistortingTransform("z",l,f,this.animationValues);for(let d=0;d<transformAxes.length;d++)resetDistortingTransform(`rotate${transformAxes[d]}`,l,f,this.animationValues),resetDistortingTransform(`skew${transformAxes[d]}`,l,f,this.animationValues);l.render();for(const d in f)l.setStaticValue(d,f[d]),this.animationValues&&(this.animationValues[d]=f[d]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=resolveMotionValue(c==null?void 0:c.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=resolveMotionValue(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const d=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),l.transform=h;const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,f.animationValues?l.opacity=f===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in scaleCorrectors){if(d[g]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=scaleCorrectors[g],E=h==="none"?d[g]:v(d[g],f);if(b){const S=b.length;for(let w=0;w<S;w++)l[b[w]]=E}else y?this.options.visualElement.renderState.vars[g]=E:l[g]=E}this.options.layoutId&&(l.pointerEvents=f===this?resolveMotionValue(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){var i;const t=((i=e.resumeFrom)==null?void 0:i.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:a}=e.options,l=t.source!==e.layout.source;a==="size"?eachAxis(h=>{const p=l?t.measuredBox[h]:t.layoutBox[h],m=calcLength(p);p.min=s[h].min,p.max=p.min+m}):shouldAnimatePositionOnly(a,t.layoutBox,s)&&eachAxis(h=>{const p=l?t.measuredBox[h]:t.layoutBox[h],m=calcLength(s[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const c=createDelta();calcBoxDelta(c,s,t.layoutBox);const u=createDelta();l?calcBoxDelta(u,e.applyTransform(o,!0),t.measuredBox):calcBoxDelta(u,s,t.layoutBox);const f=!isDeltaZero(c);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const g=createBox();calcRelativePosition(g,t.layoutBox,p.layoutBox);const v=createBox();calcRelativePosition(v,s,m.layoutBox),boxEqualsRounded(g,v)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:u,layoutDelta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function propagateDirtyNodes(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,i){e.translate=mixNumber$1(t.translate,0,i),e.scale=mixNumber$1(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,i,s){e.min=mixNumber$1(t.min,i.min,s),e.max=mixNumber$1(t.max,i.max,s)}function mixBox(e,t,i,s){mixAxis(e.x,t.x,i.x,s),mixAxis(e.y,t.y,i.y,s)}function hasOpacityCrossfade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$2;function roundAxis(e){e.min=roundPoint(e.min),e.max=roundPoint(e.max)}function roundBox(e){roundAxis(e.x),roundAxis(e.y)}function shouldAnimatePositionOnly(e,t,i){return e==="position"||e==="preserve-aspect"&&!isNear(aspectRatio(t),aspectRatio(i),.2)}function checkNodeWasScrollRoot(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(e,t)=>addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const e=new DocumentProjectionNode({});e.mount(window),e.setOptions({layoutScroll:!0}),rootProjectionNode.current=e}return rootProjectionNode.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(e,t,i){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,a=s[o];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class HoverGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=hover(t,(i,s)=>(handleHoverEvent(this.node,s,"Start"),o=>handleHoverEvent(this.node,o,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(e,t,i){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),a=s[o];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class PressGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=press(t,(i,s)=>(handlePressEvent(this.node,s,"Start"),(o,{success:a})=>handlePressEvent(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=e=>{const t=observerCallbacks.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)};function initIntersectionObserver({root:e,...t}){const i=e||document;observers.has(i)||observers.set(i,{});const s=observers.get(i),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),s[o]}function observeIntersection(e,t,i){const s=initIntersectionObserver(t);return observerCallbacks.set(e,i),s.observe(e),()=>{observerCallbacks.delete(e),s.unobserve(e)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:o="some",once:a}=t,l={root:i?i.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:thresholdNames[o]},c=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=f?d:h;p&&p(u)};return observeIntersection(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(t,i))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},featureBundle={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy(featureBundle,createDomVisualElement);function useUnmountEffect(e){return React.useEffect(()=>()=>e(),[])}function useMotionValue(e){const t=useConstant(()=>motionValue(e)),{isStatic:i}=React.useContext(MotionConfigContext);if(i){const[,s]=React.useState(e);React.useEffect(()=>t.on("change",s),[])}return t}function isDOMKeyframes(e){return typeof e=="object"&&!Array.isArray(e)}function resolveSubjects(e,t,i,s){return typeof e=="string"&&isDOMKeyframes(t)?resolveElements(e,i,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function calculateRepeatDuration(e,t,i){return e*(t+1)}function calcNextTime(e,t,i,s){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?i:t.startsWith("<")?Math.max(0,i+parseFloat(t.slice(1))):s.get(t)??e}function eraseKeyframes(e,t,i){for(let s=0;s<e.length;s++){const o=e[s];o.at>t&&o.at<i&&(removeItem(e,o),s--)}}function addKeyframes(e,t,i,s,o,a){eraseKeyframes(e,o,a);for(let l=0;l<t.length;l++)e.push({value:t[l],at:mixNumber$1(o,a,s[l]),easing:getEasingForSegment(i,l)})}function normalizeTimes(e,t){for(let i=0;i<e.length;i++)e[i]=e[i]/(t+1)}function compareByTime(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const defaultSegmentEasing="easeInOut";function createAnimationsFromSequence(e,{defaultTransition:t={},...i}={},s,o){const a=t.duration||.3,l=new Map,c=new Map,u={},f=new Map;let d=0,h=0,p=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){f.set(g,h);continue}else if(!Array.isArray(g)){f.set(g.name,calcNextTime(h,g.at,d,f));continue}let[v,b,y={}]=g;y.at!==void 0&&(h=calcNextTime(h,y.at,d,f));let E=0;const S=(w,C,A,O=0,I=0)=>{const L=keyframesAsList(w),{delay:$=0,times:V=defaultOffset(L),type:W="keyframes",repeat:K,repeatType:j,repeatDelay:D=0,...M}=C;let{ease:k=t.ease||"easeOut",duration:T}=C;const P=typeof $=="function"?$(O,I):$,F=L.length,N=isGenerator(W)?W:o==null?void 0:o[W||"keyframes"];if(F<=2&&N){let Q=100;if(F===2&&isNumberKeyframesArray(L)){const z=L[1]-L[0];Q=Math.abs(z)}const re={...M};T!==void 0&&(re.duration=secondsToMilliseconds(T));const ee=createGeneratorEasing(re,Q,N);k=ee.ease,T=ee.duration}T??(T=a);const H=h+P;V.length===1&&V[0]===0&&(V[1]=1);const q=V.length-L.length;if(q>0&&fillOffset(V,q),L.length===1&&L.unshift(null),K){T=calculateRepeatDuration(T,K);const Q=[...L],re=[...V];k=Array.isArray(k)?[...k]:[k];const ee=[...k];for(let z=0;z<K;z++){L.push(...Q);for(let J=0;J<Q.length;J++)V.push(re[J]+(z+1)),k.push(J===0?"linear":getEasingForSegment(ee,J-1))}normalizeTimes(V,K)}const Y=H+T;addKeyframes(A,L,k,V,H,Y),E=Math.max(P+T,E),p=Math.max(Y,p)};if(isMotionValue(v)){const w=getSubjectSequence(v,c);S(b,y,getValueSequence("default",w))}else{const w=resolveSubjects(v,b,s,u),C=w.length;for(let A=0;A<C;A++){b=b,y=y;const O=w[A],I=getSubjectSequence(O,c);for(const L in b)S(b[L],getValueTransition(y,L),getValueSequence(L,I),A,C)}}d=h,h+=E}return c.forEach((m,g)=>{for(const v in m){const b=m[v];b.sort(compareByTime);const y=[],E=[],S=[];for(let C=0;C<b.length;C++){const{at:A,value:O,easing:I}=b[C];y.push(O),E.push(progress(0,p,A)),S.push(I||"easeOut")}E[0]!==0&&(E.unshift(0),y.unshift(y[0]),S.unshift(defaultSegmentEasing)),E[E.length-1]!==1&&(E.push(1),y.push(null)),l.has(g)||l.set(g,{keyframes:{},transition:{}});const w=l.get(g);w.keyframes[v]=y,w.transition[v]={...t,duration:p,ease:S,times:E,...i}}}),l}function getSubjectSequence(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function getValueSequence(e,t){return t[e]||(t[e]=[]),t[e]}function keyframesAsList(e){return Array.isArray(e)?e:[e]}function getValueTransition(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const isNumber$2=e=>typeof e=="number",isNumberKeyframesArray=e=>e.every(isNumber$2);function isObjectKey(e,t){return e in t}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,i){if(isObjectKey(i,t)){const s=t[i];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,i){delete i.output[t]}measureInstanceViewportBox(){return createBox()}build(t,i){Object.assign(t.output,i)}renderInstance(t,{output:i}){Object.assign(t,i)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=isSVGElement$1(e)&&!isSVGSVGElement(e)?new SVGVisualElement(t):new HTMLVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function createObjectVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},i=new ObjectVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function isSingleValue(e,t){return isMotionValue(e)||typeof e=="number"||typeof e=="string"&&!isDOMKeyframes(t)}function animateSubject(e,t,i,s){const o=[];if(isSingleValue(e,t))o.push(animateSingleValue(e,isDOMKeyframes(t)&&t.default||t,i&&(i.default||i)));else{const a=resolveSubjects(e,t,s),l=a.length;for(let c=0;c<l;c++){const u=a[c],f=u instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(u)||f(u);const d=visualElementStore.get(u),h={...i};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(c,l)),o.push(...animateTarget(d,{...t,transition:h},{}))}}return o}function animateSequence(e,t,i){const s=[];return createAnimationsFromSequence(e,t,i,{spring}).forEach(({keyframes:a,transition:l},c)=>{s.push(...animateSubject(c,a,l))}),s}function isSequence(e){return Array.isArray(e)&&e.some(Array.isArray)}function createScopedAnimate(e){function t(i,s,o){let a=[],l;if(isSequence(i))a=animateSequence(i,s,e);else{const{onComplete:u,...f}=o||{};typeof u=="function"&&(l=u),a=animateSubject(i,s,f,e)}const c=new GroupAnimationWithThen(a);return l&&c.finished.then(l),e&&(e.animations.push(c),c.finished.then(()=>{removeItem(e.animations,c)})),c}return t}function useAnimate(){const e=useConstant(()=>({current:null,animations:[]})),t=useConstant(()=>createScopedAnimate(e));return useUnmountEffect(()=>{e.animations.forEach(i=>i.stop()),e.animations.length=0}),[e,t]}var define_process_env_default$5={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ASSETS_BASE_URL=define_process_env_default$5.ASSETS_BASE_URL;function assetUrl(e){return`${ASSETS_BASE_URL}/${e}`}const image$1=assetUrl("icon_diamond.webp"),IconBalanceGems=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:image$1,style:{aspectRatio:"1/1",...e},...t,alt:""});function r(e){var t,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=r(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function clsx(){for(var e,t,i=0,s="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=r(e))&&(s&&(s+=" "),s+=t);return s}const CLASS_PART_SEPARATOR="-",createClassGroupUtils=e=>{const t=createClassMap(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:l=>{const c=l.split(CLASS_PART_SEPARATOR);return c[0]===""&&c.length!==1&&c.shift(),getGroupRecursive(c,t)||getGroupIdForArbitraryProperty(l)},getConflictingClassGroupIds:(l,c)=>{const u=i[l]||[];return c&&s[l]?[...u,...s[l]]:u}}},getGroupRecursive=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const i=e[0],s=t.nextPart.get(i),o=s?getGroupRecursive(e.slice(1),s):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(CLASS_PART_SEPARATOR);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const t=arbitraryPropertyRegex.exec(e)[1],i=t==null?void 0:t.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},createClassMap=e=>{const{theme:t,classGroups:i}=e,s={nextPart:new Map,validators:[]};for(const o in i)processClassesRecursively(i[o],s,o,t);return s},processClassesRecursively=(e,t,i,s)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:getPart(t,o);a.classGroupId=i;return}if(typeof o=="function"){if(isThemeGetter(o)){processClassesRecursively(o(s),t,i,s);return}t.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,l])=>{processClassesRecursively(l,getPart(t,a),i,s)})})},getPart=(e,t)=>{let i=e;return t.split(CLASS_PART_SEPARATOR).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},isThemeGetter=e=>e.isThemeGetter,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=new Map,s=new Map;const o=(a,l)=>{i.set(a,l),t++,t>e&&(t=0,s=i,i=new Map)};return{get(a){let l=i.get(a);if(l!==void 0)return l;if((l=s.get(a))!==void 0)return o(a,l),l},set(a,l){i.has(a)?i.set(a,l):o(a,l)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=e=>{const{prefix:t,experimentalParseClassName:i}=e;let s=o=>{const a=[];let l=0,c=0,u=0,f;for(let g=0;g<o.length;g++){let v=o[g];if(l===0&&c===0){if(v===MODIFIER_SEPARATOR){a.push(o.slice(u,g)),u=g+MODIFIER_SEPARATOR_LENGTH;continue}if(v==="/"){f=g;continue}}v==="["?l++:v==="]"?l--:v==="("?c++:v===")"&&c--}const d=a.length===0?o:o.substring(u),h=stripImportantModifier(d),p=h!==d,m=f&&f>u?f-u:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+MODIFIER_SEPARATOR,a=s;s=l=>l.startsWith(o)?a(l.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(i){const o=s;s=a=>i({className:a,parseClassName:o})}return s},stripImportantModifier=e=>e.endsWith(IMPORTANT_MODIFIER)?e.substring(0,e.length-1):e.startsWith(IMPORTANT_MODIFIER)?e.substring(1):e,createSortModifiers=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(l=>{l[0]==="["||t[l]?(o.push(...a.sort(),l),a=[]):a.push(l)}),o.push(...a.sort()),o}},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),sortModifiers:createSortModifiers(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,t)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],c=e.trim().split(SPLIT_CLASSES_REGEX);let u="";for(let f=c.length-1;f>=0;f-=1){const d=c[f],{isExternal:h,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=i(d);if(h){u=d+(u.length>0?" "+u:u);continue}let b=!!v,y=s(b?g.substring(0,v):g);if(!y){if(!b){u=d+(u.length>0?" "+u:u);continue}if(y=s(g),!y){u=d+(u.length>0?" "+u:u);continue}b=!1}const E=a(p).join(":"),S=m?E+IMPORTANT_MODIFIER:E,w=S+y;if(l.includes(w))continue;l.push(w);const C=o(y,b);for(let A=0;A<C.length;++A){const O=C[A];l.push(S+O)}u=d+(u.length>0?" "+u:u)}return u};function twJoin(){let e=0,t,i,s="";for(;e<arguments.length;)(t=arguments[e++])&&(i=toValue(t))&&(s&&(s+=" "),s+=i);return s}const toValue=e=>{if(typeof e=="string")return e;let t,i="";for(let s=0;s<e.length;s++)e[s]&&(t=toValue(e[s]))&&(i&&(i+=" "),i+=t);return i};function createTailwindMerge(e,...t){let i,s,o,a=l;function l(u){const f=t.reduce((d,h)=>h(d),e());return i=createConfigUtils(f),s=i.cache.get,o=i.cache.set,a=c,c(u)}function c(u){const f=s(u);if(f)return f;const d=mergeClassList(u,i);return o(u,d),d}return function(){return a(twJoin.apply(null,arguments))}}const fromTheme=e=>{const t=i=>i[e]||[];return t.isThemeGetter=!0,t},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=e=>fractionRegex.test(e),isNumber$1=e=>!!e&&!Number.isNaN(Number(e)),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$1(e.slice(0,-1)),isTshirtSize=e=>tshirtUnitRegex.test(e),isAny=()=>!0,isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),isAnyNonArbitrary=e=>!isArbitraryValue(e)&&!isArbitraryVariable(e),isArbitrarySize=e=>getIsArbitraryValue(e,isLabelSize,isNever),isArbitraryValue=e=>arbitraryValueRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,isLabelLength,isLengthOnly),isArbitraryNumber=e=>getIsArbitraryValue(e,isLabelNumber,isNumber$1),isArbitraryPosition=e=>getIsArbitraryValue(e,isLabelPosition,isNever),isArbitraryImage=e=>getIsArbitraryValue(e,isLabelImage,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,isLabelShadow,isShadow),isArbitraryVariable=e=>arbitraryVariableRegex.test(e),isArbitraryVariableLength=e=>getIsArbitraryVariable(e,isLabelLength),isArbitraryVariableFamilyName=e=>getIsArbitraryVariable(e,isLabelFamilyName),isArbitraryVariablePosition=e=>getIsArbitraryVariable(e,isLabelPosition),isArbitraryVariableSize=e=>getIsArbitraryVariable(e,isLabelSize),isArbitraryVariableImage=e=>getIsArbitraryVariable(e,isLabelImage),isArbitraryVariableShadow=e=>getIsArbitraryVariable(e,isLabelShadow,!0),getIsArbitraryValue=(e,t,i)=>{const s=arbitraryValueRegex.exec(e);return s?s[1]?t(s[1]):i(s[2]):!1},getIsArbitraryVariable=(e,t,i=!1)=>{const s=arbitraryVariableRegex.exec(e);return s?s[1]?t(s[1]):i:!1},isLabelPosition=e=>e==="position"||e==="percentage",isLabelImage=e=>e==="image"||e==="url",isLabelSize=e=>e==="length"||e==="size"||e==="bg-size",isLabelLength=e=>e==="length",isLabelNumber=e=>e==="number",isLabelFamilyName=e=>e==="family-name",isLabelShadow=e=>e==="shadow",getDefaultConfig=()=>{const e=fromTheme("color"),t=fromTheme("font"),i=fromTheme("text"),s=fromTheme("font-weight"),o=fromTheme("tracking"),a=fromTheme("leading"),l=fromTheme("breakpoint"),c=fromTheme("container"),u=fromTheme("spacing"),f=fromTheme("radius"),d=fromTheme("shadow"),h=fromTheme("inset-shadow"),p=fromTheme("text-shadow"),m=fromTheme("drop-shadow"),g=fromTheme("blur"),v=fromTheme("perspective"),b=fromTheme("aspect"),y=fromTheme("ease"),E=fromTheme("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...w(),isArbitraryVariable,isArbitraryValue],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[isArbitraryVariable,isArbitraryValue,u],L=()=>[isFraction,"full","auto",...I()],$=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],V=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],W=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],K=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...I()],k=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],T=()=>[e,isArbitraryVariable,isArbitraryValue],P=()=>[...w(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],H=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],q=()=>["","none","full",f,isArbitraryVariable,isArbitraryValue],Y=()=>["",isNumber$1,isArbitraryVariableLength,isArbitraryLength],Q=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[isNumber$1,isPercent,isArbitraryVariablePosition,isArbitraryPosition],z=()=>["","none",g,isArbitraryVariable,isArbitraryValue],J=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],te=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],X=()=>[isNumber$1,isArbitraryVariable,isArbitraryValue],se=()=>[isFraction,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber$1],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,b]}],container:["container"],columns:[{columns:[isNumber$1,isArbitraryValue,isArbitraryVariable,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",c,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber$1,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[c,"screen",...k()]}],"min-w":[{"min-w":[c,"screen","none",...k()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",i,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber$1,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber$1,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[isNumber$1,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber$1,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",h,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[isNumber$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber$1]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[isNumber$1]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:z()}],brightness:[{brightness:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",m,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber$1,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",y,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",E,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[isNumber$1,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...e){return twMerge(clsx(e))}function Drawer({children:e,headerOptions:t,closeButtonStyles:i,className:s,variant:o="default",style:a,...l}){return jsxRuntimeExports.jsx(Modal,{header:jsxRuntimeExports.jsx(Modal.Header,{after:jsxRuntimeExports.jsx(Modal.Close,{children:jsxRuntimeExports.jsx(Icon28Close,{style:{color:"var(--tgui--secondary_color)",...i}})}),style:{zIndex:1,position:"absolute",top:0,left:0,right:0,backgroundColor:"transparent",borderRadius:"inherit",overflow:"hidden",...t==null?void 0:t.style},className:cn$1("before:hidden",t==null?void 0:t.className),...t}),className:cn$1("pb-0",s),style:o==="secondary"?{backgroundColor:"var(--tgui--secondary_bg_color)",...a}:a,...l,children:e})}const DrawerContent=React.forwardRef(({children:e,className:t,...i},s)=>jsxRuntimeExports.jsx("div",{ref:s,className:cn$1("flex flex-col text-center px-4 pt-7.5 gap-6 pb-[calc(var(--tg-safe-area-inset-bottom)+6px)]",t),...i,children:e})),useAnimateNumber=(e,t=!0,i=!1)=>{const[,s]=useAnimate(),[o,a]=React.useState(t?0:e),l=useMotionValue(t?0:e),c=React.useRef(e);return l.on("change",f=>{const h=Math.abs(f-c.current)<.001;a(h?i?c.current:Math.round(c.current):i?f:Math.round(f))}),React.useEffect(()=>{c.current=e;const f=s(l,e,{ease:"easeOut",duration:.1});return()=>f.stop()},[l,e,s]),[o,f=>{c.current=f;const d=s(l,f,{ease:"easeOut",duration:.1});return()=>d.stop()}]},XpProgress=({level:e,experience:t,xpNeeded:i,className:s,size:o=40,levelFontSize:a})=>{const[l]=useAnimateNumber(t),[c]=useAnimateNumber(e),u=4,f=Math.round(l/i*100)/100,d=o,h=d/2-u/2,p=2*Math.PI*h,m=formatCompactNumber(c),g=a||`${d*.6/(1+.4*(m.length-1))}px`;return jsxRuntimeExports.jsxs("div",{className:cn$1("relative flex justify-center items-center overflow-hidden",s),style:{width:o,height:o},children:[jsxRuntimeExports.jsx(Text,{className:"text-rounded",style:{fontSize:g,lineHeight:`${o||d}px`,fontWeight:800},children:m}),jsxRuntimeExports.jsxs(motion.svg,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:"absolute inset-0 text-inherit",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress background"}),jsxRuntimeExports.jsx(motion.circle,{cx:d/2,cy:d/2,r:h,opacity:.2,stroke:"currentColor",fill:"none",strokeWidth:u})]},"bg"),jsxRuntimeExports.jsxs(motion.svg,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:"absolute inset-0 -rotate-90",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress"}),jsxRuntimeExports.jsx(motion.circle,{cx:d/2,cy:d/2,r:h,fill:"none",stroke:"currentColor",strokeWidth:u,strokeLinecap:"round",initial:{strokeDasharray:p,strokeDashoffset:p},animate:{strokeDashoffset:(1-f)*p},transition:{strokeDashoffset:{ease:"easeOut",duration:2}}})]},"fg")]})},dividePriceResponse=e=>e/100,DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GLOBAL_OBJ=globalThis,SDK_VERSION="10.18.0";function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||SDK_VERSION,t[SDK_VERSION]=t[SDK_VERSION]||{}}function getGlobalSingleton(e,t,i=GLOBAL_OBJ){const s=i.__SENTRY__=i.__SENTRY__||{},o=s[SDK_VERSION]=s[SDK_VERSION]||{};return o[e]||(o[e]=t())}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],PREFIX="Sentry Logger ",originalConsoleMethods={};function consoleSandbox(e){if(!("console"in GLOBAL_OBJ))return e();const t=GLOBAL_OBJ.console,i={},s=Object.keys(originalConsoleMethods);s.forEach(o=>{const a=originalConsoleMethods[o];i[o]=t[o],t[o]=a});try{return e()}finally{s.forEach(o=>{t[o]=i[o]})}}function enable(){_getLoggerSettings().enabled=!0}function disable(){_getLoggerSettings().enabled=!1}function isEnabled(){return _getLoggerSettings().enabled}function log$6(...e){_maybeLog("log",...e)}function warn(...e){_maybeLog("warn",...e)}function error(...e){_maybeLog("error",...e)}function _maybeLog(e,...t){DEBUG_BUILD$2&&isEnabled()&&consoleSandbox(()=>{GLOBAL_OBJ.console[e](`${PREFIX}[${e}]:`,...t)})}function _getLoggerSettings(){return DEBUG_BUILD$2?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const debug={enable,disable,isEnabled,log:log$6,warn,error},STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...e){const t=e.sort((i,s)=>i[0]-s[0]).map(i=>i[1]);return(i,s=0,o=0)=>{const a=[],l=i.split(`
68
+ `),()=>{b.contains(v)&&b.removeChild(v)}},[t]),jsxRuntimeExports.jsx(PopChildMeasure,{isPresent:t,childRef:a,sizeRef:l,children:React__namespace.cloneElement(e,{ref:u})})}const PresenceChild=({children:e,initial:t,isPresent:i,onExitComplete:s,custom:o,presenceAffectsLayout:a,mode:l,anchorX:c,root:u})=>{const f=useConstant(newChildrenMap),d=React.useId();let h=!0,p=React.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:i,custom:o,onExitComplete:m=>{f.set(m,!0);for(const g of f.values())if(!g)return;s&&s()},register:m=>(f.set(m,!1),()=>f.delete(m))}),[i,f,s]);return a&&h&&(p={...p}),React.useMemo(()=>{f.forEach((m,g)=>f.set(g,!1))},[i]),React__namespace.useEffect(()=>{!i&&!f.size&&s&&s()},[i]),l==="popLayout"&&(e=jsxRuntimeExports.jsx(PopChild,{isPresent:i,anchorX:c,root:u,children:e})),jsxRuntimeExports.jsx(PresenceContext.Provider,{value:p,children:e})};function newChildrenMap(){return new Map}function usePresence(e=!0){const t=React.useContext(PresenceContext);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=t,a=React.useId();React.useEffect(()=>{if(e)return o(a)},[e]);const l=React.useCallback(()=>e&&s&&s(a),[a,s,e]);return!i&&s?[!1,l]:[!0]}const getChildKey=e=>e.key||"";function onlyElements(e){const t=[];return React.Children.forEach(e,i=>{React.isValidElement(i)&&t.push(i)}),t}const AnimatePresence=({children:e,custom:t,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",root:u})=>{const[f,d]=usePresence(l),h=React.useMemo(()=>onlyElements(e),[e]),p=l&&!f?[]:h.map(getChildKey),m=React.useRef(!0),g=React.useRef(h),v=useConstant(()=>new Map),[b,y]=React.useState(h),[E,S]=React.useState(h);useIsomorphicLayoutEffect(()=>{m.current=!1,g.current=h;for(let A=0;A<E.length;A++){const O=getChildKey(E[A]);p.includes(O)?v.delete(O):v.get(O)!==!0&&v.set(O,!1)}},[E,p.length,p.join("-")]);const w=[];if(h!==b){let A=[...h];for(let O=0;O<E.length;O++){const I=E[O],L=getChildKey(I);p.includes(L)||(A.splice(O,0,I),w.push(I))}return a==="wait"&&w.length&&(A=w),S(onlyElements(A)),y(h),null}const{forceRender:C}=React.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:E.map(A=>{const O=getChildKey(A),I=l&&!f?!1:h===E||p.includes(O),L=()=>{if(v.has(O))v.set(O,!0);else return;let $=!0;v.forEach(V=>{V||($=!1)}),$&&(C==null||C(),S(g.current),l&&(d==null||d()),s&&s())};return jsxRuntimeExports.jsx(PresenceChild,{isPresent:I,initial:!m.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:I?void 0:L,anchorX:c,children:A},O)})})},LazyContext=React.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const e in featureProps)featureDefinitions[e]={isEnabled:t=>featureProps[e].some(i=>!!t[i])};function loadFeatures(e){for(const t in e)featureDefinitions[t]={...featureDefinitions[t],...e[t]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||validMotionProps.has(e)}let shouldForward=e=>!isValidMotionProp(e);function loadExternalIsValidProp(e){typeof e=="function"&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):e(t))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(e,t,i){const s={};for(const o in e)o==="values"&&typeof e.values=="object"||(shouldForward(o)||i===!0&&isValidMotionProp(o)||!t&&!isValidMotionProp(o)||e.draggable&&o.startsWith("onDrag"))&&(s[o]=e[o]);return s}const MotionContext=React.createContext({});function isAnimationControls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function isVariantLabel(e){return typeof e=="string"||Array.isArray(e)}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(e){return isAnimationControls(e.animate)||variantProps.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function getCurrentTreeVariants(e,t){if(isControllingVariants(e)){const{initial:i,animate:s}=e;return{initial:i===!1||isVariantLabel(i)?i:void 0,animate:isVariantLabel(s)?s:void 0}}return e.inherit!==!1?t:{}}function useCreateMotionContext(e){const{initial:t,animate:i}=getCurrentTreeVariants(e,React.useContext(MotionContext));return React.useMemo(()=>({initial:t,animate:i}),[variantLabelsAsDependency(t),variantLabelsAsDependency(i)])}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(" "):e}const scaleCorrectors={};function addScaleCorrector(e){for(const t in e)scaleCorrectors[t]=e[t],isCSSVariableName(t)&&(scaleCorrectors[t].isCSSVariable=!0)}function isForcedMotionValue(e,{layout:t,layoutId:i}){return transformProps.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!scaleCorrectors[e]||e==="opacity")}const translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(e,t,i){let s="",o=!0;for(let a=0;a<numTransforms;a++){const l=transformPropOrder[a],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||i){const f=getValueAsType(c,numberValueTypes[l]);if(!u){o=!1;const d=translateAlias[l]||l;s+=`${d}(${f}) `}i&&(t[l]=f)}}return s=s.trim(),i?s=i(t,o?"":s):o&&(s="none"),s}function buildHTMLStyles(e,t,i){const{style:s,vars:o,transformOrigin:a}=e;let l=!1,c=!1;for(const u in t){const f=t[u];if(transformProps.has(u)){l=!0;continue}else if(isCSSVariableName(u)){o[u]=f;continue}else{const d=getValueAsType(f,numberValueTypes[u]);u.startsWith("origin")?(c=!0,a[u]=d):s[u]=d}}if(t.transform||(l||i?s.transform=buildTransform(t,e.transform,i):s.transform&&(s.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:d=0}=a;s.transformOrigin=`${u} ${f} ${d}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(e,t,i){for(const s in t)!isMotionValue(t[s])&&!isForcedMotionValue(s,i)&&(e[s]=t[s])}function useInitialMotionValues({transformTemplate:e},t){return React.useMemo(()=>{const i=createHtmlRenderState();return buildHTMLStyles(i,t,e),Object.assign({},i.vars,i.style)},[t])}function useStyle(e,t){const i=e.style||{},s={};return copyRawValuesOnly(s,i,e),Object.assign(s,useInitialMotionValues(e,t)),s}function useHTMLProps(e,t){const i={},s=useStyle(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=s,i}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(e,t,i=1,s=0,o=!0){e.pathLength=1;const a=o?dashKeys:camelKeys;e[a.offset]=px.transform(-s);const l=px.transform(t),c=px.transform(i);e[a.array]=`${l} ${c}`}function buildSVGAttrs(e,{attrX:t,attrY:i,attrScale:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,f,d){if(buildHTMLStyles(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),i!==void 0&&(h.y=i),s!==void 0&&(h.scale=s),o!==void 0&&buildSVGPath(h,o,a,l,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=e=>typeof e=="string"&&e.toLowerCase()==="svg";function useSVGProps(e,t,i,s){const o=React.useMemo(()=>{const a=createSvgRenderState();return buildSVGAttrs(a,t,isSVGTag(s),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};copyRawValuesOnly(a,e.style,e),o.style={...a,...o.style}}return o}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(e){return typeof e!="string"||e.includes("-")?!1:!!(lowercaseSVGElements.indexOf(e)>-1||/[A-Z]/u.test(e))}function useRender(e,t,i,{latestValues:s},o,a=!1){const c=(isSVGComponent(e)?useSVGProps:useHTMLProps)(t,s,o,e),u=filterProps(t,typeof e=="string",a),f=e!==React.Fragment?{...u,...c,ref:i}:{},{children:d}=t,h=React.useMemo(()=>isMotionValue(d)?d.get():d,[d]);return React.createElement(e,{...f,children:h})}function getValueState(e){const t=[{},{}];return e==null||e.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function resolveVariantFromProps(e,t,i,s){if(typeof t=="function"){const[o,a]=getValueState(s);t=t(i!==void 0?i:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,a]=getValueState(s);t=t(i!==void 0?i:e.custom,o,a)}return t}function resolveMotionValue(e){return isMotionValue(e)?e.get():e}function makeState({scrapeMotionValuesFromProps:e,createRenderState:t},i,s,o){return{latestValues:makeLatestValues(i,s,o,e),renderState:t()}}function makeLatestValues(e,t,i,s){const o={},a=s(e,{});for(const p in a)o[p]=resolveMotionValue(a[p]);let{initial:l,animate:c}=e;const u=isControllingVariants(e),f=isVariantNode(e);t&&f&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let d=i?i.initial===!1:!1;d=d||l===!1;const h=d?c:l;if(h&&typeof h!="boolean"&&!isAnimationControls(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=resolveVariantFromProps(e,p[m]);if(g){const{transitionEnd:v,transition:b,...y}=g;for(const E in y){let S=y[E];if(Array.isArray(S)){const w=d?S.length-1:0;S=S[w]}S!==null&&(o[E]=S)}for(const E in v)o[E]=v[E]}}}return o}const makeUseVisualState=e=>(t,i)=>{const s=React.useContext(MotionContext),o=React.useContext(PresenceContext),a=()=>makeState(e,t,s,o);return i?a():useConstant(a)};function scrapeMotionValuesFromProps$1(e,t,i){var a;const{style:s}=e,o={};for(const l in s)(isMotionValue(s[l])||t.style&&isMotionValue(t.style[l])||isForcedMotionValue(l,e)||((a=i==null?void 0:i.getValue(l))==null?void 0:a.liveStyle)!==void 0)&&(o[l]=s[l]);return o}const useHTMLVisualState=makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState});function scrapeMotionValuesFromProps(e,t,i){const s=scrapeMotionValuesFromProps$1(e,t,i);for(const o in e)if(isMotionValue(e[o])||isMotionValue(t[o])){const a=transformPropOrder.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[a]=e[o]}return s}const useSVGVisualState=makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function useMotionRef(e,t,i){return React.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),i&&(typeof i=="function"?i(s):isRefObject(i)&&(i.current=s))},[t])}const camelToDash=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),SwitchLayoutGroupContext=React.createContext({});function useVisualElement(e,t,i,s,o){var v,b;const{visualElement:a}=React.useContext(MotionContext),l=React.useContext(LazyContext),c=React.useContext(PresenceContext),u=React.useContext(MotionConfigContext).reducedMotion,f=React.useRef(null);s=s||l.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:a,props:i,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const d=f.current,h=React.useContext(SwitchLayoutGroupContext);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&createProjectionNode$1(f.current,i,o,h);const p=React.useRef(!1);React.useInsertionEffect(()=>{d&&p.current&&d.update(i,c)});const m=i[optimizedAppearDataAttribute],g=React.useRef(!!m&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return useIsomorphicLayoutEffect(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),React.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,m)}),g.current=!1),d.enteringChildren=void 0)}),d}function createProjectionNode$1(e,t,i,s){const{layoutId:o,layout:a,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:f,layoutCrossfade:d}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:getClosestProjectingNode(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!l||c&&isRefObject(c),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:u,layoutRoot:f})}function getClosestProjectingNode(e){if(e)return e.options.allowProjection!==!1?e.projection:getClosestProjectingNode(e.parent)}function createMotionComponent(e,{forwardMotionProps:t=!1}={},i,s){i&&loadFeatures(i);const o=isSVGComponent(e)?useSVGVisualState:useHTMLVisualState;function a(c,u){let f;const d={...React.useContext(MotionConfigContext),...c,layoutId:useLayoutId(c)},{isStatic:h}=d,p=useCreateMotionContext(c),m=o(c,h);if(!h&&isBrowser){useStrictMode();const g=getProjectionFunctionality(d);f=g.MeasureLayout,p.visualElement=useVisualElement(e,m,d,s,g.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:p,children:[f&&p.visualElement?jsxRuntimeExports.jsx(f,{visualElement:p.visualElement,...d}):null,useRender(e,c,useMotionRef(m,p.visualElement,u),m,h,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=React.forwardRef(a);return l[motionComponentSymbol]=e,l}function useLayoutId({layoutId:e}){const t=React.useContext(LayoutGroupContext).id;return t&&e!==void 0?t+"-"+e:e}function useStrictMode(e,t){React.useContext(LazyContext).strict}function getProjectionFunctionality(e){const{drag:t,layout:i}=featureDefinitions;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t!=null&&t.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function createMotionProxy(e,t){if(typeof Proxy>"u")return createMotionComponent;const i=new Map,s=(a,l)=>createMotionComponent(a,l,e,t),o=(a,l)=>s(a,l);return new Proxy(o,{get:(a,l)=>l==="create"?s:(i.has(l)||i.set(l,createMotionComponent(l,void 0,e,t)),i.get(l))})}function convertBoundingBoxToBox({top:e,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:e,max:s}}}function convertBoxToBoundingBox({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function transformBoxPoints(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function isIdentityScale(e){return e===void 0||e===1}function hasScale({scale:e,scaleX:t,scaleY:i}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(i)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){return is2DTranslate(e.x)||is2DTranslate(e.y)}function is2DTranslate(e){return e&&e!=="0%"}function scalePoint(e,t,i){const s=e-i,o=t*s;return i+o}function applyPointDelta(e,t,i,s,o){return o!==void 0&&(e=scalePoint(e,o,s)),scalePoint(e,i,s)+t}function applyAxisDelta(e,t=0,i=1,s,o){e.min=applyPointDelta(e.min,t,i,s,o),e.max=applyPointDelta(e.max,t,i,s,o)}function applyBoxDelta(e,{x:t,y:i}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,i.translate,i.scale,i.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(e,t,i,s=!1){const o=i.length;if(!o)return;t.x=t.y=1;let a,l;for(let c=0;c<o;c++){a=i[c],l=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,applyBoxDelta(e,l)),s&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues))}t.x<TREE_SCALE_SNAP_MAX&&t.x>TREE_SCALE_SNAP_MIN&&(t.x=1),t.y<TREE_SCALE_SNAP_MAX&&t.y>TREE_SCALE_SNAP_MIN&&(t.y=1)}function translateAxis(e,t){e.min=e.min+t,e.max=e.max+t}function transformAxis(e,t,i,s,o=.5){const a=mixNumber$1(e.min,e.max,o);applyAxisDelta(e,t,i,a,s)}function transformBox(e,t){transformAxis(e.x,t.x,t.scaleX,t.scale,t.originX),transformAxis(e.y,t.y,t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(transformBoxPoints(e.getBoundingClientRect(),t))}function measurePageBox(e,t,i){const s=measureViewportBox(e,i),{scroll:o}=t;return o&&(translateAxis(s.x,o.offset.x),translateAxis(s.y,o.offset.y)),s}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()}),prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>prefersReducedMotion.current=e.matches;e.addEventListener("change",t),t()}else prefersReducedMotion.current=!1}const visualElementStore=new WeakMap;function updateMotionValuesFromProps(e,t,i){for(const s in t){const o=t[s],a=i[s];if(isMotionValue(o))e.addValue(s,o);else if(isMotionValue(a))e.addValue(s,motionValue(o,{owner:e}));else if(a!==o)if(e.hasValue(s)){const l=e.getValue(s);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(s);e.addValue(s,motionValue(l!==void 0?l:o,{owner:e}))}}for(const s in i)t[s]===void 0&&e.removeValue(s);return t}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:a,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=time.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,frame.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=i.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(i),this.isVariantNode=isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(i,{},this);for(const p in h){const m=h[p];u[p]!==void 0&&isMotionValue(m)&&m.set(u[p])}}mount(t){var i;this.current=t,visualElementStore.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const s=this.features[i];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=transformProps.has(t);s&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&frame.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{o(),a&&a(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in featureDefinitions){const i=featureDefinitions[t];if(!i)continue;const{isEnabled:s,Feature:o}=i;if(!this.features[t]&&o&&s(this.props)&&(this.features[t]=new o(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<propEventHandlers.length;s++){const o=propEventHandlers[s];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const a="on"+o,l=t[a];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=motionValue(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(isNumericalString(s)||isZeroValueString(s))?s=parseFloat(s):!findValueType(s)&&complex.test(i)&&(s=getAnimatableNone(t,i)),this.setBaseTarget(t,isMotionValue(s)?s.get():s)),isMotionValue(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){var a;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const l=resolveVariantFromProps(this.props,i,(a=this.presenceContext)==null?void 0:a.custom);l&&(s=l[t])}if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!isMotionValue(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new SubscriptionManager),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){microtask.render(this.render)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function renderHTML(e,{style:t,vars:i},s,o){const a=e.style;let l;for(l in t)a[l]=t[l];o==null||o.applyProjectionStyles(a,s);for(l in i)a.setProperty(l,i[l])}function getComputedStyle$1(e){return window.getComputedStyle(e)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(t,i){var s;if(transformProps.has(i))return(s=this.projection)!=null&&s.isProjecting?defaultTransformValue(i):readTransformValue(t,i);{const o=getComputedStyle$1(t),a=(isCSSVariableName(i)?o.getPropertyValue(i):o[i])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:i}){return measureViewportBox(t,i)}build(t,i,s){buildHTMLStyles(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return scrapeMotionValuesFromProps$1(t,i,s)}}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(e,t,i,s){renderHTML(e,t,void 0,s);for(const o in t.attrs)e.setAttribute(camelCaseAttributes.has(o)?o:camelToDash(o),t.attrs[o])}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(transformProps.has(i)){const s=getDefaultValueType(i);return s&&s.default||0}return i=camelCaseAttributes.has(i)?i:camelToDash(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return scrapeMotionValuesFromProps(t,i,s)}build(t,i,s){buildSVGAttrs(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,o){renderSVG(t,i,s,o)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}}const createDomVisualElement=(e,t)=>isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==React.Fragment});function resolveVariant(e,t,i){const s=e.getProps();return resolveVariantFromProps(s,t,i!==void 0?i:s.custom,e)}const isKeyframesTarget=e=>Array.isArray(e);function setMotionValue(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,motionValue(i))}function resolveFinalValueInKeyframes(e){return isKeyframesTarget(e)?e[e.length-1]||0:e}function setTarget(e,t){const i=resolveVariant(e,t);let{transitionEnd:s={},transition:o={},...a}=i||{};a={...a,...s};for(const l in a){const c=resolveFinalValueInKeyframes(a[l]);setMotionValue(e,l,c)}}function isWillChangeMotionValue(e){return!!(isMotionValue(e)&&e.add)}function addValueToWillChange(e,t){const i=e.getValue("willChange");if(isWillChangeMotionValue(i))return i.add(t);if(!i&&MotionGlobalConfig.WillChange){const s=new MotionGlobalConfig.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function getOptimisedAppearId(e){return e.props[optimizedAppearDataAttribute]}const isNotNull=e=>e!==null;function getFinalKeyframe(e,{repeat:t,repeatType:i="loop"},s){const o=e.filter(isNotNull),a=t&&i!=="loop"&&t%2===1?0:o.length-1;return o[a]}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?keyframesTransition:transformProps.has(e)?e.startsWith("scale")?criticallyDampedSpring(t[1]):underDampedSpring:ease;function isTransitionDefined({when:e,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:o,repeat:a,repeatType:l,repeatDelay:c,from:u,elapsed:f,...d}){return!!Object.keys(d).length}const animateMotionValue=(e,t,i,s={},o,a)=>l=>{const c=getValueTransition$1(s,e)||{},u=c.delay||s.delay||0;let{elapsed:f=0}=s;f=f-secondsToMilliseconds(u);const d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:p=>{t.set(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:a?void 0:o};isTransitionDefined(c)||Object.assign(d,getDefaultTransition(e,d)),d.duration&&(d.duration=secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=secondsToMilliseconds(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(makeAnimationInstant(d),d.delay===0&&(h=!0)),(MotionGlobalConfig.instantAnimations||MotionGlobalConfig.skipAnimations)&&(h=!0,makeAnimationInstant(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,h&&!a&&t.get()!==void 0){const p=getFinalKeyframe(d.keyframes,c);if(p!==void 0){frame.update(()=>{d.onUpdate(p),d.onComplete()});return}}return c.isSync?new JSAnimation(d):new AsyncMotionValueAnimation(d)};function shouldBlockAnimation({protectedKeys:e,needsAnimating:t},i){const s=e.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function animateTarget(e,t,{delay:i=0,transitionOverride:s,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(a=s);const u=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const d in c){const h=e.getValue(d,e.latestValues[d]??null),p=c[d];if(p===void 0||f&&shouldBlockAnimation(f,d))continue;const m={delay:i,...getValueTransition$1(a||{},d)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=getOptimisedAppearId(e);if(y){const E=window.MotionHandoffAnimation(y,d,frame);E!==null&&(m.startTime=E,v=!0)}}addValueToWillChange(e,d),h.start(animateMotionValue(d,h,p,e.shouldReduceMotion&&positionalKeys.has(d)?{type:!1}:m,e,v));const b=h.animation;b&&u.push(b)}return l&&Promise.all(u).then(()=>{frame.update(()=>{l&&setTarget(e,l)})}),u}function calcChildStagger(e,t,i,s=0,o=1){const a=Array.from(e).sort((f,d)=>f.sortNodePosition(d)).indexOf(t),l=e.size,c=(l-1)*s;return typeof i=="function"?i(a,l):o===1?a*s:c-a*s}function animateVariant(e,t,i={}){var u;const s=resolveVariant(e,t,i.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(o=i.transitionOverride);const a=s?()=>Promise.all(animateTarget(e,s,i)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return animateChildren(e,t,f,d,h,p,i)}:()=>Promise.resolve(),{when:c}=o;if(c){const[f,d]=c==="beforeChildren"?[a,l]:[l,a];return f().then(()=>d())}else return Promise.all([a(),l(i.delay)])}function animateChildren(e,t,i=0,s=0,o=0,a=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(animateVariant(u,t,{...l,delay:i+(typeof s=="function"?0:s)+calcChildStagger(e.variantChildren,u,s,o,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function animateVisualElement(e,t,i={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const o=t.map(a=>animateVariant(e,a,i));s=Promise.all(o)}else if(typeof t=="string")s=animateVariant(e,t,i);else{const o=typeof t=="function"?resolveVariant(e,t,i.custom):t;s=Promise.all(animateTarget(e,o,i))}return s.then(()=>{e.notify("AnimationComplete",t)})}function shallowCompare(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let s=0;s<i;s++)if(t[s]!==e[s])return!1;return!0}const numVariantProps=variantProps.length;function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){const i=e.parent?getVariantContext(e.parent)||{}:{};return e.props.initial!==void 0&&(i.initial=e.props.initial),i}const t={};for(let i=0;i<numVariantProps;i++){const s=variantProps[i],o=e.props[s];(isVariantLabel(o)||o===!1)&&(t[s]=o)}return t}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(e){return t=>Promise.all(t.map(({animation:i,options:s})=>animateVisualElement(e,i,s)))}function createAnimationState(e){let t=animateList(e),i=createState(),s=!0;const o=u=>(f,d)=>{var p;const h=resolveVariant(e,d,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:g,...v}=h;f={...f,...v,...g}}return f};function a(u){t=u(e)}function l(u){const{props:f}=e,d=getVariantContext(e.parent)||{},h=[],p=new Set;let m={},g=1/0;for(let b=0;b<numAnimationTypes;b++){const y=reversePriorityOrder[b],E=i[y],S=f[y]!==void 0?f[y]:d[y],w=isVariantLabel(S),C=y===u?E.isActive:null;C===!1&&(g=b);let A=S===d[y]&&S!==f[y]&&w;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),E.protectedKeys={...m},!E.isActive&&C===null||!S&&!E.prevProp||isAnimationControls(S)||typeof S=="boolean")continue;const O=checkVariantsDidChange(E.prevProp,S);let I=O||y===u&&E.isActive&&!A&&w||b>g&&w,L=!1;const $=Array.isArray(S)?S:[S];let V=$.reduce(o(y),{});C===!1&&(V={});const{prevResolvedValues:W={}}=E,K={...W,...V},j=k=>{I=!0,p.has(k)&&(L=!0,p.delete(k)),E.needsAnimating[k]=!0;const T=e.getValue(k);T&&(T.liveStyle=!1)};for(const k in K){const T=V[k],P=W[k];if(m.hasOwnProperty(k))continue;let F=!1;isKeyframesTarget(T)&&isKeyframesTarget(P)?F=!shallowCompare(T,P):F=T!==P,F?T!=null?j(k):p.add(k):T!==void 0&&p.has(k)?j(k):E.protectedKeys[k]=!0}E.prevProp=S,E.prevResolvedValues=V,E.isActive&&(m={...m,...V}),s&&e.blockInitialAnimation&&(I=!1);const D=A&&O;I&&(!D||L)&&h.push(...$.map(k=>{const T={type:y};if(typeof k=="string"&&s&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,F=resolveVariant(P,k);if(P.enteringChildren&&F){const{delayChildren:N}=F.transition||{};T.delay=calcChildStagger(P.enteringChildren,e,N)}}return{animation:k,options:T}}))}if(p.size){const b={};if(typeof f.initial!="boolean"){const y=resolveVariant(e,Array.isArray(f.initial)?f.initial[0]:f.initial);y&&y.transition&&(b.transition=y.transition)}p.forEach(y=>{const E=e.getBaseTarget(y),S=e.getValue(y);S&&(S.liveStyle=!0),b[y]=E??null}),h.push({animation:b})}let v=!!h.length;return s&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!1,v?t(h):Promise.resolve()}function c(u,f){var h;if(i[u].isActive===f)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,f)}),i[u].isActive=f;const d=l(u);for(const p in i)i[p].protectedKeys={};return d}return{animateChanges:l,setActive:c,setAnimateFunction:a,getState:()=>i,reset:()=>{i=createState(),s=!0}}}function checkVariantsDidChange(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!shallowCompare(t,e):!1}function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(t){this.isMounted=!1,this.node=t}update(){}}class AnimationFeature extends Feature{constructor(t){super(t),t.animationState||(t.animationState=createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const o=this.node.animationState.setActive("exit",!t);i&&!t&&o.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(e,t,i,s={passive:!0}){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i)}function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}const addPointerInfo=e=>t=>isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addPointerEvent(e,t,i,s){return addDomEvent(e,t,addPointerInfo(i),s)}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(e){return e.max-e.min}function isNear(e,t,i){return Math.abs(e-t)<=i}function calcAxisDelta(e,t,i,s=.5){e.origin=s,e.originPoint=mixNumber$1(t.min,t.max,e.origin),e.scale=calcLength(i)/calcLength(t),e.translate=mixNumber$1(i.min,i.max,e.origin)-e.originPoint,(e.scale>=SCALE_MIN&&e.scale<=SCALE_MAX||isNaN(e.scale))&&(e.scale=1),(e.translate>=TRANSLATE_MIN&&e.translate<=TRANSLATE_MAX||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,i,s){calcAxisDelta(e.x,t.x,i.x,s?s.originX:void 0),calcAxisDelta(e.y,t.y,i.y,s?s.originY:void 0)}function calcRelativeAxis(e,t,i){e.min=i.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeBox(e,t,i){calcRelativeAxis(e.x,t.x,i.x),calcRelativeAxis(e.y,t.y,i.y)}function calcRelativeAxisPosition(e,t,i){e.min=t.min-i.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,i){calcRelativeAxisPosition(e.x,t.x,i.x),calcRelativeAxisPosition(e.y,t.y,i.y)}function eachAxis(e){return[e("x"),e("y")]}const getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,distance=(e,t)=>Math.abs(e-t);function distance2D(e,t){const i=distance(e.x,t.x),s=distance(e.y,t.y);return Math.sqrt(i**2+s**2)}class PanSession{constructor(t,i,{transformPagePoint:s,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=getPanInfo(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=distance2D(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=p,{timestamp:b}=frameData;this.history.push({...v,timestamp:b});const{onStart:y,onMove:E}=this.handlers;m||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=transformPoint(m,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=getPanInfo(p.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,y),v&&v(p,y)},!isPrimaryPointer(t))return;this.dragSnapToOrigin=a,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=l,this.contextWindow=o||window;const c=extractEventInfo(t),u=transformPoint(c,this.transformPagePoint),{point:f}=u,{timestamp:d}=frameData;this.history=[{...f,timestamp:d}];const{onSessionStart:h}=i;h&&h(t,getPanInfo(u,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,startDevicePoint(t)),velocity:getVelocity(t,.1)}}function startDevicePoint(e){return e[0]}function lastDevicePoint(e){return e[e.length-1]}function getVelocity(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,s=null;const o=lastDevicePoint(e);for(;i>=0&&(s=e[i],!(o.timestamp-s.timestamp>secondsToMilliseconds(t)));)i--;if(!s)return{x:0,y:0};const a=millisecondsToSeconds(o.timestamp-s.timestamp);if(a===0)return{x:0,y:0};const l={x:(o.x-s.x)/a,y:(o.y-s.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function applyConstraints(e,{min:t,max:i},s){return t!==void 0&&e<t?e=s?mixNumber$1(t,e,s.min):Math.max(e,t):i!==void 0&&e>i&&(e=s?mixNumber$1(i,e,s.max):Math.min(e,i)),e}function calcRelativeAxisConstraints(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function calcRelativeConstraints(e,{top:t,left:i,bottom:s,right:o}){return{x:calcRelativeAxisConstraints(e.x,i,o),y:calcRelativeAxisConstraints(e.y,t,s)}}function calcViewportAxisConstraints(e,t){let i=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,s]=[s,i]),{min:i,max:s}}function calcViewportConstraints(e,t){return{x:calcViewportAxisConstraints(e.x,t.x),y:calcViewportAxisConstraints(e.y,t.y)}}function calcOrigin(e,t){let i=.5;const s=calcLength(e),o=calcLength(t);return o>s?i=progress(t.min,t.max-s,e.min):s>o&&(i=progress(e.min,e.max-o,t.min)),clamp(0,1,i)}function rebaseAxisConstraints(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const defaultElastic=.35;function resolveDragElastic(e=defaultElastic){return e===!1?e=0:e===!0&&(e=defaultElastic),{x:resolveAxisElastic(e,"left","right"),y:resolveAxisElastic(e,"top","bottom")}}function resolveAxisElastic(e,t,i){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,i)}}function resolvePointElastic(e,t){return typeof e=="number"?e:e[t]||0}const elementDragControls=new WeakMap;class VisualElementDragControls{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const a=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(extractEventInfo(h).point)},l=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:v}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(y=>{let E=this.getAxisMotionValue(y).get()||0;if(percent.test(E)){const{projection:S}=this.visualElement;if(S&&S.layout){const w=S.layout.layoutBox[y];w&&(E=calcLength(w)*(parseFloat(E)/100))}}this.originPoint[y]=E}),v&&frame.postRender(()=>v(h,p)),addValueToWillChange(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:v,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(g&&this.currentDirection===null){this.currentDirection=getCurrentDirection(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),b&&b(h,p)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>eachAxis(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new PanSession(t,{onSessionStart:a,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:getContextWindow(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,o=i||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!s)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&frame.postRender(()=>c(s,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:o}=this.getProps();if(!s||!shouldDrag(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(l=applyConstraints(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,o=this.constraints;t&&isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=calcRelativeConstraints(s.layoutBox,t):this.constraints=!1,this.elastic=resolveDragElastic(i),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=rebaseAxisConstraints(s.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!isRefObject(t))return!1;const s=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=measurePageBox(s,o.root,this.visualElement.getTransformPagePoint());let l=calcViewportConstraints(o.layout.layoutBox,a);if(i){const c=i(convertBoxToBoundingBox(l));this.hasMutatedConstraints=!!c,c&&(l=convertBoundingBoxToBox(c))}return l}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:o,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},f=eachAxis(d=>{if(!shouldDrag(d,i,this.currentDirection))return;let h=u[d]||{};l&&(h={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(f).then(c)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return addValueToWillChange(this.visualElement,t),s.start(animateMotionValue(t,s,0,i,this.visualElement,!1))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eachAxis(t=>{var i;return(i=this.getAxisMotionValue(t).animation)==null?void 0:i.pause()})}getAnimationState(t){var i;return(i=this.getAxisMotionValue(t).animation)==null?void 0:i.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),o=s[i];return o||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(i=>{const{drag:s}=this.getProps();if(!shouldDrag(i,s,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(i);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[i];a.set(t[i]-mixNumber$1(l,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!isRefObject(i)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};eachAxis(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=calcOrigin({min:u,max:u},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),eachAxis(l=>{if(!shouldDrag(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:f}=this.constraints[l];c.set(mixNumber$1(u,f,o[l]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const t=this.visualElement.current,i=addPointerEvent(t,"pointerdown",u=>{const{drag:f,dragListener:d=!0}=this.getProps();f&&d&&this.start(u)}),s=()=>{const{dragConstraints:u}=this.getProps();isRefObject(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),frame.read(s);const l=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(eachAxis(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{l(),i(),a(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:l=defaultElastic,dragMomentum:c=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:o,dragConstraints:a,dragElastic:l,dragMomentum:c}}}function shouldDrag(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function getCurrentDirection(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}class DragGesture extends Feature{constructor(t){super(t),this.removeGroupControls=noop$2,this.removeListeners=noop$2,this.controls=new VisualElementDragControls(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$2}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=e=>(t,i)=>{e&&frame.postRender(()=>e(t,i))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$2}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(i),onMove:s,onEnd:(a,l)=>{delete this.session,o&&frame.postRender(()=>o(a,l))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const correctBorderRadius={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(px.test(e))e=parseFloat(e);else return e;const i=pixelsToPercent(e,t.target.x),s=pixelsToPercent(e,t.target.y);return`${i}% ${s}%`}},correctBoxShadow={correct:(e,{treeScale:t,projectionDelta:i})=>{const s=e,o=complex.parse(e);if(o.length>5)return s;const a=complex.createTransformer(e),l=typeof o[0]!="number"?1:0,c=i.x.scale*t.x,u=i.y.scale*t.y;o[0+l]/=c,o[1+l]/=u;const f=mixNumber$1(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=f),typeof o[3+l]=="number"&&(o[3+l]/=f),a(o)}};let hasTakenAnySnapshot=!1;class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:o}=this.props,{projection:a}=t;addScaleCorrector(defaultScaleCorrectors),a&&(i.group&&i.group.add(a),s&&s.register&&o&&s.register(a),hasTakenAnySnapshot&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:o,isPresent:a}=this.props,{projection:l}=s;return l&&(l.isPresent=a,hasTakenAnySnapshot=!0,o||t.layoutDependency!==i||i===void 0||t.isPresent!==a?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||frame.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),microtask.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:o}=t;hasTakenAnySnapshot=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function MeasureLayout(e){const[t,i]=usePresence(),s=React.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...e,layoutGroup:s,switchLayoutGroup:React.useContext(SwitchLayoutGroupContext),isPresent:t,safeToRemove:i})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(e,t,i){const s=isMotionValue(e)?e:motionValue(e);return s.start(animateMotionValue("",s,t,i)),s.animation}const compareByDepth=(e,t)=>e.depth-t.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){addUniqueItem(this.children,t),this.isDirty=!0}remove(t){removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}}function delay$1(e,t){const i=time.now(),s=({timestamp:o})=>{const a=o-i;a>=t&&(cancelFrame(s),e(a-t))};return frame.setup(s,!0),()=>cancelFrame(s)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=e=>typeof e=="string"?parseFloat(e):e,isPx=e=>typeof e=="number"||px.test(e);function mixValues(e,t,i,s,o,a){o?(e.opacity=mixNumber$1(0,i.opacity??1,easeCrossfadeIn(s)),e.opacityExit=mixNumber$1(t.opacity??1,0,easeCrossfadeOut(s))):a&&(e.opacity=mixNumber$1(t.opacity??1,i.opacity??1,s));for(let l=0;l<numBorders;l++){const c=`border${borders[l]}Radius`;let u=getRadius(t,c),f=getRadius(i,c);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||isPx(u)===isPx(f)?(e[c]=Math.max(mixNumber$1(asNumber(u),asNumber(f),s),0),(percent.test(f)||percent.test(u))&&(e[c]+="%")):e[c]=f}(t.rotate||i.rotate)&&(e.rotate=mixNumber$1(t.rotate||0,i.rotate||0,s))}function getRadius(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop$2);function compress(e,t,i){return s=>s<e?0:s>t?1:i(progress(e,t,s))}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function removePointDelta(e,t,i,s,o){return e-=t,e=scalePoint(e,1/i,s),o!==void 0&&(e=scalePoint(e,1/o,s)),e}function removeAxisDelta(e,t=0,i=1,s=.5,o,a=e,l=e){if(percent.test(t)&&(t=parseFloat(t),t=mixNumber$1(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=mixNumber$1(a.min,a.max,s);e===a&&(c-=t),e.min=removePointDelta(e.min,t,i,c,o),e.max=removePointDelta(e.max,t,i,c,o)}function removeAxisTransforms(e,t,[i,s,o],a,l){removeAxisDelta(e,t[i],t[s],t[o],t.scale,a,l)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(e,t,i,s){removeAxisTransforms(e.x,t,xKeys,i?i.x:void 0,s?s.x:void 0),removeAxisTransforms(e.y,t,yKeys,i?i.y:void 0,s?s.y:void 0)}function isAxisDeltaZero(e){return e.translate===0&&e.scale===1}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function boxEquals(e,t){return axisEquals(e.x,t.x)&&axisEquals(e.y,t.y)}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NodeStack{constructor(){this.members=[]}add(t){addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(o=>t===o);if(i===0)return!1;let s;for(let o=i;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(e,t,i){let s="";const o=e.x.translate/t.x,a=e.y.translate/t.y,l=(i==null?void 0:i.z)||0;if((o||a||l)&&(s=`translate3d(${o}px, ${a}px, ${l}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:f,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:g}=i;f&&(s=`perspective(${f}px) ${s}`),d&&(s+=`rotate(${d}deg) `),h&&(s+=`rotateX(${h}deg) `),p&&(s+=`rotateY(${p}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(s+=`scale(${c}, ${u})`),s||"none"}const transformAxes=["","X","Y","Z"],animationTarget=1e3;let id=0;function resetDistortingTransform(e,t,i,s){const{latestValues:o}=t;o[e]&&(i[e]=o[e],t.setStaticValue(e,0),s&&(s[e]=0))}function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",frame,!(o||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(s)}function createProjectionNode({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(l={},c=t==null?void 0:t()){this.id=id++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new SubscriptionManager),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=isSVGElement$1(l)&&!isSVGSVGElement(l),this.instance=l;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;frame.read(()=>{h=window.innerWidth}),e(l,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=delay$1(p,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=f.getProps(),y=!this.targetLayout||!boxEqualsRounded(this.targetLayout,m),E=!h&&p;if(this.options.layoutRoot||this.resumeFrom||E||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...getValueTransition$1(g,"layout"),onPlay:v,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,E)}else h||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(clearIsLayoutDirty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate)):this.nodes.forEach(clearIsLayoutDirty),this.clearAllSnapshots();const c=time.now();frameData.delta=clamp(0,1e3/60,c-frameData.timestamp),frameData.timestamp=c,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!calcLength(this.snapshot.measuredBox.x)&&!calcLength(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!isDeltaZero(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,d=f!==this.prevTransformTemplateValue;l&&this.instance&&(c||hasTransform(this.latestValues)||d)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),roundBox(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return createBox();const c=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:d}=this.root;d&&(translateAxis(c.x,d.offset.x),translateAxis(c.y,d.offset.y))}return c}removeElementScroll(l){var u;const c=createBox();if(copyBoxInto(c,l),(u=this.scroll)!=null&&u.wasRoot)return c;for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&copyBoxInto(c,l),translateAxis(c.x,h.offset.x),translateAxis(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=createBox();copyBoxInto(u,l);for(let f=0;f<this.path.length;f++){const d=this.path[f];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&transformBox(u,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),hasTransform(d.latestValues)&&transformBox(u,d.latestValues)}return hasTransform(this.latestValues)&&transformBox(u,this.latestValues),u}removeTransform(l){const c=createBox();copyBoxInto(c,l);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!hasTransform(f.latestValues))continue;hasScale(f.latestValues)&&f.updateSnapshot();const d=createBox(),h=f.measurePageBox();copyBoxInto(d,h),removeBoxTransforms(c,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,d)}return hasTransform(this.latestValues)&&removeBoxTransforms(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var p;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,m.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(u=!1),u)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=createBox());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(l,c=!1){const u=this.snapshot,f=u?u.latestValues:{},d={...this.latestValues},h=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const p=createBox(),m=u?u.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,b=this.getStack(),y=!b||b.members.length<=1,E=!!(v&&!y&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let S;this.mixTargetDelta=w=>{const C=w/1e3;mixAxisDelta(h.x,l.x,C),mixAxisDelta(h.y,l.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,p,C),S&&boxEquals(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=createBox()),copyBoxInto(S,this.relativeTarget)),v&&(this.animationValues=d,mixValues(d,f,this.latestValues,C,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,u,f;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(f=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||f.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=motionValue(0)),this.currentAnimation=animateSingleValue(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),l.onUpdate&&l.onUpdate(d)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:f,latestValues:d}=l;if(!(!c||!u||!f)){if(this!==l&&this.layout&&f&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||createBox();const h=calcLength(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+h;const p=calcLength(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+p}copyBoxInto(c,u),transformBox(c,d),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new NodeStack),this.sharedNodes.get(l).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const f={};u.z&&resetDistortingTransform("z",l,f,this.animationValues);for(let d=0;d<transformAxes.length;d++)resetDistortingTransform(`rotate${transformAxes[d]}`,l,f,this.animationValues),resetDistortingTransform(`skew${transformAxes[d]}`,l,f,this.animationValues);l.render();for(const d in f)l.setStaticValue(d,f[d]),this.animationValues&&(this.animationValues[d]=f[d]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=resolveMotionValue(c==null?void 0:c.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=resolveMotionValue(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const d=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),l.transform=h;const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,f.animationValues?l.opacity=f===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in scaleCorrectors){if(d[g]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=scaleCorrectors[g],E=h==="none"?d[g]:v(d[g],f);if(b){const S=b.length;for(let w=0;w<S;w++)l[b[w]]=E}else y?this.options.visualElement.renderState.vars[g]=E:l[g]=E}this.options.layoutId&&(l.pointerEvents=f===this?resolveMotionValue(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){var i;const t=((i=e.resumeFrom)==null?void 0:i.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:a}=e.options,l=t.source!==e.layout.source;a==="size"?eachAxis(h=>{const p=l?t.measuredBox[h]:t.layoutBox[h],m=calcLength(p);p.min=s[h].min,p.max=p.min+m}):shouldAnimatePositionOnly(a,t.layoutBox,s)&&eachAxis(h=>{const p=l?t.measuredBox[h]:t.layoutBox[h],m=calcLength(s[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const c=createDelta();calcBoxDelta(c,s,t.layoutBox);const u=createDelta();l?calcBoxDelta(u,e.applyTransform(o,!0),t.measuredBox):calcBoxDelta(u,s,t.layoutBox);const f=!isDeltaZero(c);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const g=createBox();calcRelativePosition(g,t.layoutBox,p.layoutBox);const v=createBox();calcRelativePosition(v,s,m.layoutBox),boxEqualsRounded(g,v)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:u,layoutDelta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function propagateDirtyNodes(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,i){e.translate=mixNumber$1(t.translate,0,i),e.scale=mixNumber$1(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,i,s){e.min=mixNumber$1(t.min,i.min,s),e.max=mixNumber$1(t.max,i.max,s)}function mixBox(e,t,i,s){mixAxis(e.x,t.x,i.x,s),mixAxis(e.y,t.y,i.y,s)}function hasOpacityCrossfade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$2;function roundAxis(e){e.min=roundPoint(e.min),e.max=roundPoint(e.max)}function roundBox(e){roundAxis(e.x),roundAxis(e.y)}function shouldAnimatePositionOnly(e,t,i){return e==="position"||e==="preserve-aspect"&&!isNear(aspectRatio(t),aspectRatio(i),.2)}function checkNodeWasScrollRoot(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(e,t)=>addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const e=new DocumentProjectionNode({});e.mount(window),e.setOptions({layoutScroll:!0}),rootProjectionNode.current=e}return rootProjectionNode.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(e,t,i){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,a=s[o];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class HoverGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=hover(t,(i,s)=>(handleHoverEvent(this.node,s,"Start"),o=>handleHoverEvent(this.node,o,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(e,t,i){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),a=s[o];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class PressGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=press(t,(i,s)=>(handlePressEvent(this.node,s,"Start"),(o,{success:a})=>handlePressEvent(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=e=>{const t=observerCallbacks.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)};function initIntersectionObserver({root:e,...t}){const i=e||document;observers.has(i)||observers.set(i,{});const s=observers.get(i),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),s[o]}function observeIntersection(e,t,i){const s=initIntersectionObserver(t);return observerCallbacks.set(e,i),s.observe(e),()=>{observerCallbacks.delete(e),s.unobserve(e)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:o="some",once:a}=t,l={root:i?i.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:thresholdNames[o]},c=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=f?d:h;p&&p(u)};return observeIntersection(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(t,i))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},featureBundle={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy(featureBundle,createDomVisualElement);function useUnmountEffect(e){return React.useEffect(()=>()=>e(),[])}function useMotionValue(e){const t=useConstant(()=>motionValue(e)),{isStatic:i}=React.useContext(MotionConfigContext);if(i){const[,s]=React.useState(e);React.useEffect(()=>t.on("change",s),[])}return t}function isDOMKeyframes(e){return typeof e=="object"&&!Array.isArray(e)}function resolveSubjects(e,t,i,s){return typeof e=="string"&&isDOMKeyframes(t)?resolveElements(e,i,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function calculateRepeatDuration(e,t,i){return e*(t+1)}function calcNextTime(e,t,i,s){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?i:t.startsWith("<")?Math.max(0,i+parseFloat(t.slice(1))):s.get(t)??e}function eraseKeyframes(e,t,i){for(let s=0;s<e.length;s++){const o=e[s];o.at>t&&o.at<i&&(removeItem(e,o),s--)}}function addKeyframes(e,t,i,s,o,a){eraseKeyframes(e,o,a);for(let l=0;l<t.length;l++)e.push({value:t[l],at:mixNumber$1(o,a,s[l]),easing:getEasingForSegment(i,l)})}function normalizeTimes(e,t){for(let i=0;i<e.length;i++)e[i]=e[i]/(t+1)}function compareByTime(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const defaultSegmentEasing="easeInOut";function createAnimationsFromSequence(e,{defaultTransition:t={},...i}={},s,o){const a=t.duration||.3,l=new Map,c=new Map,u={},f=new Map;let d=0,h=0,p=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){f.set(g,h);continue}else if(!Array.isArray(g)){f.set(g.name,calcNextTime(h,g.at,d,f));continue}let[v,b,y={}]=g;y.at!==void 0&&(h=calcNextTime(h,y.at,d,f));let E=0;const S=(w,C,A,O=0,I=0)=>{const L=keyframesAsList(w),{delay:$=0,times:V=defaultOffset(L),type:W="keyframes",repeat:K,repeatType:j,repeatDelay:D=0,...M}=C;let{ease:k=t.ease||"easeOut",duration:T}=C;const P=typeof $=="function"?$(O,I):$,F=L.length,N=isGenerator(W)?W:o==null?void 0:o[W||"keyframes"];if(F<=2&&N){let Q=100;if(F===2&&isNumberKeyframesArray(L)){const z=L[1]-L[0];Q=Math.abs(z)}const re={...M};T!==void 0&&(re.duration=secondsToMilliseconds(T));const ee=createGeneratorEasing(re,Q,N);k=ee.ease,T=ee.duration}T??(T=a);const H=h+P;V.length===1&&V[0]===0&&(V[1]=1);const q=V.length-L.length;if(q>0&&fillOffset(V,q),L.length===1&&L.unshift(null),K){T=calculateRepeatDuration(T,K);const Q=[...L],re=[...V];k=Array.isArray(k)?[...k]:[k];const ee=[...k];for(let z=0;z<K;z++){L.push(...Q);for(let J=0;J<Q.length;J++)V.push(re[J]+(z+1)),k.push(J===0?"linear":getEasingForSegment(ee,J-1))}normalizeTimes(V,K)}const Y=H+T;addKeyframes(A,L,k,V,H,Y),E=Math.max(P+T,E),p=Math.max(Y,p)};if(isMotionValue(v)){const w=getSubjectSequence(v,c);S(b,y,getValueSequence("default",w))}else{const w=resolveSubjects(v,b,s,u),C=w.length;for(let A=0;A<C;A++){b=b,y=y;const O=w[A],I=getSubjectSequence(O,c);for(const L in b)S(b[L],getValueTransition(y,L),getValueSequence(L,I),A,C)}}d=h,h+=E}return c.forEach((m,g)=>{for(const v in m){const b=m[v];b.sort(compareByTime);const y=[],E=[],S=[];for(let C=0;C<b.length;C++){const{at:A,value:O,easing:I}=b[C];y.push(O),E.push(progress(0,p,A)),S.push(I||"easeOut")}E[0]!==0&&(E.unshift(0),y.unshift(y[0]),S.unshift(defaultSegmentEasing)),E[E.length-1]!==1&&(E.push(1),y.push(null)),l.has(g)||l.set(g,{keyframes:{},transition:{}});const w=l.get(g);w.keyframes[v]=y,w.transition[v]={...t,duration:p,ease:S,times:E,...i}}}),l}function getSubjectSequence(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function getValueSequence(e,t){return t[e]||(t[e]=[]),t[e]}function keyframesAsList(e){return Array.isArray(e)?e:[e]}function getValueTransition(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const isNumber$2=e=>typeof e=="number",isNumberKeyframesArray=e=>e.every(isNumber$2);function isObjectKey(e,t){return e in t}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,i){if(isObjectKey(i,t)){const s=t[i];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,i){delete i.output[t]}measureInstanceViewportBox(){return createBox()}build(t,i){Object.assign(t.output,i)}renderInstance(t,{output:i}){Object.assign(t,i)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=isSVGElement$1(e)&&!isSVGSVGElement(e)?new SVGVisualElement(t):new HTMLVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function createObjectVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},i=new ObjectVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function isSingleValue(e,t){return isMotionValue(e)||typeof e=="number"||typeof e=="string"&&!isDOMKeyframes(t)}function animateSubject(e,t,i,s){const o=[];if(isSingleValue(e,t))o.push(animateSingleValue(e,isDOMKeyframes(t)&&t.default||t,i&&(i.default||i)));else{const a=resolveSubjects(e,t,s),l=a.length;for(let c=0;c<l;c++){const u=a[c],f=u instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(u)||f(u);const d=visualElementStore.get(u),h={...i};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(c,l)),o.push(...animateTarget(d,{...t,transition:h},{}))}}return o}function animateSequence(e,t,i){const s=[];return createAnimationsFromSequence(e,t,i,{spring}).forEach(({keyframes:a,transition:l},c)=>{s.push(...animateSubject(c,a,l))}),s}function isSequence(e){return Array.isArray(e)&&e.some(Array.isArray)}function createScopedAnimate(e){function t(i,s,o){let a=[],l;if(isSequence(i))a=animateSequence(i,s,e);else{const{onComplete:u,...f}=o||{};typeof u=="function"&&(l=u),a=animateSubject(i,s,f,e)}const c=new GroupAnimationWithThen(a);return l&&c.finished.then(l),e&&(e.animations.push(c),c.finished.then(()=>{removeItem(e.animations,c)})),c}return t}function useAnimate(){const e=useConstant(()=>({current:null,animations:[]})),t=useConstant(()=>createScopedAnimate(e));return useUnmountEffect(()=>{e.animations.forEach(i=>i.stop()),e.animations.length=0}),[e,t]}var define_process_env_default$5={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ASSETS_BASE_URL=define_process_env_default$5.ASSETS_BASE_URL;function assetUrl(e){return`${ASSETS_BASE_URL}/${e}`}const image$1=assetUrl("icon_diamond.webp"),IconBalanceGems=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:image$1,style:{aspectRatio:"1/1",...e},...t,alt:""});function r(e){var t,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=r(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function clsx(){for(var e,t,i=0,s="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=r(e))&&(s&&(s+=" "),s+=t);return s}const CLASS_PART_SEPARATOR="-",createClassGroupUtils=e=>{const t=createClassMap(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:l=>{const c=l.split(CLASS_PART_SEPARATOR);return c[0]===""&&c.length!==1&&c.shift(),getGroupRecursive(c,t)||getGroupIdForArbitraryProperty(l)},getConflictingClassGroupIds:(l,c)=>{const u=i[l]||[];return c&&s[l]?[...u,...s[l]]:u}}},getGroupRecursive=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const i=e[0],s=t.nextPart.get(i),o=s?getGroupRecursive(e.slice(1),s):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(CLASS_PART_SEPARATOR);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const t=arbitraryPropertyRegex.exec(e)[1],i=t==null?void 0:t.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},createClassMap=e=>{const{theme:t,classGroups:i}=e,s={nextPart:new Map,validators:[]};for(const o in i)processClassesRecursively(i[o],s,o,t);return s},processClassesRecursively=(e,t,i,s)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:getPart(t,o);a.classGroupId=i;return}if(typeof o=="function"){if(isThemeGetter(o)){processClassesRecursively(o(s),t,i,s);return}t.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,l])=>{processClassesRecursively(l,getPart(t,a),i,s)})})},getPart=(e,t)=>{let i=e;return t.split(CLASS_PART_SEPARATOR).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},isThemeGetter=e=>e.isThemeGetter,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=new Map,s=new Map;const o=(a,l)=>{i.set(a,l),t++,t>e&&(t=0,s=i,i=new Map)};return{get(a){let l=i.get(a);if(l!==void 0)return l;if((l=s.get(a))!==void 0)return o(a,l),l},set(a,l){i.has(a)?i.set(a,l):o(a,l)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=e=>{const{prefix:t,experimentalParseClassName:i}=e;let s=o=>{const a=[];let l=0,c=0,u=0,f;for(let g=0;g<o.length;g++){let v=o[g];if(l===0&&c===0){if(v===MODIFIER_SEPARATOR){a.push(o.slice(u,g)),u=g+MODIFIER_SEPARATOR_LENGTH;continue}if(v==="/"){f=g;continue}}v==="["?l++:v==="]"?l--:v==="("?c++:v===")"&&c--}const d=a.length===0?o:o.substring(u),h=stripImportantModifier(d),p=h!==d,m=f&&f>u?f-u:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+MODIFIER_SEPARATOR,a=s;s=l=>l.startsWith(o)?a(l.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(i){const o=s;s=a=>i({className:a,parseClassName:o})}return s},stripImportantModifier=e=>e.endsWith(IMPORTANT_MODIFIER)?e.substring(0,e.length-1):e.startsWith(IMPORTANT_MODIFIER)?e.substring(1):e,createSortModifiers=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(l=>{l[0]==="["||t[l]?(o.push(...a.sort(),l),a=[]):a.push(l)}),o.push(...a.sort()),o}},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),sortModifiers:createSortModifiers(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,t)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],c=e.trim().split(SPLIT_CLASSES_REGEX);let u="";for(let f=c.length-1;f>=0;f-=1){const d=c[f],{isExternal:h,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=i(d);if(h){u=d+(u.length>0?" "+u:u);continue}let b=!!v,y=s(b?g.substring(0,v):g);if(!y){if(!b){u=d+(u.length>0?" "+u:u);continue}if(y=s(g),!y){u=d+(u.length>0?" "+u:u);continue}b=!1}const E=a(p).join(":"),S=m?E+IMPORTANT_MODIFIER:E,w=S+y;if(l.includes(w))continue;l.push(w);const C=o(y,b);for(let A=0;A<C.length;++A){const O=C[A];l.push(S+O)}u=d+(u.length>0?" "+u:u)}return u};function twJoin(){let e=0,t,i,s="";for(;e<arguments.length;)(t=arguments[e++])&&(i=toValue(t))&&(s&&(s+=" "),s+=i);return s}const toValue=e=>{if(typeof e=="string")return e;let t,i="";for(let s=0;s<e.length;s++)e[s]&&(t=toValue(e[s]))&&(i&&(i+=" "),i+=t);return i};function createTailwindMerge(e,...t){let i,s,o,a=l;function l(u){const f=t.reduce((d,h)=>h(d),e());return i=createConfigUtils(f),s=i.cache.get,o=i.cache.set,a=c,c(u)}function c(u){const f=s(u);if(f)return f;const d=mergeClassList(u,i);return o(u,d),d}return function(){return a(twJoin.apply(null,arguments))}}const fromTheme=e=>{const t=i=>i[e]||[];return t.isThemeGetter=!0,t},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=e=>fractionRegex.test(e),isNumber$1=e=>!!e&&!Number.isNaN(Number(e)),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$1(e.slice(0,-1)),isTshirtSize=e=>tshirtUnitRegex.test(e),isAny=()=>!0,isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),isAnyNonArbitrary=e=>!isArbitraryValue(e)&&!isArbitraryVariable(e),isArbitrarySize=e=>getIsArbitraryValue(e,isLabelSize,isNever),isArbitraryValue=e=>arbitraryValueRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,isLabelLength,isLengthOnly),isArbitraryNumber=e=>getIsArbitraryValue(e,isLabelNumber,isNumber$1),isArbitraryPosition=e=>getIsArbitraryValue(e,isLabelPosition,isNever),isArbitraryImage=e=>getIsArbitraryValue(e,isLabelImage,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,isLabelShadow,isShadow),isArbitraryVariable=e=>arbitraryVariableRegex.test(e),isArbitraryVariableLength=e=>getIsArbitraryVariable(e,isLabelLength),isArbitraryVariableFamilyName=e=>getIsArbitraryVariable(e,isLabelFamilyName),isArbitraryVariablePosition=e=>getIsArbitraryVariable(e,isLabelPosition),isArbitraryVariableSize=e=>getIsArbitraryVariable(e,isLabelSize),isArbitraryVariableImage=e=>getIsArbitraryVariable(e,isLabelImage),isArbitraryVariableShadow=e=>getIsArbitraryVariable(e,isLabelShadow,!0),getIsArbitraryValue=(e,t,i)=>{const s=arbitraryValueRegex.exec(e);return s?s[1]?t(s[1]):i(s[2]):!1},getIsArbitraryVariable=(e,t,i=!1)=>{const s=arbitraryVariableRegex.exec(e);return s?s[1]?t(s[1]):i:!1},isLabelPosition=e=>e==="position"||e==="percentage",isLabelImage=e=>e==="image"||e==="url",isLabelSize=e=>e==="length"||e==="size"||e==="bg-size",isLabelLength=e=>e==="length",isLabelNumber=e=>e==="number",isLabelFamilyName=e=>e==="family-name",isLabelShadow=e=>e==="shadow",getDefaultConfig=()=>{const e=fromTheme("color"),t=fromTheme("font"),i=fromTheme("text"),s=fromTheme("font-weight"),o=fromTheme("tracking"),a=fromTheme("leading"),l=fromTheme("breakpoint"),c=fromTheme("container"),u=fromTheme("spacing"),f=fromTheme("radius"),d=fromTheme("shadow"),h=fromTheme("inset-shadow"),p=fromTheme("text-shadow"),m=fromTheme("drop-shadow"),g=fromTheme("blur"),v=fromTheme("perspective"),b=fromTheme("aspect"),y=fromTheme("ease"),E=fromTheme("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...w(),isArbitraryVariable,isArbitraryValue],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[isArbitraryVariable,isArbitraryValue,u],L=()=>[isFraction,"full","auto",...I()],$=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],V=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],W=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],K=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...I()],k=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],T=()=>[e,isArbitraryVariable,isArbitraryValue],P=()=>[...w(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],H=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],q=()=>["","none","full",f,isArbitraryVariable,isArbitraryValue],Y=()=>["",isNumber$1,isArbitraryVariableLength,isArbitraryLength],Q=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[isNumber$1,isPercent,isArbitraryVariablePosition,isArbitraryPosition],z=()=>["","none",g,isArbitraryVariable,isArbitraryValue],J=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],te=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],X=()=>[isNumber$1,isArbitraryVariable,isArbitraryValue],se=()=>[isFraction,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber$1],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,b]}],container:["container"],columns:[{columns:[isNumber$1,isArbitraryValue,isArbitraryVariable,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",c,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber$1,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[c,"screen",...k()]}],"min-w":[{"min-w":[c,"screen","none",...k()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",i,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber$1,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber$1,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[isNumber$1,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber$1,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",h,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[isNumber$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber$1]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[isNumber$1]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:z()}],brightness:[{brightness:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",m,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber$1,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",y,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",E,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[isNumber$1,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...e){return twMerge(clsx(e))}function Drawer({children:e,headerOptions:t,closeButtonStyles:i,className:s,variant:o="default",style:a,...l}){return jsxRuntimeExports.jsx(Modal,{header:jsxRuntimeExports.jsx(Modal.Header,{after:jsxRuntimeExports.jsx(Modal.Close,{children:jsxRuntimeExports.jsx(Icon28Close,{style:{color:"var(--tgui--secondary_color)",...i}})}),style:{zIndex:1,position:"absolute",top:0,left:0,right:0,backgroundColor:"transparent",borderRadius:"inherit",overflow:"hidden",...t==null?void 0:t.style},className:cn$1("before:hidden",t==null?void 0:t.className),...t}),className:cn$1("pb-0",s),style:o==="secondary"?{backgroundColor:"var(--tgui--secondary_bg_color)",...a}:a,...l,children:e})}const DrawerContent=React.forwardRef(({children:e,className:t,...i},s)=>jsxRuntimeExports.jsx("div",{ref:s,className:cn$1("flex flex-col text-center px-4 pt-7.5 gap-6 pb-[calc(var(--tg-safe-area-inset-bottom)+6px)]",t),...i,children:e})),useAnimateNumber=(e,t=!0,i=!1)=>{const[,s]=useAnimate(),[o,a]=React.useState(t?0:e),l=useMotionValue(t?0:e),c=React.useRef(e);return l.on("change",f=>{const h=Math.abs(f-c.current)<.001;a(h?i?c.current:Math.round(c.current):i?f:Math.round(f))}),React.useEffect(()=>{c.current=e;const f=s(l,e,{ease:"easeOut",duration:.1});return()=>f.stop()},[l,e,s]),[o,f=>{c.current=f;const d=s(l,f,{ease:"easeOut",duration:.1});return()=>d.stop()}]},XpProgress=({level:e,experience:t,xpNeeded:i,className:s,size:o=40,levelFontSize:a})=>{const[l]=useAnimateNumber(t),[c]=useAnimateNumber(e),u=4,f=Math.round(l/i*100)/100,d=o,h=d/2-u/2,p=2*Math.PI*h,m=formatCompactNumber(c),g=a||`${d*.6/(1+.4*(m.length-1))}px`;return jsxRuntimeExports.jsxs("div",{className:cn$1("relative flex justify-center items-center overflow-hidden",s),style:{width:o,height:o},children:[jsxRuntimeExports.jsx(Text,{className:"text-rounded",style:{fontSize:g,lineHeight:`${o||d}px`,fontWeight:800},children:m}),jsxRuntimeExports.jsxs(motion.svg,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:"absolute inset-0 text-inherit",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress background"}),jsxRuntimeExports.jsx(motion.circle,{cx:d/2,cy:d/2,r:h,opacity:.2,stroke:"currentColor",fill:"none",strokeWidth:u})]},"bg"),jsxRuntimeExports.jsxs(motion.svg,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:"absolute inset-0 -rotate-90",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress"}),jsxRuntimeExports.jsx(motion.circle,{cx:d/2,cy:d/2,r:h,fill:"none",stroke:"currentColor",strokeWidth:u,strokeLinecap:"round",initial:{strokeDasharray:p,strokeDashoffset:p},animate:{strokeDashoffset:(1-f)*p},transition:{strokeDashoffset:{ease:"easeOut",duration:2}}})]},"fg")]})},dividePriceResponse=e=>e/100,DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GLOBAL_OBJ=globalThis,SDK_VERSION="10.18.0";function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||SDK_VERSION,t[SDK_VERSION]=t[SDK_VERSION]||{}}function getGlobalSingleton(e,t,i=GLOBAL_OBJ){const s=i.__SENTRY__=i.__SENTRY__||{},o=s[SDK_VERSION]=s[SDK_VERSION]||{};return o[e]||(o[e]=t())}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],PREFIX="Sentry Logger ",originalConsoleMethods={};function consoleSandbox(e){if(!("console"in GLOBAL_OBJ))return e();const t=GLOBAL_OBJ.console,i={},s=Object.keys(originalConsoleMethods);s.forEach(o=>{const a=originalConsoleMethods[o];i[o]=t[o],t[o]=a});try{return e()}finally{s.forEach(o=>{t[o]=i[o]})}}function enable(){_getLoggerSettings().enabled=!0}function disable(){_getLoggerSettings().enabled=!1}function isEnabled(){return _getLoggerSettings().enabled}function log$6(...e){_maybeLog("log",...e)}function warn(...e){_maybeLog("warn",...e)}function error(...e){_maybeLog("error",...e)}function _maybeLog(e,...t){DEBUG_BUILD$2&&isEnabled()&&consoleSandbox(()=>{GLOBAL_OBJ.console[e](`${PREFIX}[${e}]:`,...t)})}function _getLoggerSettings(){return DEBUG_BUILD$2?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const debug={enable,disable,isEnabled,log:log$6,warn,error},STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...e){const t=e.sort((i,s)=>i[0]-s[0]).map(i=>i[1]);return(i,s=0,o=0)=>{const a=[],l=i.split(`
69
69
  `);for(let c=s;c<l.length;c++){let u=l[c];u.length>1024&&(u=u.slice(0,1024));const f=WEBPACK_ERROR_REGEXP.test(u)?u.replace(WEBPACK_ERROR_REGEXP,"$1"):u;if(!f.match(/\S*Error: /)){for(const d of t){const h=d(f);if(h){a.push(h);break}}if(a.length>=STACKTRACE_FRAME_LIMIT+o)break}}return stripSentryFramesAndReverse(a.slice(o))}}function stackParserFromStackParserOptions(e){return Array.isArray(e)?createStackParser(...e):e}function stripSentryFramesAndReverse(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(getLastStackFrame(t).function||"")&&t.pop(),t.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&(t.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&t.pop()),t.slice(0,STACKTRACE_FRAME_LIMIT).map(i=>({...i,filename:i.filename||getLastStackFrame(t).filename,function:i.function||UNKNOWN_FUNCTION}))}function getLastStackFrame(e){return e[e.length-1]||{}}const defaultFunctionName="<anonymous>";function getFunctionName(e){try{return!e||typeof e!="function"?defaultFunctionName:e.name||defaultFunctionName}catch{return defaultFunctionName}}function getFramesFromEvent(e){const t=e.exception;if(t){const i=[];try{return t.values.forEach(s=>{s.stacktrace.frames&&i.push(...s.stacktrace.frames)}),i}catch{return}}}const handlers={},instrumented={};function addHandler(e,t){handlers[e]=handlers[e]||[],handlers[e].push(t)}function maybeInstrument(e,t){if(!instrumented[e]){instrumented[e]=!0;try{t()}catch(i){DEBUG_BUILD$2&&debug.error(`Error while instrumenting ${e}`,i)}}}function triggerHandlers(e,t){const i=e&&handlers[e];if(i)for(const s of i)try{s(t)}catch(o){DEBUG_BUILD$2&&debug.error(`Error while triggering instrumentation handler.
70
70
  Type: ${e}
71
71
  Name: ${getFunctionName(s)}
@@ -79,7 +79,7 @@ Event: ${getEventDescription(e)}`),!0;if(_isDeniedUrl(e,t.denyUrls))return DEBUG
79
79
  Event: ${getEventDescription(e)}.
80
80
  Url: ${_getEventFilterUrl(e)}`),!0;if(!_isAllowedUrl(e,t.allowUrls))return DEBUG_BUILD$2&&debug.warn(`Event dropped due to not being matched by \`allowUrls\` option.
81
81
  Event: ${getEventDescription(e)}.
82
- Url: ${_getEventFilterUrl(e)}`),!0}return!1}function _isIgnoredError(e,t){return t!=null&&t.length?getPossibleEventMessages(e).some(i=>stringMatchesSomePattern(i,t)):!1}function _isIgnoredTransaction(e,t){if(!(t!=null&&t.length))return!1;const i=e.transaction;return i?stringMatchesSomePattern(i,t):!1}function _isDeniedUrl(e,t){if(!(t!=null&&t.length))return!1;const i=_getEventFilterUrl(e);return i?stringMatchesSomePattern(i,t):!1}function _isAllowedUrl(e,t){if(!(t!=null&&t.length))return!0;const i=_getEventFilterUrl(e);return i?stringMatchesSomePattern(i,t):!0}function _getLastValidUrl(e=[]){for(let t=e.length-1;t>=0;t--){const i=e[t];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function _getEventFilterUrl(e){var t,i;try{const s=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(a=>{var l,c,u;return((l=a.mechanism)==null?void 0:l.parent_id)===void 0&&((u=(c=a.stacktrace)==null?void 0:c.frames)==null?void 0:u.length)}),o=(i=s==null?void 0:s.stacktrace)==null?void 0:i.frames;return o?_getLastValidUrl(o):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(e)}`),null}}function _isUselessError(e){var t,i;return(i=(t=e.exception)==null?void 0:t.values)!=null&&i.length?!e.message&&!e.exception.values.some(s=>s.stacktrace||s.type&&s.type!=="Error"||s.value):!1}function applyAggregateErrorsToEvent(e,t,i,s,o,a){var c;if(!((c=o.exception)!=null&&c.values)||!a||!isInstanceOf(a.originalException,Error))return;const l=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;l&&(o.exception.values=aggregateExceptionsFromError(e,t,s,a.originalException,i,o.exception.values,l,0))}function aggregateExceptionsFromError(e,t,i,s,o,a,l,c){if(a.length>=i+1)return a;let u=[...a];if(isInstanceOf(s[o],Error)){applyExceptionGroupFieldsForParentException(l,c);const f=e(t,s[o]),d=u.length;applyExceptionGroupFieldsForChildException(f,o,d,c),u=aggregateExceptionsFromError(e,t,i,s[o],o,[f,...u],f,d)}return Array.isArray(s.errors)&&s.errors.forEach((f,d)=>{if(isInstanceOf(f,Error)){applyExceptionGroupFieldsForParentException(l,c);const h=e(t,f),p=u.length;applyExceptionGroupFieldsForChildException(h,`errors[${d}]`,p,c),u=aggregateExceptionsFromError(e,t,i,f,o,[h,...u],h,p)}}),u}function applyExceptionGroupFieldsForParentException(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function applyExceptionGroupFieldsForChildException(e,t,i,s){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:i,parent_id:s}}function addConsoleInstrumentationHandler(e){const t="console";addHandler(t,e),maybeInstrument(t,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(e){e in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,e,function(t){return originalConsoleMethods[e]=t,function(...i){triggerHandlers("console",{args:i,level:e});const o=originalConsoleMethods[e];o==null||o.apply(GLOBAL_OBJ.console,i)}})})}function severityLevelFromString(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let e;return{name:INTEGRATION_NAME$4,processEvent(t){if(t.type)return t;try{if(_shouldDropEvent(t,e))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(e,t){return t?!!(_isSameMessageEvent(e,t)||_isSameExceptionEvent(e,t)):!1}function _isSameMessageEvent(e,t){const i=e.message,s=t.message;return!(!i&&!s||i&&!s||!i&&s||i!==s||!_isSameFingerprint(e,t)||!_isSameStacktrace(e,t))}function _isSameExceptionEvent(e,t){const i=_getExceptionFromEvent(t),s=_getExceptionFromEvent(e);return!(!i||!s||i.type!==s.type||i.value!==s.value||!_isSameFingerprint(e,t)||!_isSameStacktrace(e,t))}function _isSameStacktrace(e,t){let i=getFramesFromEvent(e),s=getFramesFromEvent(t);if(!i&&!s)return!0;if(i&&!s||!i&&s||(i=i,s=s,s.length!==i.length))return!1;for(let o=0;o<s.length;o++){const a=s[o],l=i[o];if(a.filename!==l.filename||a.lineno!==l.lineno||a.colno!==l.colno||a.function!==l.function)return!1}return!0}function _isSameFingerprint(e,t){let i=e.fingerprint,s=t.fingerprint;if(!i&&!s)return!0;if(i&&!s||!i&&s)return!1;i=i,s=s;try{return i.join("")===s.join("")}catch{return!1}}function _getExceptionFromEvent(e){var t,i;return(i=(t=e.exception)==null?void 0:t.values)==null?void 0:i[0]}function getBreadcrumbLogLevelFromHttpStatusCode(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function supportsNativeFetch(){var i;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let e=!1;const t=WINDOW$2.document;if(t&&typeof t.createElement=="function")try{const s=t.createElement("iframe");s.hidden=!0,t.head.appendChild(s),(i=s.contentWindow)!=null&&i.fetch&&(e=isNativeFunction(s.contentWindow.fetch)),t.head.removeChild(s)}catch(s){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}return e}function addFetchInstrumentationHandler(e,t){const i="fetch";addHandler(i,e),maybeInstrument(i,()=>instrumentFetch(void 0,t))}function instrumentFetch(e,t=!1){t&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(i){return function(...s){const o=new Error,{method:a,url:l}=parseFetchArgs(s),c={args:s,fetchData:{method:a,url:l},startTimestamp:timestampInSeconds()*1e3,virtualError:o,headers:getHeadersFromFetchArgs(s)};return triggerHandlers("fetch",{...c}),i.apply(GLOBAL_OBJ,s).then(async u=>(triggerHandlers("fetch",{...c,endTimestamp:timestampInSeconds()*1e3,response:u}),u),u=>{if(triggerHandlers("fetch",{...c,endTimestamp:timestampInSeconds()*1e3,error:u}),isError(u)&&u.stack===void 0&&(u.stack=o.stack,addNonEnumerableProperty(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(c.fetchData.url);u.message=`${u.message} (${f.host})`}catch{}throw u})}})}function hasProp(e,t){return!!e&&typeof e=="object"&&!!e[t]}function getUrlFromResource(e){return typeof e=="string"?e:e?hasProp(e,"url")?e.url:e.toString?e.toString():"":""}function parseFetchArgs(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[i,s]=e;return{url:getUrlFromResource(i),method:hasProp(s,"method")?String(s.method).toUpperCase():"GET"}}const t=e[0];return{url:getUrlFromResource(t),method:hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(e){const[t,i]=e;try{if(typeof i=="object"&&i!==null&&"headers"in i&&i.headers)return new Headers(i.headers);if(isRequest(t))return new Headers(t.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(e,t={}){function i(o){return typeof o=="function"}if(!i(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(getOriginalFunction(e))return e}catch{return e}const s=function(...o){try{const a=o.map(l=>wrap(l,t));return e.apply(this,a)}catch(a){throw ignoreNextOnError(),withScope(l=>{l.addEventProcessor(c=>(t.mechanism&&(addExceptionTypeValue(c,void 0),addExceptionMechanism(c,t.mechanism)),c.extra={...c.extra,arguments:o},c)),captureException(a)}),a}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}catch{}markFunctionWrapped(s,e),addNonEnumerableProperty(e,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get(){return e.name}})}catch{}return s}function getHttpRequestData(){const e=getLocationHref(),{referrer:t}=WINDOW$1.document||{},{userAgent:i}=WINDOW$1.navigator||{},s={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:e,headers:s}}function exceptionFromError(e,t){const i=parseStackFrames(e,t),s={type:extractType(t),value:extractMessage(t)};return i.length&&(s.stacktrace={frames:i}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function eventFromPlainObject(e,t,i,s){const o=getClient(),a=o==null?void 0:o.getOptions().normalizeDepth,l=getErrorPropertyFromObject(t),c={__serialized__:normalizeToSize(t,a)};if(l)return{exception:{values:[exceptionFromError(e,l)]},extra:c};const u={exception:{values:[{type:isEvent(t)?t.constructor.name:s?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(t,{isUnhandledRejection:s})}]},extra:c};if(i){const f=parseStackFrames(e,i);f.length&&(u.exception.values[0].stacktrace={frames:f})}return u}function eventFromError(e,t){return{exception:{values:[exceptionFromError(e,t)]}}}function parseStackFrames(e,t){const i=t.stacktrace||t.stack||"",s=getSkipFirstStackStringLines(t),o=getPopFirstTopFrames(t);try{return e(i,s,o)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(e){return e&&reactMinifiedRegexp.test(e.message)?1:0}function getPopFirstTopFrames(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function isWebAssemblyException(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function extractType(e){const t=e==null?void 0:e.name;return!t&&isWebAssemblyException(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function extractMessage(e){const t=e==null?void 0:e.message;return isWebAssemblyException(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function eventFromException(e,t,i,s){const o=(i==null?void 0:i.syntheticException)||void 0,a=eventFromUnknownInput(e,t,o,s);return addExceptionMechanism(a),a.level="error",i!=null&&i.event_id&&(a.event_id=i.event_id),resolvedSyncPromise(a)}function eventFromMessage(e,t,i="info",s,o){const a=(s==null?void 0:s.syntheticException)||void 0,l=eventFromString(e,t,a,o);return l.level=i,s!=null&&s.event_id&&(l.event_id=s.event_id),resolvedSyncPromise(l)}function eventFromUnknownInput(e,t,i,s,o){let a;if(isErrorEvent$1(t)&&t.error)return eventFromError(e,t.error);if(isDOMError(t)||isDOMException(t)){const l=t;if("stack"in t)a=eventFromError(e,t);else{const c=l.name||(isDOMError(l)?"DOMError":"DOMException"),u=l.message?`${c}: ${l.message}`:c;a=eventFromString(e,u,i,s),addExceptionTypeValue(a,u)}return"code"in l&&(a.tags={...a.tags,"DOMException.code":`${l.code}`}),a}return isError(t)?eventFromError(e,t):isPlainObject$1(t)||isEvent(t)?(a=eventFromPlainObject(e,t,i,o),addExceptionMechanism(a,{synthetic:!0}),a):(a=eventFromString(e,t,i,s),addExceptionTypeValue(a,`${t}`),addExceptionMechanism(a,{synthetic:!0}),a)}function eventFromString(e,t,i,s){const o={};if(s&&i){const a=parseStackFrames(e,i);a.length&&(o.exception={values:[{value:t,stacktrace:{frames:a}}]}),addExceptionMechanism(o,{synthetic:!0})}if(isParameterizedString(t)){const{__sentry_template_string__:a,__sentry_template_values__:l}=t;return o.logentry={message:a,params:l},o}return o.message=t,o}function getNonErrorObjectExceptionValue(e,{isUnhandledRejection:t}){const i=extractExceptionKeysForMessage(e),s=t?"promise rejection":"exception";return isErrorEvent$1(e)?`Event \`ErrorEvent\` captured as ${s} with message \`${e.message}\``:isEvent(e)?`Event \`${getObjectClassName(e)}\` (type=${e.type}) captured as ${s}`:`Object captured as ${s} with keys: ${i}`}function getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];if(i instanceof Error)return i}}const DEFAULT_FLUSH_INTERVAL=5e3;class BrowserClient extends Client{constructor(t){var c;const i=applyDefaultOptions(t),s=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(i,"browser",["browser"],s),(c=i._metadata)!=null&&c.sdk&&(i._metadata.sdk.settings={infer_ip:i.sendDefaultPii?"auto":"never",...i._metadata.sdk.settings}),super(i);const{sendDefaultPii:o,sendClientReports:a,enableLogs:l}=this._options;WINDOW$1.document&&(a||l)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(a&&this._flushOutcomes(),l&&_INTERNAL_flushLogsBuffer(this))}),l&&(this.on("flush",()=>{_INTERNAL_flushLogsBuffer(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(this)},DEFAULT_FLUSH_INTERVAL)})),o&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(t,i){return eventFromException(this._options.stackParser,t,i,this._options.attachStacktrace)}eventFromMessage(t,i="info",s){return eventFromMessage(this._options.stackParser,t,i,s,this._options.attachStacktrace)}_prepareEvent(t,i,s,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,i,s,o)}}function applyDefaultOptions(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=WINDOW$1.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(e){const t="dom";addHandler(t,e),maybeInstrument(t,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const e=triggerHandlers.bind(null,"dom"),t=makeDOMEventHandler(e,!0);WINDOW.document.addEventListener("click",t,!1),WINDOW.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(i=>{var a,l;const o=(a=WINDOW[i])==null?void 0:a.prototype;(l=o==null?void 0:o.hasOwnProperty)!=null&&l.call(o,"addEventListener")&&(fill(o,"addEventListener",function(c){return function(u,f,d){if(u==="click"||u=="keypress")try{const h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=h[u]=h[u]||{refCount:0};if(!p.handler){const m=makeDOMEventHandler(e);p.handler=m,c.call(this,u,m,d)}p.refCount++}catch{}return c.call(this,u,f,d)}}),fill(o,"removeEventListener",function(c){return function(u,f,d){if(u==="click"||u=="keypress")try{const h=this.__sentry_instrumentation_handlers__||{},p=h[u];p&&(p.refCount--,p.refCount<=0&&(c.call(this,u,p.handler,d),p.handler=void 0,delete h[u]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,u,f,d)}}))})}function isSimilarToLastCapturedEvent(e){if(e.type!==lastCapturedEventType)return!1;try{if(!e.target||e.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function makeDOMEventHandler(e,t=!1){return i=>{if(!i||i._sentryCaptured)return;const s=getEventTarget$1(i);if(shouldSkipDOMEvent(i.type,s))return;addNonEnumerableProperty(i,"_sentryCaptured",!0),s&&!s._sentryId&&addNonEnumerableProperty(s,"_sentryId",uuid4());const o=i.type==="keypress"?"input":i.type;isSimilarToLastCapturedEvent(i)||(e({event:i,name:o,global:t}),lastCapturedEventType=i.type,lastCapturedEventTargetId=s?s._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget$1(e){try{return e.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(e){const t="history";addHandler(t,e),maybeInstrument(t,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const t=WINDOW.location.href,i=lastHref;if(lastHref=t,i===t)return;triggerHandlers("history",{from:i,to:t})}),!supportsHistory())return;function e(t){return function(...i){const s=i.length>2?i[2]:void 0;if(s){const o=lastHref,a=getAbsoluteUrl(String(s));if(lastHref=a,o===a)return t.apply(this,i);triggerHandlers("history",{from:o,to:a})}return t.apply(this,i)}}fill(WINDOW.history,"pushState",e),fill(WINDOW.history,"replaceState",e)}function getAbsoluteUrl(e){try{return new URL(e,WINDOW.location.origin).toString()}catch{return e}}const cachedImplementations={};function getNativeImplementation(e){const t=cachedImplementations[e];if(t)return t;let i=WINDOW[e];if(isNativeFunction(i))return cachedImplementations[e]=i.bind(WINDOW);const s=WINDOW.document;if(s&&typeof s.createElement=="function")try{const o=s.createElement("iframe");o.hidden=!0,s.head.appendChild(o);const a=o.contentWindow;a!=null&&a[e]&&(i=a[e]),s.head.removeChild(o)}catch(o){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return i&&(cachedImplementations[e]=i.bind(WINDOW))}function clearCachedImplementation(e){cachedImplementations[e]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(e){const t="xhr";addHandler(t,e),maybeInstrument(t,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,i,s){const o=new Error,a=timestampInSeconds()*1e3,l=isString$2(s[0])?s[0].toUpperCase():void 0,c=parseXhrUrlArg(s[1]);if(!l||!c)return t.apply(i,s);i[SENTRY_XHR_DATA_KEY]={method:l,url:c,request_headers:{}},l==="POST"&&c.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const u=()=>{const f=i[SENTRY_XHR_DATA_KEY];if(f&&i.readyState===4){try{f.status_code=i.status}catch{}const d={endTimestamp:timestampInSeconds()*1e3,startTimestamp:a,xhr:i,virtualError:o};triggerHandlers("xhr",d)}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?i.onreadystatechange=new Proxy(i.onreadystatechange,{apply(f,d,h){return u(),f.apply(d,h)}}):i.addEventListener("readystatechange",u),i.setRequestHeader=new Proxy(i.setRequestHeader,{apply(f,d,h){const[p,m]=h,g=d[SENTRY_XHR_DATA_KEY];return g&&isString$2(p)&&isString$2(m)&&(g.request_headers[p.toLowerCase()]=m),f.apply(d,h)}}),t.apply(i,s)}}),e.send=new Proxy(e.send,{apply(t,i,s){const o=i[SENTRY_XHR_DATA_KEY];if(!o)return t.apply(i,s);s[0]!==void 0&&(o.body=s[0]);const a={startTimestamp:timestampInSeconds()*1e3,xhr:i};return triggerHandlers("xhr",a),t.apply(i,s)}})}function parseXhrUrlArg(e){if(isString$2(e))return e;try{return e.toString()}catch{}}function makeFetchTransport(e,t=getNativeImplementation("fetch")){let i=0,s=0;async function o(a){const l=a.body.length;i+=l,s++;const c={body:a.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:i<=6e4&&s<15,...e.fetchOptions};try{const u=await t(e.url,c);return{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}}catch(u){throw clearCachedImplementation("fetch"),u}finally{i-=l,s--}}return createTransport(e,o)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(e,t,i,s){const o={filename:e,function:t==="<anonymous>"?UNKNOWN_FUNCTION:t,in_app:!0};return i!==void 0&&(o.lineno=i),s!==void 0&&(o.colno=s),o}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=e=>{const t=e.match(chromeDataUriRegex);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const i=chromeRegexNoFnName.exec(e);if(i){const[,o,a,l]=i;return createFrame(o,UNKNOWN_FUNCTION,+a,+l)}const s=chromeRegex.exec(e);if(s){if(s[2]&&s[2].indexOf("eval")===0){const c=chromeEvalRegex.exec(s[2]);c&&(s[2]=c[1],s[3]=c[2],s[4]=c[3])}const[a,l]=extractSafariExtensionDetails(s[1]||UNKNOWN_FUNCTION,s[2]);return createFrame(l,a,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=e=>{const t=geckoREgex.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=geckoEvalRegex.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let s=t[3],o=t[1]||UNKNOWN_FUNCTION;return[o,s]=extractSafariExtensionDetails(o,s),createFrame(s,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(e,t)=>{const i=e.indexOf("safari-extension")!==-1,s=e.indexOf("safari-web-extension")!==-1;return i||s?[e.indexOf("@")!==-1?e.split("@")[0]:UNKNOWN_FUNCTION,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:INTEGRATION_NAME$3,setup(i){t.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(i)),t.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(i,t.dom)),t.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(i)),t.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(i)),t.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(i)),t.sentry&&i.on("beforeSendEvent",_getSentryBreadcrumbHandler(i))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(e){return function(i){getClient()===e&&addBreadcrumb({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:getEventDescription(i)},{event:i})}}function _getDomBreadcrumbHandler(e,t){return function(s){if(getClient()!==e)return;let o,a,l=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${c} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),c=MAX_ALLOWED_STRING_LENGTH),typeof l=="string"&&(l=[l]);try{const f=s.event,d=_isEvent(f)?f.target:f;o=htmlTreeAsString(d,{keyAttrs:l,maxStringLength:c}),a=getComponentName(d)}catch{o="<unknown>"}if(o.length===0)return;const u={category:`ui.${s.name}`,message:o};a&&(u.data={"ui.component_name":a}),addBreadcrumb(u,{event:s.event,name:s.name,global:s.global})}}function _getConsoleBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const s={category:"console",data:{arguments:i.args,logger:"console"},level:severityLevelFromString(i.level),message:safeJoin(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)s.message=`Assertion failed: ${safeJoin(i.args.slice(1)," ")||"console.assert"}`,s.data.arguments=i.args.slice(1);else return;addBreadcrumb(s,{input:i.args,level:i.level})}}function _getXhrBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const{startTimestamp:s,endTimestamp:o}=i,a=i.xhr[SENTRY_XHR_DATA_KEY];if(!s||!o||!a)return;const{method:l,url:c,status_code:u,body:f}=a,d={method:l,url:c,status_code:u},h={xhr:i.xhr,input:f,startTimestamp:s,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(u)};e.emit("beforeOutgoingRequestBreadcrumb",p,h),addBreadcrumb(p,h)}}function _getFetchBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const{startTimestamp:s,endTimestamp:o}=i;if(o&&!(i.fetchData.url.match(/sentry_key/)&&i.fetchData.method==="POST"))if(i.fetchData.method,i.fetchData.url,i.error){const a=i.fetchData,l={data:i.error,input:i.args,startTimestamp:s,endTimestamp:o},c={category:"fetch",data:a,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",c,l),addBreadcrumb(c,l)}else{const a=i.response,l={...i.fetchData,status_code:a==null?void 0:a.status};i.fetchData.request_body_size,i.fetchData.response_body_size,a==null||a.status;const c={input:i.args,response:a,startTimestamp:s,endTimestamp:o},u={category:"fetch",data:l,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(l.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",u,c),addBreadcrumb(u,c)}}}function _getHistoryBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;let s=i.from,o=i.to;const a=parseUrl(WINDOW$1.location.href);let l=s?parseUrl(s):void 0;const c=parseUrl(o);l!=null&&l.path||(l=a),a.protocol===c.protocol&&a.host===c.host&&(o=c.relative),a.protocol===l.protocol&&a.host===l.host&&(s=l.relative),addBreadcrumb({category:"navigation",data:{from:s,to:o}})}}function _isEvent(e){return!!e&&!!e.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:INTEGRATION_NAME$2,setupOnce(){t.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),t.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),t.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),t.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const i=t.eventTarget;i&&(Array.isArray(i)?i:DEFAULT_EVENT_TARGET).forEach(o=>_wrapEventTarget(o,t))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(e){return function(...t){const i=t[0];return t[0]=wrap(i,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(e)}`}}),e.apply(this,t)}}function _wrapRAF(e){return function(t){return e.apply(this,[wrap(t,{mechanism:{data:{handler:getFunctionName(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(e){return function(...t){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in i&&typeof i[o]=="function"&&fill(i,o,function(a){const l={mechanism:{data:{handler:getFunctionName(a)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},c=getOriginalFunction(a);return c&&(l.mechanism.data.handler=getFunctionName(c)),wrap(a,l)})}),e.apply(this,t)}}function _wrapEventTarget(e,t){var o,a;const s=(o=WINDOW$1[e])==null?void 0:o.prototype;(a=s==null?void 0:s.hasOwnProperty)!=null&&a.call(s,"addEventListener")&&(fill(s,"addEventListener",function(l){return function(c,u,f){try{isEventListenerObject(u)&&(u.handleEvent=wrap(u.handleEvent,{mechanism:{data:{handler:getFunctionName(u),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,c,u),l.apply(this,[c,wrap(u,{mechanism:{data:{handler:getFunctionName(u),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),f])}}),fill(s,"removeEventListener",function(l){return function(c,u,f){try{const d=u.__sentry_wrapped__;d&&l.call(this,c,d,f)}catch{}return l.call(this,c,u,f)}}))}function isEventListenerObject(e){return typeof e.handleEvent=="function"}function unregisterOriginalCallback(e,t,i){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,i)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:e,to:t})=>{e!==void 0&&e!==t&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(_installGlobalOnErrorHandler(i),globalHandlerLog("onerror")),t.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(i),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(e){addGlobalErrorInstrumentationHandler(t=>{const{stackParser:i,attachStacktrace:s}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const{msg:o,url:a,line:l,column:c,error:u}=t,f=_enhanceEventWithInitialFrame(eventFromUnknownInput(i,u||o,void 0,s,!1),a,l,c);f.level="error",captureEvent(f,{originalException:u,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(e){addGlobalUnhandledRejectionInstrumentationHandler(t=>{const{stackParser:i,attachStacktrace:s}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const o=_getUnhandledRejectionError(t),a=isPrimitive(o)?_eventFromRejectionWithPrimitive(o):eventFromUnknownInput(i,o,void 0,s,!0);a.level="error",captureEvent(a,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(e){if(isPrimitive(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function _eventFromRejectionWithPrimitive(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _enhanceEventWithInitialFrame(e,t,i,s){const o=e.exception=e.exception||{},a=o.values=o.values||[],l=a[0]=a[0]||{},c=l.stacktrace=l.stacktrace||{},u=c.frames=c.frames||[],f=s,d=i,h=getFilenameFromUrl(t)??getLocationHref();return u.length===0&&u.push({colno:f,filename:h,function:UNKNOWN_FUNCTION,in_app:!0,lineno:d}),e}function globalHandlerLog(e){DEBUG_BUILD&&debug.log(`Global Handler attached: ${e}`)}function getOptions(){const e=getClient();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(e){if(!(!isString$2(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),i=t?t[1]:"text/javascript",s=e.includes("base64,");return`<data:${i}${s?",base64":""}>`}return e.slice(0,1024)}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(e){var s;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const t=getHttpRequestData(),i={...t.headers,...(s=e.request)==null?void 0:s.headers};e.request={...t,...e.request,headers:i}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(e={})=>{const t=e.limit||DEFAULT_LIMIT,i=e.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(s,o,a){const l=a.getOptions();applyAggregateErrorsToEvent(exceptionFromError,l.stackParser,i,t,s,o)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var a;if(typeof WINDOW$1.window>"u")return!1;const e=WINDOW$1;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((a=t==null?void 0:t.runtime)!=null&&a.id))return!1;const i=getLocationHref(),s=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&s.some(l=>i.startsWith(`${l}://`)))}function getDefaultIntegrations(e){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init$1(e={}){const t=!e.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension(),i={...e,enabled:t?!1:e.enabled,stackParser:stackParserFromStackParserOptions(e.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?getDefaultIntegrations():e.defaultIntegrations}),transport:e.transport||makeFetchTransport};return initAndBind(BrowserClient,i)}function init(e){const t={...e};return applySdkMetadata(t,"react"),setContext("react",{version:React.version}),init$1(t)}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},defaultTimeoutProvider={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TimeoutManager=(Ze=class{constructor(){we(this,Le,defaultTimeoutProvider);we(this,Ve,!1)}setTimeoutProvider(e){ge(this,Le,e)}setTimeout(e,t){return U(this,Le).setTimeout(e,t)}clearTimeout(e){U(this,Le).clearTimeout(e)}setInterval(e,t){return U(this,Le).setInterval(e,t)}clearInterval(e){U(this,Le).clearInterval(e)}},Le=new WeakMap,Ve=new WeakMap,Ze),timeoutManager=new TimeoutManager;function systemSetTimeoutZero(e){setTimeout(e,0)}var isServer=typeof window>"u"||"Deno"in globalThis;function noop$1(){}function functionalUpdate(e,t){return typeof e=="function"?e(t):e}function isValidTimeout(e){return typeof e=="number"&&e>=0&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return typeof e=="function"?e(t):e}function resolveEnabled(e,t){return typeof e=="function"?e(t):e}function matchQuery(e,t){const{type:i="all",exact:s,fetchStatus:o,predicate:a,queryKey:l,stale:c}=e;if(l){if(s){if(t.queryHash!==hashQueryKeyByOptions(l,t.options))return!1}else if(!partialMatchKey(t.queryKey,l))return!1}if(i!=="all"){const u=t.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function matchMutation(e,t){const{exact:i,status:s,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(i){if(hashKey(t.options.mutationKey)!==hashKey(a))return!1}else if(!partialMatchKey(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function hashQueryKeyByOptions(e,t){return((t==null?void 0:t.queryKeyHashFn)||hashKey)(e)}function hashKey(e){return JSON.stringify(e,(t,i)=>isPlainObject(i)?Object.keys(i).sort().reduce((s,o)=>(s[o]=i[o],s),{}):i)}function partialMatchKey(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(i=>partialMatchKey(e[i],t[i])):!1}var hasOwn=Object.prototype.hasOwnProperty;function replaceEqualDeep(e,t){if(e===t)return e;const i=isPlainArray(e)&&isPlainArray(t);if(!i&&!(isPlainObject(e)&&isPlainObject(t)))return t;const o=(i?e:Object.keys(e)).length,a=i?t:Object.keys(t),l=a.length,c=i?new Array(l):{};let u=0;for(let f=0;f<l;f++){const d=i?f:a[f],h=e[d],p=t[d];if(h===p){c[d]=h,(i?f<o:hasOwn.call(e,d))&&u++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){c[d]=p;continue}const m=replaceEqualDeep(h,p);c[d]=m,m===h&&u++}return o===l&&u===o?e:c}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;const t=e.constructor;if(t===void 0)return!0;const i=t.prototype;return!(!hasObjectPrototype(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hasObjectPrototype(e){return Object.prototype.toString.call(e)==="[object Object]"}function sleep(e){return new Promise(t=>{timeoutManager.setTimeout(t,e)})}function replaceData(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?replaceEqualDeep(e,t):t}function addToEnd(e,t,i=0){const s=[...e,t];return i&&s.length>i?s.slice(1):s}function addToStart(e,t,i=0){const s=[t,...e];return i&&s.length>i?s.slice(0,-1):s}var skipToken=Symbol();function ensureQueryFn(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function shouldThrowError(e,t){return typeof e=="function"?e(...t):!!e}var FocusManager=(xr=class extends Subscribable{constructor(){super();we(this,lt);we(this,dt);we(this,Ut);ge(this,Ut,t=>{if(!isServer&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){U(this,dt)||this.setEventListener(U(this,Ut))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,dt))==null||t.call(this),ge(this,dt,void 0))}setEventListener(t){var i;ge(this,Ut,t),(i=U(this,dt))==null||i.call(this),ge(this,dt,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){U(this,lt)!==t&&(ge(this,lt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){var t;return typeof U(this,lt)=="boolean"?U(this,lt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lt=new WeakMap,dt=new WeakMap,Ut=new WeakMap,xr),focusManager=new FocusManager;function pendingThenable(){let e,t;const i=new Promise((o,a)=>{e=o,t=a});i.status="pending",i.catch(()=>{});function s(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},i.reject=o=>{s({status:"rejected",reason:o}),t(o)},i}var defaultScheduler=systemSetTimeoutZero;function createNotifyManager(){let e=[],t=0,i=c=>{c()},s=c=>{c()},o=defaultScheduler;const a=c=>{t?e.push(c):o(()=>{i(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{s(()=>{c.forEach(u=>{i(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{a(()=>{c(...u)})},schedule:a,setNotifyFunction:c=>{i=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{o=c}}}var notifyManager=createNotifyManager(),OnlineManager=(Sr=class extends Subscribable{constructor(){super();we(this,Gt,!0);we(this,wt);we(this,zt);ge(this,zt,t=>{if(!isServer&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){U(this,wt)||this.setEventListener(U(this,zt))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,wt))==null||t.call(this),ge(this,wt,void 0))}setEventListener(t){var i;ge(this,zt,t),(i=U(this,wt))==null||i.call(this),ge(this,wt,t(this.setOnline.bind(this)))}setOnline(t){U(this,Gt)!==t&&(ge(this,Gt,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return U(this,Gt)}},Gt=new WeakMap,wt=new WeakMap,zt=new WeakMap,Sr),onlineManager=new OnlineManager;function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(e??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function createRetryer(e){let t=!1,i=0,s;const o=pendingThenable(),a=()=>o.status!=="pending",l=v=>{var b;if(!a()){const y=new CancelledError(v);p(y),(b=e.onCancel)==null||b.call(e,y)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>focusManager.isFocused()&&(e.networkMode==="always"||onlineManager.isOnline())&&e.canRun(),d=()=>canFetch(e.networkMode)&&e.canRun(),h=v=>{a()||(s==null||s(),o.resolve(v))},p=v=>{a()||(s==null||s(),o.reject(v))},m=()=>new Promise(v=>{var b;s=y=>{(a()||f())&&v(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;s=void 0,a()||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(a())return;let v;const b=i===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(h).catch(y=>{var A;if(a())return;const E=e.retry??(isServer?0:3),S=e.retryDelay??defaultRetryDelay,w=typeof S=="function"?S(i,y):S,C=E===!0||typeof E=="number"&&i<E||typeof E=="function"&&E(i,y);if(t||!C){p(y);return}i++,(A=e.onFail)==null||A.call(e,i,y),sleep(w).then(()=>f()?void 0:m()).then(()=>{t?p(y):g()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(s==null||s(),o),cancelRetry:c,continueRetry:u,canStart:d,start:()=>(d()?g():m().then(g),o)}}var Removable=(Er=class{constructor(){we(this,Ot)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&ge(this,Ot,timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(isServer?1/0:5*60*1e3))}clearGcTimeout(){U(this,Ot)&&(timeoutManager.clearTimeout(U(this,Ot)),ge(this,Ot,void 0))}},Ot=new WeakMap,Er),define_process_env_default$4={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},Query=(wr=class extends Removable{constructor(t){super();we(this,ut);we(this,kt);we(this,Wt);we(this,ct);we(this,Lt);we(this,Xe);we(this,er);we(this,Dt);ge(this,Dt,!1),ge(this,er,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,Lt,t.client),ge(this,ct,U(this,Lt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,kt,getDefaultState$1(this.options)),this.state=t.state??U(this,kt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=U(this,Xe))==null?void 0:t.promise}setOptions(t){if(this.options={...U(this,er),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=getDefaultState$1(this.options);i.data!==void 0&&(this.setData(i.data,{updatedAt:i.dataUpdatedAt,manual:!0}),ge(this,kt,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,ct).remove(this)}setData(t,i){const s=replaceData(this.state.data,t,this.options);return Me(this,ut,Et).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(t,i){Me(this,ut,Et).call(this,{type:"setState",state:t,setStateOptions:i})}cancel(t){var s,o;const i=(s=U(this,Xe))==null?void 0:s.promise;return(o=U(this,Xe))==null||o.cancel(t),i?i.then(noop$1).catch(noop$1):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(U(this,kt))}isActive(){return this.observers.some(t=>resolveEnabled(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>resolveStaleTime(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,t)}onFocus(){var i;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(i=U(this,Xe))==null||i.continue()}onOnline(){var i;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(i=U(this,Xe))==null||i.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),U(this,ct).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(U(this,Xe)&&(U(this,Dt)?U(this,Xe).cancel({revert:!0}):U(this,Xe).cancelRetry()),this.scheduleGc()),U(this,ct).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,ut,Et).call(this,{type:"invalidate"})}async fetch(t,i){var u,f,d,h,p,m,g,v,b,y,E,S;if(this.state.fetchStatus!=="idle"&&((u=U(this,Xe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(U(this,Xe))return U(this,Xe).continueRetry(),U(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(C=>C.options.queryFn);w&&this.setOptions(w.options)}const s=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ge(this,Dt,!0),s.signal)})},a=()=>{const w=ensureQueryFn(this.options,i),A=(()=>{const O={client:U(this,Lt),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ge(this,Dt,!1),this.options.persister?this.options.persister(w,A,this):w(A)},c=(()=>{const w={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:U(this,Lt),state:this.state,fetchFn:a};return o(w),w})();(f=this.options.behavior)==null||f.onFetch(c,this),ge(this,Wt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=c.fetchOptions)==null?void 0:d.meta))&&Me(this,ut,Et).call(this,{type:"fetch",meta:(h=c.fetchOptions)==null?void 0:h.meta}),ge(this,Xe,createRetryer({initialPromise:i==null?void 0:i.initialPromise,fn:c.fetchFn,onCancel:w=>{w instanceof CancelledError&&w.revert&&this.setState({...U(this,Wt),fetchStatus:"idle"}),s.abort()},onFail:(w,C)=>{Me(this,ut,Et).call(this,{type:"failed",failureCount:w,error:C})},onPause:()=>{Me(this,ut,Et).call(this,{type:"pause"})},onContinue:()=>{Me(this,ut,Et).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const w=await U(this,Xe).start();if(w===void 0)throw define_process_env_default$4.NODE_ENV,new Error(`${this.queryHash} data is undefined`);return this.setData(w),(m=(p=U(this,ct).config).onSuccess)==null||m.call(p,w,this),(v=(g=U(this,ct).config).onSettled)==null||v.call(g,w,this.state.error,this),w}catch(w){if(w instanceof CancelledError){if(w.silent)return U(this,Xe).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Me(this,ut,Et).call(this,{type:"error",error:w}),(y=(b=U(this,ct).config).onError)==null||y.call(b,w,this),(S=(E=U(this,ct).config).onSettled)==null||S.call(E,this.state.data,w,this),w}finally{this.scheduleGc()}}},kt=new WeakMap,Wt=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Xe=new WeakMap,er=new WeakMap,Dt=new WeakMap,ut=new WeakSet,Et=function(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...fetchState(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,Wt,t.manual?o:void 0),o;case"error":const a=t.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),notifyManager.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),U(this,ct).notify({query:this,type:"updated",action:t})})},wr);function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var QueryObserver=(Cr=class extends Subscribable{constructor(t,i){super();we(this,je);we(this,nt);we(this,De);we(this,tr);we(this,tt);we(this,Nt);we(this,Ht);we(this,yt);we(this,Ct);we(this,rr);we(this,qt);we(this,Kt);we(this,$t);we(this,Ft);we(this,Rt);we(this,Yt,new Set);this.options=i,ge(this,nt,t),ge(this,Ct,null),ge(this,yt,pendingThenable()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,De).addObserver(this),shouldFetchOnMount(U(this,De),this.options)?Me(this,je,or).call(this):this.updateResult(),Me(this,je,gr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(U(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(U(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,je,vr).call(this),Me(this,je,yr).call(this),U(this,De).removeObserver(this)}setOptions(t){const i=this.options,s=U(this,De);if(this.options=U(this,nt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,U(this,De))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,je,_r).call(this),U(this,De).setOptions(this.options),i._defaulted&&!shallowEqualObjects(this.options,i)&&U(this,nt).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,De),observer:this});const o=this.hasListeners();o&&shouldFetchOptionally(U(this,De),s,this.options,i)&&Me(this,je,or).call(this),this.updateResult(),o&&(U(this,De)!==s||resolveEnabled(this.options.enabled,U(this,De))!==resolveEnabled(i.enabled,U(this,De))||resolveStaleTime(this.options.staleTime,U(this,De))!==resolveStaleTime(i.staleTime,U(this,De)))&&Me(this,je,hr).call(this);const a=Me(this,je,pr).call(this);o&&(U(this,De)!==s||resolveEnabled(this.options.enabled,U(this,De))!==resolveEnabled(i.enabled,U(this,De))||a!==U(this,Rt))&&Me(this,je,mr).call(this,a)}getOptimisticResult(t){const i=U(this,nt).getQueryCache().build(U(this,nt),t),s=this.createResult(i,t);return shouldAssignObserverCurrentProperties(this,s)&&(ge(this,tt,s),ge(this,Ht,this.options),ge(this,Nt,U(this,De).state)),s}getCurrentResult(){return U(this,tt)}trackResult(t,i){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&!this.options.experimental_prefetchInRender&&U(this,yt).status==="pending"&&U(this,yt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(s,o))})}trackProp(t){U(this,Yt).add(t)}getCurrentQuery(){return U(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=U(this,nt).defaultQueryOptions(t),s=U(this,nt).getQueryCache().build(U(this,nt),i);return s.fetch().then(()=>this.createResult(s,i))}fetch(t){return Me(this,je,or).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,tt)))}createResult(t,i){var L;const s=U(this,De),o=this.options,a=U(this,tt),l=U(this,Nt),c=U(this,Ht),f=t!==s?t.state:U(this,tr),{state:d}=t;let h={...d},p=!1,m;if(i._optimisticResults){const $=this.hasListeners(),V=!$&&shouldFetchOnMount(t,i),W=$&&shouldFetchOptionally(t,s,i,o);(V||W)&&(h={...h,...fetchState(d.data,t.options)}),i._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:b}=h;m=h.data;let y=!1;if(i.placeholderData!==void 0&&m===void 0&&b==="pending"){let $;a!=null&&a.isPlaceholderData&&i.placeholderData===(c==null?void 0:c.placeholderData)?($=a.data,y=!0):$=typeof i.placeholderData=="function"?i.placeholderData((L=U(this,Kt))==null?void 0:L.state.data,U(this,Kt)):i.placeholderData,$!==void 0&&(b="success",m=replaceData(a==null?void 0:a.data,$,i),p=!0)}if(i.select&&m!==void 0&&!y)if(a&&m===(l==null?void 0:l.data)&&i.select===U(this,rr))m=U(this,qt);else try{ge(this,rr,i.select),m=i.select(m),m=replaceData(a==null?void 0:a.data,m,i),ge(this,qt,m),ge(this,Ct,null)}catch($){ge(this,Ct,$)}U(this,Ct)&&(g=U(this,Ct),m=U(this,qt),v=Date.now(),b="error");const E=h.fetchStatus==="fetching",S=b==="pending",w=b==="error",C=S&&E,A=m!==void 0,I={status:b,fetchStatus:h.fetchStatus,isPending:S,isSuccess:b==="success",isError:w,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!S,isLoadingError:w&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&A,isStale:isStale(t,i),refetch:this.refetch,promise:U(this,yt),isEnabled:resolveEnabled(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=K=>{I.status==="error"?K.reject(I.error):I.data!==void 0&&K.resolve(I.data)},V=()=>{const K=ge(this,yt,I.promise=pendingThenable());$(K)},W=U(this,yt);switch(W.status){case"pending":t.queryHash===s.queryHash&&$(W);break;case"fulfilled":(I.status==="error"||I.data!==W.value)&&V();break;case"rejected":(I.status!=="error"||I.error!==W.reason)&&V();break}}return I}updateResult(){const t=U(this,tt),i=this.createResult(U(this,De),this.options);if(ge(this,Nt,U(this,De).state),ge(this,Ht,this.options),U(this,Nt).data!==void 0&&ge(this,Kt,U(this,De)),shallowEqualObjects(i,t))return;ge(this,tt,i);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!U(this,Yt).size)return!0;const l=new Set(a??U(this,Yt));return this.options.throwOnError&&l.add("error"),Object.keys(U(this,tt)).some(c=>{const u=c;return U(this,tt)[u]!==t[u]&&l.has(u)})};Me(this,je,Jr).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,je,gr).call(this)}},nt=new WeakMap,De=new WeakMap,tr=new WeakMap,tt=new WeakMap,Nt=new WeakMap,Ht=new WeakMap,yt=new WeakMap,Ct=new WeakMap,rr=new WeakMap,qt=new WeakMap,Kt=new WeakMap,$t=new WeakMap,Ft=new WeakMap,Rt=new WeakMap,Yt=new WeakMap,je=new WeakSet,or=function(t){Me(this,je,_r).call(this);let i=U(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(i=i.catch(noop$1)),i},hr=function(){Me(this,je,vr).call(this);const t=resolveStaleTime(this.options.staleTime,U(this,De));if(isServer||U(this,tt).isStale||!isValidTimeout(t))return;const s=timeUntilStale(U(this,tt).dataUpdatedAt,t)+1;ge(this,$t,timeoutManager.setTimeout(()=>{U(this,tt).isStale||this.updateResult()},s))},pr=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(U(this,De)):this.options.refetchInterval)??!1},mr=function(t){Me(this,je,yr).call(this),ge(this,Rt,t),!(isServer||resolveEnabled(this.options.enabled,U(this,De))===!1||!isValidTimeout(U(this,Rt))||U(this,Rt)===0)&&ge(this,Ft,timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&Me(this,je,or).call(this)},U(this,Rt)))},gr=function(){Me(this,je,hr).call(this),Me(this,je,mr).call(this,Me(this,je,pr).call(this))},vr=function(){U(this,$t)&&(timeoutManager.clearTimeout(U(this,$t)),ge(this,$t,void 0))},yr=function(){U(this,Ft)&&(timeoutManager.clearInterval(U(this,Ft)),ge(this,Ft,void 0))},_r=function(){const t=U(this,nt).getQueryCache().build(U(this,nt),this.options);if(t===U(this,De))return;const i=U(this,De);ge(this,De,t),ge(this,tr,t.state),this.hasListeners()&&(i==null||i.removeObserver(this),t.addObserver(this))},Jr=function(t){notifyManager.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(U(this,tt))}),U(this,nt).getQueryCache().notify({query:U(this,De),type:"observerResultsUpdated"})})},Cr);function shouldLoadOnMount(e,t){return resolveEnabled(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||e.state.data!==void 0&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,i){if(resolveEnabled(t.enabled,e)!==!1&&resolveStaleTime(t.staleTime,e)!=="static"){const s=typeof i=="function"?i(e):i;return s==="always"||s!==!1&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,i,s){return(e!==t||resolveEnabled(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&isStale(e,i)}function isStale(e,t){return resolveEnabled(t.enabled,e)!==!1&&e.isStaleByTime(resolveStaleTime(t.staleTime,e))}function shouldAssignObserverCurrentProperties(e,t){return!shallowEqualObjects(e.getCurrentResult(),t)}function infiniteQueryBehavior(e){return{onFetch:(t,i)=>{var d,h,p,m,g;const s=t.options,o=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],l=((g=t.state.data)==null?void 0:g.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let v=!1;const b=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},y=ensureQueryFn(t.options,t.fetchOptions),E=async(S,w,C)=>{if(v)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const O=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:w,direction:C?"backward":"forward",meta:t.options.meta};return b(V),V})(),I=await y(O),{maxPages:L}=t.options,$=C?addToStart:addToEnd;return{pages:$(S.pages,I,L),pageParams:$(S.pageParams,w,L)}};if(o&&a.length){const S=o==="backward",w=S?getPreviousPageParam:getNextPageParam,C={pages:a,pageParams:l},A=w(s,C);c=await E(C,A,S)}else{const S=e??a.length;do{const w=u===0?l[0]??s.initialPageParam:getNextPageParam(s,c);if(u>0&&w==null)break;c=await E(c,w),u++}while(u<S)}return c};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i)}:t.fetchFn=f}}}function getNextPageParam(e,{pages:t,pageParams:i}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,i[s],i):void 0}function getPreviousPageParam(e,{pages:t,pageParams:i}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,i[0],i):void 0}var Mutation=(Rr=class extends Removable{constructor(t){super();we(this,mt);we(this,nr);we(this,ht);we(this,rt);we(this,jt);ge(this,nr,t.client),this.mutationId=t.mutationId,ge(this,rt,t.mutationCache),ge(this,ht,[]),this.state=t.state||getDefaultState(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){U(this,ht).includes(t)||(U(this,ht).push(t),this.clearGcTimeout(),U(this,rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,ht,U(this,ht).filter(i=>i!==t)),this.scheduleGc(),U(this,rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){U(this,ht).length||(this.state.status==="pending"?this.scheduleGc():U(this,rt).remove(this))}continue(){var t;return((t=U(this,jt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,u,f,d,h,p,m,g,v,b,y,E,S,w,C,A,O,I,L;const i=()=>{Me(this,mt,Mt).call(this,{type:"continue"})},s={client:U(this,nr),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,jt,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:($,V)=>{Me(this,mt,Mt).call(this,{type:"failed",failureCount:$,error:V})},onPause:()=>{Me(this,mt,Mt).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,rt).canRun(this)}));const o=this.state.status==="pending",a=!U(this,jt).canStart();try{if(o)i();else{Me(this,mt,Mt).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(l=U(this,rt).config).onMutate)==null?void 0:c.call(l,t,this,s));const V=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,t,s));V!==this.state.context&&Me(this,mt,Mt).call(this,{type:"pending",context:V,variables:t,isPaused:a})}const $=await U(this,jt).start();return await((h=(d=U(this,rt).config).onSuccess)==null?void 0:h.call(d,$,t,this.state.context,this,s)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,$,t,this.state.context,s)),await((v=(g=U(this,rt).config).onSettled)==null?void 0:v.call(g,$,null,this.state.variables,this.state.context,this,s)),await((y=(b=this.options).onSettled)==null?void 0:y.call(b,$,null,t,this.state.context,s)),Me(this,mt,Mt).call(this,{type:"success",data:$}),$}catch($){try{throw await((S=(E=U(this,rt).config).onError)==null?void 0:S.call(E,$,t,this.state.context,this,s)),await((C=(w=this.options).onError)==null?void 0:C.call(w,$,t,this.state.context,s)),await((O=(A=U(this,rt).config).onSettled)==null?void 0:O.call(A,void 0,$,this.state.variables,this.state.context,this,s)),await((L=(I=this.options).onSettled)==null?void 0:L.call(I,void 0,$,t,this.state.context,s)),$}finally{Me(this,mt,Mt).call(this,{type:"error",error:$})}}finally{U(this,rt).runNext(this)}}},nr=new WeakMap,ht=new WeakMap,rt=new WeakMap,jt=new WeakMap,mt=new WeakSet,Mt=function(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),notifyManager.batch(()=>{U(this,ht).forEach(s=>{s.onMutationUpdate(t)}),U(this,rt).notify({mutation:this,type:"updated",action:t})})},Rr);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MutationCache=(Tr=class extends Subscribable{constructor(t={}){super();we(this,_t);we(this,ft);we(this,ir);this.config=t,ge(this,_t,new Set),ge(this,ft,new Map),ge(this,ir,0)}build(t,i,s){const o=new Mutation({client:t,mutationCache:this,mutationId:++cr(this,ir)._,options:t.defaultMutationOptions(i),state:s});return this.add(o),o}add(t){U(this,_t).add(t);const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i);s?s.push(t):U(this,ft).set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(U(this,_t).delete(t)){const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&U(this,ft).delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i),o=s==null?void 0:s.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const i=scopeFor(t);if(typeof i=="string"){const o=(s=U(this,ft).get(i))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){notifyManager.batch(()=>{U(this,_t).forEach(t=>{this.notify({type:"removed",mutation:t})}),U(this,_t).clear(),U(this,ft).clear()})}getAll(){return Array.from(U(this,_t))}find(t){const i={exact:!0,...t};return this.getAll().find(s=>matchMutation(i,s))}findAll(t={}){return this.getAll().filter(i=>matchMutation(t,i))}notify(t){notifyManager.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return notifyManager.batch(()=>Promise.all(t.map(i=>i.continue().catch(noop$1))))}},_t=new WeakMap,ft=new WeakMap,ir=new WeakMap,Tr);function scopeFor(e){var t;return(t=e.options.scope)==null?void 0:t.id}var MutationObserver$1=(Ar=class extends Subscribable{constructor(i,s){super();we(this,St);we(this,bt);we(this,Tt);we(this,it);we(this,xt);ge(this,bt,i),this.setOptions(s),this.bindMethods(),Me(this,St,ur).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const s=this.options;this.options=U(this,bt).defaultMutationOptions(i),shallowEqualObjects(this.options,s)||U(this,bt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:U(this,it),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&hashKey(s.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((o=U(this,it))==null?void 0:o.state.status)==="pending"&&U(this,it).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=U(this,it))==null||i.removeObserver(this)}onMutationUpdate(i){Me(this,St,ur).call(this),Me(this,St,br).call(this,i)}getCurrentResult(){return U(this,Tt)}reset(){var i;(i=U(this,it))==null||i.removeObserver(this),ge(this,it,void 0),Me(this,St,ur).call(this),Me(this,St,br).call(this)}mutate(i,s){var o;return ge(this,xt,s),(o=U(this,it))==null||o.removeObserver(this),ge(this,it,U(this,bt).getMutationCache().build(U(this,bt),this.options)),U(this,it).addObserver(this),U(this,it).execute(i)}},bt=new WeakMap,Tt=new WeakMap,it=new WeakMap,xt=new WeakMap,St=new WeakSet,ur=function(){var s;const i=((s=U(this,it))==null?void 0:s.state)??getDefaultState();ge(this,Tt,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},br=function(i){notifyManager.batch(()=>{var s,o,a,l,c,u,f,d;if(U(this,xt)&&this.hasListeners()){const h=U(this,Tt).variables,p=U(this,Tt).context,m={client:U(this,bt),meta:this.options.meta,mutationKey:this.options.mutationKey};(i==null?void 0:i.type)==="success"?((o=(s=U(this,xt)).onSuccess)==null||o.call(s,i.data,h,p,m),(l=(a=U(this,xt)).onSettled)==null||l.call(a,i.data,null,h,p,m)):(i==null?void 0:i.type)==="error"&&((u=(c=U(this,xt)).onError)==null||u.call(c,i.error,h,p,m),(d=(f=U(this,xt)).onSettled)==null||d.call(f,void 0,i.error,h,p,m))}this.listeners.forEach(h=>{h(U(this,Tt))})})},Ar),QueryCache=(Ir=class extends Subscribable{constructor(t={}){super();we(this,gt);this.config=t,ge(this,gt,new Map)}build(t,i,s){const o=i.queryKey,a=i.queryHash??hashQueryKeyByOptions(o,i);let l=this.get(a);return l||(l=new Query({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){U(this,gt).has(t.queryHash)||(U(this,gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=U(this,gt).get(t.queryHash);i&&(t.destroy(),i===t&&U(this,gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return U(this,gt).get(t)}getAll(){return[...U(this,gt).values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>matchQuery(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>matchQuery(t,s)):i}notify(t){notifyManager.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gt=new WeakMap,Ir),QueryClient=(Pr=class{constructor(e={}){we(this,Ge);we(this,At);we(this,It);we(this,Xt);we(this,Jt);we(this,Pt);we(this,Qt);we(this,Zt);ge(this,Ge,e.queryCache||new QueryCache),ge(this,At,e.mutationCache||new MutationCache),ge(this,It,e.defaultOptions||{}),ge(this,Xt,new Map),ge(this,Jt,new Map),ge(this,Pt,0)}mount(){cr(this,Pt)._++,U(this,Pt)===1&&(ge(this,Qt,focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ge).onFocus())})),ge(this,Zt,onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ge).onOnline())})))}unmount(){var e,t;cr(this,Pt)._--,U(this,Pt)===0&&((e=U(this,Qt))==null||e.call(this),ge(this,Qt,void 0),(t=U(this,Zt))==null||t.call(this),ge(this,Zt,void 0))}isFetching(e){return U(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return U(this,At).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=U(this,Ge).get(t.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=U(this,Ge).build(this,t),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(resolveStaleTime(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return U(this,Ge).findAll(e).map(({queryKey:t,state:i})=>{const s=i.data;return[t,s]})}setQueryData(e,t,i){const s=this.defaultQueryOptions({queryKey:e}),o=U(this,Ge).get(s.queryHash),a=o==null?void 0:o.state.data,l=functionalUpdate(t,a);if(l!==void 0)return U(this,Ge).build(this,s).setData(l,{...i,manual:!0})}setQueriesData(e,t,i){return notifyManager.batch(()=>U(this,Ge).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,i)]))}getQueryState(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=U(this,Ge).get(t.queryHash))==null?void 0:i.state}removeQueries(e){const t=U(this,Ge);notifyManager.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=U(this,Ge);return notifyManager.batch(()=>(i.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const i={revert:!0,...t},s=notifyManager.batch(()=>U(this,Ge).findAll(e).map(o=>o.cancel(i)));return Promise.all(s).then(noop$1).catch(noop$1)}invalidateQueries(e,t={}){return notifyManager.batch(()=>(U(this,Ge).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const i={...t,cancelRefetch:t.cancelRefetch??!0},s=notifyManager.batch(()=>U(this,Ge).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,i);return i.throwOnError||(a=a.catch(noop$1)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(noop$1)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=U(this,Ge).build(this,t);return i.isStaleByTime(resolveStaleTime(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(noop$1).catch(noop$1)}fetchInfiniteQuery(e){return e.behavior=infiniteQueryBehavior(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(noop$1).catch(noop$1)}ensureInfiniteQueryData(e){return e.behavior=infiniteQueryBehavior(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return onlineManager.isOnline()?U(this,At).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Ge)}getMutationCache(){return U(this,At)}getDefaultOptions(){return U(this,It)}setDefaultOptions(e){ge(this,It,e)}setQueryDefaults(e,t){U(this,Xt).set(hashKey(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...U(this,Xt).values()],i={};return t.forEach(s=>{partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,t){U(this,Jt).set(hashKey(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...U(this,Jt).values()],i={};return t.forEach(s=>{partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...U(this,It).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hashQueryKeyByOptions(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...U(this,It).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){U(this,Ge).clear(),U(this,At).clear()}},Ge=new WeakMap,At=new WeakMap,It=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Pt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap,Pr),QueryClientContext=React__namespace.createContext(void 0),useQueryClient=e=>{const t=React__namespace.useContext(QueryClientContext);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},QueryClientProvider=({client:e,children:t})=>(React__namespace.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:e,children:t})),IsRestoringContext=React__namespace.createContext(!1),useIsRestoring=()=>React__namespace.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QueryErrorResetBoundaryContext=React__namespace.createContext(createValue()),useQueryErrorResetBoundary=()=>React__namespace.useContext(QueryErrorResetBoundaryContext),ensurePreventErrorBoundaryRetry=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},useClearResetErrorBoundary=e=>{React__namespace.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||shouldThrowError(i,[e.error,s])),defaultThrowOnError=(e,t)=>t.state.data===void 0,ensureSuspenseTimers=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>i(s(...o)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fetchOptimistic=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function useBaseQuery(e,t,i){var h,p,m,g,v;const s=useIsRestoring(),o=useQueryErrorResetBoundary(),a=useQueryClient(),l=a.defaultQueryOptions(e);(p=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,l),l._optimisticResults=s?"isRestoring":"optimistic",ensureSuspenseTimers(l),ensurePreventErrorBoundaryRetry(l,o),useClearResetErrorBoundary(o);const c=!a.getQueryCache().get(l.queryHash),[u]=React__namespace.useState(()=>new t(a,l)),f=u.getOptimisticResult(l),d=!s&&e.subscribed!==!1;if(React__namespace.useSyncExternalStore(React__namespace.useCallback(b=>{const y=d?u.subscribe(notifyManager.batchCalls(b)):noop$1;return u.updateResult(),y},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),React__namespace.useEffect(()=>{u.setOptions(l)},[l,u]),shouldSuspend(l,f))throw fetchOptimistic(l,u,o);if(getHasError({result:f,errorResetBoundary:o,throwOnError:l.throwOnError,query:a.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;if((g=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||g.call(m,l,f),l.experimental_prefetchInRender&&!isServer&&willFetch(f,s)){const b=c?fetchOptimistic(l,u,o):(v=a.getQueryCache().get(l.queryHash))==null?void 0:v.promise;b==null||b.catch(noop$1).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?f:u.trackResult(f)}function useQuery(e,t){return useBaseQuery(e,QueryObserver)}function useSuspenseQuery(e,t){return useBaseQuery({...e,enabled:!0,suspense:!0,throwOnError:defaultThrowOnError,placeholderData:void 0},QueryObserver)}function useMutation(e,t){const i=useQueryClient(),[s]=React__namespace.useState(()=>new MutationObserver$1(i,e));React__namespace.useEffect(()=>{s.setOptions(e)},[s,e]);const o=React__namespace.useSyncExternalStore(React__namespace.useCallback(l=>s.subscribe(notifyManager.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=React__namespace.useCallback((l,c)=>{s.mutate(l,c).catch(noop$1)},[s]);if(o.error&&shouldThrowError(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}const PROFILE_TAG="profile";function useProfile(e){return useSuspenseQuery({queryKey:[PROFILE_TAG],queryFn:async()=>{const t=await window.CryptoSteamSDK.getProfile();return setUser({id:String(t.id)}),t},select:t=>({...t,inventory:t.inventory||[],balance_usdt:dividePriceResponse(t.balance_usdt),balances:{...t.balances,usdt:dividePriceResponse(t.balance_usdt)}}),...e})}const LevelInfoModal=({children:e})=>{const{t}=useTranslation(),[i,s]=React.useState(!1),{data:{level_up_exp:o,experience:a,level:l}}=useProfile(),[c]=useAnimateNumber(a);return jsxRuntimeExports.jsx(Drawer,{trigger:e,open:i,onOpenChange:s,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-18 flex items-center justify-center",children:jsxRuntimeExports.jsx(XpProgress,{experience:a,xpNeeded:o,level:l,size:64,className:"text-[var(--tgui--button_color)]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:t("levelInfoModal.title")}),jsxRuntimeExports.jsxs(Caption,{level:"1",weight:"2",className:"text-center",children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--tgui--text_color)"},children:c.toLocaleString()}),jsxRuntimeExports.jsxs("span",{style:{color:"var(--tgui--subtitle_text_color)"},children:[" / ",o.toLocaleString()," XP"]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"-mt-1.5 text-center",children:jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:t("levelInfoModal.description")})}),jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:()=>s(!1),mode:"filled",style:{height:42},children:t("levelInfoModal.action")})]})})};function AnimatedBalance({value:e,style:t,className:i,colorText:s="",noRounding:o}){const[a,l]=useAnimateNumber(0,!1,o),[c,u]=React.useState(s),f=React.useRef(0),d=React.useRef();React.useEffect(()=>{const p=e,m=f.current;return d.current&&clearTimeout(d.current),m!==0&&(p>m?u("#22C55E"):p<m&&u("#FF7700")),l(p),d.current=setTimeout(()=>{u(s)},300),f.current=p,()=>{d.current&&clearTimeout(d.current)}},[e,l,s]);const h=o?Math.trunc((a??0)*100)/100:Math.round(a??0);return jsxRuntimeExports.jsx(Text,{weight:"1",className:cn$1("text-rounded",i),style:{color:c||"inherit",transition:"color 0.3s ease",...t},children:formatter.format(h)})}const Icons={thumbsDownOutlined:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.5 15.16-.61.53a.45.45 0 0 0-.15.24l-.92 4.36a3.1 3.1 0 0 1-4.37 2.24 3.24 3.24 0 0 1-1.8-2.93v-2.18c-1.82-.01-3.42-.47-4.57-1.6-1.17-1.14-1.7-2.8-1.7-4.88V9.77c0-2.07.53-3.74 1.7-4.87 1.16-1.12 2.78-1.57 4.6-1.57h7.87c.41-.53 1-.91 1.68-1.04.24-.04.5-.04.8-.04h.14A2.79 2.79 0 0 1 21.2 4.6c.04.24.04.52.04.83v7.72c0 .32 0 .6-.04.84a2.79 2.79 0 0 1-2.22 2.3c-.24.04-.5.04-.8.04h-.14c-.3 0-.57 0-.8-.04a2.73 2.73 0 0 1-1.75-1.13Zm-3.52 4.71a1.23 1.23 0 0 1-1.73.89 1.29 1.29 0 0 1-.72-1.16v-3.16a.96.96 0 0 0-.94-.97h-.9c-1.56 0-2.63-.4-3.32-1.06-.67-.66-1.12-1.74-1.12-3.47V9.77c0-1.73.45-2.8 1.12-3.44.68-.66 1.75-1.05 3.32-1.05h7.28V13.1a.96.96 0 0 0-.08.06l-1.21 1.04c-.4.34-.67.8-.78 1.33l-.92 4.35Zm6.67-5.5-.54.01-.55-.01a.87.87 0 0 1-.7-.72V4.93a.87.87 0 0 1 .7-.72l.55-.01.54.01c.36.07.64.36.7.72l.01.57v7.58l-.01.57a.87.87 0 0 1-.7.72Z",clipRule:"evenodd"})}),thumbsUpOutlined:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8.2 8.97.6-.63c.05-.05.1-.12.11-.2l1.02-4.56a3.03 3.03 0 0 1 3.55-2.36 3.11 3.11 0 0 1 2.43 3.07v2.4h.1c1.94 0 3.55.43 4.66 1.57 1.1 1.15 1.52 2.81 1.52 4.82v1.09c0 2.08-.58 3.73-1.74 4.84A6.2 6.2 0 0 1 16 20.56h-7.9c-.33.48-.81.84-1.38 1-.33.08-.69.08-1.08.08h-.19c-.39 0-.75 0-1.08-.09a2.56 2.56 0 0 1-1.77-1.84 4.54 4.54 0 0 1-.09-1.11v-7.78c0-.4 0-.78.09-1.12.23-.9.9-1.6 1.77-1.84.33-.09.7-.09 1.08-.09h.19c.39 0 .75 0 1.08.1.61.16 1.13.56 1.46 1.1Zm3.57-4.95c.14-.62.73-1.02 1.34-.9.53.12.92.6.92 1.17v3.38c0 .54.42.97.94.97H16c1.73 0 2.73.39 3.33 1 .6.62.96 1.66.96 3.44v1.09c0 1.7-.46 2.77-1.13 3.41-.69.66-1.73 1.03-3.16 1.03L8.6 18.6v-7.28l1.54-1.6c.3-.31.52-.7.61-1.14l1.03-4.56Zm-5.06 6.9v7.58c0 .57-.01.66-.03.71a.64.64 0 0 1-.44.46c-.05.01-.14.02-.68.02-.55 0-.64 0-.69-.02a.64.64 0 0 1-.44-.46 4.12 4.12 0 0 1-.02-.71v-7.58c0-.57 0-.66.02-.71.05-.23.22-.4.44-.46.05-.02.14-.03.69-.03.54 0 .63.01.68.03.22.06.39.23.44.46.02.05.02.15.03.71Z",clipRule:"evenodd"})}),thumbsDownFilled:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m21.32 13.75.01-.58V5l-.01-.59a2 2 0 0 0-1.74-1.73L19 2.67l-.59.01a2 2 0 0 0-1.73 1.73l-.01.59v8.17l.01.58a2 2 0 0 0 1.73 1.73c.13.02.28.02.59.02.3 0 .46 0 .58-.02a2 2 0 0 0 1.74-1.73ZM7.5 3.83c-3.79 0-6 1.79-6 5.89v1.26c0 4.1 2.21 5.69 6 5.69h1v3.65a2.18 2.18 0 0 0 4.26.63l1.73-5.52c.05-.17.08-.34.08-.5V5.7c0-.65 0-.98-.13-1.23-.11-.22-.3-.4-.51-.51-.25-.13-.58-.13-1.23-.13H7.5Z"})}),thumbsUpFilled:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m2.68 10.24-.01.59v8.16l.01.59a2 2 0 0 0 1.73 1.73c.13.02.29.02.59.02s.46 0 .59-.02a2 2 0 0 0 1.73-1.73l.01-.59v-8.16l-.01-.59a2 2 0 0 0-1.73-1.73C5.46 8.5 5.3 8.5 5 8.5s-.46 0-.59.02a2 2 0 0 0-1.73 1.73ZM16.5 20.16c3.79 0 6-1.78 6-5.88v-1.26c0-4.1-2.21-5.7-6-5.7h-1V3.69a2.18 2.18 0 0 0-4.26-.63L9.51 8.57c-.05.16-.08.33-.08.5v9.22c0 .66 0 .98.13 1.23.11.22.29.4.51.51.25.13.58.13 1.23.13h5.2Z"})}),star:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M11.17 2.49a.87.87 0 0 1 1.66 0L13.9 5.7c.16.5.74.74 1.21.5l3.03-1.51a.87.87 0 0 1 1.17 1.17L17.8 8.9a.87.87 0 0 0 .5 1.21l3.21 1.07c.8.27.8 1.4 0 1.66L18.3 13.9a.87.87 0 0 0-.5 1.21l1.51 3.03a.87.87 0 0 1-1.17 1.17L15.1 17.8a.87.87 0 0 0-1.21.5l-1.07 3.21c-.27.8-1.4.8-1.66 0L10.1 18.3a.87.87 0 0 0-1.21-.5L5.86 19.3a.87.87 0 0 1-1.17-1.17L6.2 15.1a.87.87 0 0 0-.5-1.21l-3.21-1.07a.87.87 0 0 1 0-1.66L5.7 10.1c.5-.16.74-.74.5-1.21L4.7 5.86A.87.87 0 0 1 5.86 4.7L8.9 6.2a.87.87 0 0 0 1.21-.5l1.07-3.21Z"})}),smile:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.987 14c0-4.953 4.024-8.991 9.015-8.991S23.017 9.047 23.017 14s-4.024 8.991-9.015 8.991S4.987 18.953 4.987 14m9.015-11c-6.063 0-11 4.912-11 11s4.937 11 11 11 11-4.912 11-11-4.937-11-11-11m4.438 13.835a1.01 1.01 0 0 0-.604-1.283.99.99 0 0 0-1.27.616 1 1 0 0 1-.069.132 2.1 2.1 0 0 1-.372.466c-.348.331-.983.728-2.123.728s-1.775-.397-2.123-.727a2.1 2.1 0 0 1-.372-.467 1 1 0 0 1-.07-.132l-.005-.013-.003-.007a.99.99 0 0 0-1.261-.596c-.517.186-.787.76-.604 1.283l.89-.32-.89.32v.002l.002.003.002.006.005.013a2 2 0 0 0 .059.142c.038.084.092.194.166.321.148.254.38.582.722.908.704.67 1.82 1.272 3.482 1.272s2.778-.602 3.482-1.272a4.2 4.2 0 0 0 .722-.908 3.5 3.5 0 0 0 .225-.463l.005-.014.002-.005.001-.003v-.001l-.886-.32zM11.007 12.8c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.247 1.476m5.986 0c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.246 1.476Z",clipRule:"evenodd"})}),discountOutline:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.04 2.57a2.81 2.81 0 0 0-4.05 0l-.65.68a1.1 1.1 0 0 1-.9.33l-.94-.1a2.81 2.81 0 0 0-3.1 2.6L4.35 7c-.02.34-.2.65-.48.84l-.78.52a2.81 2.81 0 0 0-.7 3.98l.55.76c.2.28.26.63.17.95l-.26.9a2.81 2.81 0 0 0 2.02 3.5l.91.23c.33.08.6.31.74.62l.38.86a2.81 2.81 0 0 0 3.8 1.38l.84-.41c.3-.15.66-.15.97 0l.84.41c1.43.7 3.15.07 3.8-1.38l.38-.86c.14-.3.41-.54.74-.62l.9-.23a2.81 2.81 0 0 0 2.03-3.5l-.26-.9a1.1 1.1 0 0 1 .17-.95l.55-.76c.93-1.28.62-3.09-.7-3.98l-.78-.52a1.1 1.1 0 0 1-.48-.84l-.07-.93a2.81 2.81 0 0 0-3.1-2.6l-.93.1a1.1 1.1 0 0 1-.9-.33l-.65-.68Zm-2.81 1.2a1.1 1.1 0 0 1 1.57 0l.66.67c.6.62 1.45.93 2.31.84l.93-.1a1.1 1.1 0 0 1 1.21 1.02l.07.93c.06.87.51 1.65 1.23 2.14l.78.52c.51.35.64 1.05.27 1.56l-.55.76c-.5.7-.66 1.6-.43 2.42l.26.9a1.1 1.1 0 0 1-.79 1.37l-.9.23c-.85.2-1.54.8-1.9 1.58l-.38.86a1.1 1.1 0 0 1-1.48.54l-.84-.41a2.81 2.81 0 0 0-2.47 0l-.84.4a1.1 1.1 0 0 1-1.48-.53l-.38-.86a2.81 2.81 0 0 0-1.9-1.58l-.9-.23a1.1 1.1 0 0 1-.8-1.37l.27-.9c.24-.83.08-1.72-.43-2.42l-.55-.76a1.1 1.1 0 0 1 .27-1.56l.78-.52a2.81 2.81 0 0 0 1.23-2.14l.07-.93a1.1 1.1 0 0 1 1.2-1.02l.94.1c.86.1 1.71-.22 2.31-.84l.66-.68Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 6c.36 0 .64.29.64.64v.68c1.66.17 2.8.98 3.17 1.86a.64.64 0 1 1-1.19.5c-.12-.3-.73-.9-1.98-1.07v2.82c1.22.19 2.02.53 2.52 1 .62.59.7 1.26.7 1.71 0 .84-.54 1.5-1.22 1.91-.55.34-1.24.55-2 .63v.68a.64.64 0 0 1-1.28 0v-.68c-1.66-.17-2.8-.98-3.17-1.86a.64.64 0 0 1 1.19-.5c.12.3.73.9 1.98 1.07v-2.82a4.62 4.62 0 0 1-2.52-1 2.21 2.21 0 0 1-.7-1.71c0-.84.54-1.5 1.23-1.91a4.78 4.78 0 0 1 1.99-.63v-.68c0-.35.29-.64.64-.64Zm-.64 2.61c-.54.07-1 .23-1.33.43-.45.28-.6.59-.6.82 0 .3.04.54.29.77.23.2.7.47 1.64.63V8.61Zm1.28 4.13v2.65c.54-.07 1-.23 1.33-.43.45-.28.6-.59.6-.82 0-.3-.04-.54-.29-.77-.22-.2-.7-.47-1.64-.63Z",clipRule:"evenodd"})]}),cup:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.6 1.71H9.4c-.57 0-1.05 0-1.45.04a3 3 0 0 0-1.2.33c-.57.3-1.06.85-1.32 1.44a3.57 3.57 0 0 0-.21 1.67c-.54-.1-1.1-.04-1.59.12A2.76 2.76 0 0 0 1.71 8c0 1.34.8 2.57 1.85 3.41a6.47 6.47 0 0 0 3.21 1.4c.15.35.3.67.47.98a6.82 6.82 0 0 0 2.39 2.7c-.03.47-.1.8-.18 1.02-.1.28-.21.44-.34.59l-.15.16-.1.1a2.28 2.28 0 0 0-.71 1.74v1.33c0 .47.38.86.85.86h6c.47 0 .86-.39.86-.86V20.1a2.28 2.28 0 0 0-.72-1.74l-.1-.1-.15-.16c-.13-.15-.25-.31-.34-.59a3.9 3.9 0 0 1-.18-1.02 6.82 6.82 0 0 0 2.39-2.7c.16-.3.32-.63.47-.98a6.47 6.47 0 0 0 3.21-1.4A4.57 4.57 0 0 0 22.3 8c0-1.42-.9-2.34-1.92-2.69a3.22 3.22 0 0 0-1.59-.12c.04-.62.01-1.16-.21-1.67a3.11 3.11 0 0 0-1.32-1.44 3 3 0 0 0-1.2-.33c-.4-.04-.88-.04-1.44-.04ZM12.7 17.1a4.72 4.72 0 0 1-1.4 0c-.05.37-.13.7-.22.97-.19.55-.45.9-.7 1.18l-.23.25-.06.06c-.08.08-.12.13-.15.18-.03.05-.08.13-.08.37v.47h4.28v-.47c0-.24-.05-.32-.08-.37a1.42 1.42 0 0 0-.17-.2l-.04-.04-.24-.25a3.3 3.3 0 0 1-.69-1.18c-.1-.28-.17-.6-.21-.97Zm6.66-7c-.43.35-.94.63-1.48.81.33-1.15.56-2.43.73-3.8.21-.2.7-.34 1.2-.16.44.15.76.48.76 1.06 0 .66-.41 1.43-1.21 2.09Zm-13.24.81a25.2 25.2 0 0 1-.73-3.8c-.21-.2-.7-.34-1.2-.16-.44.15-.76.48-.76 1.06 0 .66.41 1.43 1.21 2.09.43.35.94.63 1.48.81Zm1.45-7.32c.1-.05.24-.1.53-.12.31-.03.72-.03 1.33-.03h5.14c.61 0 1.02 0 1.33.03.3.02.43.07.53.12.23.13.46.38.57.62.1.25.1.54 0 1.72-.25 2.94-.85 5.39-1.75 7.06-.9 1.68-2 2.45-3.25 2.45s-2.35-.77-3.25-2.45c-.9-1.67-1.5-4.12-1.75-7.06-.1-1.18-.1-1.47 0-1.72.1-.24.34-.5.57-.62Z",clipRule:"evenodd"})}),games:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.82 3.86h.36c1.38 0 2.46 0 3.33.06.9.07 1.65.22 2.34.54a6.37 6.37 0 0 1 2.74 2.43c.4.64.62 1.35.78 2.22.17.85.29 1.91.44 3.27l.46 4.06c.05.45 0 .9-.13 1.34a3.4 3.4 0 0 1-6.17.7l-1.39-2.33a.22.22 0 0 0-.19-.11H9.61a.22.22 0 0 0-.19.1l-1.4 2.35a3.4 3.4 0 0 1-6.16-.7 3.3 3.3 0 0 1-.13-1.35l.46-4.06c.15-1.36.27-2.42.44-3.27.16-.87.39-1.58.78-2.22a6.37 6.37 0 0 1 2.74-2.43 6.6 6.6 0 0 1 2.34-.54c.87-.06 1.95-.06 3.33-.06Zm-3.2 1.7c-.79.07-1.3.18-1.73.38a4.7 4.7 0 0 0-2.02 1.8c-.25.4-.43.9-.57 1.67a45.2 45.2 0 0 0-.43 3.18l-.45 4.02a1.7 1.7 0 0 0 3.14 1.06l1.39-2.35c.34-.57.97-.93 1.66-.93h4.78c.7 0 1.32.36 1.66.93l1.4 2.35a1.69 1.69 0 0 0 3.13-1.06l-.45-4.02c-.16-1.4-.27-2.4-.43-3.18a4.83 4.83 0 0 0-.57-1.68 4.69 4.69 0 0 0-2.02-1.79 4.9 4.9 0 0 0-1.73-.37c-.8-.07-1.82-.07-3.23-.07h-.3c-1.41 0-2.43 0-3.23.07Zm-.09 2.42c.47 0 .85.37.85.82v.55h.54c.47 0 .85.37.85.83 0 .45-.38.82-.85.82h-.54v.55c0 .45-.38.82-.85.82a.84.84 0 0 1-.85-.82V11h-.54a.84.84 0 0 1-.84-.82c0-.46.38-.83.84-.83h.54V8.8c0-.45.38-.82.85-.82Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M16.62 8.3c0 .47-.4.86-.9.86-.49 0-.89-.39-.89-.87s.4-.86.9-.86.9.38.9.86ZM18.51 10.12c0 .48-.4.87-.9.87-.49 0-.9-.39-.9-.87s.41-.86.9-.86c.5 0 .9.38.9.86ZM14.74 10.12c0 .48-.4.87-.9.87s-.9-.39-.9-.87.4-.86.9-.86.9.38.9.86ZM16.62 11.95c0 .48-.4.87-.9.87-.49 0-.89-.39-.89-.87s.4-.87.9-.87.9.4.9.87Z"})]}),download:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M19.14 19c.53 0 .96.45.96 1s-.43 1-.96 1H4.86a.98.98 0 0 1-.96-1c0-.55.43-1 .96-1h14.28ZM12 2c.53 0 .95.45.95 1v10.34l4.57-4.8a.91.91 0 0 1 1.34 0c.38.4.38 1.03 0 1.42l-6.19 6.5a.91.91 0 0 1-1.34 0l-6.2-6.5a1.04 1.04 0 0 1 0-1.42.93.93 0 0 1 1.35 0l4.57 4.8V3c0-.55.42-1 .95-1Z"})}),checkThin:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M24.66 6.21c.4.38.4 1 .03 1.4l-13.3 13.78a.99.99 0 0 1-1.43 0L3.31 14.5a.99.99 0 1 1 1.43-1.37l5.93 6.15 12.6-13.05a1 1 0 0 1 1.4-.02Z",clipRule:"evenodd"})}),addCircle:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.06 18.58a8.65 8.65 0 0 1-8.57-8.57c0-1.18.22-2.28.67-3.32a8.73 8.73 0 0 1 7.9-5.26c1.17 0 2.28.23 3.31.67a8.76 8.76 0 0 1 4.6 4.6c.45 1.03.67 2.13.67 3.3 0 1.18-.22 2.28-.67 3.32a8.76 8.76 0 0 1-4.6 4.59 8.24 8.24 0 0 1-3.31.67Zm0-1.7a6.76 6.76 0 0 0 4.87-2 6.9 6.9 0 1 0-4.87 2ZM10 5.5a.75.75 0 0 0-.75.75v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5h-3v-3A.75.75 0 0 0 10 5.5Z",clipRule:"evenodd"})}),search:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("circle",{cx:"9",cy:"10",r:"6",stroke:"currentColor",strokeWidth:"2"}),jsxRuntimeExports.jsx("rect",{width:"8",height:"2",x:"13.88",y:"13.46",fill:"currentColor",rx:"1",transform:"rotate(45 13.88 13.46)"})]}),chevronLeft:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M.72 6a.88.88 0 0 1 .25-.63L5.06.97a.66.66 0 0 1 .86-.13c.11.07.2.17.27.29a.84.84 0 0 1-.13.97L2.42 6l3.64 3.9c.15.17.22.36.22.58a.8.8 0 0 1-.36.68.66.66 0 0 1-.86-.12L.97 6.63c-.08-.1-.15-.2-.19-.3A.86.86 0 0 1 .72 6Z"})}),chevronRight:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M6.42 5.77c0 .12-.02.23-.07.33a.9.9 0 0 1-.21.3l-4.5 4.4a.77.77 0 0 1-.56.23.77.77 0 0 1-.4-.1.76.76 0 0 1-.4-.68c0-.22.09-.41.25-.58l4.01-3.9-4-3.9A.79.79 0 0 1 1.07.5c.21 0 .4.07.55.22l4.5 4.41c.1.1.17.2.22.3.05.1.07.2.07.33Z"})}),close:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor","fill-opacity":".8",d:"M7.86 17.14a1 1 0 0 1-1-1.02c0-.27.1-.52.3-.7L10.54 12l-3.4-3.4a.98.98 0 0 1-.3-.71c0-.58.45-1 1.01-1 .28 0 .5.09.7.27l3.42 3.42 3.45-3.43a1 1 0 0 1 1.72.71c0 .29-.1.5-.31.73L13.43 12l3.4 3.4c.2.18.3.44.3.72 0 .57-.45 1.02-1.03 1.02a.97.97 0 0 1-.72-.3l-3.4-3.4-3.38 3.4c-.2.2-.46.3-.74.3Z",opacity:".5"})})};function Icon({name:e,size:t=24,className:i,title:s,"aria-label":o,...a}){const l=Icons[e],c=!!(s||o);return jsxRuntimeExports.jsx(l,{className:cn$1("aspect-square",i),width:t,height:t,role:"img","aria-hidden":!c,"aria-label":o,...a,children:s?jsxRuntimeExports.jsx("title",{children:s}):null})}const useForceRerender=()=>{const[,e]=React.useState(0);return()=>e(t=>t+1)},useMiniApp=()=>{const e=useForceRerender();return React.useEffect(()=>{var i;const t=["viewportChanged","themeChanged","safeAreaChanged","contentSafeAreaChanged","fullscreenChanged"];for(const s of t)(i=window.Telegram.WebApp)==null||i.onEvent(s,e);return window.screen.orientation.addEventListener("change",e),()=>{var s;window.screen.orientation.removeEventListener("change",e);for(const o of t)(s=window.Telegram.WebApp)==null||s.offEvent(o,e)}},[e]),{miniApp:window.Telegram.WebApp}};function useThrottle(e,t=500){const[i,s]=React.useState(e),o=React.useRef(null);return React.useEffect(()=>{const a=Date.now();if(o.current&&a>=o.current+t)o.current=a,s(e);else{const l=window.setTimeout(()=>{o.current=a,s(e)},t);return()=>window.clearTimeout(l)}},[e,t]),i}const createStoreImpl=e=>{let t;const i=new Set,s=(f,d)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),i.forEach(m=>m(t,p))}},o=()=>t,c={setState:s,getState:o,getInitialState:()=>u,subscribe:f=>(i.add(f),()=>i.delete(f))},u=t=e(s,o,c);return c},createStore=e=>e?createStoreImpl(e):createStoreImpl,identity=e=>e;function useStore(e,t=identity){const i=React.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return React.useDebugValue(i),i}const createImpl=e=>{const t=createStore(e),i=s=>useStore(t,s);return Object.assign(i,t),i},create$2=e=>e?createImpl(e):createImpl,useInventoryModalStore=create$2(e=>({isOpen:!1,setIsOpen:t=>e({isOpen:t})})),useTopUpModalStore=create$2(e=>({isOpen:!1,setIsOpen:t=>e({isOpen:t})})),IconTelegramStar=e=>jsxRuntimeExports.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsxRuntimeExports.jsx("title",{children:"Telegram star"}),jsxRuntimeExports.jsx("path",{d:"M5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6242 6.87734 14.5373 7.05617 14.4007 7.19164L11.7111 9.85999C11.6025 9.96772 11.5501 10.1203 11.5689 10.2729L12.0159 13.8751C12.0798 14.3908 11.718 14.8614 11.208 14.9259C11.0147 14.9504 10.8185 14.9132 10.6472 14.8191L7.80591 13.2571C7.60021 13.1442 7.35288 13.1409 7.14436 13.2484L4.20051 14.7679C3.78627 14.9819 3.27883 14.8156 3.06727 14.3968C2.98815 14.2401 2.95889 14.0626 2.9836 13.8883L3.219 12.2357C3.33411 11.4274 3.83114 10.7262 4.55123 10.3562L7.82109 8.67603C7.90844 8.63116 7.94313 8.52343 7.89869 8.43521C7.86444 8.36671 7.79074 8.32813 7.71574 8.33897L3.71669 8.91512C3.10542 9.00334 2.48548 8.82972 2.00622 8.43608L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162Z",fill:"url(#paint0_linear_13203_44637)"}),jsxRuntimeExports.jsx("path",{d:"M8.14979 9.42368C8.22479 9.41285 8.29849 9.45143 8.33273 9.51993C8.37717 9.60815 8.34249 9.71588 8.25513 9.76075L4.98527 11.4409C4.26519 11.8109 3.76815 12.5121 3.65305 13.3204L3.44604 14.7745C3.28846 14.6964 3.15363 14.5679 3.06779 14.3977C2.98867 14.241 2.95941 14.0635 2.98412 13.8892L3.21952 12.2366C3.33463 11.4283 3.83166 10.7271 4.55175 10.3571L5.67393 9.78026L8.14979 9.42368Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6385 6.75704 14.6209 6.82705 14.5954 6.89381C14.5175 6.85783 14.4332 6.83334 14.3439 6.8225L10.9414 6.41173C10.6438 6.37575 10.3843 6.19042 10.2516 5.91881L8.62658 2.5939C8.55006 2.43718 8.42499 2.30972 8.27065 2.23103C7.87701 2.03031 7.3971 2.19007 7.19876 2.58783L5.4781 6.03543C5.37883 6.23485 5.18786 6.3712 4.96893 6.39959L1.55427 6.84179C1.3284 6.87105 1.12226 6.98702 0.978764 7.16563C0.905716 7.25646 0.853259 7.35747 0.820528 7.4626L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M6.45499 1.35048C6.73938 0.780608 7.42912 0.551056 7.99466 0.83935C8.2164 0.952283 8.39523 1.1348 8.50491 1.35893L10.1298 4.68385C10.2111 4.85011 10.3691 4.96304 10.5496 4.98493L13.9522 5.39548C14.6048 5.47438 15.0691 6.07091 14.9915 6.72705C14.9597 6.99692 14.8376 7.24815 14.6451 7.43912L11.9556 10.1072C11.9235 10.1393 11.9074 10.1853 11.9133 10.2315L12.3603 13.8336C12.4476 14.5383 11.9523 15.1825 11.2517 15.2714C10.9855 15.305 10.7159 15.2536 10.4805 15.1242L7.63895 13.5624C7.53468 13.505 7.4094 13.5033 7.30362 13.5579L4.35977 15.0774C3.77364 15.3798 3.05616 15.1448 2.75789 14.5546C2.64669 14.3343 2.60572 14.0851 2.64041 13.8408L2.87581 12.1879C3.00673 11.2687 3.57248 10.4705 4.39293 10.0489L6.7719 8.8264L3.76649 9.2597C3.0839 9.35811 2.392 9.17452 1.8464 8.75313L1.78636 8.70544L0.454356 7.61166C-0.0728106 7.179 -0.152796 6.39801 0.275093 5.86564C0.474515 5.61744 0.761508 5.45596 1.07625 5.41521L4.49091 4.97301C4.59517 4.95957 4.68643 4.89433 4.73455 4.79808L6.45499 1.35048ZM7.6797 1.45734C7.45838 1.34441 7.1883 1.43436 7.07558 1.66023L5.35514 5.10784C5.20427 5.41022 4.91403 5.61766 4.58 5.6608L1.16534 6.10299C1.02856 6.12077 0.903271 6.19122 0.815699 6.30025C0.625815 6.5363 0.661581 6.88442 0.8946 7.07561L2.22661 8.16939C2.63065 8.50104 3.15262 8.64735 3.66743 8.57322L7.66626 7.99685C7.88952 7.96477 8.10759 8.07922 8.20882 8.28059C8.33844 8.53832 8.23678 8.85371 7.9797 8.98593L4.71005 10.6658C4.09011 10.9843 3.66179 11.5886 3.56251 12.2859L3.32711 13.9385C3.31237 14.0424 3.32993 14.1483 3.37696 14.2418C3.50182 14.4889 3.799 14.5862 4.04156 14.4609L6.98563 12.9416C7.29646 12.781 7.66626 12.7858 7.9732 12.9544L10.8145 14.5162C10.9216 14.5752 11.0439 14.5983 11.1646 14.5832C11.4841 14.5426 11.7123 14.2459 11.6718 13.919L11.2248 10.3169C11.1928 10.0578 11.2821 9.79836 11.4672 9.61498L14.1566 6.94663C14.2374 6.86643 14.2892 6.76022 14.3027 6.64555C14.3356 6.36766 14.1403 6.11708 13.8691 6.08413L10.4664 5.67359C10.0517 5.62351 9.69082 5.36557 9.50657 4.9884L7.88172 1.66348C7.83794 1.57417 7.76705 1.50178 7.6797 1.45734Z",fill:"url(#paint1_linear_13203_44637)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_13203_44637",x1:"5.54898",y1:"4.31195",x2:"11.4016",y2:"14.7166",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_13203_44637",x1:"7.50002",y1:"1.06175",x2:"7.50002",y2:"14.7178",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),coinImage=assetUrl("cs-coin.webp"),IconBalanceCoins=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:coinImage,style:{aspectRatio:"1/1",...e},...t,alt:""}),image=assetUrl("icon_usdt.webp"),IconUsdt=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:image,style:{aspectRatio:"1/1",height:32,...e},...t,alt:""});React.memo(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-[var(--tabbar-current-height)] shrink-0"}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]}));function BottomSentinelSafeArea(){return jsxRuntimeExports.jsx("div",{className:"h-[var(--tg-safe-area-inset-bottom)] shrink-0"})}const boxRegularIcon=assetUrl("boxes/rewards/box_regular.webp"),SnackbarContext=React.createContext({showSnackbar:()=>{}}),useSnackbar=()=>React.useContext(SnackbarContext),CustomSnackbar=({id:e,before:t,after:i,className:s,children:o})=>jsxRuntimeExports.jsx("div",{id:e,className:s,children:jsxRuntimeExports.jsxs("div",{children:[t&&jsxRuntimeExports.jsx("div",{className:"before",children:t}),jsxRuntimeExports.jsx("div",{className:"content",children:o}),i&&jsxRuntimeExports.jsx("div",{className:"after",children:i})]})}),SnackbarProvider=({children:e})=>{const[t,i]=React.useState([]),[s,o]=React.useState([]),a=React.useRef(0),l=React.useRef(new Map),c=React.useCallback(p=>{i(m=>m.map(g=>g.id===p?{...g,animationState:"exit"}:g)),l.current.set(p,setTimeout(()=>{i(m=>m.filter(g=>g.id!==p)),l.current.delete(p)},300))},[]),u=React.useCallback(p=>{o(m=>m.map(g=>g.id===p?{...g,animationState:"exit"}:g)),l.current.set(p,setTimeout(()=>{o(m=>m.filter(g=>g.id!==p)),l.current.delete(p)},300))},[]),f=React.useCallback((p,m={})=>{const g=++a.current,v={id:g,message:p,before:m.before||d(m.type),after:m.after||null,coins:m.coins||null,gems:m.gems||null,usdt:m.usdt||null,isSpentCoins:m.isSpentCoins||!1,boxes:m.boxes||null,type:m.type||null,animationState:"enter"};m.type==="warning"||m.type==="error"?(o(y=>[...y,v]),l.current.set(g,setTimeout(()=>u(g),3e3))):(i(y=>[...y,v]),l.current.set(g,setTimeout(()=>c(g),3e3)))},[u,c]);React.useEffect(()=>{const p=l.current;return()=>{p.forEach(m=>clearTimeout(m)),p.clear()}},[]);const d=p=>{switch(p){case"success":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"success_top":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"warning":return null;case"error":return null;default:return null}},h=p=>jsxRuntimeExports.jsx(CustomSnackbar,{id:"snackbar",onClose:()=>p.type==="warning"||p.type==="error"?u(p.id):c(p.id),before:p.before,after:p.after,className:`ui-snackbar ${p.type?`ui-snackbar--${p.type}`:""} ${p.animationState||""}`,children:jsxRuntimeExports.jsxs(Text,{style:{fontSize:13,lineHeight:"16px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:4},children:[jsxRuntimeExports.jsx("span",{children:p.message}),jsxRuntimeExports.jsxs("div",{className:"grid grid-flow-col auto-cols-max gap-2 items-center",children:[!!p.coins&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.coins]}),jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:14,marginBottom:-2}})]}),!!p.gems&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.gems]}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{height:14,marginBottom:-2}})]}),!!p.usdt&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.usdt]}),jsxRuntimeExports.jsx(IconUsdt,{style:{height:14,marginBottom:-2}})]}),!!p.boxes&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:["+",p.boxes]}),jsxRuntimeExports.jsx("img",{src:boxRegularIcon,alt:"Box",style:{height:14,width:14,transform:"translateY(10%)"}})]})]})]})},p.id);return jsxRuntimeExports.jsxs(SnackbarContext.Provider,{value:{showSnackbar:f},children:[e,t.map(h),s.map(h),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})};var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof document<"u"&&typeof navigator<"u"&&function(e,t){module.exports=t()}(lottie$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var i,s=e.length,o;for(i=0;i<s;i+=1){o=e[i].prototype;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t.prototype[a]=o[a])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(i){this.audios.push(i)},pause:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].pause()},resume:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].resume()},setRate:function(i){var s,o=this.audios.length;for(s=0;s<o;s+=1)this.audios[s].setRate(i)},createAudio:function(i){return this.audioFactory?this.audioFactory(i):window.Howl?new window.Howl({src:[i]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(i){this.audioFactory=i},setVolume:function(i){this._volume=i,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(i,s){var o=0,a=[],l;switch(i){case"int16":case"uint8c":l=1;break;default:l=1.1;break}for(o=0;o<s;o+=1)a.push(l);return a}function t(i,s){return i==="float32"?new Float32Array(s):i==="int16"?new Int16Array(s):i==="uint8c"?new Uint8ClampedArray(s):e(i,s)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var i=createSizedArray(e.length),s,o=e.length;for(s=0;s<o;s+=1)i[s]=Math.abs(e[s]);return i}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,i,s){this.type=e,this.currentTime=t,this.totalTime=i,this.direction=s<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,i,s){this.type=e,this.currentLoop=i,this.totalLoops=t,this.direction=s<0?-1:1}function BMSegmentStartEvent(e,t,i){this.type=e,this.firstFrame=t,this.totalFrames=i}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,i){var s,o,a,l,c,u,f,d;switch(l=Math.floor(e*6),c=e*6-l,u=i*(1-t),f=i*(1-c*t),d=i*(1-(1-c)*t),l%6){case 0:s=i,o=d,a=u;break;case 1:s=f,o=i,a=u;break;case 2:s=u,o=i,a=d;break;case 3:s=u,o=f,a=i;break;case 4:s=d,o=u,a=i;break;case 5:s=i,o=u,a=f;break}return[s,o,a]}function RGBtoHSV(e,t,i){var s=Math.max(e,t,i),o=Math.min(e,t,i),a=s-o,l,c=s===0?0:a/s,u=s/255;switch(s){case o:l=0;break;case e:l=t-i+a*(t<i?6:0),l/=6*a;break;case t:l=i-e+a*2,l/=6*a;break;case i:l=e-t+a*4,l/=6*a;break}return[l,c,u]}function addSaturationToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[1]+=t,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[2]+=t,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[0]+=t/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var e=[],t,i;for(t=0;t<256;t+=1)i=t.toString(16),e[t]=i.length===1?"0"+i:i;return function(s,o,a){return s<0&&(s=0),o<0&&(o=0),a<0&&(a=0),"#"+e[s]+e[o]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],i,s,o={onmessage:function(){},postMessage:function(m){i({data:m})}},a={postMessage:function(m){o.onmessage({data:m})}};function l(p){if(window.Worker&&window.Blob&&getWebWorker()){var m=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),g=URL.createObjectURL(m);return new Worker(g)}return i=p,o}function c(){s||(s=l(function(m){function g(){function b(D,M){var k,T,P=D.length,F,N,H,q;for(T=0;T<P;T+=1)if(k=D[T],"ks"in k&&!k.completed){if(k.completed=!0,k.hasMask){var Y=k.masksProperties;for(N=Y.length,F=0;F<N;F+=1)if(Y[F].pt.k.i)C(Y[F].pt.k);else for(q=Y[F].pt.k.length,H=0;H<q;H+=1)Y[F].pt.k[H].s&&C(Y[F].pt.k[H].s[0]),Y[F].pt.k[H].e&&C(Y[F].pt.k[H].e[0])}k.ty===0?(k.layers=S(k.refId,M),b(k.layers,M)):k.ty===4?w(k.shapes):k.ty===5&&K(k)}}function y(D,M){if(D){var k=0,T=D.length;for(k=0;k<T;k+=1)D[k].t===1&&(D[k].data.layers=S(D[k].data.refId,M),b(D[k].data.layers,M))}}function E(D,M){for(var k=0,T=M.length;k<T;){if(M[k].id===D)return M[k];k+=1}return null}function S(D,M){var k=E(D,M);return k?k.layers.__used?JSON.parse(JSON.stringify(k.layers)):(k.layers.__used=!0,k.layers):null}function w(D){var M,k=D.length,T,P;for(M=k-1;M>=0;M-=1)if(D[M].ty==="sh")if(D[M].ks.k.i)C(D[M].ks.k);else for(P=D[M].ks.k.length,T=0;T<P;T+=1)D[M].ks.k[T].s&&C(D[M].ks.k[T].s[0]),D[M].ks.k[T].e&&C(D[M].ks.k[T].e[0]);else D[M].ty==="gr"&&w(D[M].it)}function C(D){var M,k=D.i.length;for(M=0;M<k;M+=1)D.i[M][0]+=D.v[M][0],D.i[M][1]+=D.v[M][1],D.o[M][0]+=D.v[M][0],D.o[M][1]+=D.v[M][1]}function A(D,M){var k=M?M.split("."):[100,100,100];return D[0]>k[0]?!0:k[0]>D[0]?!1:D[1]>k[1]?!0:k[1]>D[1]?!1:D[2]>k[2]?!0:k[2]>D[2]?!1:null}var O=function(){var D=[4,4,14];function M(T){var P=T.t.d;T.t.d={k:[{s:P,t:0}]}}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===5&&M(T[P])}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),I=function(){var D=[4,7,99];return function(M){if(M.chars&&!A(D,M.v)){var k,T=M.chars.length;for(k=0;k<T;k+=1){var P=M.chars[k];P.data&&P.data.shapes&&(w(P.data.shapes),P.data.ip=0,P.data.op=99999,P.data.st=0,P.data.sr=1,P.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},M.chars[k].t||(P.data.shapes.push({ty:"no"}),P.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),L=function(){var D=[5,7,15];function M(T){var P=T.t.p;typeof P.a=="number"&&(P.a={a:0,k:P.a}),typeof P.p=="number"&&(P.p={a:0,k:P.p}),typeof P.r=="number"&&(P.r={a:0,k:P.r})}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===5&&M(T[P])}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),$=function(){var D=[4,1,9];function M(T){var P,F=T.length,N,H;for(P=0;P<F;P+=1)if(T[P].ty==="gr")M(T[P].it);else if(T[P].ty==="fl"||T[P].ty==="st")if(T[P].c.k&&T[P].c.k[0].i)for(H=T[P].c.k.length,N=0;N<H;N+=1)T[P].c.k[N].s&&(T[P].c.k[N].s[0]/=255,T[P].c.k[N].s[1]/=255,T[P].c.k[N].s[2]/=255,T[P].c.k[N].s[3]/=255),T[P].c.k[N].e&&(T[P].c.k[N].e[0]/=255,T[P].c.k[N].e[1]/=255,T[P].c.k[N].e[2]/=255,T[P].c.k[N].e[3]/=255);else T[P].c.k[0]/=255,T[P].c.k[1]/=255,T[P].c.k[2]/=255,T[P].c.k[3]/=255}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===4&&M(T[P].shapes)}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),V=function(){var D=[4,4,18];function M(T){var P,F=T.length,N,H;for(P=F-1;P>=0;P-=1)if(T[P].ty==="sh")if(T[P].ks.k.i)T[P].ks.k.c=T[P].closed;else for(H=T[P].ks.k.length,N=0;N<H;N+=1)T[P].ks.k[N].s&&(T[P].ks.k[N].s[0].c=T[P].closed),T[P].ks.k[N].e&&(T[P].ks.k[N].e[0].c=T[P].closed);else T[P].ty==="gr"&&M(T[P].it)}function k(T){var P,F,N=T.length,H,q,Y,Q;for(F=0;F<N;F+=1){if(P=T[F],P.hasMask){var re=P.masksProperties;for(q=re.length,H=0;H<q;H+=1)if(re[H].pt.k.i)re[H].pt.k.c=re[H].cl;else for(Q=re[H].pt.k.length,Y=0;Y<Q;Y+=1)re[H].pt.k[Y].s&&(re[H].pt.k[Y].s[0].c=re[H].cl),re[H].pt.k[Y].e&&(re[H].pt.k[Y].e[0].c=re[H].cl)}P.ty===4&&M(P.shapes)}}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}();function W(D){D.__complete||($(D),O(D),I(D),L(D),V(D),b(D.layers,D.assets),y(D.chars,D.assets),D.__complete=!0)}function K(D){D.t.a.length===0&&"m"in D.t.p}var j={};return j.completeData=W,j.checkColors=$,j.checkChars=I,j.checkPathProperties=L,j.checkShapes=V,j.completeLayers=b,j}if(a.dataManager||(a.dataManager=g()),a.assetLoader||(a.assetLoader=function(){function b(E){var S=E.getResponseHeader("content-type");return S&&E.responseType==="json"&&S.indexOf("json")!==-1||E.response&&_typeof$5(E.response)==="object"?E.response:E.response&&typeof E.response=="string"?JSON.parse(E.response):E.responseText?JSON.parse(E.responseText):null}function y(E,S,w,C){var A,O=new XMLHttpRequest;try{O.responseType="json"}catch{}O.onreadystatechange=function(){if(O.readyState===4)if(O.status===200)A=b(O),w(A);else try{A=b(O),w(A)}catch(I){C&&C(I)}};try{O.open(["G","E","T"].join(""),E,!0)}catch{O.open(["G","E","T"].join(""),S+"/"+E,!0)}O.send()}return{load:y}}()),m.data.type==="loadAnimation")a.assetLoader.load(m.data.path,m.data.fullPath,function(b){a.dataManager.completeData(b),a.postMessage({id:m.data.id,payload:b,status:"success"})},function(){a.postMessage({id:m.data.id,status:"error"})});else if(m.data.type==="complete"){var v=m.data.animation;a.dataManager.completeData(v),a.postMessage({id:m.data.id,payload:v,status:"success"})}else m.data.type==="loadData"&&a.assetLoader.load(m.data.path,m.data.fullPath,function(b){a.postMessage({id:m.data.id,payload:b,status:"success"})},function(){a.postMessage({id:m.data.id,status:"error"})})}),s.onmessage=function(p){var m=p.data,g=m.id,v=t[g];t[g]=null,m.status==="success"?v.onComplete(m.payload):v.onError&&v.onError()})}function u(p,m){e+=1;var g="processId_"+e;return t[g]={onComplete:p,onError:m},g}function f(p,m,g){c();var v=u(m,g);s.postMessage({type:"loadAnimation",path:p,fullPath:window.location.origin+window.location.pathname,id:v})}function d(p,m,g){c();var v=u(m,g);s.postMessage({type:"loadData",path:p,fullPath:window.location.origin+window.location.pathname,id:v})}function h(p,m,g){c();var v=u(m,g);s.postMessage({type:"complete",animation:p,id:v})}return{loadAnimation:f,loadData:d,completeAnimation:h}}(),ImagePreloader=function(){var e=function(){var y=createTag("canvas");y.width=1,y.height=1;var E=y.getContext("2d");return E.fillStyle="rgba(0,0,0,0)",E.fillRect(0,0,1,1),y}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(y,E,S){var w="";if(y.e)w=y.p;else if(E){var C=y.p;C.indexOf("images/")!==-1&&(C=C.split("/")[1]),w=E+C}else w=S,w+=y.u?y.u:"",w+=y.p;return w}function o(y){var E=0,S=setInterval((function(){var w=y.getBBox();(w.width||E>500)&&(this._imageLoaded(),clearInterval(S)),E+=1}).bind(this),50)}function a(y){var E=s(y,this.assetsPath,this.path),S=createNS("image");isSafari?this.testImageLoaded(S):S.addEventListener("load",this._imageLoaded,!1),S.addEventListener("error",(function(){w.img=e,this._imageLoaded()}).bind(this),!1),S.setAttributeNS("http://www.w3.org/1999/xlink","href",E),this._elementHelper.append?this._elementHelper.append(S):this._elementHelper.appendChild(S);var w={img:S,assetData:y};return w}function l(y){var E=s(y,this.assetsPath,this.path),S=createTag("img");S.crossOrigin="anonymous",S.addEventListener("load",this._imageLoaded,!1),S.addEventListener("error",(function(){w.img=e,this._imageLoaded()}).bind(this),!1),S.src=E;var w={img:S,assetData:y};return w}function c(y){var E={assetData:y},S=s(y,this.assetsPath,this.path);return dataManager.loadData(S,(function(w){E.img=w,this._footageLoaded()}).bind(this),(function(){E.img={},this._footageLoaded()}).bind(this)),E}function u(y,E){this.imagesLoadedCb=E;var S,w=y.length;for(S=0;S<w;S+=1)y[S].layers||(!y[S].t||y[S].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(y[S]))):y[S].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(y[S]))))}function f(y){this.path=y||""}function d(y){this.assetsPath=y||""}function h(y){for(var E=0,S=this.images.length;E<S;){if(this.images[E].assetData===y)return this.images[E].img;E+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function m(){return this.totalImages===this.loadedAssets}function g(){return this.totalFootages===this.loadedFootagesCount}function v(y,E){y==="svg"?(this._elementHelper=E,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function b(){this._imageLoaded=t.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=o.bind(this),this.createFootageData=c.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return b.prototype={loadAssets:u,setAssetsPath:d,setPath:f,loadedImages:m,loadedFootages:g,destroy:p,getAsset:h,createImgData:l,createImageData:a,imageLoaded:t,footageLoaded:i,setCacheType:v},b}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,i){if(this._cbs[t])for(var s=this._cbs[t],o=0;o<s.length;o+=1)s[o](i)},addEventListener:function(t,i){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(i),(function(){this.removeEventListener(t,i)}).bind(this)},removeEventListener:function(t,i){if(!i)this._cbs[t]=null;else if(this._cbs[t]){for(var s=0,o=this._cbs[t].length;s<o;)this._cbs[t][s]===i&&(this._cbs[t].splice(s,1),s-=1,o-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=function(){function e(t){for(var i=t.split(`\r
82
+ Url: ${_getEventFilterUrl(e)}`),!0}return!1}function _isIgnoredError(e,t){return t!=null&&t.length?getPossibleEventMessages(e).some(i=>stringMatchesSomePattern(i,t)):!1}function _isIgnoredTransaction(e,t){if(!(t!=null&&t.length))return!1;const i=e.transaction;return i?stringMatchesSomePattern(i,t):!1}function _isDeniedUrl(e,t){if(!(t!=null&&t.length))return!1;const i=_getEventFilterUrl(e);return i?stringMatchesSomePattern(i,t):!1}function _isAllowedUrl(e,t){if(!(t!=null&&t.length))return!0;const i=_getEventFilterUrl(e);return i?stringMatchesSomePattern(i,t):!0}function _getLastValidUrl(e=[]){for(let t=e.length-1;t>=0;t--){const i=e[t];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function _getEventFilterUrl(e){var t,i;try{const s=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(a=>{var l,c,u;return((l=a.mechanism)==null?void 0:l.parent_id)===void 0&&((u=(c=a.stacktrace)==null?void 0:c.frames)==null?void 0:u.length)}),o=(i=s==null?void 0:s.stacktrace)==null?void 0:i.frames;return o?_getLastValidUrl(o):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(e)}`),null}}function _isUselessError(e){var t,i;return(i=(t=e.exception)==null?void 0:t.values)!=null&&i.length?!e.message&&!e.exception.values.some(s=>s.stacktrace||s.type&&s.type!=="Error"||s.value):!1}function applyAggregateErrorsToEvent(e,t,i,s,o,a){var c;if(!((c=o.exception)!=null&&c.values)||!a||!isInstanceOf(a.originalException,Error))return;const l=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;l&&(o.exception.values=aggregateExceptionsFromError(e,t,s,a.originalException,i,o.exception.values,l,0))}function aggregateExceptionsFromError(e,t,i,s,o,a,l,c){if(a.length>=i+1)return a;let u=[...a];if(isInstanceOf(s[o],Error)){applyExceptionGroupFieldsForParentException(l,c);const f=e(t,s[o]),d=u.length;applyExceptionGroupFieldsForChildException(f,o,d,c),u=aggregateExceptionsFromError(e,t,i,s[o],o,[f,...u],f,d)}return Array.isArray(s.errors)&&s.errors.forEach((f,d)=>{if(isInstanceOf(f,Error)){applyExceptionGroupFieldsForParentException(l,c);const h=e(t,f),p=u.length;applyExceptionGroupFieldsForChildException(h,`errors[${d}]`,p,c),u=aggregateExceptionsFromError(e,t,i,f,o,[h,...u],h,p)}}),u}function applyExceptionGroupFieldsForParentException(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function applyExceptionGroupFieldsForChildException(e,t,i,s){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:i,parent_id:s}}function addConsoleInstrumentationHandler(e){const t="console";addHandler(t,e),maybeInstrument(t,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(e){e in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,e,function(t){return originalConsoleMethods[e]=t,function(...i){triggerHandlers("console",{args:i,level:e});const o=originalConsoleMethods[e];o==null||o.apply(GLOBAL_OBJ.console,i)}})})}function severityLevelFromString(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let e;return{name:INTEGRATION_NAME$4,processEvent(t){if(t.type)return t;try{if(_shouldDropEvent(t,e))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(e,t){return t?!!(_isSameMessageEvent(e,t)||_isSameExceptionEvent(e,t)):!1}function _isSameMessageEvent(e,t){const i=e.message,s=t.message;return!(!i&&!s||i&&!s||!i&&s||i!==s||!_isSameFingerprint(e,t)||!_isSameStacktrace(e,t))}function _isSameExceptionEvent(e,t){const i=_getExceptionFromEvent(t),s=_getExceptionFromEvent(e);return!(!i||!s||i.type!==s.type||i.value!==s.value||!_isSameFingerprint(e,t)||!_isSameStacktrace(e,t))}function _isSameStacktrace(e,t){let i=getFramesFromEvent(e),s=getFramesFromEvent(t);if(!i&&!s)return!0;if(i&&!s||!i&&s||(i=i,s=s,s.length!==i.length))return!1;for(let o=0;o<s.length;o++){const a=s[o],l=i[o];if(a.filename!==l.filename||a.lineno!==l.lineno||a.colno!==l.colno||a.function!==l.function)return!1}return!0}function _isSameFingerprint(e,t){let i=e.fingerprint,s=t.fingerprint;if(!i&&!s)return!0;if(i&&!s||!i&&s)return!1;i=i,s=s;try{return i.join("")===s.join("")}catch{return!1}}function _getExceptionFromEvent(e){var t,i;return(i=(t=e.exception)==null?void 0:t.values)==null?void 0:i[0]}function getBreadcrumbLogLevelFromHttpStatusCode(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function supportsNativeFetch(){var i;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let e=!1;const t=WINDOW$2.document;if(t&&typeof t.createElement=="function")try{const s=t.createElement("iframe");s.hidden=!0,t.head.appendChild(s),(i=s.contentWindow)!=null&&i.fetch&&(e=isNativeFunction(s.contentWindow.fetch)),t.head.removeChild(s)}catch(s){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}return e}function addFetchInstrumentationHandler(e,t){const i="fetch";addHandler(i,e),maybeInstrument(i,()=>instrumentFetch(void 0,t))}function instrumentFetch(e,t=!1){t&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(i){return function(...s){const o=new Error,{method:a,url:l}=parseFetchArgs(s),c={args:s,fetchData:{method:a,url:l},startTimestamp:timestampInSeconds()*1e3,virtualError:o,headers:getHeadersFromFetchArgs(s)};return triggerHandlers("fetch",{...c}),i.apply(GLOBAL_OBJ,s).then(async u=>(triggerHandlers("fetch",{...c,endTimestamp:timestampInSeconds()*1e3,response:u}),u),u=>{if(triggerHandlers("fetch",{...c,endTimestamp:timestampInSeconds()*1e3,error:u}),isError(u)&&u.stack===void 0&&(u.stack=o.stack,addNonEnumerableProperty(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(c.fetchData.url);u.message=`${u.message} (${f.host})`}catch{}throw u})}})}function hasProp(e,t){return!!e&&typeof e=="object"&&!!e[t]}function getUrlFromResource(e){return typeof e=="string"?e:e?hasProp(e,"url")?e.url:e.toString?e.toString():"":""}function parseFetchArgs(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[i,s]=e;return{url:getUrlFromResource(i),method:hasProp(s,"method")?String(s.method).toUpperCase():"GET"}}const t=e[0];return{url:getUrlFromResource(t),method:hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(e){const[t,i]=e;try{if(typeof i=="object"&&i!==null&&"headers"in i&&i.headers)return new Headers(i.headers);if(isRequest(t))return new Headers(t.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(e,t={}){function i(o){return typeof o=="function"}if(!i(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(getOriginalFunction(e))return e}catch{return e}const s=function(...o){try{const a=o.map(l=>wrap(l,t));return e.apply(this,a)}catch(a){throw ignoreNextOnError(),withScope(l=>{l.addEventProcessor(c=>(t.mechanism&&(addExceptionTypeValue(c,void 0),addExceptionMechanism(c,t.mechanism)),c.extra={...c.extra,arguments:o},c)),captureException(a)}),a}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}catch{}markFunctionWrapped(s,e),addNonEnumerableProperty(e,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get(){return e.name}})}catch{}return s}function getHttpRequestData(){const e=getLocationHref(),{referrer:t}=WINDOW$1.document||{},{userAgent:i}=WINDOW$1.navigator||{},s={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:e,headers:s}}function exceptionFromError(e,t){const i=parseStackFrames(e,t),s={type:extractType(t),value:extractMessage(t)};return i.length&&(s.stacktrace={frames:i}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function eventFromPlainObject(e,t,i,s){const o=getClient(),a=o==null?void 0:o.getOptions().normalizeDepth,l=getErrorPropertyFromObject(t),c={__serialized__:normalizeToSize(t,a)};if(l)return{exception:{values:[exceptionFromError(e,l)]},extra:c};const u={exception:{values:[{type:isEvent(t)?t.constructor.name:s?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(t,{isUnhandledRejection:s})}]},extra:c};if(i){const f=parseStackFrames(e,i);f.length&&(u.exception.values[0].stacktrace={frames:f})}return u}function eventFromError(e,t){return{exception:{values:[exceptionFromError(e,t)]}}}function parseStackFrames(e,t){const i=t.stacktrace||t.stack||"",s=getSkipFirstStackStringLines(t),o=getPopFirstTopFrames(t);try{return e(i,s,o)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(e){return e&&reactMinifiedRegexp.test(e.message)?1:0}function getPopFirstTopFrames(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function isWebAssemblyException(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function extractType(e){const t=e==null?void 0:e.name;return!t&&isWebAssemblyException(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function extractMessage(e){const t=e==null?void 0:e.message;return isWebAssemblyException(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function eventFromException(e,t,i,s){const o=(i==null?void 0:i.syntheticException)||void 0,a=eventFromUnknownInput(e,t,o,s);return addExceptionMechanism(a),a.level="error",i!=null&&i.event_id&&(a.event_id=i.event_id),resolvedSyncPromise(a)}function eventFromMessage(e,t,i="info",s,o){const a=(s==null?void 0:s.syntheticException)||void 0,l=eventFromString(e,t,a,o);return l.level=i,s!=null&&s.event_id&&(l.event_id=s.event_id),resolvedSyncPromise(l)}function eventFromUnknownInput(e,t,i,s,o){let a;if(isErrorEvent$1(t)&&t.error)return eventFromError(e,t.error);if(isDOMError(t)||isDOMException(t)){const l=t;if("stack"in t)a=eventFromError(e,t);else{const c=l.name||(isDOMError(l)?"DOMError":"DOMException"),u=l.message?`${c}: ${l.message}`:c;a=eventFromString(e,u,i,s),addExceptionTypeValue(a,u)}return"code"in l&&(a.tags={...a.tags,"DOMException.code":`${l.code}`}),a}return isError(t)?eventFromError(e,t):isPlainObject$1(t)||isEvent(t)?(a=eventFromPlainObject(e,t,i,o),addExceptionMechanism(a,{synthetic:!0}),a):(a=eventFromString(e,t,i,s),addExceptionTypeValue(a,`${t}`),addExceptionMechanism(a,{synthetic:!0}),a)}function eventFromString(e,t,i,s){const o={};if(s&&i){const a=parseStackFrames(e,i);a.length&&(o.exception={values:[{value:t,stacktrace:{frames:a}}]}),addExceptionMechanism(o,{synthetic:!0})}if(isParameterizedString(t)){const{__sentry_template_string__:a,__sentry_template_values__:l}=t;return o.logentry={message:a,params:l},o}return o.message=t,o}function getNonErrorObjectExceptionValue(e,{isUnhandledRejection:t}){const i=extractExceptionKeysForMessage(e),s=t?"promise rejection":"exception";return isErrorEvent$1(e)?`Event \`ErrorEvent\` captured as ${s} with message \`${e.message}\``:isEvent(e)?`Event \`${getObjectClassName(e)}\` (type=${e.type}) captured as ${s}`:`Object captured as ${s} with keys: ${i}`}function getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];if(i instanceof Error)return i}}const DEFAULT_FLUSH_INTERVAL=5e3;class BrowserClient extends Client{constructor(t){var c;const i=applyDefaultOptions(t),s=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(i,"browser",["browser"],s),(c=i._metadata)!=null&&c.sdk&&(i._metadata.sdk.settings={infer_ip:i.sendDefaultPii?"auto":"never",...i._metadata.sdk.settings}),super(i);const{sendDefaultPii:o,sendClientReports:a,enableLogs:l}=this._options;WINDOW$1.document&&(a||l)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(a&&this._flushOutcomes(),l&&_INTERNAL_flushLogsBuffer(this))}),l&&(this.on("flush",()=>{_INTERNAL_flushLogsBuffer(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(this)},DEFAULT_FLUSH_INTERVAL)})),o&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(t,i){return eventFromException(this._options.stackParser,t,i,this._options.attachStacktrace)}eventFromMessage(t,i="info",s){return eventFromMessage(this._options.stackParser,t,i,s,this._options.attachStacktrace)}_prepareEvent(t,i,s,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,i,s,o)}}function applyDefaultOptions(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=WINDOW$1.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(e){const t="dom";addHandler(t,e),maybeInstrument(t,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const e=triggerHandlers.bind(null,"dom"),t=makeDOMEventHandler(e,!0);WINDOW.document.addEventListener("click",t,!1),WINDOW.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(i=>{var a,l;const o=(a=WINDOW[i])==null?void 0:a.prototype;(l=o==null?void 0:o.hasOwnProperty)!=null&&l.call(o,"addEventListener")&&(fill(o,"addEventListener",function(c){return function(u,f,d){if(u==="click"||u=="keypress")try{const h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=h[u]=h[u]||{refCount:0};if(!p.handler){const m=makeDOMEventHandler(e);p.handler=m,c.call(this,u,m,d)}p.refCount++}catch{}return c.call(this,u,f,d)}}),fill(o,"removeEventListener",function(c){return function(u,f,d){if(u==="click"||u=="keypress")try{const h=this.__sentry_instrumentation_handlers__||{},p=h[u];p&&(p.refCount--,p.refCount<=0&&(c.call(this,u,p.handler,d),p.handler=void 0,delete h[u]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,u,f,d)}}))})}function isSimilarToLastCapturedEvent(e){if(e.type!==lastCapturedEventType)return!1;try{if(!e.target||e.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function makeDOMEventHandler(e,t=!1){return i=>{if(!i||i._sentryCaptured)return;const s=getEventTarget$1(i);if(shouldSkipDOMEvent(i.type,s))return;addNonEnumerableProperty(i,"_sentryCaptured",!0),s&&!s._sentryId&&addNonEnumerableProperty(s,"_sentryId",uuid4());const o=i.type==="keypress"?"input":i.type;isSimilarToLastCapturedEvent(i)||(e({event:i,name:o,global:t}),lastCapturedEventType=i.type,lastCapturedEventTargetId=s?s._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget$1(e){try{return e.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(e){const t="history";addHandler(t,e),maybeInstrument(t,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const t=WINDOW.location.href,i=lastHref;if(lastHref=t,i===t)return;triggerHandlers("history",{from:i,to:t})}),!supportsHistory())return;function e(t){return function(...i){const s=i.length>2?i[2]:void 0;if(s){const o=lastHref,a=getAbsoluteUrl(String(s));if(lastHref=a,o===a)return t.apply(this,i);triggerHandlers("history",{from:o,to:a})}return t.apply(this,i)}}fill(WINDOW.history,"pushState",e),fill(WINDOW.history,"replaceState",e)}function getAbsoluteUrl(e){try{return new URL(e,WINDOW.location.origin).toString()}catch{return e}}const cachedImplementations={};function getNativeImplementation(e){const t=cachedImplementations[e];if(t)return t;let i=WINDOW[e];if(isNativeFunction(i))return cachedImplementations[e]=i.bind(WINDOW);const s=WINDOW.document;if(s&&typeof s.createElement=="function")try{const o=s.createElement("iframe");o.hidden=!0,s.head.appendChild(o);const a=o.contentWindow;a!=null&&a[e]&&(i=a[e]),s.head.removeChild(o)}catch(o){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return i&&(cachedImplementations[e]=i.bind(WINDOW))}function clearCachedImplementation(e){cachedImplementations[e]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(e){const t="xhr";addHandler(t,e),maybeInstrument(t,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,i,s){const o=new Error,a=timestampInSeconds()*1e3,l=isString$2(s[0])?s[0].toUpperCase():void 0,c=parseXhrUrlArg(s[1]);if(!l||!c)return t.apply(i,s);i[SENTRY_XHR_DATA_KEY]={method:l,url:c,request_headers:{}},l==="POST"&&c.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const u=()=>{const f=i[SENTRY_XHR_DATA_KEY];if(f&&i.readyState===4){try{f.status_code=i.status}catch{}const d={endTimestamp:timestampInSeconds()*1e3,startTimestamp:a,xhr:i,virtualError:o};triggerHandlers("xhr",d)}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?i.onreadystatechange=new Proxy(i.onreadystatechange,{apply(f,d,h){return u(),f.apply(d,h)}}):i.addEventListener("readystatechange",u),i.setRequestHeader=new Proxy(i.setRequestHeader,{apply(f,d,h){const[p,m]=h,g=d[SENTRY_XHR_DATA_KEY];return g&&isString$2(p)&&isString$2(m)&&(g.request_headers[p.toLowerCase()]=m),f.apply(d,h)}}),t.apply(i,s)}}),e.send=new Proxy(e.send,{apply(t,i,s){const o=i[SENTRY_XHR_DATA_KEY];if(!o)return t.apply(i,s);s[0]!==void 0&&(o.body=s[0]);const a={startTimestamp:timestampInSeconds()*1e3,xhr:i};return triggerHandlers("xhr",a),t.apply(i,s)}})}function parseXhrUrlArg(e){if(isString$2(e))return e;try{return e.toString()}catch{}}function makeFetchTransport(e,t=getNativeImplementation("fetch")){let i=0,s=0;async function o(a){const l=a.body.length;i+=l,s++;const c={body:a.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:i<=6e4&&s<15,...e.fetchOptions};try{const u=await t(e.url,c);return{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}}catch(u){throw clearCachedImplementation("fetch"),u}finally{i-=l,s--}}return createTransport(e,o)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(e,t,i,s){const o={filename:e,function:t==="<anonymous>"?UNKNOWN_FUNCTION:t,in_app:!0};return i!==void 0&&(o.lineno=i),s!==void 0&&(o.colno=s),o}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=e=>{const t=e.match(chromeDataUriRegex);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const i=chromeRegexNoFnName.exec(e);if(i){const[,o,a,l]=i;return createFrame(o,UNKNOWN_FUNCTION,+a,+l)}const s=chromeRegex.exec(e);if(s){if(s[2]&&s[2].indexOf("eval")===0){const c=chromeEvalRegex.exec(s[2]);c&&(s[2]=c[1],s[3]=c[2],s[4]=c[3])}const[a,l]=extractSafariExtensionDetails(s[1]||UNKNOWN_FUNCTION,s[2]);return createFrame(l,a,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=e=>{const t=geckoREgex.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=geckoEvalRegex.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let s=t[3],o=t[1]||UNKNOWN_FUNCTION;return[o,s]=extractSafariExtensionDetails(o,s),createFrame(s,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(e,t)=>{const i=e.indexOf("safari-extension")!==-1,s=e.indexOf("safari-web-extension")!==-1;return i||s?[e.indexOf("@")!==-1?e.split("@")[0]:UNKNOWN_FUNCTION,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:INTEGRATION_NAME$3,setup(i){t.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(i)),t.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(i,t.dom)),t.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(i)),t.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(i)),t.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(i)),t.sentry&&i.on("beforeSendEvent",_getSentryBreadcrumbHandler(i))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(e){return function(i){getClient()===e&&addBreadcrumb({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:getEventDescription(i)},{event:i})}}function _getDomBreadcrumbHandler(e,t){return function(s){if(getClient()!==e)return;let o,a,l=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${c} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),c=MAX_ALLOWED_STRING_LENGTH),typeof l=="string"&&(l=[l]);try{const f=s.event,d=_isEvent(f)?f.target:f;o=htmlTreeAsString(d,{keyAttrs:l,maxStringLength:c}),a=getComponentName(d)}catch{o="<unknown>"}if(o.length===0)return;const u={category:`ui.${s.name}`,message:o};a&&(u.data={"ui.component_name":a}),addBreadcrumb(u,{event:s.event,name:s.name,global:s.global})}}function _getConsoleBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const s={category:"console",data:{arguments:i.args,logger:"console"},level:severityLevelFromString(i.level),message:safeJoin(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)s.message=`Assertion failed: ${safeJoin(i.args.slice(1)," ")||"console.assert"}`,s.data.arguments=i.args.slice(1);else return;addBreadcrumb(s,{input:i.args,level:i.level})}}function _getXhrBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const{startTimestamp:s,endTimestamp:o}=i,a=i.xhr[SENTRY_XHR_DATA_KEY];if(!s||!o||!a)return;const{method:l,url:c,status_code:u,body:f}=a,d={method:l,url:c,status_code:u},h={xhr:i.xhr,input:f,startTimestamp:s,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(u)};e.emit("beforeOutgoingRequestBreadcrumb",p,h),addBreadcrumb(p,h)}}function _getFetchBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;const{startTimestamp:s,endTimestamp:o}=i;if(o&&!(i.fetchData.url.match(/sentry_key/)&&i.fetchData.method==="POST"))if(i.fetchData.method,i.fetchData.url,i.error){const a=i.fetchData,l={data:i.error,input:i.args,startTimestamp:s,endTimestamp:o},c={category:"fetch",data:a,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",c,l),addBreadcrumb(c,l)}else{const a=i.response,l={...i.fetchData,status_code:a==null?void 0:a.status};i.fetchData.request_body_size,i.fetchData.response_body_size,a==null||a.status;const c={input:i.args,response:a,startTimestamp:s,endTimestamp:o},u={category:"fetch",data:l,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(l.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",u,c),addBreadcrumb(u,c)}}}function _getHistoryBreadcrumbHandler(e){return function(i){if(getClient()!==e)return;let s=i.from,o=i.to;const a=parseUrl(WINDOW$1.location.href);let l=s?parseUrl(s):void 0;const c=parseUrl(o);l!=null&&l.path||(l=a),a.protocol===c.protocol&&a.host===c.host&&(o=c.relative),a.protocol===l.protocol&&a.host===l.host&&(s=l.relative),addBreadcrumb({category:"navigation",data:{from:s,to:o}})}}function _isEvent(e){return!!e&&!!e.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:INTEGRATION_NAME$2,setupOnce(){t.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),t.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),t.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),t.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const i=t.eventTarget;i&&(Array.isArray(i)?i:DEFAULT_EVENT_TARGET).forEach(o=>_wrapEventTarget(o,t))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(e){return function(...t){const i=t[0];return t[0]=wrap(i,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(e)}`}}),e.apply(this,t)}}function _wrapRAF(e){return function(t){return e.apply(this,[wrap(t,{mechanism:{data:{handler:getFunctionName(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(e){return function(...t){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in i&&typeof i[o]=="function"&&fill(i,o,function(a){const l={mechanism:{data:{handler:getFunctionName(a)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},c=getOriginalFunction(a);return c&&(l.mechanism.data.handler=getFunctionName(c)),wrap(a,l)})}),e.apply(this,t)}}function _wrapEventTarget(e,t){var o,a;const s=(o=WINDOW$1[e])==null?void 0:o.prototype;(a=s==null?void 0:s.hasOwnProperty)!=null&&a.call(s,"addEventListener")&&(fill(s,"addEventListener",function(l){return function(c,u,f){try{isEventListenerObject(u)&&(u.handleEvent=wrap(u.handleEvent,{mechanism:{data:{handler:getFunctionName(u),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,c,u),l.apply(this,[c,wrap(u,{mechanism:{data:{handler:getFunctionName(u),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),f])}}),fill(s,"removeEventListener",function(l){return function(c,u,f){try{const d=u.__sentry_wrapped__;d&&l.call(this,c,d,f)}catch{}return l.call(this,c,u,f)}}))}function isEventListenerObject(e){return typeof e.handleEvent=="function"}function unregisterOriginalCallback(e,t,i){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,i)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:e,to:t})=>{e!==void 0&&e!==t&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(_installGlobalOnErrorHandler(i),globalHandlerLog("onerror")),t.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(i),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(e){addGlobalErrorInstrumentationHandler(t=>{const{stackParser:i,attachStacktrace:s}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const{msg:o,url:a,line:l,column:c,error:u}=t,f=_enhanceEventWithInitialFrame(eventFromUnknownInput(i,u||o,void 0,s,!1),a,l,c);f.level="error",captureEvent(f,{originalException:u,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(e){addGlobalUnhandledRejectionInstrumentationHandler(t=>{const{stackParser:i,attachStacktrace:s}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const o=_getUnhandledRejectionError(t),a=isPrimitive(o)?_eventFromRejectionWithPrimitive(o):eventFromUnknownInput(i,o,void 0,s,!0);a.level="error",captureEvent(a,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(e){if(isPrimitive(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function _eventFromRejectionWithPrimitive(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _enhanceEventWithInitialFrame(e,t,i,s){const o=e.exception=e.exception||{},a=o.values=o.values||[],l=a[0]=a[0]||{},c=l.stacktrace=l.stacktrace||{},u=c.frames=c.frames||[],f=s,d=i,h=getFilenameFromUrl(t)??getLocationHref();return u.length===0&&u.push({colno:f,filename:h,function:UNKNOWN_FUNCTION,in_app:!0,lineno:d}),e}function globalHandlerLog(e){DEBUG_BUILD&&debug.log(`Global Handler attached: ${e}`)}function getOptions(){const e=getClient();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(e){if(!(!isString$2(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),i=t?t[1]:"text/javascript",s=e.includes("base64,");return`<data:${i}${s?",base64":""}>`}return e.slice(0,1024)}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(e){var s;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const t=getHttpRequestData(),i={...t.headers,...(s=e.request)==null?void 0:s.headers};e.request={...t,...e.request,headers:i}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(e={})=>{const t=e.limit||DEFAULT_LIMIT,i=e.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(s,o,a){const l=a.getOptions();applyAggregateErrorsToEvent(exceptionFromError,l.stackParser,i,t,s,o)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var a;if(typeof WINDOW$1.window>"u")return!1;const e=WINDOW$1;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((a=t==null?void 0:t.runtime)!=null&&a.id))return!1;const i=getLocationHref(),s=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&s.some(l=>i.startsWith(`${l}://`)))}function getDefaultIntegrations(e){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init$1(e={}){const t=!e.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension(),i={...e,enabled:t?!1:e.enabled,stackParser:stackParserFromStackParserOptions(e.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?getDefaultIntegrations():e.defaultIntegrations}),transport:e.transport||makeFetchTransport};return initAndBind(BrowserClient,i)}function init(e){const t={...e};return applySdkMetadata(t,"react"),setContext("react",{version:React.version}),init$1(t)}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},defaultTimeoutProvider={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TimeoutManager=(Ze=class{constructor(){we(this,Le,defaultTimeoutProvider);we(this,Ve,!1)}setTimeoutProvider(e){ge(this,Le,e)}setTimeout(e,t){return U(this,Le).setTimeout(e,t)}clearTimeout(e){U(this,Le).clearTimeout(e)}setInterval(e,t){return U(this,Le).setInterval(e,t)}clearInterval(e){U(this,Le).clearInterval(e)}},Le=new WeakMap,Ve=new WeakMap,Ze),timeoutManager=new TimeoutManager;function systemSetTimeoutZero(e){setTimeout(e,0)}var isServer=typeof window>"u"||"Deno"in globalThis;function noop$1(){}function functionalUpdate(e,t){return typeof e=="function"?e(t):e}function isValidTimeout(e){return typeof e=="number"&&e>=0&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return typeof e=="function"?e(t):e}function resolveEnabled(e,t){return typeof e=="function"?e(t):e}function matchQuery(e,t){const{type:i="all",exact:s,fetchStatus:o,predicate:a,queryKey:l,stale:c}=e;if(l){if(s){if(t.queryHash!==hashQueryKeyByOptions(l,t.options))return!1}else if(!partialMatchKey(t.queryKey,l))return!1}if(i!=="all"){const u=t.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function matchMutation(e,t){const{exact:i,status:s,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(i){if(hashKey(t.options.mutationKey)!==hashKey(a))return!1}else if(!partialMatchKey(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function hashQueryKeyByOptions(e,t){return((t==null?void 0:t.queryKeyHashFn)||hashKey)(e)}function hashKey(e){return JSON.stringify(e,(t,i)=>isPlainObject(i)?Object.keys(i).sort().reduce((s,o)=>(s[o]=i[o],s),{}):i)}function partialMatchKey(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(i=>partialMatchKey(e[i],t[i])):!1}var hasOwn=Object.prototype.hasOwnProperty;function replaceEqualDeep(e,t){if(e===t)return e;const i=isPlainArray(e)&&isPlainArray(t);if(!i&&!(isPlainObject(e)&&isPlainObject(t)))return t;const o=(i?e:Object.keys(e)).length,a=i?t:Object.keys(t),l=a.length,c=i?new Array(l):{};let u=0;for(let f=0;f<l;f++){const d=i?f:a[f],h=e[d],p=t[d];if(h===p){c[d]=h,(i?f<o:hasOwn.call(e,d))&&u++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){c[d]=p;continue}const m=replaceEqualDeep(h,p);c[d]=m,m===h&&u++}return o===l&&u===o?e:c}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;const t=e.constructor;if(t===void 0)return!0;const i=t.prototype;return!(!hasObjectPrototype(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hasObjectPrototype(e){return Object.prototype.toString.call(e)==="[object Object]"}function sleep(e){return new Promise(t=>{timeoutManager.setTimeout(t,e)})}function replaceData(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?replaceEqualDeep(e,t):t}function addToEnd(e,t,i=0){const s=[...e,t];return i&&s.length>i?s.slice(1):s}function addToStart(e,t,i=0){const s=[t,...e];return i&&s.length>i?s.slice(0,-1):s}var skipToken=Symbol();function ensureQueryFn(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function shouldThrowError(e,t){return typeof e=="function"?e(...t):!!e}var FocusManager=(xr=class extends Subscribable{constructor(){super();we(this,lt);we(this,dt);we(this,Ut);ge(this,Ut,t=>{if(!isServer&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){U(this,dt)||this.setEventListener(U(this,Ut))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,dt))==null||t.call(this),ge(this,dt,void 0))}setEventListener(t){var i;ge(this,Ut,t),(i=U(this,dt))==null||i.call(this),ge(this,dt,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){U(this,lt)!==t&&(ge(this,lt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){var t;return typeof U(this,lt)=="boolean"?U(this,lt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lt=new WeakMap,dt=new WeakMap,Ut=new WeakMap,xr),focusManager=new FocusManager;function pendingThenable(){let e,t;const i=new Promise((o,a)=>{e=o,t=a});i.status="pending",i.catch(()=>{});function s(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},i.reject=o=>{s({status:"rejected",reason:o}),t(o)},i}var defaultScheduler=systemSetTimeoutZero;function createNotifyManager(){let e=[],t=0,i=c=>{c()},s=c=>{c()},o=defaultScheduler;const a=c=>{t?e.push(c):o(()=>{i(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{s(()=>{c.forEach(u=>{i(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{a(()=>{c(...u)})},schedule:a,setNotifyFunction:c=>{i=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{o=c}}}var notifyManager=createNotifyManager(),OnlineManager=(Sr=class extends Subscribable{constructor(){super();we(this,Gt,!0);we(this,wt);we(this,zt);ge(this,zt,t=>{if(!isServer&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){U(this,wt)||this.setEventListener(U(this,zt))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,wt))==null||t.call(this),ge(this,wt,void 0))}setEventListener(t){var i;ge(this,zt,t),(i=U(this,wt))==null||i.call(this),ge(this,wt,t(this.setOnline.bind(this)))}setOnline(t){U(this,Gt)!==t&&(ge(this,Gt,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return U(this,Gt)}},Gt=new WeakMap,wt=new WeakMap,zt=new WeakMap,Sr),onlineManager=new OnlineManager;function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(e??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function createRetryer(e){let t=!1,i=0,s;const o=pendingThenable(),a=()=>o.status!=="pending",l=v=>{var b;if(!a()){const y=new CancelledError(v);p(y),(b=e.onCancel)==null||b.call(e,y)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>focusManager.isFocused()&&(e.networkMode==="always"||onlineManager.isOnline())&&e.canRun(),d=()=>canFetch(e.networkMode)&&e.canRun(),h=v=>{a()||(s==null||s(),o.resolve(v))},p=v=>{a()||(s==null||s(),o.reject(v))},m=()=>new Promise(v=>{var b;s=y=>{(a()||f())&&v(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;s=void 0,a()||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(a())return;let v;const b=i===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(h).catch(y=>{var A;if(a())return;const E=e.retry??(isServer?0:3),S=e.retryDelay??defaultRetryDelay,w=typeof S=="function"?S(i,y):S,C=E===!0||typeof E=="number"&&i<E||typeof E=="function"&&E(i,y);if(t||!C){p(y);return}i++,(A=e.onFail)==null||A.call(e,i,y),sleep(w).then(()=>f()?void 0:m()).then(()=>{t?p(y):g()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(s==null||s(),o),cancelRetry:c,continueRetry:u,canStart:d,start:()=>(d()?g():m().then(g),o)}}var Removable=(Er=class{constructor(){we(this,Ot)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&ge(this,Ot,timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(isServer?1/0:5*60*1e3))}clearGcTimeout(){U(this,Ot)&&(timeoutManager.clearTimeout(U(this,Ot)),ge(this,Ot,void 0))}},Ot=new WeakMap,Er),define_process_env_default$4={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},Query=(wr=class extends Removable{constructor(t){super();we(this,ut);we(this,kt);we(this,Wt);we(this,ct);we(this,Lt);we(this,Xe);we(this,er);we(this,Dt);ge(this,Dt,!1),ge(this,er,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,Lt,t.client),ge(this,ct,U(this,Lt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,kt,getDefaultState$1(this.options)),this.state=t.state??U(this,kt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=U(this,Xe))==null?void 0:t.promise}setOptions(t){if(this.options={...U(this,er),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=getDefaultState$1(this.options);i.data!==void 0&&(this.setData(i.data,{updatedAt:i.dataUpdatedAt,manual:!0}),ge(this,kt,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,ct).remove(this)}setData(t,i){const s=replaceData(this.state.data,t,this.options);return Me(this,ut,Et).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(t,i){Me(this,ut,Et).call(this,{type:"setState",state:t,setStateOptions:i})}cancel(t){var s,o;const i=(s=U(this,Xe))==null?void 0:s.promise;return(o=U(this,Xe))==null||o.cancel(t),i?i.then(noop$1).catch(noop$1):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(U(this,kt))}isActive(){return this.observers.some(t=>resolveEnabled(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>resolveStaleTime(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,t)}onFocus(){var i;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(i=U(this,Xe))==null||i.continue()}onOnline(){var i;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(i=U(this,Xe))==null||i.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),U(this,ct).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(U(this,Xe)&&(U(this,Dt)?U(this,Xe).cancel({revert:!0}):U(this,Xe).cancelRetry()),this.scheduleGc()),U(this,ct).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,ut,Et).call(this,{type:"invalidate"})}async fetch(t,i){var u,f,d,h,p,m,g,v,b,y,E,S;if(this.state.fetchStatus!=="idle"&&((u=U(this,Xe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(U(this,Xe))return U(this,Xe).continueRetry(),U(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(C=>C.options.queryFn);w&&this.setOptions(w.options)}const s=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ge(this,Dt,!0),s.signal)})},a=()=>{const w=ensureQueryFn(this.options,i),A=(()=>{const O={client:U(this,Lt),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ge(this,Dt,!1),this.options.persister?this.options.persister(w,A,this):w(A)},c=(()=>{const w={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:U(this,Lt),state:this.state,fetchFn:a};return o(w),w})();(f=this.options.behavior)==null||f.onFetch(c,this),ge(this,Wt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=c.fetchOptions)==null?void 0:d.meta))&&Me(this,ut,Et).call(this,{type:"fetch",meta:(h=c.fetchOptions)==null?void 0:h.meta}),ge(this,Xe,createRetryer({initialPromise:i==null?void 0:i.initialPromise,fn:c.fetchFn,onCancel:w=>{w instanceof CancelledError&&w.revert&&this.setState({...U(this,Wt),fetchStatus:"idle"}),s.abort()},onFail:(w,C)=>{Me(this,ut,Et).call(this,{type:"failed",failureCount:w,error:C})},onPause:()=>{Me(this,ut,Et).call(this,{type:"pause"})},onContinue:()=>{Me(this,ut,Et).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const w=await U(this,Xe).start();if(w===void 0)throw define_process_env_default$4.NODE_ENV,new Error(`${this.queryHash} data is undefined`);return this.setData(w),(m=(p=U(this,ct).config).onSuccess)==null||m.call(p,w,this),(v=(g=U(this,ct).config).onSettled)==null||v.call(g,w,this.state.error,this),w}catch(w){if(w instanceof CancelledError){if(w.silent)return U(this,Xe).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Me(this,ut,Et).call(this,{type:"error",error:w}),(y=(b=U(this,ct).config).onError)==null||y.call(b,w,this),(S=(E=U(this,ct).config).onSettled)==null||S.call(E,this.state.data,w,this),w}finally{this.scheduleGc()}}},kt=new WeakMap,Wt=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Xe=new WeakMap,er=new WeakMap,Dt=new WeakMap,ut=new WeakSet,Et=function(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...fetchState(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,Wt,t.manual?o:void 0),o;case"error":const a=t.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),notifyManager.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),U(this,ct).notify({query:this,type:"updated",action:t})})},wr);function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var QueryObserver=(Cr=class extends Subscribable{constructor(t,i){super();we(this,je);we(this,nt);we(this,De);we(this,tr);we(this,tt);we(this,Nt);we(this,Ht);we(this,yt);we(this,Ct);we(this,rr);we(this,qt);we(this,Kt);we(this,$t);we(this,Ft);we(this,Rt);we(this,Yt,new Set);this.options=i,ge(this,nt,t),ge(this,Ct,null),ge(this,yt,pendingThenable()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,De).addObserver(this),shouldFetchOnMount(U(this,De),this.options)?Me(this,je,or).call(this):this.updateResult(),Me(this,je,gr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(U(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(U(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,je,vr).call(this),Me(this,je,yr).call(this),U(this,De).removeObserver(this)}setOptions(t){const i=this.options,s=U(this,De);if(this.options=U(this,nt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,U(this,De))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,je,_r).call(this),U(this,De).setOptions(this.options),i._defaulted&&!shallowEqualObjects(this.options,i)&&U(this,nt).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,De),observer:this});const o=this.hasListeners();o&&shouldFetchOptionally(U(this,De),s,this.options,i)&&Me(this,je,or).call(this),this.updateResult(),o&&(U(this,De)!==s||resolveEnabled(this.options.enabled,U(this,De))!==resolveEnabled(i.enabled,U(this,De))||resolveStaleTime(this.options.staleTime,U(this,De))!==resolveStaleTime(i.staleTime,U(this,De)))&&Me(this,je,hr).call(this);const a=Me(this,je,pr).call(this);o&&(U(this,De)!==s||resolveEnabled(this.options.enabled,U(this,De))!==resolveEnabled(i.enabled,U(this,De))||a!==U(this,Rt))&&Me(this,je,mr).call(this,a)}getOptimisticResult(t){const i=U(this,nt).getQueryCache().build(U(this,nt),t),s=this.createResult(i,t);return shouldAssignObserverCurrentProperties(this,s)&&(ge(this,tt,s),ge(this,Ht,this.options),ge(this,Nt,U(this,De).state)),s}getCurrentResult(){return U(this,tt)}trackResult(t,i){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&!this.options.experimental_prefetchInRender&&U(this,yt).status==="pending"&&U(this,yt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(s,o))})}trackProp(t){U(this,Yt).add(t)}getCurrentQuery(){return U(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=U(this,nt).defaultQueryOptions(t),s=U(this,nt).getQueryCache().build(U(this,nt),i);return s.fetch().then(()=>this.createResult(s,i))}fetch(t){return Me(this,je,or).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,tt)))}createResult(t,i){var L;const s=U(this,De),o=this.options,a=U(this,tt),l=U(this,Nt),c=U(this,Ht),f=t!==s?t.state:U(this,tr),{state:d}=t;let h={...d},p=!1,m;if(i._optimisticResults){const $=this.hasListeners(),V=!$&&shouldFetchOnMount(t,i),W=$&&shouldFetchOptionally(t,s,i,o);(V||W)&&(h={...h,...fetchState(d.data,t.options)}),i._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:b}=h;m=h.data;let y=!1;if(i.placeholderData!==void 0&&m===void 0&&b==="pending"){let $;a!=null&&a.isPlaceholderData&&i.placeholderData===(c==null?void 0:c.placeholderData)?($=a.data,y=!0):$=typeof i.placeholderData=="function"?i.placeholderData((L=U(this,Kt))==null?void 0:L.state.data,U(this,Kt)):i.placeholderData,$!==void 0&&(b="success",m=replaceData(a==null?void 0:a.data,$,i),p=!0)}if(i.select&&m!==void 0&&!y)if(a&&m===(l==null?void 0:l.data)&&i.select===U(this,rr))m=U(this,qt);else try{ge(this,rr,i.select),m=i.select(m),m=replaceData(a==null?void 0:a.data,m,i),ge(this,qt,m),ge(this,Ct,null)}catch($){ge(this,Ct,$)}U(this,Ct)&&(g=U(this,Ct),m=U(this,qt),v=Date.now(),b="error");const E=h.fetchStatus==="fetching",S=b==="pending",w=b==="error",C=S&&E,A=m!==void 0,I={status:b,fetchStatus:h.fetchStatus,isPending:S,isSuccess:b==="success",isError:w,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!S,isLoadingError:w&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&A,isStale:isStale(t,i),refetch:this.refetch,promise:U(this,yt),isEnabled:resolveEnabled(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=K=>{I.status==="error"?K.reject(I.error):I.data!==void 0&&K.resolve(I.data)},V=()=>{const K=ge(this,yt,I.promise=pendingThenable());$(K)},W=U(this,yt);switch(W.status){case"pending":t.queryHash===s.queryHash&&$(W);break;case"fulfilled":(I.status==="error"||I.data!==W.value)&&V();break;case"rejected":(I.status!=="error"||I.error!==W.reason)&&V();break}}return I}updateResult(){const t=U(this,tt),i=this.createResult(U(this,De),this.options);if(ge(this,Nt,U(this,De).state),ge(this,Ht,this.options),U(this,Nt).data!==void 0&&ge(this,Kt,U(this,De)),shallowEqualObjects(i,t))return;ge(this,tt,i);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!U(this,Yt).size)return!0;const l=new Set(a??U(this,Yt));return this.options.throwOnError&&l.add("error"),Object.keys(U(this,tt)).some(c=>{const u=c;return U(this,tt)[u]!==t[u]&&l.has(u)})};Me(this,je,Jr).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,je,gr).call(this)}},nt=new WeakMap,De=new WeakMap,tr=new WeakMap,tt=new WeakMap,Nt=new WeakMap,Ht=new WeakMap,yt=new WeakMap,Ct=new WeakMap,rr=new WeakMap,qt=new WeakMap,Kt=new WeakMap,$t=new WeakMap,Ft=new WeakMap,Rt=new WeakMap,Yt=new WeakMap,je=new WeakSet,or=function(t){Me(this,je,_r).call(this);let i=U(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(i=i.catch(noop$1)),i},hr=function(){Me(this,je,vr).call(this);const t=resolveStaleTime(this.options.staleTime,U(this,De));if(isServer||U(this,tt).isStale||!isValidTimeout(t))return;const s=timeUntilStale(U(this,tt).dataUpdatedAt,t)+1;ge(this,$t,timeoutManager.setTimeout(()=>{U(this,tt).isStale||this.updateResult()},s))},pr=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(U(this,De)):this.options.refetchInterval)??!1},mr=function(t){Me(this,je,yr).call(this),ge(this,Rt,t),!(isServer||resolveEnabled(this.options.enabled,U(this,De))===!1||!isValidTimeout(U(this,Rt))||U(this,Rt)===0)&&ge(this,Ft,timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&Me(this,je,or).call(this)},U(this,Rt)))},gr=function(){Me(this,je,hr).call(this),Me(this,je,mr).call(this,Me(this,je,pr).call(this))},vr=function(){U(this,$t)&&(timeoutManager.clearTimeout(U(this,$t)),ge(this,$t,void 0))},yr=function(){U(this,Ft)&&(timeoutManager.clearInterval(U(this,Ft)),ge(this,Ft,void 0))},_r=function(){const t=U(this,nt).getQueryCache().build(U(this,nt),this.options);if(t===U(this,De))return;const i=U(this,De);ge(this,De,t),ge(this,tr,t.state),this.hasListeners()&&(i==null||i.removeObserver(this),t.addObserver(this))},Jr=function(t){notifyManager.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(U(this,tt))}),U(this,nt).getQueryCache().notify({query:U(this,De),type:"observerResultsUpdated"})})},Cr);function shouldLoadOnMount(e,t){return resolveEnabled(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||e.state.data!==void 0&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,i){if(resolveEnabled(t.enabled,e)!==!1&&resolveStaleTime(t.staleTime,e)!=="static"){const s=typeof i=="function"?i(e):i;return s==="always"||s!==!1&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,i,s){return(e!==t||resolveEnabled(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&isStale(e,i)}function isStale(e,t){return resolveEnabled(t.enabled,e)!==!1&&e.isStaleByTime(resolveStaleTime(t.staleTime,e))}function shouldAssignObserverCurrentProperties(e,t){return!shallowEqualObjects(e.getCurrentResult(),t)}function infiniteQueryBehavior(e){return{onFetch:(t,i)=>{var d,h,p,m,g;const s=t.options,o=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],l=((g=t.state.data)==null?void 0:g.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let v=!1;const b=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},y=ensureQueryFn(t.options,t.fetchOptions),E=async(S,w,C)=>{if(v)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const O=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:w,direction:C?"backward":"forward",meta:t.options.meta};return b(V),V})(),I=await y(O),{maxPages:L}=t.options,$=C?addToStart:addToEnd;return{pages:$(S.pages,I,L),pageParams:$(S.pageParams,w,L)}};if(o&&a.length){const S=o==="backward",w=S?getPreviousPageParam:getNextPageParam,C={pages:a,pageParams:l},A=w(s,C);c=await E(C,A,S)}else{const S=e??a.length;do{const w=u===0?l[0]??s.initialPageParam:getNextPageParam(s,c);if(u>0&&w==null)break;c=await E(c,w),u++}while(u<S)}return c};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i)}:t.fetchFn=f}}}function getNextPageParam(e,{pages:t,pageParams:i}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,i[s],i):void 0}function getPreviousPageParam(e,{pages:t,pageParams:i}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,i[0],i):void 0}var Mutation=(Rr=class extends Removable{constructor(t){super();we(this,mt);we(this,nr);we(this,ht);we(this,rt);we(this,jt);ge(this,nr,t.client),this.mutationId=t.mutationId,ge(this,rt,t.mutationCache),ge(this,ht,[]),this.state=t.state||getDefaultState(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){U(this,ht).includes(t)||(U(this,ht).push(t),this.clearGcTimeout(),U(this,rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,ht,U(this,ht).filter(i=>i!==t)),this.scheduleGc(),U(this,rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){U(this,ht).length||(this.state.status==="pending"?this.scheduleGc():U(this,rt).remove(this))}continue(){var t;return((t=U(this,jt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,u,f,d,h,p,m,g,v,b,y,E,S,w,C,A,O,I,L;const i=()=>{Me(this,mt,Mt).call(this,{type:"continue"})},s={client:U(this,nr),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,jt,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:($,V)=>{Me(this,mt,Mt).call(this,{type:"failed",failureCount:$,error:V})},onPause:()=>{Me(this,mt,Mt).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,rt).canRun(this)}));const o=this.state.status==="pending",a=!U(this,jt).canStart();try{if(o)i();else{Me(this,mt,Mt).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(l=U(this,rt).config).onMutate)==null?void 0:c.call(l,t,this,s));const V=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,t,s));V!==this.state.context&&Me(this,mt,Mt).call(this,{type:"pending",context:V,variables:t,isPaused:a})}const $=await U(this,jt).start();return await((h=(d=U(this,rt).config).onSuccess)==null?void 0:h.call(d,$,t,this.state.context,this,s)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,$,t,this.state.context,s)),await((v=(g=U(this,rt).config).onSettled)==null?void 0:v.call(g,$,null,this.state.variables,this.state.context,this,s)),await((y=(b=this.options).onSettled)==null?void 0:y.call(b,$,null,t,this.state.context,s)),Me(this,mt,Mt).call(this,{type:"success",data:$}),$}catch($){try{throw await((S=(E=U(this,rt).config).onError)==null?void 0:S.call(E,$,t,this.state.context,this,s)),await((C=(w=this.options).onError)==null?void 0:C.call(w,$,t,this.state.context,s)),await((O=(A=U(this,rt).config).onSettled)==null?void 0:O.call(A,void 0,$,this.state.variables,this.state.context,this,s)),await((L=(I=this.options).onSettled)==null?void 0:L.call(I,void 0,$,t,this.state.context,s)),$}finally{Me(this,mt,Mt).call(this,{type:"error",error:$})}}finally{U(this,rt).runNext(this)}}},nr=new WeakMap,ht=new WeakMap,rt=new WeakMap,jt=new WeakMap,mt=new WeakSet,Mt=function(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),notifyManager.batch(()=>{U(this,ht).forEach(s=>{s.onMutationUpdate(t)}),U(this,rt).notify({mutation:this,type:"updated",action:t})})},Rr);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MutationCache=(Tr=class extends Subscribable{constructor(t={}){super();we(this,_t);we(this,ft);we(this,ir);this.config=t,ge(this,_t,new Set),ge(this,ft,new Map),ge(this,ir,0)}build(t,i,s){const o=new Mutation({client:t,mutationCache:this,mutationId:++cr(this,ir)._,options:t.defaultMutationOptions(i),state:s});return this.add(o),o}add(t){U(this,_t).add(t);const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i);s?s.push(t):U(this,ft).set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(U(this,_t).delete(t)){const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&U(this,ft).delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=scopeFor(t);if(typeof i=="string"){const s=U(this,ft).get(i),o=s==null?void 0:s.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const i=scopeFor(t);if(typeof i=="string"){const o=(s=U(this,ft).get(i))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){notifyManager.batch(()=>{U(this,_t).forEach(t=>{this.notify({type:"removed",mutation:t})}),U(this,_t).clear(),U(this,ft).clear()})}getAll(){return Array.from(U(this,_t))}find(t){const i={exact:!0,...t};return this.getAll().find(s=>matchMutation(i,s))}findAll(t={}){return this.getAll().filter(i=>matchMutation(t,i))}notify(t){notifyManager.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return notifyManager.batch(()=>Promise.all(t.map(i=>i.continue().catch(noop$1))))}},_t=new WeakMap,ft=new WeakMap,ir=new WeakMap,Tr);function scopeFor(e){var t;return(t=e.options.scope)==null?void 0:t.id}var MutationObserver$1=(Ar=class extends Subscribable{constructor(i,s){super();we(this,St);we(this,bt);we(this,Tt);we(this,it);we(this,xt);ge(this,bt,i),this.setOptions(s),this.bindMethods(),Me(this,St,ur).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const s=this.options;this.options=U(this,bt).defaultMutationOptions(i),shallowEqualObjects(this.options,s)||U(this,bt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:U(this,it),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&hashKey(s.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((o=U(this,it))==null?void 0:o.state.status)==="pending"&&U(this,it).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=U(this,it))==null||i.removeObserver(this)}onMutationUpdate(i){Me(this,St,ur).call(this),Me(this,St,br).call(this,i)}getCurrentResult(){return U(this,Tt)}reset(){var i;(i=U(this,it))==null||i.removeObserver(this),ge(this,it,void 0),Me(this,St,ur).call(this),Me(this,St,br).call(this)}mutate(i,s){var o;return ge(this,xt,s),(o=U(this,it))==null||o.removeObserver(this),ge(this,it,U(this,bt).getMutationCache().build(U(this,bt),this.options)),U(this,it).addObserver(this),U(this,it).execute(i)}},bt=new WeakMap,Tt=new WeakMap,it=new WeakMap,xt=new WeakMap,St=new WeakSet,ur=function(){var s;const i=((s=U(this,it))==null?void 0:s.state)??getDefaultState();ge(this,Tt,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},br=function(i){notifyManager.batch(()=>{var s,o,a,l,c,u,f,d;if(U(this,xt)&&this.hasListeners()){const h=U(this,Tt).variables,p=U(this,Tt).context,m={client:U(this,bt),meta:this.options.meta,mutationKey:this.options.mutationKey};(i==null?void 0:i.type)==="success"?((o=(s=U(this,xt)).onSuccess)==null||o.call(s,i.data,h,p,m),(l=(a=U(this,xt)).onSettled)==null||l.call(a,i.data,null,h,p,m)):(i==null?void 0:i.type)==="error"&&((u=(c=U(this,xt)).onError)==null||u.call(c,i.error,h,p,m),(d=(f=U(this,xt)).onSettled)==null||d.call(f,void 0,i.error,h,p,m))}this.listeners.forEach(h=>{h(U(this,Tt))})})},Ar),QueryCache=(Ir=class extends Subscribable{constructor(t={}){super();we(this,gt);this.config=t,ge(this,gt,new Map)}build(t,i,s){const o=i.queryKey,a=i.queryHash??hashQueryKeyByOptions(o,i);let l=this.get(a);return l||(l=new Query({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){U(this,gt).has(t.queryHash)||(U(this,gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=U(this,gt).get(t.queryHash);i&&(t.destroy(),i===t&&U(this,gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return U(this,gt).get(t)}getAll(){return[...U(this,gt).values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>matchQuery(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>matchQuery(t,s)):i}notify(t){notifyManager.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gt=new WeakMap,Ir),QueryClient=(Pr=class{constructor(e={}){we(this,Ge);we(this,At);we(this,It);we(this,Xt);we(this,Jt);we(this,Pt);we(this,Qt);we(this,Zt);ge(this,Ge,e.queryCache||new QueryCache),ge(this,At,e.mutationCache||new MutationCache),ge(this,It,e.defaultOptions||{}),ge(this,Xt,new Map),ge(this,Jt,new Map),ge(this,Pt,0)}mount(){cr(this,Pt)._++,U(this,Pt)===1&&(ge(this,Qt,focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ge).onFocus())})),ge(this,Zt,onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Ge).onOnline())})))}unmount(){var e,t;cr(this,Pt)._--,U(this,Pt)===0&&((e=U(this,Qt))==null||e.call(this),ge(this,Qt,void 0),(t=U(this,Zt))==null||t.call(this),ge(this,Zt,void 0))}isFetching(e){return U(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return U(this,At).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=U(this,Ge).get(t.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=U(this,Ge).build(this,t),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(resolveStaleTime(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return U(this,Ge).findAll(e).map(({queryKey:t,state:i})=>{const s=i.data;return[t,s]})}setQueryData(e,t,i){const s=this.defaultQueryOptions({queryKey:e}),o=U(this,Ge).get(s.queryHash),a=o==null?void 0:o.state.data,l=functionalUpdate(t,a);if(l!==void 0)return U(this,Ge).build(this,s).setData(l,{...i,manual:!0})}setQueriesData(e,t,i){return notifyManager.batch(()=>U(this,Ge).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,i)]))}getQueryState(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=U(this,Ge).get(t.queryHash))==null?void 0:i.state}removeQueries(e){const t=U(this,Ge);notifyManager.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=U(this,Ge);return notifyManager.batch(()=>(i.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const i={revert:!0,...t},s=notifyManager.batch(()=>U(this,Ge).findAll(e).map(o=>o.cancel(i)));return Promise.all(s).then(noop$1).catch(noop$1)}invalidateQueries(e,t={}){return notifyManager.batch(()=>(U(this,Ge).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const i={...t,cancelRefetch:t.cancelRefetch??!0},s=notifyManager.batch(()=>U(this,Ge).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,i);return i.throwOnError||(a=a.catch(noop$1)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(noop$1)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=U(this,Ge).build(this,t);return i.isStaleByTime(resolveStaleTime(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(noop$1).catch(noop$1)}fetchInfiniteQuery(e){return e.behavior=infiniteQueryBehavior(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(noop$1).catch(noop$1)}ensureInfiniteQueryData(e){return e.behavior=infiniteQueryBehavior(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return onlineManager.isOnline()?U(this,At).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Ge)}getMutationCache(){return U(this,At)}getDefaultOptions(){return U(this,It)}setDefaultOptions(e){ge(this,It,e)}setQueryDefaults(e,t){U(this,Xt).set(hashKey(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...U(this,Xt).values()],i={};return t.forEach(s=>{partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,t){U(this,Jt).set(hashKey(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...U(this,Jt).values()],i={};return t.forEach(s=>{partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...U(this,It).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hashQueryKeyByOptions(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...U(this,It).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){U(this,Ge).clear(),U(this,At).clear()}},Ge=new WeakMap,At=new WeakMap,It=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Pt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap,Pr),QueryClientContext=React__namespace.createContext(void 0),useQueryClient=e=>{const t=React__namespace.useContext(QueryClientContext);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},QueryClientProvider=({client:e,children:t})=>(React__namespace.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:e,children:t})),IsRestoringContext=React__namespace.createContext(!1),useIsRestoring=()=>React__namespace.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QueryErrorResetBoundaryContext=React__namespace.createContext(createValue()),useQueryErrorResetBoundary=()=>React__namespace.useContext(QueryErrorResetBoundaryContext),ensurePreventErrorBoundaryRetry=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},useClearResetErrorBoundary=e=>{React__namespace.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||shouldThrowError(i,[e.error,s])),defaultThrowOnError=(e,t)=>t.state.data===void 0,ensureSuspenseTimers=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>i(s(...o)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fetchOptimistic=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function useBaseQuery(e,t,i){var h,p,m,g,v;const s=useIsRestoring(),o=useQueryErrorResetBoundary(),a=useQueryClient(),l=a.defaultQueryOptions(e);(p=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,l),l._optimisticResults=s?"isRestoring":"optimistic",ensureSuspenseTimers(l),ensurePreventErrorBoundaryRetry(l,o),useClearResetErrorBoundary(o);const c=!a.getQueryCache().get(l.queryHash),[u]=React__namespace.useState(()=>new t(a,l)),f=u.getOptimisticResult(l),d=!s&&e.subscribed!==!1;if(React__namespace.useSyncExternalStore(React__namespace.useCallback(b=>{const y=d?u.subscribe(notifyManager.batchCalls(b)):noop$1;return u.updateResult(),y},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),React__namespace.useEffect(()=>{u.setOptions(l)},[l,u]),shouldSuspend(l,f))throw fetchOptimistic(l,u,o);if(getHasError({result:f,errorResetBoundary:o,throwOnError:l.throwOnError,query:a.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;if((g=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||g.call(m,l,f),l.experimental_prefetchInRender&&!isServer&&willFetch(f,s)){const b=c?fetchOptimistic(l,u,o):(v=a.getQueryCache().get(l.queryHash))==null?void 0:v.promise;b==null||b.catch(noop$1).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?f:u.trackResult(f)}function useQuery(e,t){return useBaseQuery(e,QueryObserver)}function useSuspenseQuery(e,t){return useBaseQuery({...e,enabled:!0,suspense:!0,throwOnError:defaultThrowOnError,placeholderData:void 0},QueryObserver)}function useMutation(e,t){const i=useQueryClient(),[s]=React__namespace.useState(()=>new MutationObserver$1(i,e));React__namespace.useEffect(()=>{s.setOptions(e)},[s,e]);const o=React__namespace.useSyncExternalStore(React__namespace.useCallback(l=>s.subscribe(notifyManager.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=React__namespace.useCallback((l,c)=>{s.mutate(l,c).catch(noop$1)},[s]);if(o.error&&shouldThrowError(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}const PROFILE_TAG="profile";function useProfile(e){return useSuspenseQuery({queryKey:[PROFILE_TAG],queryFn:async()=>{const t=await window.CryptoSteamSDK.getProfile();return setUser({id:String(t.id)}),t},select:t=>({...t,inventory:t.inventory||[],balance_usdt:dividePriceResponse(t.balance_usdt),balances:{...t.balances,usdt:dividePriceResponse(t.balance_usdt)}}),...e})}const LevelInfoModal=({children:e})=>{const{t}=useTranslation(),[i,s]=React.useState(!1),{data:{level_up_exp:o,experience:a,level:l,current_level_exp:c}}=useProfile(),[u]=useAnimateNumber(a);return jsxRuntimeExports.jsx(Drawer,{trigger:e,open:i,onOpenChange:s,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-18 flex items-center justify-center",children:jsxRuntimeExports.jsx(XpProgress,{experience:a-c,xpNeeded:o-c,level:l,size:64,className:"text-[var(--tgui--button_color)]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:t("levelInfoModal.title")}),jsxRuntimeExports.jsxs(Caption,{level:"1",weight:"2",className:"text-center",children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--tgui--text_color)"},children:u.toLocaleString()}),jsxRuntimeExports.jsxs("span",{style:{color:"var(--tgui--subtitle_text_color)"},children:[" / ",o.toLocaleString()," XP"]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"-mt-1.5 text-center",children:jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:t("levelInfoModal.description")})}),jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:()=>s(!1),mode:"filled",style:{height:42},children:t("levelInfoModal.action")})]})})};function AnimatedBalance({value:e,style:t,className:i,colorText:s="",noRounding:o}){const[a,l]=useAnimateNumber(0,!1,o),[c,u]=React.useState(s),f=React.useRef(0),d=React.useRef();React.useEffect(()=>{const p=e,m=f.current;return d.current&&clearTimeout(d.current),m!==0&&(p>m?u("#22C55E"):p<m&&u("#FF7700")),l(p),d.current=setTimeout(()=>{u(s)},300),f.current=p,()=>{d.current&&clearTimeout(d.current)}},[e,l,s]);const h=o?Math.trunc((a??0)*100)/100:Math.round(a??0);return jsxRuntimeExports.jsx(Text,{weight:"1",className:cn$1("text-rounded",i),style:{color:c||"inherit",transition:"color 0.3s ease",...t},children:formatter.format(h)})}const Icons={thumbsDownOutlined:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.5 15.16-.61.53a.45.45 0 0 0-.15.24l-.92 4.36a3.1 3.1 0 0 1-4.37 2.24 3.24 3.24 0 0 1-1.8-2.93v-2.18c-1.82-.01-3.42-.47-4.57-1.6-1.17-1.14-1.7-2.8-1.7-4.88V9.77c0-2.07.53-3.74 1.7-4.87 1.16-1.12 2.78-1.57 4.6-1.57h7.87c.41-.53 1-.91 1.68-1.04.24-.04.5-.04.8-.04h.14A2.79 2.79 0 0 1 21.2 4.6c.04.24.04.52.04.83v7.72c0 .32 0 .6-.04.84a2.79 2.79 0 0 1-2.22 2.3c-.24.04-.5.04-.8.04h-.14c-.3 0-.57 0-.8-.04a2.73 2.73 0 0 1-1.75-1.13Zm-3.52 4.71a1.23 1.23 0 0 1-1.73.89 1.29 1.29 0 0 1-.72-1.16v-3.16a.96.96 0 0 0-.94-.97h-.9c-1.56 0-2.63-.4-3.32-1.06-.67-.66-1.12-1.74-1.12-3.47V9.77c0-1.73.45-2.8 1.12-3.44.68-.66 1.75-1.05 3.32-1.05h7.28V13.1a.96.96 0 0 0-.08.06l-1.21 1.04c-.4.34-.67.8-.78 1.33l-.92 4.35Zm6.67-5.5-.54.01-.55-.01a.87.87 0 0 1-.7-.72V4.93a.87.87 0 0 1 .7-.72l.55-.01.54.01c.36.07.64.36.7.72l.01.57v7.58l-.01.57a.87.87 0 0 1-.7.72Z",clipRule:"evenodd"})}),thumbsUpOutlined:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8.2 8.97.6-.63c.05-.05.1-.12.11-.2l1.02-4.56a3.03 3.03 0 0 1 3.55-2.36 3.11 3.11 0 0 1 2.43 3.07v2.4h.1c1.94 0 3.55.43 4.66 1.57 1.1 1.15 1.52 2.81 1.52 4.82v1.09c0 2.08-.58 3.73-1.74 4.84A6.2 6.2 0 0 1 16 20.56h-7.9c-.33.48-.81.84-1.38 1-.33.08-.69.08-1.08.08h-.19c-.39 0-.75 0-1.08-.09a2.56 2.56 0 0 1-1.77-1.84 4.54 4.54 0 0 1-.09-1.11v-7.78c0-.4 0-.78.09-1.12.23-.9.9-1.6 1.77-1.84.33-.09.7-.09 1.08-.09h.19c.39 0 .75 0 1.08.1.61.16 1.13.56 1.46 1.1Zm3.57-4.95c.14-.62.73-1.02 1.34-.9.53.12.92.6.92 1.17v3.38c0 .54.42.97.94.97H16c1.73 0 2.73.39 3.33 1 .6.62.96 1.66.96 3.44v1.09c0 1.7-.46 2.77-1.13 3.41-.69.66-1.73 1.03-3.16 1.03L8.6 18.6v-7.28l1.54-1.6c.3-.31.52-.7.61-1.14l1.03-4.56Zm-5.06 6.9v7.58c0 .57-.01.66-.03.71a.64.64 0 0 1-.44.46c-.05.01-.14.02-.68.02-.55 0-.64 0-.69-.02a.64.64 0 0 1-.44-.46 4.12 4.12 0 0 1-.02-.71v-7.58c0-.57 0-.66.02-.71.05-.23.22-.4.44-.46.05-.02.14-.03.69-.03.54 0 .63.01.68.03.22.06.39.23.44.46.02.05.02.15.03.71Z",clipRule:"evenodd"})}),thumbsDownFilled:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m21.32 13.75.01-.58V5l-.01-.59a2 2 0 0 0-1.74-1.73L19 2.67l-.59.01a2 2 0 0 0-1.73 1.73l-.01.59v8.17l.01.58a2 2 0 0 0 1.73 1.73c.13.02.28.02.59.02.3 0 .46 0 .58-.02a2 2 0 0 0 1.74-1.73ZM7.5 3.83c-3.79 0-6 1.79-6 5.89v1.26c0 4.1 2.21 5.69 6 5.69h1v3.65a2.18 2.18 0 0 0 4.26.63l1.73-5.52c.05-.17.08-.34.08-.5V5.7c0-.65 0-.98-.13-1.23-.11-.22-.3-.4-.51-.51-.25-.13-.58-.13-1.23-.13H7.5Z"})}),thumbsUpFilled:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m2.68 10.24-.01.59v8.16l.01.59a2 2 0 0 0 1.73 1.73c.13.02.29.02.59.02s.46 0 .59-.02a2 2 0 0 0 1.73-1.73l.01-.59v-8.16l-.01-.59a2 2 0 0 0-1.73-1.73C5.46 8.5 5.3 8.5 5 8.5s-.46 0-.59.02a2 2 0 0 0-1.73 1.73ZM16.5 20.16c3.79 0 6-1.78 6-5.88v-1.26c0-4.1-2.21-5.7-6-5.7h-1V3.69a2.18 2.18 0 0 0-4.26-.63L9.51 8.57c-.05.16-.08.33-.08.5v9.22c0 .66 0 .98.13 1.23.11.22.29.4.51.51.25.13.58.13 1.23.13h5.2Z"})}),star:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M11.17 2.49a.87.87 0 0 1 1.66 0L13.9 5.7c.16.5.74.74 1.21.5l3.03-1.51a.87.87 0 0 1 1.17 1.17L17.8 8.9a.87.87 0 0 0 .5 1.21l3.21 1.07c.8.27.8 1.4 0 1.66L18.3 13.9a.87.87 0 0 0-.5 1.21l1.51 3.03a.87.87 0 0 1-1.17 1.17L15.1 17.8a.87.87 0 0 0-1.21.5l-1.07 3.21c-.27.8-1.4.8-1.66 0L10.1 18.3a.87.87 0 0 0-1.21-.5L5.86 19.3a.87.87 0 0 1-1.17-1.17L6.2 15.1a.87.87 0 0 0-.5-1.21l-3.21-1.07a.87.87 0 0 1 0-1.66L5.7 10.1c.5-.16.74-.74.5-1.21L4.7 5.86A.87.87 0 0 1 5.86 4.7L8.9 6.2a.87.87 0 0 0 1.21-.5l1.07-3.21Z"})}),smile:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.987 14c0-4.953 4.024-8.991 9.015-8.991S23.017 9.047 23.017 14s-4.024 8.991-9.015 8.991S4.987 18.953 4.987 14m9.015-11c-6.063 0-11 4.912-11 11s4.937 11 11 11 11-4.912 11-11-4.937-11-11-11m4.438 13.835a1.01 1.01 0 0 0-.604-1.283.99.99 0 0 0-1.27.616 1 1 0 0 1-.069.132 2.1 2.1 0 0 1-.372.466c-.348.331-.983.728-2.123.728s-1.775-.397-2.123-.727a2.1 2.1 0 0 1-.372-.467 1 1 0 0 1-.07-.132l-.005-.013-.003-.007a.99.99 0 0 0-1.261-.596c-.517.186-.787.76-.604 1.283l.89-.32-.89.32v.002l.002.003.002.006.005.013a2 2 0 0 0 .059.142c.038.084.092.194.166.321.148.254.38.582.722.908.704.67 1.82 1.272 3.482 1.272s2.778-.602 3.482-1.272a4.2 4.2 0 0 0 .722-.908 3.5 3.5 0 0 0 .225-.463l.005-.014.002-.005.001-.003v-.001l-.886-.32zM11.007 12.8c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.247 1.476m5.986 0c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.246 1.476Z",clipRule:"evenodd"})}),discountOutline:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.04 2.57a2.81 2.81 0 0 0-4.05 0l-.65.68a1.1 1.1 0 0 1-.9.33l-.94-.1a2.81 2.81 0 0 0-3.1 2.6L4.35 7c-.02.34-.2.65-.48.84l-.78.52a2.81 2.81 0 0 0-.7 3.98l.55.76c.2.28.26.63.17.95l-.26.9a2.81 2.81 0 0 0 2.02 3.5l.91.23c.33.08.6.31.74.62l.38.86a2.81 2.81 0 0 0 3.8 1.38l.84-.41c.3-.15.66-.15.97 0l.84.41c1.43.7 3.15.07 3.8-1.38l.38-.86c.14-.3.41-.54.74-.62l.9-.23a2.81 2.81 0 0 0 2.03-3.5l-.26-.9a1.1 1.1 0 0 1 .17-.95l.55-.76c.93-1.28.62-3.09-.7-3.98l-.78-.52a1.1 1.1 0 0 1-.48-.84l-.07-.93a2.81 2.81 0 0 0-3.1-2.6l-.93.1a1.1 1.1 0 0 1-.9-.33l-.65-.68Zm-2.81 1.2a1.1 1.1 0 0 1 1.57 0l.66.67c.6.62 1.45.93 2.31.84l.93-.1a1.1 1.1 0 0 1 1.21 1.02l.07.93c.06.87.51 1.65 1.23 2.14l.78.52c.51.35.64 1.05.27 1.56l-.55.76c-.5.7-.66 1.6-.43 2.42l.26.9a1.1 1.1 0 0 1-.79 1.37l-.9.23c-.85.2-1.54.8-1.9 1.58l-.38.86a1.1 1.1 0 0 1-1.48.54l-.84-.41a2.81 2.81 0 0 0-2.47 0l-.84.4a1.1 1.1 0 0 1-1.48-.53l-.38-.86a2.81 2.81 0 0 0-1.9-1.58l-.9-.23a1.1 1.1 0 0 1-.8-1.37l.27-.9c.24-.83.08-1.72-.43-2.42l-.55-.76a1.1 1.1 0 0 1 .27-1.56l.78-.52a2.81 2.81 0 0 0 1.23-2.14l.07-.93a1.1 1.1 0 0 1 1.2-1.02l.94.1c.86.1 1.71-.22 2.31-.84l.66-.68Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 6c.36 0 .64.29.64.64v.68c1.66.17 2.8.98 3.17 1.86a.64.64 0 1 1-1.19.5c-.12-.3-.73-.9-1.98-1.07v2.82c1.22.19 2.02.53 2.52 1 .62.59.7 1.26.7 1.71 0 .84-.54 1.5-1.22 1.91-.55.34-1.24.55-2 .63v.68a.64.64 0 0 1-1.28 0v-.68c-1.66-.17-2.8-.98-3.17-1.86a.64.64 0 0 1 1.19-.5c.12.3.73.9 1.98 1.07v-2.82a4.62 4.62 0 0 1-2.52-1 2.21 2.21 0 0 1-.7-1.71c0-.84.54-1.5 1.23-1.91a4.78 4.78 0 0 1 1.99-.63v-.68c0-.35.29-.64.64-.64Zm-.64 2.61c-.54.07-1 .23-1.33.43-.45.28-.6.59-.6.82 0 .3.04.54.29.77.23.2.7.47 1.64.63V8.61Zm1.28 4.13v2.65c.54-.07 1-.23 1.33-.43.45-.28.6-.59.6-.82 0-.3-.04-.54-.29-.77-.22-.2-.7-.47-1.64-.63Z",clipRule:"evenodd"})]}),cup:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.6 1.71H9.4c-.57 0-1.05 0-1.45.04a3 3 0 0 0-1.2.33c-.57.3-1.06.85-1.32 1.44a3.57 3.57 0 0 0-.21 1.67c-.54-.1-1.1-.04-1.59.12A2.76 2.76 0 0 0 1.71 8c0 1.34.8 2.57 1.85 3.41a6.47 6.47 0 0 0 3.21 1.4c.15.35.3.67.47.98a6.82 6.82 0 0 0 2.39 2.7c-.03.47-.1.8-.18 1.02-.1.28-.21.44-.34.59l-.15.16-.1.1a2.28 2.28 0 0 0-.71 1.74v1.33c0 .47.38.86.85.86h6c.47 0 .86-.39.86-.86V20.1a2.28 2.28 0 0 0-.72-1.74l-.1-.1-.15-.16c-.13-.15-.25-.31-.34-.59a3.9 3.9 0 0 1-.18-1.02 6.82 6.82 0 0 0 2.39-2.7c.16-.3.32-.63.47-.98a6.47 6.47 0 0 0 3.21-1.4A4.57 4.57 0 0 0 22.3 8c0-1.42-.9-2.34-1.92-2.69a3.22 3.22 0 0 0-1.59-.12c.04-.62.01-1.16-.21-1.67a3.11 3.11 0 0 0-1.32-1.44 3 3 0 0 0-1.2-.33c-.4-.04-.88-.04-1.44-.04ZM12.7 17.1a4.72 4.72 0 0 1-1.4 0c-.05.37-.13.7-.22.97-.19.55-.45.9-.7 1.18l-.23.25-.06.06c-.08.08-.12.13-.15.18-.03.05-.08.13-.08.37v.47h4.28v-.47c0-.24-.05-.32-.08-.37a1.42 1.42 0 0 0-.17-.2l-.04-.04-.24-.25a3.3 3.3 0 0 1-.69-1.18c-.1-.28-.17-.6-.21-.97Zm6.66-7c-.43.35-.94.63-1.48.81.33-1.15.56-2.43.73-3.8.21-.2.7-.34 1.2-.16.44.15.76.48.76 1.06 0 .66-.41 1.43-1.21 2.09Zm-13.24.81a25.2 25.2 0 0 1-.73-3.8c-.21-.2-.7-.34-1.2-.16-.44.15-.76.48-.76 1.06 0 .66.41 1.43 1.21 2.09.43.35.94.63 1.48.81Zm1.45-7.32c.1-.05.24-.1.53-.12.31-.03.72-.03 1.33-.03h5.14c.61 0 1.02 0 1.33.03.3.02.43.07.53.12.23.13.46.38.57.62.1.25.1.54 0 1.72-.25 2.94-.85 5.39-1.75 7.06-.9 1.68-2 2.45-3.25 2.45s-2.35-.77-3.25-2.45c-.9-1.67-1.5-4.12-1.75-7.06-.1-1.18-.1-1.47 0-1.72.1-.24.34-.5.57-.62Z",clipRule:"evenodd"})}),games:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.82 3.86h.36c1.38 0 2.46 0 3.33.06.9.07 1.65.22 2.34.54a6.37 6.37 0 0 1 2.74 2.43c.4.64.62 1.35.78 2.22.17.85.29 1.91.44 3.27l.46 4.06c.05.45 0 .9-.13 1.34a3.4 3.4 0 0 1-6.17.7l-1.39-2.33a.22.22 0 0 0-.19-.11H9.61a.22.22 0 0 0-.19.1l-1.4 2.35a3.4 3.4 0 0 1-6.16-.7 3.3 3.3 0 0 1-.13-1.35l.46-4.06c.15-1.36.27-2.42.44-3.27.16-.87.39-1.58.78-2.22a6.37 6.37 0 0 1 2.74-2.43 6.6 6.6 0 0 1 2.34-.54c.87-.06 1.95-.06 3.33-.06Zm-3.2 1.7c-.79.07-1.3.18-1.73.38a4.7 4.7 0 0 0-2.02 1.8c-.25.4-.43.9-.57 1.67a45.2 45.2 0 0 0-.43 3.18l-.45 4.02a1.7 1.7 0 0 0 3.14 1.06l1.39-2.35c.34-.57.97-.93 1.66-.93h4.78c.7 0 1.32.36 1.66.93l1.4 2.35a1.69 1.69 0 0 0 3.13-1.06l-.45-4.02c-.16-1.4-.27-2.4-.43-3.18a4.83 4.83 0 0 0-.57-1.68 4.69 4.69 0 0 0-2.02-1.79 4.9 4.9 0 0 0-1.73-.37c-.8-.07-1.82-.07-3.23-.07h-.3c-1.41 0-2.43 0-3.23.07Zm-.09 2.42c.47 0 .85.37.85.82v.55h.54c.47 0 .85.37.85.83 0 .45-.38.82-.85.82h-.54v.55c0 .45-.38.82-.85.82a.84.84 0 0 1-.85-.82V11h-.54a.84.84 0 0 1-.84-.82c0-.46.38-.83.84-.83h.54V8.8c0-.45.38-.82.85-.82Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M16.62 8.3c0 .47-.4.86-.9.86-.49 0-.89-.39-.89-.87s.4-.86.9-.86.9.38.9.86ZM18.51 10.12c0 .48-.4.87-.9.87-.49 0-.9-.39-.9-.87s.41-.86.9-.86c.5 0 .9.38.9.86ZM14.74 10.12c0 .48-.4.87-.9.87s-.9-.39-.9-.87.4-.86.9-.86.9.38.9.86ZM16.62 11.95c0 .48-.4.87-.9.87-.49 0-.89-.39-.89-.87s.4-.87.9-.87.9.4.9.87Z"})]}),download:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M19.14 19c.53 0 .96.45.96 1s-.43 1-.96 1H4.86a.98.98 0 0 1-.96-1c0-.55.43-1 .96-1h14.28ZM12 2c.53 0 .95.45.95 1v10.34l4.57-4.8a.91.91 0 0 1 1.34 0c.38.4.38 1.03 0 1.42l-6.19 6.5a.91.91 0 0 1-1.34 0l-6.2-6.5a1.04 1.04 0 0 1 0-1.42.93.93 0 0 1 1.35 0l4.57 4.8V3c0-.55.42-1 .95-1Z"})}),checkThin:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M24.66 6.21c.4.38.4 1 .03 1.4l-13.3 13.78a.99.99 0 0 1-1.43 0L3.31 14.5a.99.99 0 1 1 1.43-1.37l5.93 6.15 12.6-13.05a1 1 0 0 1 1.4-.02Z",clipRule:"evenodd"})}),addCircle:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.06 18.58a8.65 8.65 0 0 1-8.57-8.57c0-1.18.22-2.28.67-3.32a8.73 8.73 0 0 1 7.9-5.26c1.17 0 2.28.23 3.31.67a8.76 8.76 0 0 1 4.6 4.6c.45 1.03.67 2.13.67 3.3 0 1.18-.22 2.28-.67 3.32a8.76 8.76 0 0 1-4.6 4.59 8.24 8.24 0 0 1-3.31.67Zm0-1.7a6.76 6.76 0 0 0 4.87-2 6.9 6.9 0 1 0-4.87 2ZM10 5.5a.75.75 0 0 0-.75.75v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5h-3v-3A.75.75 0 0 0 10 5.5Z",clipRule:"evenodd"})}),search:e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:[jsxRuntimeExports.jsx("circle",{cx:"9",cy:"10",r:"6",stroke:"currentColor",strokeWidth:"2"}),jsxRuntimeExports.jsx("rect",{width:"8",height:"2",x:"13.88",y:"13.46",fill:"currentColor",rx:"1",transform:"rotate(45 13.88 13.46)"})]}),chevronLeft:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M.72 6a.88.88 0 0 1 .25-.63L5.06.97a.66.66 0 0 1 .86-.13c.11.07.2.17.27.29a.84.84 0 0 1-.13.97L2.42 6l3.64 3.9c.15.17.22.36.22.58a.8.8 0 0 1-.36.68.66.66 0 0 1-.86-.12L.97 6.63c-.08-.1-.15-.2-.19-.3A.86.86 0 0 1 .72 6Z"})}),chevronRight:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M6.42 5.77c0 .12-.02.23-.07.33a.9.9 0 0 1-.21.3l-4.5 4.4a.77.77 0 0 1-.56.23.77.77 0 0 1-.4-.1.76.76 0 0 1-.4-.68c0-.22.09-.41.25-.58l4.01-3.9-4-3.9A.79.79 0 0 1 1.07.5c.21 0 .4.07.55.22l4.5 4.41c.1.1.17.2.22.3.05.1.07.2.07.33Z"})}),close:e=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e,children:jsxRuntimeExports.jsx("path",{fill:"currentColor","fill-opacity":".8",d:"M7.86 17.14a1 1 0 0 1-1-1.02c0-.27.1-.52.3-.7L10.54 12l-3.4-3.4a.98.98 0 0 1-.3-.71c0-.58.45-1 1.01-1 .28 0 .5.09.7.27l3.42 3.42 3.45-3.43a1 1 0 0 1 1.72.71c0 .29-.1.5-.31.73L13.43 12l3.4 3.4c.2.18.3.44.3.72 0 .57-.45 1.02-1.03 1.02a.97.97 0 0 1-.72-.3l-3.4-3.4-3.38 3.4c-.2.2-.46.3-.74.3Z",opacity:".5"})})};function Icon({name:e,size:t=24,className:i,title:s,"aria-label":o,...a}){const l=Icons[e],c=!!(s||o);return jsxRuntimeExports.jsx(l,{className:cn$1("aspect-square",i),width:t,height:t,role:"img","aria-hidden":!c,"aria-label":o,...a,children:s?jsxRuntimeExports.jsx("title",{children:s}):null})}const useForceRerender=()=>{const[,e]=React.useState(0);return()=>e(t=>t+1)},useMiniApp=()=>{const e=useForceRerender();return React.useEffect(()=>{var i;const t=["viewportChanged","themeChanged","safeAreaChanged","contentSafeAreaChanged","fullscreenChanged"];for(const s of t)(i=window.Telegram.WebApp)==null||i.onEvent(s,e);return window.screen.orientation.addEventListener("change",e),()=>{var s;window.screen.orientation.removeEventListener("change",e);for(const o of t)(s=window.Telegram.WebApp)==null||s.offEvent(o,e)}},[e]),{miniApp:window.Telegram.WebApp}};function useThrottle(e,t=500){const[i,s]=React.useState(e),o=React.useRef(null);return React.useEffect(()=>{const a=Date.now();if(o.current&&a>=o.current+t)o.current=a,s(e);else{const l=window.setTimeout(()=>{o.current=a,s(e)},t);return()=>window.clearTimeout(l)}},[e,t]),i}const createStoreImpl=e=>{let t;const i=new Set,s=(f,d)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),i.forEach(m=>m(t,p))}},o=()=>t,c={setState:s,getState:o,getInitialState:()=>u,subscribe:f=>(i.add(f),()=>i.delete(f))},u=t=e(s,o,c);return c},createStore=e=>e?createStoreImpl(e):createStoreImpl,identity=e=>e;function useStore(e,t=identity){const i=React.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return React.useDebugValue(i),i}const createImpl=e=>{const t=createStore(e),i=s=>useStore(t,s);return Object.assign(i,t),i},create$2=e=>e?createImpl(e):createImpl,useInventoryModalStore=create$2(e=>({isOpen:!1,setIsOpen:t=>e({isOpen:t})})),useTopUpModalStore=create$2(e=>({isOpen:!1,setIsOpen:t=>e({isOpen:t})})),IconTelegramStar=e=>jsxRuntimeExports.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsxRuntimeExports.jsx("title",{children:"Telegram star"}),jsxRuntimeExports.jsx("path",{d:"M5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6242 6.87734 14.5373 7.05617 14.4007 7.19164L11.7111 9.85999C11.6025 9.96772 11.5501 10.1203 11.5689 10.2729L12.0159 13.8751C12.0798 14.3908 11.718 14.8614 11.208 14.9259C11.0147 14.9504 10.8185 14.9132 10.6472 14.8191L7.80591 13.2571C7.60021 13.1442 7.35288 13.1409 7.14436 13.2484L4.20051 14.7679C3.78627 14.9819 3.27883 14.8156 3.06727 14.3968C2.98815 14.2401 2.95889 14.0626 2.9836 13.8883L3.219 12.2357C3.33411 11.4274 3.83114 10.7262 4.55123 10.3562L7.82109 8.67603C7.90844 8.63116 7.94313 8.52343 7.89869 8.43521C7.86444 8.36671 7.79074 8.32813 7.71574 8.33897L3.71669 8.91512C3.10542 9.00334 2.48548 8.82972 2.00622 8.43608L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162Z",fill:"url(#paint0_linear_13203_44637)"}),jsxRuntimeExports.jsx("path",{d:"M8.14979 9.42368C8.22479 9.41285 8.29849 9.45143 8.33273 9.51993C8.37717 9.60815 8.34249 9.71588 8.25513 9.76075L4.98527 11.4409C4.26519 11.8109 3.76815 12.5121 3.65305 13.3204L3.44604 14.7745C3.28846 14.6964 3.15363 14.5679 3.06779 14.3977C2.98867 14.241 2.95941 14.0635 2.98412 13.8892L3.21952 12.2366C3.33463 11.4283 3.83166 10.7271 4.55175 10.3571L5.67393 9.78026L8.14979 9.42368Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6385 6.75704 14.6209 6.82705 14.5954 6.89381C14.5175 6.85783 14.4332 6.83334 14.3439 6.8225L10.9414 6.41173C10.6438 6.37575 10.3843 6.19042 10.2516 5.91881L8.62658 2.5939C8.55006 2.43718 8.42499 2.30972 8.27065 2.23103C7.87701 2.03031 7.3971 2.19007 7.19876 2.58783L5.4781 6.03543C5.37883 6.23485 5.18786 6.3712 4.96893 6.39959L1.55427 6.84179C1.3284 6.87105 1.12226 6.98702 0.978764 7.16563C0.905716 7.25646 0.853259 7.35747 0.820528 7.4626L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M6.45499 1.35048C6.73938 0.780608 7.42912 0.551056 7.99466 0.83935C8.2164 0.952283 8.39523 1.1348 8.50491 1.35893L10.1298 4.68385C10.2111 4.85011 10.3691 4.96304 10.5496 4.98493L13.9522 5.39548C14.6048 5.47438 15.0691 6.07091 14.9915 6.72705C14.9597 6.99692 14.8376 7.24815 14.6451 7.43912L11.9556 10.1072C11.9235 10.1393 11.9074 10.1853 11.9133 10.2315L12.3603 13.8336C12.4476 14.5383 11.9523 15.1825 11.2517 15.2714C10.9855 15.305 10.7159 15.2536 10.4805 15.1242L7.63895 13.5624C7.53468 13.505 7.4094 13.5033 7.30362 13.5579L4.35977 15.0774C3.77364 15.3798 3.05616 15.1448 2.75789 14.5546C2.64669 14.3343 2.60572 14.0851 2.64041 13.8408L2.87581 12.1879C3.00673 11.2687 3.57248 10.4705 4.39293 10.0489L6.7719 8.8264L3.76649 9.2597C3.0839 9.35811 2.392 9.17452 1.8464 8.75313L1.78636 8.70544L0.454356 7.61166C-0.0728106 7.179 -0.152796 6.39801 0.275093 5.86564C0.474515 5.61744 0.761508 5.45596 1.07625 5.41521L4.49091 4.97301C4.59517 4.95957 4.68643 4.89433 4.73455 4.79808L6.45499 1.35048ZM7.6797 1.45734C7.45838 1.34441 7.1883 1.43436 7.07558 1.66023L5.35514 5.10784C5.20427 5.41022 4.91403 5.61766 4.58 5.6608L1.16534 6.10299C1.02856 6.12077 0.903271 6.19122 0.815699 6.30025C0.625815 6.5363 0.661581 6.88442 0.8946 7.07561L2.22661 8.16939C2.63065 8.50104 3.15262 8.64735 3.66743 8.57322L7.66626 7.99685C7.88952 7.96477 8.10759 8.07922 8.20882 8.28059C8.33844 8.53832 8.23678 8.85371 7.9797 8.98593L4.71005 10.6658C4.09011 10.9843 3.66179 11.5886 3.56251 12.2859L3.32711 13.9385C3.31237 14.0424 3.32993 14.1483 3.37696 14.2418C3.50182 14.4889 3.799 14.5862 4.04156 14.4609L6.98563 12.9416C7.29646 12.781 7.66626 12.7858 7.9732 12.9544L10.8145 14.5162C10.9216 14.5752 11.0439 14.5983 11.1646 14.5832C11.4841 14.5426 11.7123 14.2459 11.6718 13.919L11.2248 10.3169C11.1928 10.0578 11.2821 9.79836 11.4672 9.61498L14.1566 6.94663C14.2374 6.86643 14.2892 6.76022 14.3027 6.64555C14.3356 6.36766 14.1403 6.11708 13.8691 6.08413L10.4664 5.67359C10.0517 5.62351 9.69082 5.36557 9.50657 4.9884L7.88172 1.66348C7.83794 1.57417 7.76705 1.50178 7.6797 1.45734Z",fill:"url(#paint1_linear_13203_44637)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_13203_44637",x1:"5.54898",y1:"4.31195",x2:"11.4016",y2:"14.7166",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_13203_44637",x1:"7.50002",y1:"1.06175",x2:"7.50002",y2:"14.7178",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),coinImage=assetUrl("cs-coin.webp"),IconBalanceCoins=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:coinImage,style:{aspectRatio:"1/1",...e},...t,alt:""}),image=assetUrl("icon_usdt.webp"),IconUsdt=({style:e,...t})=>jsxRuntimeExports.jsx("img",{src:image,style:{aspectRatio:"1/1",height:32,...e},...t,alt:""});React.memo(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-[var(--tabbar-current-height)] shrink-0"}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]}));function BottomSentinelSafeArea(){return jsxRuntimeExports.jsx("div",{className:"h-[var(--tg-safe-area-inset-bottom)] shrink-0"})}const boxRegularIcon=assetUrl("boxes/rewards/box_regular.webp"),SnackbarContext=React.createContext({showSnackbar:()=>{}}),useSnackbar=()=>React.useContext(SnackbarContext),CustomSnackbar=({id:e,before:t,after:i,className:s,children:o})=>jsxRuntimeExports.jsx("div",{id:e,className:s,children:jsxRuntimeExports.jsxs("div",{children:[t&&jsxRuntimeExports.jsx("div",{className:"before",children:t}),jsxRuntimeExports.jsx("div",{className:"content",children:o}),i&&jsxRuntimeExports.jsx("div",{className:"after",children:i})]})}),SnackbarProvider=({children:e})=>{const[t,i]=React.useState([]),[s,o]=React.useState([]),a=React.useRef(0),l=React.useRef(new Map),c=React.useCallback(p=>{i(m=>m.map(g=>g.id===p?{...g,animationState:"exit"}:g)),l.current.set(p,setTimeout(()=>{i(m=>m.filter(g=>g.id!==p)),l.current.delete(p)},300))},[]),u=React.useCallback(p=>{o(m=>m.map(g=>g.id===p?{...g,animationState:"exit"}:g)),l.current.set(p,setTimeout(()=>{o(m=>m.filter(g=>g.id!==p)),l.current.delete(p)},300))},[]),f=React.useCallback((p,m={})=>{const g=++a.current,v={id:g,message:p,before:m.before||d(m.type),after:m.after||null,coins:m.coins||null,gems:m.gems||null,usdt:m.usdt||null,isSpentCoins:m.isSpentCoins||!1,boxes:m.boxes||null,type:m.type||null,animationState:"enter"};m.type==="warning"||m.type==="error"?(o(y=>[...y,v]),l.current.set(g,setTimeout(()=>u(g),3e3))):(i(y=>[...y,v]),l.current.set(g,setTimeout(()=>c(g),3e3)))},[u,c]);React.useEffect(()=>{const p=l.current;return()=>{p.forEach(m=>clearTimeout(m)),p.clear()}},[]);const d=p=>{switch(p){case"success":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"success_top":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"warning":return null;case"error":return null;default:return null}},h=p=>jsxRuntimeExports.jsx(CustomSnackbar,{id:"snackbar",onClose:()=>p.type==="warning"||p.type==="error"?u(p.id):c(p.id),before:p.before,after:p.after,className:`ui-snackbar ${p.type?`ui-snackbar--${p.type}`:""} ${p.animationState||""}`,children:jsxRuntimeExports.jsxs(Text,{style:{fontSize:13,lineHeight:"16px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:4},children:[jsxRuntimeExports.jsx("span",{children:p.message}),jsxRuntimeExports.jsxs("div",{className:"grid grid-flow-col auto-cols-max gap-2 items-center",children:[!!p.coins&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.coins]}),jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:14,marginBottom:-2}})]}),!!p.gems&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.gems]}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{height:14,marginBottom:-2}})]}),!!p.usdt&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[p.isSpentCoins?"-":"+",p.usdt]}),jsxRuntimeExports.jsx(IconUsdt,{style:{height:14,marginBottom:-2}})]}),!!p.boxes&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:["+",p.boxes]}),jsxRuntimeExports.jsx("img",{src:boxRegularIcon,alt:"Box",style:{height:14,width:14,transform:"translateY(10%)"}})]})]})]})},p.id);return jsxRuntimeExports.jsxs(SnackbarContext.Provider,{value:{showSnackbar:f},children:[e,t.map(h),s.map(h),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})};var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof document<"u"&&typeof navigator<"u"&&function(e,t){module.exports=t()}(lottie$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var i,s=e.length,o;for(i=0;i<s;i+=1){o=e[i].prototype;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t.prototype[a]=o[a])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(i){this.audios.push(i)},pause:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].pause()},resume:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].resume()},setRate:function(i){var s,o=this.audios.length;for(s=0;s<o;s+=1)this.audios[s].setRate(i)},createAudio:function(i){return this.audioFactory?this.audioFactory(i):window.Howl?new window.Howl({src:[i]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(i){this.audioFactory=i},setVolume:function(i){this._volume=i,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var i,s=this.audios.length;for(i=0;i<s;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(i,s){var o=0,a=[],l;switch(i){case"int16":case"uint8c":l=1;break;default:l=1.1;break}for(o=0;o<s;o+=1)a.push(l);return a}function t(i,s){return i==="float32"?new Float32Array(s):i==="int16"?new Int16Array(s):i==="uint8c"?new Uint8ClampedArray(s):e(i,s)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var i=createSizedArray(e.length),s,o=e.length;for(s=0;s<o;s+=1)i[s]=Math.abs(e[s]);return i}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,i,s){this.type=e,this.currentTime=t,this.totalTime=i,this.direction=s<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,i,s){this.type=e,this.currentLoop=i,this.totalLoops=t,this.direction=s<0?-1:1}function BMSegmentStartEvent(e,t,i){this.type=e,this.firstFrame=t,this.totalFrames=i}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,i){var s,o,a,l,c,u,f,d;switch(l=Math.floor(e*6),c=e*6-l,u=i*(1-t),f=i*(1-c*t),d=i*(1-(1-c)*t),l%6){case 0:s=i,o=d,a=u;break;case 1:s=f,o=i,a=u;break;case 2:s=u,o=i,a=d;break;case 3:s=u,o=f,a=i;break;case 4:s=d,o=u,a=i;break;case 5:s=i,o=u,a=f;break}return[s,o,a]}function RGBtoHSV(e,t,i){var s=Math.max(e,t,i),o=Math.min(e,t,i),a=s-o,l,c=s===0?0:a/s,u=s/255;switch(s){case o:l=0;break;case e:l=t-i+a*(t<i?6:0),l/=6*a;break;case t:l=i-e+a*2,l/=6*a;break;case i:l=e-t+a*4,l/=6*a;break}return[l,c,u]}function addSaturationToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[1]+=t,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[2]+=t,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[0]+=t/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var e=[],t,i;for(t=0;t<256;t+=1)i=t.toString(16),e[t]=i.length===1?"0"+i:i;return function(s,o,a){return s<0&&(s=0),o<0&&(o=0),a<0&&(a=0),"#"+e[s]+e[o]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],i,s,o={onmessage:function(){},postMessage:function(m){i({data:m})}},a={postMessage:function(m){o.onmessage({data:m})}};function l(p){if(window.Worker&&window.Blob&&getWebWorker()){var m=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),g=URL.createObjectURL(m);return new Worker(g)}return i=p,o}function c(){s||(s=l(function(m){function g(){function b(D,M){var k,T,P=D.length,F,N,H,q;for(T=0;T<P;T+=1)if(k=D[T],"ks"in k&&!k.completed){if(k.completed=!0,k.hasMask){var Y=k.masksProperties;for(N=Y.length,F=0;F<N;F+=1)if(Y[F].pt.k.i)C(Y[F].pt.k);else for(q=Y[F].pt.k.length,H=0;H<q;H+=1)Y[F].pt.k[H].s&&C(Y[F].pt.k[H].s[0]),Y[F].pt.k[H].e&&C(Y[F].pt.k[H].e[0])}k.ty===0?(k.layers=S(k.refId,M),b(k.layers,M)):k.ty===4?w(k.shapes):k.ty===5&&K(k)}}function y(D,M){if(D){var k=0,T=D.length;for(k=0;k<T;k+=1)D[k].t===1&&(D[k].data.layers=S(D[k].data.refId,M),b(D[k].data.layers,M))}}function E(D,M){for(var k=0,T=M.length;k<T;){if(M[k].id===D)return M[k];k+=1}return null}function S(D,M){var k=E(D,M);return k?k.layers.__used?JSON.parse(JSON.stringify(k.layers)):(k.layers.__used=!0,k.layers):null}function w(D){var M,k=D.length,T,P;for(M=k-1;M>=0;M-=1)if(D[M].ty==="sh")if(D[M].ks.k.i)C(D[M].ks.k);else for(P=D[M].ks.k.length,T=0;T<P;T+=1)D[M].ks.k[T].s&&C(D[M].ks.k[T].s[0]),D[M].ks.k[T].e&&C(D[M].ks.k[T].e[0]);else D[M].ty==="gr"&&w(D[M].it)}function C(D){var M,k=D.i.length;for(M=0;M<k;M+=1)D.i[M][0]+=D.v[M][0],D.i[M][1]+=D.v[M][1],D.o[M][0]+=D.v[M][0],D.o[M][1]+=D.v[M][1]}function A(D,M){var k=M?M.split("."):[100,100,100];return D[0]>k[0]?!0:k[0]>D[0]?!1:D[1]>k[1]?!0:k[1]>D[1]?!1:D[2]>k[2]?!0:k[2]>D[2]?!1:null}var O=function(){var D=[4,4,14];function M(T){var P=T.t.d;T.t.d={k:[{s:P,t:0}]}}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===5&&M(T[P])}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),I=function(){var D=[4,7,99];return function(M){if(M.chars&&!A(D,M.v)){var k,T=M.chars.length;for(k=0;k<T;k+=1){var P=M.chars[k];P.data&&P.data.shapes&&(w(P.data.shapes),P.data.ip=0,P.data.op=99999,P.data.st=0,P.data.sr=1,P.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},M.chars[k].t||(P.data.shapes.push({ty:"no"}),P.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),L=function(){var D=[5,7,15];function M(T){var P=T.t.p;typeof P.a=="number"&&(P.a={a:0,k:P.a}),typeof P.p=="number"&&(P.p={a:0,k:P.p}),typeof P.r=="number"&&(P.r={a:0,k:P.r})}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===5&&M(T[P])}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),$=function(){var D=[4,1,9];function M(T){var P,F=T.length,N,H;for(P=0;P<F;P+=1)if(T[P].ty==="gr")M(T[P].it);else if(T[P].ty==="fl"||T[P].ty==="st")if(T[P].c.k&&T[P].c.k[0].i)for(H=T[P].c.k.length,N=0;N<H;N+=1)T[P].c.k[N].s&&(T[P].c.k[N].s[0]/=255,T[P].c.k[N].s[1]/=255,T[P].c.k[N].s[2]/=255,T[P].c.k[N].s[3]/=255),T[P].c.k[N].e&&(T[P].c.k[N].e[0]/=255,T[P].c.k[N].e[1]/=255,T[P].c.k[N].e[2]/=255,T[P].c.k[N].e[3]/=255);else T[P].c.k[0]/=255,T[P].c.k[1]/=255,T[P].c.k[2]/=255,T[P].c.k[3]/=255}function k(T){var P,F=T.length;for(P=0;P<F;P+=1)T[P].ty===4&&M(T[P].shapes)}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}(),V=function(){var D=[4,4,18];function M(T){var P,F=T.length,N,H;for(P=F-1;P>=0;P-=1)if(T[P].ty==="sh")if(T[P].ks.k.i)T[P].ks.k.c=T[P].closed;else for(H=T[P].ks.k.length,N=0;N<H;N+=1)T[P].ks.k[N].s&&(T[P].ks.k[N].s[0].c=T[P].closed),T[P].ks.k[N].e&&(T[P].ks.k[N].e[0].c=T[P].closed);else T[P].ty==="gr"&&M(T[P].it)}function k(T){var P,F,N=T.length,H,q,Y,Q;for(F=0;F<N;F+=1){if(P=T[F],P.hasMask){var re=P.masksProperties;for(q=re.length,H=0;H<q;H+=1)if(re[H].pt.k.i)re[H].pt.k.c=re[H].cl;else for(Q=re[H].pt.k.length,Y=0;Y<Q;Y+=1)re[H].pt.k[Y].s&&(re[H].pt.k[Y].s[0].c=re[H].cl),re[H].pt.k[Y].e&&(re[H].pt.k[Y].e[0].c=re[H].cl)}P.ty===4&&M(P.shapes)}}return function(T){if(A(D,T.v)&&(k(T.layers),T.assets)){var P,F=T.assets.length;for(P=0;P<F;P+=1)T.assets[P].layers&&k(T.assets[P].layers)}}}();function W(D){D.__complete||($(D),O(D),I(D),L(D),V(D),b(D.layers,D.assets),y(D.chars,D.assets),D.__complete=!0)}function K(D){D.t.a.length===0&&"m"in D.t.p}var j={};return j.completeData=W,j.checkColors=$,j.checkChars=I,j.checkPathProperties=L,j.checkShapes=V,j.completeLayers=b,j}if(a.dataManager||(a.dataManager=g()),a.assetLoader||(a.assetLoader=function(){function b(E){var S=E.getResponseHeader("content-type");return S&&E.responseType==="json"&&S.indexOf("json")!==-1||E.response&&_typeof$5(E.response)==="object"?E.response:E.response&&typeof E.response=="string"?JSON.parse(E.response):E.responseText?JSON.parse(E.responseText):null}function y(E,S,w,C){var A,O=new XMLHttpRequest;try{O.responseType="json"}catch{}O.onreadystatechange=function(){if(O.readyState===4)if(O.status===200)A=b(O),w(A);else try{A=b(O),w(A)}catch(I){C&&C(I)}};try{O.open(["G","E","T"].join(""),E,!0)}catch{O.open(["G","E","T"].join(""),S+"/"+E,!0)}O.send()}return{load:y}}()),m.data.type==="loadAnimation")a.assetLoader.load(m.data.path,m.data.fullPath,function(b){a.dataManager.completeData(b),a.postMessage({id:m.data.id,payload:b,status:"success"})},function(){a.postMessage({id:m.data.id,status:"error"})});else if(m.data.type==="complete"){var v=m.data.animation;a.dataManager.completeData(v),a.postMessage({id:m.data.id,payload:v,status:"success"})}else m.data.type==="loadData"&&a.assetLoader.load(m.data.path,m.data.fullPath,function(b){a.postMessage({id:m.data.id,payload:b,status:"success"})},function(){a.postMessage({id:m.data.id,status:"error"})})}),s.onmessage=function(p){var m=p.data,g=m.id,v=t[g];t[g]=null,m.status==="success"?v.onComplete(m.payload):v.onError&&v.onError()})}function u(p,m){e+=1;var g="processId_"+e;return t[g]={onComplete:p,onError:m},g}function f(p,m,g){c();var v=u(m,g);s.postMessage({type:"loadAnimation",path:p,fullPath:window.location.origin+window.location.pathname,id:v})}function d(p,m,g){c();var v=u(m,g);s.postMessage({type:"loadData",path:p,fullPath:window.location.origin+window.location.pathname,id:v})}function h(p,m,g){c();var v=u(m,g);s.postMessage({type:"complete",animation:p,id:v})}return{loadAnimation:f,loadData:d,completeAnimation:h}}(),ImagePreloader=function(){var e=function(){var y=createTag("canvas");y.width=1,y.height=1;var E=y.getContext("2d");return E.fillStyle="rgba(0,0,0,0)",E.fillRect(0,0,1,1),y}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(y,E,S){var w="";if(y.e)w=y.p;else if(E){var C=y.p;C.indexOf("images/")!==-1&&(C=C.split("/")[1]),w=E+C}else w=S,w+=y.u?y.u:"",w+=y.p;return w}function o(y){var E=0,S=setInterval((function(){var w=y.getBBox();(w.width||E>500)&&(this._imageLoaded(),clearInterval(S)),E+=1}).bind(this),50)}function a(y){var E=s(y,this.assetsPath,this.path),S=createNS("image");isSafari?this.testImageLoaded(S):S.addEventListener("load",this._imageLoaded,!1),S.addEventListener("error",(function(){w.img=e,this._imageLoaded()}).bind(this),!1),S.setAttributeNS("http://www.w3.org/1999/xlink","href",E),this._elementHelper.append?this._elementHelper.append(S):this._elementHelper.appendChild(S);var w={img:S,assetData:y};return w}function l(y){var E=s(y,this.assetsPath,this.path),S=createTag("img");S.crossOrigin="anonymous",S.addEventListener("load",this._imageLoaded,!1),S.addEventListener("error",(function(){w.img=e,this._imageLoaded()}).bind(this),!1),S.src=E;var w={img:S,assetData:y};return w}function c(y){var E={assetData:y},S=s(y,this.assetsPath,this.path);return dataManager.loadData(S,(function(w){E.img=w,this._footageLoaded()}).bind(this),(function(){E.img={},this._footageLoaded()}).bind(this)),E}function u(y,E){this.imagesLoadedCb=E;var S,w=y.length;for(S=0;S<w;S+=1)y[S].layers||(!y[S].t||y[S].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(y[S]))):y[S].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(y[S]))))}function f(y){this.path=y||""}function d(y){this.assetsPath=y||""}function h(y){for(var E=0,S=this.images.length;E<S;){if(this.images[E].assetData===y)return this.images[E].img;E+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function m(){return this.totalImages===this.loadedAssets}function g(){return this.totalFootages===this.loadedFootagesCount}function v(y,E){y==="svg"?(this._elementHelper=E,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function b(){this._imageLoaded=t.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=o.bind(this),this.createFootageData=c.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return b.prototype={loadAssets:u,setAssetsPath:d,setPath:f,loadedImages:m,loadedFootages:g,destroy:p,getAsset:h,createImgData:l,createImageData:a,imageLoaded:t,footageLoaded:i,setCacheType:v},b}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,i){if(this._cbs[t])for(var s=this._cbs[t],o=0;o<s.length;o+=1)s[o](i)},addEventListener:function(t,i){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(i),(function(){this.removeEventListener(t,i)}).bind(this)},removeEventListener:function(t,i){if(!i)this._cbs[t]=null;else if(this._cbs[t]){for(var s=0,o=this._cbs[t].length;s<o;)this._cbs[t][s]===i&&(this._cbs[t].splice(s,1),s-=1,o-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=function(){function e(t){for(var i=t.split(`\r
83
83
  `),s={},o,a=0,l=0;l<i.length;l+=1)o=i[l].split(":"),o.length===2&&(s[o[0]]=o[1].trim(),a+=1);if(a===0)throw new Error;return s}return function(t){for(var i=[],s=0;s<t.length;s+=1){var o=t[s],a={time:o.tm,duration:o.dr};try{a.payload=JSON.parse(t[s].cm)}catch{try{a.payload=e(t[s].cm)}catch{a.payload={name:t[s].cm}}}i.push(a)}return i}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(i){for(var s=0,o=this.compositions.length;s<o;){if(this.compositions[s].data&&this.compositions[s].data.nm===i)return this.compositions[s].prepareFrame&&this.compositions[s].data.xt&&this.compositions[s].prepareFrame(this.currentFrame),this.compositions[s].compInterface;s+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(t,i){renderers[t]=i};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var i=getRenderer(t);this.renderer=new i(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay="autoplay"in e?e.autoplay:!0,this.name=e.name?e.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,"autoloadSegments")?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var i={wrapper:e,animationData:t},s=e.attributes;i.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",i.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var o=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";o==="false"?i.loop=!1:o==="true"?i.loop=!0:o!==""&&(i.loop=parseInt(o,10));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:s.getNamedItem("bm-autoplay")?s.getNamedItem("bm-autoplay").value:!0;i.autoplay=a!=="false",i.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var l=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";l==="false"&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,i,s=t.length,o=e.layers,a,l=o.length;for(a=0;a<l;a+=1)for(i=0;i<s;){if(t[i].id===o[a].id){t[i]=o[a];break}i+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(s=e.assets.length,i=0;i<s;i+=1)this.animationData.assets.push(e.assets[i]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var e=this.animationData.segments;e||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var i=typeof e=="number"?e:void 0,s=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(i,s)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,i=0;i<this.markers.length;i+=1)if(t=this.markers[i],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,i){if(!(i&&this.name!==i)){var s=Number(e);if(isNaN(s)){var o=this.getMarkerData(e);o&&this.goToAndStop(o.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,i){if(!(i&&this.name!==i)){var s=Number(e);if(isNaN(s)){var o=this.getMarkerData(e);o&&(o.duration?this.playSegments([o.time,o.time+o.duration],!0):this.goToAndStop(o.time,!0))}else this.goToAndStop(s,t,i);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,i=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(i=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(i=!0,t=0)):this.setCurrentRawFrameValue(t),i&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?i=e:this.currentRawFrame+this.firstFrame>t&&(i=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,i!==-1&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var i,s=e.length;for(i=0;i<s;i+=1)this.segments.push(e[i])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var i=e.p;i.indexOf("images/")!==-1&&(i=i.split("/")[1]),t=this.assetsPath+i}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,i=this.assets.length;t<i;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,i){try{var s=this.renderer.getElementByPath(e);s.updateDocumentData(t,i)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],i=0,s=0,o=0,a=!0,l=!1;function c(M){for(var k=0,T=M.target;k<s;)t[k].animation===T&&(t.splice(k,1),k-=1,s-=1,T.isPaused||h()),k+=1}function u(M,k){if(!M)return null;for(var T=0;T<s;){if(t[T].elem===M&&t[T].elem!==null)return t[T].animation;T+=1}var P=new AnimationItem;return p(P,M),P.setData(M,k),P}function f(){var M,k=t.length,T=[];for(M=0;M<k;M+=1)T.push(t[M].animation);return T}function d(){o+=1,$()}function h(){o-=1}function p(M,k){M.addEventListener("destroy",c),M.addEventListener("_active",d),M.addEventListener("_idle",h),t.push({elem:k,animation:M}),s+=1}function m(M){var k=new AnimationItem;return p(k,null),k.setParams(M),k}function g(M,k){var T;for(T=0;T<s;T+=1)t[T].animation.setSpeed(M,k)}function v(M,k){var T;for(T=0;T<s;T+=1)t[T].animation.setDirection(M,k)}function b(M){var k;for(k=0;k<s;k+=1)t[k].animation.play(M)}function y(M){var k=M-i,T;for(T=0;T<s;T+=1)t[T].animation.advanceTime(k);i=M,o&&!l?window.requestAnimationFrame(y):a=!0}function E(M){i=M,window.requestAnimationFrame(y)}function S(M){var k;for(k=0;k<s;k+=1)t[k].animation.pause(M)}function w(M,k,T){var P;for(P=0;P<s;P+=1)t[P].animation.goToAndStop(M,k,T)}function C(M){var k;for(k=0;k<s;k+=1)t[k].animation.stop(M)}function A(M){var k;for(k=0;k<s;k+=1)t[k].animation.togglePause(M)}function O(M){var k;for(k=s-1;k>=0;k-=1)t[k].animation.destroy(M)}function I(M,k,T){var P=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),F,N=P.length;for(F=0;F<N;F+=1)T&&P[F].setAttribute("data-bm-type",T),u(P[F],M);if(k&&N===0){T||(T="svg");var H=document.getElementsByTagName("body")[0];H.innerText="";var q=createTag("div");q.style.width="100%",q.style.height="100%",q.setAttribute("data-bm-type",T),H.appendChild(q),u(q,M)}}function L(){var M;for(M=0;M<s;M+=1)t[M].animation.resize()}function $(){!l&&o&&a&&(window.requestAnimationFrame(E),a=!1)}function V(){l=!0}function W(){l=!1,$()}function K(M,k){var T;for(T=0;T<s;T+=1)t[T].animation.setVolume(M,k)}function j(M){var k;for(k=0;k<s;k+=1)t[k].animation.mute(M)}function D(M){var k;for(k=0;k<s;k+=1)t[k].animation.unmute(M)}return e.registerAnimation=u,e.loadAnimation=m,e.setSpeed=g,e.setDirection=v,e.play=b,e.pause=S,e.stop=C,e.togglePause=A,e.searchAnimations=I,e.resize=L,e.goToAndStop=w,e.destroy=O,e.freeze=V,e.unfreeze=W,e.setVolume=K,e.mute=j,e.unmute=D,e.getRegisteredAnimations=f,e}(),BezierFactory=function(){var e={};e.getBezierEasing=i;var t={};function i(E,S,w,C,A){var O=A||("bez_"+E+"_"+S+"_"+w+"_"+C).replace(/\./g,"p");if(t[O])return t[O];var I=new y([E,S,w,C]);return t[O]=I,I}var s=4,o=.001,a=1e-7,l=10,c=11,u=1/(c-1),f=typeof Float32Array=="function";function d(E,S){return 1-3*S+3*E}function h(E,S){return 3*S-6*E}function p(E){return 3*E}function m(E,S,w){return((d(S,w)*E+h(S,w))*E+p(S))*E}function g(E,S,w){return 3*d(S,w)*E*E+2*h(S,w)*E+p(S)}function v(E,S,w,C,A){var O,I,L=0;do I=S+(w-S)/2,O=m(I,C,A)-E,O>0?w=I:S=I;while(Math.abs(O)>a&&++L<l);return I}function b(E,S,w,C){for(var A=0;A<s;++A){var O=g(S,w,C);if(O===0)return S;var I=m(S,w,C)-E;S-=I/O}return S}function y(E){this._p=E,this._mSampleValues=f?new Float32Array(c):new Array(c),this._precomputed=!1,this.get=this.get.bind(this)}return y.prototype={get:function(S){var w=this._p[0],C=this._p[1],A=this._p[2],O=this._p[3];return this._precomputed||this._precompute(),w===C&&A===O?S:S===0?0:S===1?1:m(this._getTForX(S),C,O)},_precompute:function(){var S=this._p[0],w=this._p[1],C=this._p[2],A=this._p[3];this._precomputed=!0,(S!==w||C!==A)&&this._calcSampleValues()},_calcSampleValues:function(){for(var S=this._p[0],w=this._p[2],C=0;C<c;++C)this._mSampleValues[C]=m(C*u,S,w)},_getTForX:function(S){for(var w=this._p[0],C=this._p[2],A=this._mSampleValues,O=0,I=1,L=c-1;I!==L&&A[I]<=S;++I)O+=u;--I;var $=(S-A[I])/(A[I+1]-A[I]),V=O+$*u,W=g(V,w,C);return W>=o?b(S,V,w,C):W===0?V:v(S,O,O+u,w,C)}},e}(),pooling=function(){function e(t){return t.concat(createSizedArray(t.length))}return{double:e}}(),poolFactory=function(){return function(e,t,i){var s=0,o=e,a=createSizedArray(o),l={newElement:c,release:u};function c(){var f;return s?(s-=1,f=a[s]):f=t(),f}function u(f){s===o&&(a=pooling.double(a),o*=2),i&&i(f),a[s]=f,s+=1}return l}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(i){var s,o=i.lengths.length;for(s=0;s<o;s+=1)bezierLengthPool.release(i.lengths[s]);i.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(p,m,g,v,b,y){var E=p*v+m*b+g*y-b*v-y*p-g*m;return E>-.001&&E<.001}function i(p,m,g,v,b,y,E,S,w){if(g===0&&y===0&&w===0)return t(p,m,v,b,E,S);var C=e.sqrt(e.pow(v-p,2)+e.pow(b-m,2)+e.pow(y-g,2)),A=e.sqrt(e.pow(E-p,2)+e.pow(S-m,2)+e.pow(w-g,2)),O=e.sqrt(e.pow(E-v,2)+e.pow(S-b,2)+e.pow(w-y,2)),I;return C>A?C>O?I=C-A-O:I=O-A-C:O>A?I=O-A-C:I=A-C-O,I>-1e-4&&I<1e-4}var s=function(){return function(p,m,g,v){var b=getDefaultCurveSegments(),y,E,S,w,C,A=0,O,I=[],L=[],$=bezierLengthPool.newElement();for(S=g.length,y=0;y<b;y+=1){for(C=y/(b-1),O=0,E=0;E<S;E+=1)w=bmPow(1-C,3)*p[E]+3*bmPow(1-C,2)*C*g[E]+3*(1-C)*bmPow(C,2)*v[E]+bmPow(C,3)*m[E],I[E]=w,L[E]!==null&&(O+=bmPow(I[E]-L[E],2)),L[E]=I[E];O&&(O=bmSqrt(O),A+=O),$.percents[y]=C,$.lengths[y]=A}return $.addedLength=A,$}}();function o(p){var m=segmentsLengthPool.newElement(),g=p.c,v=p.v,b=p.o,y=p.i,E,S=p._length,w=m.lengths,C=0;for(E=0;E<S-1;E+=1)w[E]=s(v[E],v[E+1],b[E],y[E+1]),C+=w[E].addedLength;return g&&S&&(w[E]=s(v[E],v[0],b[E],y[0]),C+=w[E].addedLength),m.totalLength=C,m}function a(p){this.segmentLength=0,this.points=new Array(p)}function l(p,m){this.partialLength=p,this.point=m}var c=function(){var p={};return function(m,g,v,b){var y=(m[0]+"_"+m[1]+"_"+g[0]+"_"+g[1]+"_"+v[0]+"_"+v[1]+"_"+b[0]+"_"+b[1]).replace(/\./g,"p");if(!p[y]){var E=getDefaultCurveSegments(),S,w,C,A,O,I=0,L,$,V=null;m.length===2&&(m[0]!==g[0]||m[1]!==g[1])&&t(m[0],m[1],g[0],g[1],m[0]+v[0],m[1]+v[1])&&t(m[0],m[1],g[0],g[1],g[0]+b[0],g[1]+b[1])&&(E=2);var W=new a(E);for(C=v.length,S=0;S<E;S+=1){for($=createSizedArray(C),O=S/(E-1),L=0,w=0;w<C;w+=1)A=bmPow(1-O,3)*m[w]+3*bmPow(1-O,2)*O*(m[w]+v[w])+3*(1-O)*bmPow(O,2)*(g[w]+b[w])+bmPow(O,3)*g[w],$[w]=A,V!==null&&(L+=bmPow($[w]-V[w],2));L=bmSqrt(L),I+=L,W.points[S]=new l(L,$),V=$}W.segmentLength=I,p[y]=W}return p[y]}}();function u(p,m){var g=m.percents,v=m.lengths,b=g.length,y=bmFloor((b-1)*p),E=p*m.addedLength,S=0;if(y===b-1||y===0||E===v[y])return g[y];for(var w=v[y]>E?-1:1,C=!0;C;)if(v[y]<=E&&v[y+1]>E?(S=(E-v[y])/(v[y+1]-v[y]),C=!1):y+=w,y<0||y>=b-1){if(y===b-1)return g[y];C=!1}return g[y]+(g[y+1]-g[y])*S}function f(p,m,g,v,b,y){var E=u(b,y),S=1-E,w=e.round((S*S*S*p[0]+(E*S*S+S*E*S+S*S*E)*g[0]+(E*E*S+S*E*E+E*S*E)*v[0]+E*E*E*m[0])*1e3)/1e3,C=e.round((S*S*S*p[1]+(E*S*S+S*E*S+S*S*E)*g[1]+(E*E*S+S*E*E+E*S*E)*v[1]+E*E*E*m[1])*1e3)/1e3;return[w,C]}var d=createTypedArray("float32",8);function h(p,m,g,v,b,y,E){b<0?b=0:b>1&&(b=1);var S=u(b,E);y=y>1?1:y;var w=u(y,E),C,A=p.length,O=1-S,I=1-w,L=O*O*O,$=S*O*O*3,V=S*S*O*3,W=S*S*S,K=O*O*I,j=S*O*I+O*S*I+O*O*w,D=S*S*I+O*S*w+S*O*w,M=S*S*w,k=O*I*I,T=S*I*I+O*w*I+O*I*w,P=S*w*I+O*w*w+S*I*w,F=S*w*w,N=I*I*I,H=w*I*I+I*w*I+I*I*w,q=w*w*I+I*w*w+w*I*w,Y=w*w*w;for(C=0;C<A;C+=1)d[C*4]=e.round((L*p[C]+$*g[C]+V*v[C]+W*m[C])*1e3)/1e3,d[C*4+1]=e.round((K*p[C]+j*g[C]+D*v[C]+M*m[C])*1e3)/1e3,d[C*4+2]=e.round((k*p[C]+T*g[C]+P*v[C]+F*m[C])*1e3)/1e3,d[C*4+3]=e.round((N*p[C]+H*g[C]+q*v[C]+Y*m[C])*1e3)/1e3;return d}return{getSegmentsLength:o,getNewSegment:h,getPointInSegment:f,buildBezierData:c,pointOnLine2D:t,pointOnLine3D:i}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var i=this.offsetTime,s;this.propType==="multidimensional"&&(s=createTypedArray("float32",this.pv.length));for(var o=t.lastIndex,a=o,l=this.keyframes.length-1,c=!0,u,f,d;c;){if(u=this.keyframes[a],f=this.keyframes[a+1],a===l-1&&e>=f.t-i){u.h&&(u=f),o=0;break}if(f.t-i>e){o=a;break}a<l-1?a+=1:(o=0,c=!1)}d=this.keyframesMetadata[a]||{};var h,p,m,g,v,b,y=f.t-i,E=u.t-i,S;if(u.to){d.bezierData||(d.bezierData=bez.buildBezierData(u.s,f.s||u.e,u.to,u.ti));var w=d.bezierData;if(e>=y||e<E){var C=e>=y?w.points.length-1:0;for(p=w.points[C].point.length,h=0;h<p;h+=1)s[h]=w.points[C].point[h]}else{d.__fnct?b=d.__fnct:(b=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y,u.n).get,d.__fnct=b),m=b((e-E)/(y-E));var A=w.segmentLength*m,O,I=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastAddedLength:0;for(v=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastPoint:0,c=!0,g=w.points.length;c;){if(I+=w.points[v].partialLength,A===0||m===0||v===w.points.length-1){for(p=w.points[v].point.length,h=0;h<p;h+=1)s[h]=w.points[v].point[h];break}else if(A>=I&&A<I+w.points[v+1].partialLength){for(O=(A-I)/w.points[v+1].partialLength,p=w.points[v].point.length,h=0;h<p;h+=1)s[h]=w.points[v].point[h]+(w.points[v+1].point[h]-w.points[v].point[h])*O;break}v<g-1?v+=1:c=!1}t._lastPoint=v,t._lastAddedLength=I-w.points[v].partialLength,t._lastKeyframeIndex=a}}else{var L,$,V,W,K;if(l=u.s.length,S=f.s||u.e,this.sh&&u.h!==1)if(e>=y)s[0]=S[0],s[1]=S[1],s[2]=S[2];else if(e<=E)s[0]=u.s[0],s[1]=u.s[1],s[2]=u.s[2];else{var j=createQuaternion(u.s),D=createQuaternion(S),M=(e-E)/(y-E);quaternionToEuler(s,slerp(j,D,M))}else for(a=0;a<l;a+=1)u.h!==1&&(e>=y?m=1:e<E?m=0:(u.o.x.constructor===Array?(d.__fnct||(d.__fnct=[]),d.__fnct[a]?b=d.__fnct[a]:(L=u.o.x[a]===void 0?u.o.x[0]:u.o.x[a],$=u.o.y[a]===void 0?u.o.y[0]:u.o.y[a],V=u.i.x[a]===void 0?u.i.x[0]:u.i.x[a],W=u.i.y[a]===void 0?u.i.y[0]:u.i.y[a],b=BezierFactory.getBezierEasing(L,$,V,W).get,d.__fnct[a]=b)):d.__fnct?b=d.__fnct:(L=u.o.x,$=u.o.y,V=u.i.x,W=u.i.y,b=BezierFactory.getBezierEasing(L,$,V,W).get,u.keyframeMetadata=b),m=b((e-E)/(y-E)))),S=f.s||u.e,K=u.h===1?u.s[a]:u.s[a]+(S[a]-u.s[a])*m,this.propType==="multidimensional"?s[a]=K:s=K}return t.lastIndex=o,s}function slerp(e,t,i){var s=[],o=e[0],a=e[1],l=e[2],c=e[3],u=t[0],f=t[1],d=t[2],h=t[3],p,m,g,v,b;return m=o*u+a*f+l*d+c*h,m<0&&(m=-m,u=-u,f=-f,d=-d,h=-h),1-m>1e-6?(p=Math.acos(m),g=Math.sin(p),v=Math.sin((1-i)*p)/g,b=Math.sin(i*p)/g):(v=1-i,b=i),s[0]=v*o+b*u,s[1]=v*a+b*f,s[2]=v*l+b*d,s[3]=v*c+b*h,s}function quaternionToEuler(e,t){var i=t[0],s=t[1],o=t[2],a=t[3],l=Math.atan2(2*s*a-2*i*o,1-2*s*s-2*o*o),c=Math.asin(2*i*s+2*o*a),u=Math.atan2(2*i*a-2*s*o,1-2*i*i-2*o*o);e[0]=l/degToRads,e[1]=c/degToRads,e[2]=u/degToRads}function createQuaternion(e){var t=e[0]*degToRads,i=e[1]*degToRads,s=e[2]*degToRads,o=Math.cos(t/2),a=Math.cos(i/2),l=Math.cos(s/2),c=Math.sin(t/2),u=Math.sin(i/2),f=Math.sin(s/2),d=o*a*l-c*u*f,h=c*u*l+o*a*f,p=c*a*l+o*u*f,m=o*u*l-c*a*f;return[h,p,m,d]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var i=0,s=this.v.length;i<s;)t=e[i]*this.mult,mathAbs(this.v[i]-t)>1e-5&&(this.v[i]=t,this._mdf=!0),i+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)i=this.effectsSequence[e](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,i,s){this.propType="unidimensional",this.mult=i||1,this.data=t,this.v=i?t.k*i:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=s,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,i,s){this.propType="multidimensional",this.mult=i||1,this.data=t,this._mdf=!1,this.elem=e,this.container=s,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var o,a=t.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),o=0;o<a;o+=1)this.v[o]=t.k[o]*this.mult,this.pv[o]=t.k[o];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,i,s){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=i||1,this.elem=e,this.container=s,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,i,s){this.propType="multidimensional";var o,a=t.k.length,l,c,u,f;for(o=0;o<a-1;o+=1)t.k[o].to&&t.k[o].s&&t.k[o+1]&&t.k[o+1].s&&(l=t.k[o].s,c=t.k[o+1].s,u=t.k[o].to,f=t.k[o].ti,(l.length===2&&!(l[0]===c[0]&&l[1]===c[1])&&bez.pointOnLine2D(l[0],l[1],c[0],c[1],l[0]+u[0],l[1]+u[1])&&bez.pointOnLine2D(l[0],l[1],c[0],c[1],c[0]+f[0],c[1]+f[1])||l.length===3&&!(l[0]===c[0]&&l[1]===c[1]&&l[2]===c[2])&&bez.pointOnLine3D(l[0],l[1],l[2],c[0],c[1],c[2],l[0]+u[0],l[1]+u[1],l[2]+u[2])&&bez.pointOnLine3D(l[0],l[1],l[2],c[0],c[1],c[2],c[0]+f[0],c[1]+f[1],c[2]+f[2]))&&(t.k[o].to=null,t.k[o].ti=null),l[0]===c[0]&&l[1]===c[1]&&u[0]===0&&u[1]===0&&f[0]===0&&f[1]===0&&(l.length===2||l[2]===c[2]&&u[2]===0&&f[2]===0)&&(t.k[o].to=null,t.k[o].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=e,this.container=s,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var d=t.k[0].s.length;for(this.v=createTypedArray("float32",d),this.pv=createTypedArray("float32",d),o=0;o<d;o+=1)this.v[o]=initFrame,this.pv[o]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",d)},this.addEffect=addEffect}var PropertyFactory=function(){function e(i,s,o,a,l){s.sid&&(s=i.globalData.slotManager.getProp(s));var c;if(!s.k.length)c=new ValueProperty(i,s,a,l);else if(typeof s.k[0]=="number")c=new MultiDimensionalProperty(i,s,a,l);else switch(o){case 0:c=new KeyframedValueProperty(i,s,a,l);break;case 1:c=new KeyframedMultidimensionalProperty(i,s,a,l);break}return c.effectsSequence.length&&l.addDynamicProperty(c),c}var t={getProp:e};return t}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,i=this.dynamicProperties.length;for(t=0;t<i;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray("float32",2)}return poolFactory(8,e)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var i=0;i<t;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,i,s,o){var a;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[s]||a[s]&&!o)&&(a[s]=pointPool.newElement()),a[s][0]=e,a[s][1]=t},ShapePath.prototype.setTripleAt=function(e,t,i,s,o,a,l,c){this.setXYAt(e,t,"v",l,c),this.setXYAt(i,s,"o",l,c),this.setXYAt(o,a,"i",l,c)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,i=this.o,s=this.i,o=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),o=1);var a=this._length-1,l=this._length,c;for(c=o;c<l;c+=1)e.setTripleAt(t[a][0],t[a][1],s[a][0],s[a][1],i[a][0],i[a][1],c,!1),a-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(o){var a=o._length,l;for(l=0;l<a;l+=1)pointPool.release(o.v[l]),pointPool.release(o.i[l]),pointPool.release(o.o[l]),o.v[l]=null,o.i[l]=null,o.o[l]=null;o._length=0,o.c=!1}function i(o){var a=s.newElement(),l,c=o._length===void 0?o.v.length:o._length;for(a.setLength(c),a.c=o.c,l=0;l<c;l+=1)a.setTripleAt(o.v[l][0],o.v[l][1],o.o[l][0],o.o[l][1],o.i[l][0],o.i[l][1],l);return a}var s=poolFactory(4,e,t);return s.clone=i,s}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:o,release:a},t=0,i=4,s=createSizedArray(i);function o(){var l;return t?(t-=1,l=s[t]):l=new ShapeCollection,l}function a(l){var c,u=l._length;for(c=0;c<u;c+=1)shapePool.release(l.shapes[c]);l._length=0,t===i&&(s=pooling.double(s),i*=2),s[t]=l,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(y,E,S){var w=S.lastIndex,C,A,O,I,L,$,V,W,K,j=this.keyframes;if(y<j[0].t-this.offsetTime)C=j[0].s[0],O=!0,w=0;else if(y>=j[j.length-1].t-this.offsetTime)C=j[j.length-1].s?j[j.length-1].s[0]:j[j.length-2].e[0],O=!0;else{for(var D=w,M=j.length-1,k=!0,T,P,F;k&&(T=j[D],P=j[D+1],!(P.t-this.offsetTime>y));)D<M-1?D+=1:k=!1;if(F=this.keyframesMetadata[D]||{},O=T.h===1,w=D,!O){if(y>=P.t-this.offsetTime)W=1;else if(y<T.t-this.offsetTime)W=0;else{var N;F.__fnct?N=F.__fnct:(N=BezierFactory.getBezierEasing(T.o.x,T.o.y,T.i.x,T.i.y).get,F.__fnct=N),W=N((y-(T.t-this.offsetTime))/(P.t-this.offsetTime-(T.t-this.offsetTime)))}A=P.s?P.s[0]:T.e[0]}C=T.s[0]}for($=E._length,V=C.i[0].length,S.lastIndex=w,I=0;I<$;I+=1)for(L=0;L<V;L+=1)K=O?C.i[I][L]:C.i[I][L]+(A.i[I][L]-C.i[I][L])*W,E.i[I][L]=K,K=O?C.o[I][L]:C.o[I][L]+(A.o[I][L]-C.o[I][L])*W,E.o[I][L]=K,K=O?C.v[I][L]:C.v[I][L]+(A.v[I][L]-C.v[I][L])*W,E.v[I][L]=K}function i(){var y=this.comp.renderedFrame-this.offsetTime,E=this.keyframes[0].t-this.offsetTime,S=this.keyframes[this.keyframes.length-1].t-this.offsetTime,w=this._caching.lastFrame;return w!==e&&(w<E&&y<E||w>S&&y>S)||(this._caching.lastIndex=w<y?this._caching.lastIndex:0,this.interpolateShape(y,this.pv,this._caching)),this._caching.lastFrame=y,this.pv}function s(){this.paths=this.localShapeCollection}function o(y,E){if(y._length!==E._length||y.c!==E.c)return!1;var S,w=y._length;for(S=0;S<w;S+=1)if(y.v[S][0]!==E.v[S][0]||y.v[S][1]!==E.v[S][1]||y.o[S][0]!==E.o[S][0]||y.o[S][1]!==E.o[S][1]||y.i[S][0]!==E.i[S][0]||y.i[S][1]!==E.i[S][1])return!1;return!0}function a(y){o(this.v,y)||(this.v=shapePool.clone(y),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function l(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var y;this.kf?y=this.pv:this.data.ks?y=this.data.ks.k:y=this.data.pt.k;var E,S=this.effectsSequence.length;for(E=0;E<S;E+=1)y=this.effectsSequence[E](y);this.setVValue(y),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function c(y,E,S){this.propType="shape",this.comp=y.comp,this.container=y,this.elem=y,this.data=E,this.k=!1,this.kf=!1,this._mdf=!1;var w=S===3?E.pt.k:E.ks.k;this.v=shapePool.clone(w),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=s,this.effectsSequence=[]}function u(y){this.effectsSequence.push(y),this.container.addDynamicProperty(this)}c.prototype.interpolateShape=t,c.prototype.getValue=l,c.prototype.setVValue=a,c.prototype.addEffect=u;function f(y,E,S){this.propType="shape",this.comp=y.comp,this.elem=y,this.container=y,this.offsetTime=y.data.st,this.keyframes=S===3?E.pt.k:E.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var w=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,w),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=s,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[i.bind(this)]}f.prototype.getValue=l,f.prototype.interpolateShape=t,f.prototype.setVValue=a,f.prototype.addEffect=u;var d=function(){var y=roundCorner;function E(S,w){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=w.d,this.elem=S,this.comp=S.comp,this.frameId=-1,this.initDynamicPropertyContainer(S),this.p=PropertyFactory.getProp(S,w.p,1,0,this),this.s=PropertyFactory.getProp(S,w.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return E.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var w=this.p.v[0],C=this.p.v[1],A=this.s.v[0]/2,O=this.s.v[1]/2,I=this.d!==3,L=this.v;L.v[0][0]=w,L.v[0][1]=C-O,L.v[1][0]=I?w+A:w-A,L.v[1][1]=C,L.v[2][0]=w,L.v[2][1]=C+O,L.v[3][0]=I?w-A:w+A,L.v[3][1]=C,L.i[0][0]=I?w-A*y:w+A*y,L.i[0][1]=C-O,L.i[1][0]=I?w+A:w-A,L.i[1][1]=C-O*y,L.i[2][0]=I?w+A*y:w-A*y,L.i[2][1]=C+O,L.i[3][0]=I?w-A:w+A,L.i[3][1]=C+O*y,L.o[0][0]=I?w+A*y:w-A*y,L.o[0][1]=C-O,L.o[1][0]=I?w+A:w-A,L.o[1][1]=C+O*y,L.o[2][0]=I?w-A*y:w+A*y,L.o[2][1]=C+O,L.o[3][0]=I?w-A:w+A,L.o[3][1]=C-O*y}},extendPrototype([DynamicPropertyContainer],E),E}(),h=function(){function y(E,S){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=E,this.comp=E.comp,this.data=S,this.frameId=-1,this.d=S.d,this.initDynamicPropertyContainer(E),S.sy===1?(this.ir=PropertyFactory.getProp(E,S.ir,0,0,this),this.is=PropertyFactory.getProp(E,S.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(E,S.pt,0,0,this),this.p=PropertyFactory.getProp(E,S.p,1,0,this),this.r=PropertyFactory.getProp(E,S.r,0,degToRads,this),this.or=PropertyFactory.getProp(E,S.or,0,0,this),this.os=PropertyFactory.getProp(E,S.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return y.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var S=Math.floor(this.pt.v)*2,w=Math.PI*2/S,C=!0,A=this.or.v,O=this.ir.v,I=this.os.v,L=this.is.v,$=2*Math.PI*A/(S*2),V=2*Math.PI*O/(S*2),W,K,j,D,M=-Math.PI/2;M+=this.r.v;var k=this.data.d===3?-1:1;for(this.v._length=0,W=0;W<S;W+=1){K=C?A:O,j=C?I:L,D=C?$:V;var T=K*Math.cos(M),P=K*Math.sin(M),F=T===0&&P===0?0:P/Math.sqrt(T*T+P*P),N=T===0&&P===0?0:-T/Math.sqrt(T*T+P*P);T+=+this.p.v[0],P+=+this.p.v[1],this.v.setTripleAt(T,P,T-F*D*j*k,P-N*D*j*k,T+F*D*j*k,P+N*D*j*k,W,!0),C=!C,M+=w*k}},convertPolygonToPath:function(){var S=Math.floor(this.pt.v),w=Math.PI*2/S,C=this.or.v,A=this.os.v,O=2*Math.PI*C/(S*4),I,L=-Math.PI*.5,$=this.data.d===3?-1:1;for(L+=this.r.v,this.v._length=0,I=0;I<S;I+=1){var V=C*Math.cos(L),W=C*Math.sin(L),K=V===0&&W===0?0:W/Math.sqrt(V*V+W*W),j=V===0&&W===0?0:-V/Math.sqrt(V*V+W*W);V+=+this.p.v[0],W+=+this.p.v[1],this.v.setTripleAt(V,W,V-K*O*A*$,W-j*O*A*$,V+K*O*A*$,W+j*O*A*$,I,!0),L+=w*$}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],y),y}(),p=function(){function y(E,S){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=E,this.comp=E.comp,this.frameId=-1,this.d=S.d,this.initDynamicPropertyContainer(E),this.p=PropertyFactory.getProp(E,S.p,1,0,this),this.s=PropertyFactory.getProp(E,S.s,1,0,this),this.r=PropertyFactory.getProp(E,S.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return y.prototype={convertRectToPath:function(){var S=this.p.v[0],w=this.p.v[1],C=this.s.v[0]/2,A=this.s.v[1]/2,O=bmMin(C,A,this.r.v),I=O*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(S+C,w-A+O,S+C,w-A+O,S+C,w-A+I,0,!0),this.v.setTripleAt(S+C,w+A-O,S+C,w+A-I,S+C,w+A-O,1,!0),O!==0?(this.v.setTripleAt(S+C-O,w+A,S+C-O,w+A,S+C-I,w+A,2,!0),this.v.setTripleAt(S-C+O,w+A,S-C+I,w+A,S-C+O,w+A,3,!0),this.v.setTripleAt(S-C,w+A-O,S-C,w+A-O,S-C,w+A-I,4,!0),this.v.setTripleAt(S-C,w-A+O,S-C,w-A+I,S-C,w-A+O,5,!0),this.v.setTripleAt(S-C+O,w-A,S-C+O,w-A,S-C+I,w-A,6,!0),this.v.setTripleAt(S+C-O,w-A,S+C-I,w-A,S+C-O,w-A,7,!0)):(this.v.setTripleAt(S-C,w+A,S-C+I,w+A,S-C,w+A,2),this.v.setTripleAt(S-C,w-A,S-C,w-A+I,S-C,w-A,3))):(this.v.setTripleAt(S+C,w-A+O,S+C,w-A+I,S+C,w-A+O,0,!0),O!==0?(this.v.setTripleAt(S+C-O,w-A,S+C-O,w-A,S+C-I,w-A,1,!0),this.v.setTripleAt(S-C+O,w-A,S-C+I,w-A,S-C+O,w-A,2,!0),this.v.setTripleAt(S-C,w-A+O,S-C,w-A+O,S-C,w-A+I,3,!0),this.v.setTripleAt(S-C,w+A-O,S-C,w+A-I,S-C,w+A-O,4,!0),this.v.setTripleAt(S-C+O,w+A,S-C+O,w+A,S-C+I,w+A,5,!0),this.v.setTripleAt(S+C-O,w+A,S+C-I,w+A,S+C-O,w+A,6,!0),this.v.setTripleAt(S+C,w+A-O,S+C,w+A-O,S+C,w+A-I,7,!0)):(this.v.setTripleAt(S-C,w-A,S-C+I,w-A,S-C,w-A,1,!0),this.v.setTripleAt(S-C,w+A,S-C,w+A-I,S-C,w+A,2,!0),this.v.setTripleAt(S+C,w+A,S+C-I,w+A,S+C,w+A,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:s},extendPrototype([DynamicPropertyContainer],y),y}();function m(y,E,S){var w;if(S===3||S===4){var C=S===3?E.pt:E.ks,A=C.k;A.length?w=new f(y,E,S):w=new c(y,E,S)}else S===5?w=new p(y,E):S===6?w=new d(y,E):S===7&&(w=new h(y,E));return w.k&&y.addDynamicProperty(w),w}function g(){return c}function v(){return f}var b={};return b.getShapeProp=m,b.getConstructorFunction=g,b.getKeyframedConstructorFunction=v,b}();/*!
84
84
  Transformation Matrix v2.0
85
85
  (c) Epistemex 2014-2015
@@ -89,7 +89,7 @@ Url: ${_getEventFilterUrl(e)}`),!0}return!1}function _isIgnoredError(e,t){return
89
89
  License: MIT, header required.
90
90
  */var Matrix=function(){var e=Math.cos,t=Math.sin,i=Math.tan,s=Math.round;function o(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(T){if(T===0)return this;var P=e(T),F=t(T);return this._t(P,-F,0,0,F,P,0,0,0,0,1,0,0,0,0,1)}function l(T){if(T===0)return this;var P=e(T),F=t(T);return this._t(1,0,0,0,0,P,-F,0,0,F,P,0,0,0,0,1)}function c(T){if(T===0)return this;var P=e(T),F=t(T);return this._t(P,0,F,0,0,1,0,0,-F,0,P,0,0,0,0,1)}function u(T){if(T===0)return this;var P=e(T),F=t(T);return this._t(P,-F,0,0,F,P,0,0,0,0,1,0,0,0,0,1)}function f(T,P){return this._t(1,P,T,1,0,0)}function d(T,P){return this.shear(i(T),i(P))}function h(T,P){var F=e(P),N=t(P);return this._t(F,N,0,0,-N,F,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(T),1,0,0,0,0,1,0,0,0,0,1)._t(F,-N,0,0,N,F,0,0,0,0,1,0,0,0,0,1)}function p(T,P,F){return!F&&F!==0&&(F=1),T===1&&P===1&&F===1?this:this._t(T,0,0,0,0,P,0,0,0,0,F,0,0,0,0,1)}function m(T,P,F,N,H,q,Y,Q,re,ee,z,J,te,X,se,ie){return this.props[0]=T,this.props[1]=P,this.props[2]=F,this.props[3]=N,this.props[4]=H,this.props[5]=q,this.props[6]=Y,this.props[7]=Q,this.props[8]=re,this.props[9]=ee,this.props[10]=z,this.props[11]=J,this.props[12]=te,this.props[13]=X,this.props[14]=se,this.props[15]=ie,this}function g(T,P,F){return F=F||0,T!==0||P!==0||F!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,T,P,F,1):this}function v(T,P,F,N,H,q,Y,Q,re,ee,z,J,te,X,se,ie){var ne=this.props;if(T===1&&P===0&&F===0&&N===0&&H===0&&q===1&&Y===0&&Q===0&&re===0&&ee===0&&z===1&&J===0)return ne[12]=ne[12]*T+ne[15]*te,ne[13]=ne[13]*q+ne[15]*X,ne[14]=ne[14]*z+ne[15]*se,ne[15]*=ie,this._identityCalculated=!1,this;var pe=ne[0],_e=ne[1],ye=ne[2],Ae=ne[3],xe=ne[4],ae=ne[5],me=ne[6],Se=ne[7],Te=ne[8],ve=ne[9],Re=ne[10],Ie=ne[11],Fe=ne[12],$e=ne[13],Be=ne[14],Ne=ne[15];return ne[0]=pe*T+_e*H+ye*re+Ae*te,ne[1]=pe*P+_e*q+ye*ee+Ae*X,ne[2]=pe*F+_e*Y+ye*z+Ae*se,ne[3]=pe*N+_e*Q+ye*J+Ae*ie,ne[4]=xe*T+ae*H+me*re+Se*te,ne[5]=xe*P+ae*q+me*ee+Se*X,ne[6]=xe*F+ae*Y+me*z+Se*se,ne[7]=xe*N+ae*Q+me*J+Se*ie,ne[8]=Te*T+ve*H+Re*re+Ie*te,ne[9]=Te*P+ve*q+Re*ee+Ie*X,ne[10]=Te*F+ve*Y+Re*z+Ie*se,ne[11]=Te*N+ve*Q+Re*J+Ie*ie,ne[12]=Fe*T+$e*H+Be*re+Ne*te,ne[13]=Fe*P+$e*q+Be*ee+Ne*X,ne[14]=Fe*F+$e*Y+Be*z+Ne*se,ne[15]=Fe*N+$e*Q+Be*J+Ne*ie,this._identityCalculated=!1,this}function b(T){var P=T.props;return this.transform(P[0],P[1],P[2],P[3],P[4],P[5],P[6],P[7],P[8],P[9],P[10],P[11],P[12],P[13],P[14],P[15])}function y(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function E(T){for(var P=0;P<16;){if(T.props[P]!==this.props[P])return!1;P+=1}return!0}function S(T){var P;for(P=0;P<16;P+=1)T.props[P]=this.props[P];return T}function w(T){var P;for(P=0;P<16;P+=1)this.props[P]=T[P]}function C(T,P,F){return{x:T*this.props[0]+P*this.props[4]+F*this.props[8]+this.props[12],y:T*this.props[1]+P*this.props[5]+F*this.props[9]+this.props[13],z:T*this.props[2]+P*this.props[6]+F*this.props[10]+this.props[14]}}function A(T,P,F){return T*this.props[0]+P*this.props[4]+F*this.props[8]+this.props[12]}function O(T,P,F){return T*this.props[1]+P*this.props[5]+F*this.props[9]+this.props[13]}function I(T,P,F){return T*this.props[2]+P*this.props[6]+F*this.props[10]+this.props[14]}function L(){var T=this.props[0]*this.props[5]-this.props[1]*this.props[4],P=this.props[5]/T,F=-this.props[1]/T,N=-this.props[4]/T,H=this.props[0]/T,q=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/T,Y=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/T,Q=new Matrix;return Q.props[0]=P,Q.props[1]=F,Q.props[4]=N,Q.props[5]=H,Q.props[12]=q,Q.props[13]=Y,Q}function $(T){var P=this.getInverseMatrix();return P.applyToPointArray(T[0],T[1],T[2]||0)}function V(T){var P,F=T.length,N=[];for(P=0;P<F;P+=1)N[P]=$(T[P]);return N}function W(T,P,F){var N=createTypedArray("float32",6);if(this.isIdentity())N[0]=T[0],N[1]=T[1],N[2]=P[0],N[3]=P[1],N[4]=F[0],N[5]=F[1];else{var H=this.props[0],q=this.props[1],Y=this.props[4],Q=this.props[5],re=this.props[12],ee=this.props[13];N[0]=T[0]*H+T[1]*Y+re,N[1]=T[0]*q+T[1]*Q+ee,N[2]=P[0]*H+P[1]*Y+re,N[3]=P[0]*q+P[1]*Q+ee,N[4]=F[0]*H+F[1]*Y+re,N[5]=F[0]*q+F[1]*Q+ee}return N}function K(T,P,F){var N;return this.isIdentity()?N=[T,P,F]:N=[T*this.props[0]+P*this.props[4]+F*this.props[8]+this.props[12],T*this.props[1]+P*this.props[5]+F*this.props[9]+this.props[13],T*this.props[2]+P*this.props[6]+F*this.props[10]+this.props[14]],N}function j(T,P){if(this.isIdentity())return T+","+P;var F=this.props;return Math.round((T*F[0]+P*F[4]+F[12])*100)/100+","+Math.round((T*F[1]+P*F[5]+F[13])*100)/100}function D(){for(var T=0,P=this.props,F="matrix3d(",N=1e4;T<16;)F+=s(P[T]*N)/N,F+=T===15?")":",",T+=1;return F}function M(T){var P=1e4;return T<1e-6&&T>0||T>-1e-6&&T<0?s(T*P)/P:T}function k(){var T=this.props,P=M(T[0]),F=M(T[1]),N=M(T[4]),H=M(T[5]),q=M(T[12]),Y=M(T[13]);return"matrix("+P+","+F+","+N+","+H+","+q+","+Y+")"}return function(){this.reset=o,this.rotate=a,this.rotateX=l,this.rotateY=c,this.rotateZ=u,this.skew=d,this.skewFromAxis=h,this.shear=f,this.scale=p,this.setTransform=m,this.translate=g,this.transform=v,this.multiply=b,this.applyToPoint=C,this.applyToX=A,this.applyToY=O,this.applyToZ=I,this.applyToPointArray=K,this.applyToTriplePoints=W,this.applyToPointStringified=j,this.toCSS=D,this.to2dCSS=k,this.clone=S,this.cloneFromProps=w,this.equals=E,this.inversePoints=V,this.inversePoint=$,this.getInverseMatrix=L,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if(typeof e=="string")switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return typeof navigator<"u"}function installPlugin(e,t){e==="expressions"&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.13.0";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),i=0;i<t.length;i+=1){var s=t[i].split("=");if(decodeURIComponent(s[0])==e)return decodeURIComponent(s[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};e.registerModifier=i,e.getModifier=s;function i(o,a){t[o]||(t[o]=a)}function s(o,a,l){return new t[o](a,l)}return e}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,i,s,o){var a=[];t<=1?a.push({s:e,e:t}):e>=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var l=[],c,u=a.length,f;for(c=0;c<u;c+=1)if(f=a[c],!(f.e*o<s||f.s*o>s+i)){var d,h;f.s*o<=s?d=0:d=(f.s*o-s)/i,f.e*o>=s+i?h=1:h=(f.e*o-s)/i,l.push([d,h])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,i=e.length;for(t=0;t<i;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,i;if(this._mdf||e){var s=this.o.v%360/360;if(s<0&&(s+=1),this.s.v>1?t=1+s:this.s.v<0?t=0+s:t=this.s.v+s,this.e.v>1?i=1+s:this.e.v<0?i=0+s:i=this.e.v+s,t>i){var o=t;t=i,i=o}t=Math.round(t*1e4)*1e-4,i=Math.round(i*1e4)*1e-4,this.sValue=t,this.eValue=i}else t=this.sValue,i=this.eValue;var a,l,c=this.shapes.length,u,f,d,h,p,m=0;if(i===t)for(l=0;l<c;l+=1)this.shapes[l].localShapeCollection.releaseShapes(),this.shapes[l].shape._mdf=!0,this.shapes[l].shape.paths=this.shapes[l].localShapeCollection,this._mdf&&(this.shapes[l].pathsData.length=0);else if(i===1&&t===0||i===0&&t===1){if(this._mdf)for(l=0;l<c;l+=1)this.shapes[l].pathsData.length=0,this.shapes[l].shape._mdf=!0}else{var g=[],v,b;for(l=0;l<c;l+=1)if(v=this.shapes[l],!v.shape._mdf&&!this._mdf&&!e&&this.m!==2)v.shape.paths=v.localShapeCollection;else{if(a=v.shape.paths,f=a._length,p=0,!v.shape._mdf&&v.pathsData.length)p=v.totalShapeLength;else{for(d=this.releasePathsData(v.pathsData),u=0;u<f;u+=1)h=bez.getSegmentsLength(a.shapes[u]),d.push(h),p+=h.totalLength;v.totalShapeLength=p,v.pathsData=d}m+=p,v.shape._mdf=!0}var y=t,E=i,S=0,w;for(l=c-1;l>=0;l-=1)if(v=this.shapes[l],v.shape._mdf){for(b=v.localShapeCollection,b.releaseShapes(),this.m===2&&c>1?(w=this.calculateShapeEdges(t,i,v.totalShapeLength,S,m),S+=v.totalShapeLength):w=[[y,E]],f=w.length,u=0;u<f;u+=1){y=w[u][0],E=w[u][1],g.length=0,E<=1?g.push({s:v.totalShapeLength*y,e:v.totalShapeLength*E}):y>=1?g.push({s:v.totalShapeLength*(y-1),e:v.totalShapeLength*(E-1)}):(g.push({s:v.totalShapeLength*y,e:v.totalShapeLength}),g.push({s:0,e:v.totalShapeLength*(E-1)}));var C=this.addShapes(v,g[0]);if(g[0].s!==g[0].e){if(g.length>1){var A=v.shape.paths.shapes[v.shape.paths._length-1];if(A.c){var O=C.pop();this.addPaths(C,b),C=this.addShapes(v,g[1],O)}else this.addPaths(C,b),C=this.addShapes(v,g[1])}this.addPaths(C,b)}}v.shape.paths=b}}},TrimModifier.prototype.addPaths=function(e,t){var i,s=e.length;for(i=0;i<s;i+=1)t.addShape(e[i])},TrimModifier.prototype.addSegment=function(e,t,i,s,o,a,l){o.setXYAt(t[0],t[1],"o",a),o.setXYAt(i[0],i[1],"i",a+1),l&&o.setXYAt(e[0],e[1],"v",a),o.setXYAt(s[0],s[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,i,s){t.setXYAt(e[1],e[5],"o",i),t.setXYAt(e[2],e[6],"i",i+1),s&&t.setXYAt(e[0],e[4],"v",i),t.setXYAt(e[3],e[7],"v",i+1)},TrimModifier.prototype.addShapes=function(e,t,i){var s=e.pathsData,o=e.shape.paths.shapes,a,l=e.shape.paths._length,c,u,f=0,d,h,p,m,g=[],v,b=!0;for(i?(h=i._length,v=i._length):(i=shapePool.newElement(),h=0,v=0),g.push(i),a=0;a<l;a+=1){for(p=s[a].lengths,i.c=o[a].c,u=o[a].c?p.length:p.length+1,c=1;c<u;c+=1)if(d=p[c-1],f+d.addedLength<t.s)f+=d.addedLength,i.c=!1;else if(f>t.e){i.c=!1;break}else t.s<=f&&t.e>=f+d.addedLength?(this.addSegment(o[a].v[c-1],o[a].o[c-1],o[a].i[c],o[a].v[c],i,h,b),b=!1):(m=bez.getNewSegment(o[a].v[c-1],o[a].v[c],o[a].o[c-1],o[a].i[c],(t.s-f)/d.addedLength,(t.e-f)/d.addedLength,p[c-1]),this.addSegmentFromArray(m,i,h,b),b=!1,i.c=!1),f+=d.addedLength,h+=1;if(o[a].c&&p.length){if(d=p[c-1],f<=t.e){var y=p[c-1].addedLength;t.s<=f&&t.e>=f+y?(this.addSegment(o[a].v[c-1],o[a].o[c-1],o[a].i[0],o[a].v[0],i,h,b),b=!1):(m=bez.getNewSegment(o[a].v[c-1],o[a].v[0],o[a].o[c-1],o[a].i[0],(t.s-f)/y,(t.e-f)/y,p[c-1]),this.addSegmentFromArray(m,i,h,b),b=!1,i.c=!1)}else i.c=!1;f+=d.addedLength,h+=1}if(i._length&&(i.setXYAt(i.v[v][0],i.v[v][1],"i",v),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),f>t.e)break;a<l-1&&(i=shapePool.newElement(),b=!0,g.push(i),h=0)}return g};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var i=t/100,s=[0,0],o=e._length,a=0;for(a=0;a<o;a+=1)s[0]+=e.v[a][0],s[1]+=e.v[a][1];s[0]/=o,s[1]/=o;var l=shapePool.newElement();l.c=e.c;var c,u,f,d,h,p;for(a=0;a<o;a+=1)c=e.v[a][0]+(s[0]-e.v[a][0])*i,u=e.v[a][1]+(s[1]-e.v[a][1])*i,f=e.o[a][0]+(s[0]-e.o[a][0])*-i,d=e.o[a][1]+(s[1]-e.o[a][1])*-i,h=e.i[a][0]+(s[0]-e.i[a][0])*-i,p=e.i[a][1]+(s[1]-e.i[a][1])*-i,l.setTripleAt(c,u,f,d,h,p,a);return l},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,i,s=this.shapes.length,o,a,l=this.amount.v;if(l!==0){var c,u;for(i=0;i<s;i+=1){if(c=this.shapes[i],u=c.localShapeCollection,!(!c.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),c.shape._mdf=!0,t=c.shape.paths.shapes,a=c.shape.paths._length,o=0;o<a;o+=1)u.addShape(this.processPath(t[o],l));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(u){var f=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||f,this.a&&u.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&u.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&u.skewFromAxis(-this.sk.v,this.sa.v),this.r?u.rotate(-this.r.v):u.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?u.translate(this.px.v,this.py.v,-this.pz.v):u.translate(this.px.v,this.py.v,0):u.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function i(u){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||u){var f;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var d,h;if(f=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(d=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/f,0),h=this.p.getValueAtTime(this.p.keyframes[0].t/f,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(d=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/f,0),h=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/f,0)):(d=this.p.pv,h=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/f,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){d=[],h=[];var p=this.px,m=this.py;p._caching.lastFrame+p.offsetTime<=p.keyframes[0].t?(d[0]=p.getValueAtTime((p.keyframes[0].t+.01)/f,0),d[1]=m.getValueAtTime((m.keyframes[0].t+.01)/f,0),h[0]=p.getValueAtTime(p.keyframes[0].t/f,0),h[1]=m.getValueAtTime(m.keyframes[0].t/f,0)):p._caching.lastFrame+p.offsetTime>=p.keyframes[p.keyframes.length-1].t?(d[0]=p.getValueAtTime(p.keyframes[p.keyframes.length-1].t/f,0),d[1]=m.getValueAtTime(m.keyframes[m.keyframes.length-1].t/f,0),h[0]=p.getValueAtTime((p.keyframes[p.keyframes.length-1].t-.01)/f,0),h[1]=m.getValueAtTime((m.keyframes[m.keyframes.length-1].t-.01)/f,0)):(d=[p.pv,m.pv],h[0]=p.getValueAtTime((p._caching.lastFrame+p.offsetTime-.01)/f,p.offsetTime),h[1]=m.getValueAtTime((m._caching.lastFrame+m.offsetTime-.01)/f,m.offsetTime))}else h=e,d=h;this.v.rotate(-Math.atan2(d[1]-h[1],d[0]-h[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function s(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function o(){}function a(u){this._addDynamicProperty(u),this.elem.addDynamicProperty(u),this._isDirty=!0}function l(u,f,d){if(this.elem=u,this.frameId=-1,this.propType="transform",this.data=f,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(d||u),f.p&&f.p.s?(this.px=PropertyFactory.getProp(u,f.p.x,0,0,this),this.py=PropertyFactory.getProp(u,f.p.y,0,0,this),f.p.z&&(this.pz=PropertyFactory.getProp(u,f.p.z,0,0,this))):this.p=PropertyFactory.getProp(u,f.p||{k:[0,0,0]},1,0,this),f.rx){if(this.rx=PropertyFactory.getProp(u,f.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(u,f.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(u,f.rz,0,degToRads,this),f.or.k[0].ti){var h,p=f.or.k.length;for(h=0;h<p;h+=1)f.or.k[h].to=null,f.or.k[h].ti=null}this.or=PropertyFactory.getProp(u,f.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(u,f.r||{k:0},0,degToRads,this);f.sk&&(this.sk=PropertyFactory.getProp(u,f.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(u,f.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(u,f.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(u,f.s||{k:[100,100,100]},1,.01,this),f.o?this.o=PropertyFactory.getProp(u,f.o,0,.01,u):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}l.prototype={applyToMatrix:t,getValue:i,precalculateMatrix:s,autoOrient:o},extendPrototype([DynamicPropertyContainer],l),l.prototype.addDynamicProperty=a,l.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function c(u,f,d){return new l(u,f,d)}return{getTransformProperty:c}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,i,s,o,a){var l=a?-1:1,c=s.s.v[0]+(1-s.s.v[0])*(1-o),u=s.s.v[1]+(1-s.s.v[1])*(1-o);e.translate(s.p.v[0]*l*o,s.p.v[1]*l*o,s.p.v[2]),t.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),t.rotate(-s.r.v*l*o),t.translate(s.a.v[0],s.a.v[1],s.a.v[2]),i.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),i.scale(a?1/c:c,a?1/u:u),i.translate(s.a.v[0],s.a.v[1],s.a.v[2])},RepeaterModifier.prototype.init=function(e,t,i,s){for(this.elem=e,this.arr=t,this.pos=i,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[i]);i>0;)i-=1,this._elements.unshift(t[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t]._processed=!1,e[t].ty==="gr"&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var i,s=e.length;for(i=0;i<s;i+=1)e[i]._render=t,e[i].ty==="gr"&&this.changeGroupRender(e[i].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,i,s,o,a,l=!1;if(this._mdf||e){var c=Math.ceil(this.c.v);if(this._groups.length<c){for(;this._groups.length<c;){var u={it:this.cloneElements(this._elements),ty:"gr"};u.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,u),this._groups.splice(0,0,u),this._currentCopies+=1}this.elem.reloadShapes(),l=!0}a=0;var f;for(s=0;s<=this._groups.length-1;s+=1){if(f=a<c,this._groups[s]._render=f,this.changeGroupRender(this._groups[s].it,f),!f){var d=this.elemsData[s].it,h=d[d.length-1];h.transform.op.v!==0?(h.transform.op._mdf=!0,h.transform.op.v=0):h.transform.op._mdf=!1}a+=1}this._currentCopies=c;var p=this.o.v,m=p%1,g=p>0?Math.floor(p):Math.ceil(p),v=this.pMatrix.props,b=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var E=0;if(p>0){for(;E<g;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),E+=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,m,!1),E+=m)}else if(p<0){for(;E>g;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),E-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),E-=m)}s=this.data.m===1?0:this._currentCopies-1,o=this.data.m===1?1:-1,a=this._currentCopies;for(var S,w;a;){if(t=this.elemsData[s].it,i=t[t.length-1].transform.mProps.v.props,w=i.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),E!==0){for((s!==0&&o===1||s!==this._currentCopies-1&&o===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],b[11],b[12],b[13],b[14],b[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),S=0;S<w;S+=1)i[S]=this.matrix.props[S];this.matrix.reset()}else for(this.matrix.reset(),S=0;S<w;S+=1)i[S]=this.matrix.props[S];E+=1,a-=1,s+=o}}else for(a=this._currentCopies,s=0,o=1;a;)t=this.elemsData[s].it,i=t[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,a-=1,s+=o;return l},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var i=shapePool.newElement();i.c=e.c;var s,o=e._length,a,l,c,u,f,d,h=0,p,m,g,v,b,y;for(s=0;s<o;s+=1)a=e.v[s],c=e.o[s],l=e.i[s],a[0]===c[0]&&a[1]===c[1]&&a[0]===l[0]&&a[1]===l[1]?(s===0||s===o-1)&&!e.c?(i.setTripleAt(a[0],a[1],c[0],c[1],l[0],l[1],h),h+=1):(s===0?u=e.v[o-1]:u=e.v[s-1],f=Math.sqrt(Math.pow(a[0]-u[0],2)+Math.pow(a[1]-u[1],2)),d=f?Math.min(f/2,t)/f:0,b=a[0]+(u[0]-a[0])*d,p=b,y=a[1]-(a[1]-u[1])*d,m=y,g=p-(p-a[0])*roundCorner,v=m-(m-a[1])*roundCorner,i.setTripleAt(p,m,g,v,b,y,h),h+=1,s===o-1?u=e.v[0]:u=e.v[s+1],f=Math.sqrt(Math.pow(a[0]-u[0],2)+Math.pow(a[1]-u[1],2)),d=f?Math.min(f/2,t)/f:0,g=a[0]+(u[0]-a[0])*d,p=g,v=a[1]+(u[1]-a[1])*d,m=v,b=p-(p-a[0])*roundCorner,y=m-(m-a[1])*roundCorner,i.setTripleAt(p,m,g,v,b,y,h),h+=1):(i.setTripleAt(e.v[s][0],e.v[s][1],e.o[s][0],e.o[s][1],e.i[s][0],e.i[s][1],h),h+=1);return i},RoundCornersModifier.prototype.processShapes=function(e){var t,i,s=this.shapes.length,o,a,l=this.rd.v;if(l!==0){var c,u;for(i=0;i<s;i+=1){if(c=this.shapes[i],u=c.localShapeCollection,!(!c.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),c.shape._mdf=!0,t=c.shape.paths.shapes,a=c.shape.paths._length,o=0;o<a;o+=1)u.addShape(this.processPath(t[o],l));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(e,t){return Math.abs(e-t)*1e5<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,i){return e*(1-i)+t*i}function lerpPoint(e,t,i){return[lerp(e[0],t[0],i),lerp(e[1],t[1],i)]}function quadRoots(e,t,i){if(e===0)return[];var s=t*t-4*e*i;if(s<0)return[];var o=-t/(2*e);if(s===0)return[o];var a=Math.sqrt(s)/(2*e);return[o-a,o+a]}function polynomialCoefficients(e,t,i,s){return[-e+3*t-3*i+s,3*e-6*t+3*i,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,i,s,o){o&&pointEqual(e,t)&&(t=lerpPoint(e,s,1/3)),o&&pointEqual(i,s)&&(i=lerpPoint(e,s,2/3));var a=polynomialCoefficients(e[0],t[0],i[0],s[0]),l=polynomialCoefficients(e[1],t[1],i[1],s[1]);this.a=[a[0],l[0]],this.b=[a[1],l[1]],this.c=[a[2],l[2]],this.d=[a[3],l[3]],this.points=[e,t,i,s]}PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,i=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(i<0)return[];var s=Math.sqrt(i);return floatZero(s)?s>0&&s<1?[t]:[]:[t-s,t+s].filter(function(o){return o>0&&o<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),i=lerpPoint(this.points[1],this.points[2],e),s=lerpPoint(this.points[2],this.points[3],e),o=lerpPoint(t,i,e),a=lerpPoint(i,s,e),l=lerpPoint(o,a,e);return[new PolynomialBezier(this.points[0],t,o,l,!0),new PolynomialBezier(l,a,s,this.points[3],!0)]};function extrema(e,t){var i=e.points[0][t],s=e.points[e.points.length-1][t];if(i>s){var o=s;s=i,i=o}for(var a=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),l=0;l<a.length;l+=1)if(a[l]>0&&a[l]<1){var c=e.point(a[l])[t];c<i?i=c:c>s&&(s=c)}return{min:i,max:s}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}};function intersectData(e,t,i){var s=e.boundingBox();return{cx:s.cx,cy:s.cy,width:s.width,height:s.height,bez:e,t:(t+i)/2,t1:t,t2:i}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return Math.abs(e.cx-t.cx)*2<e.width+t.width&&Math.abs(e.cy-t.cy)*2<e.height+t.height}function intersectsImpl(e,t,i,s,o,a){if(boxIntersect(e,t)){if(i>=a||e.width<=s&&e.height<=s&&t.width<=s&&t.height<=s){o.push([e.t,t.t]);return}var l=splitData(e),c=splitData(t);intersectsImpl(l[0],c[0],i+1,s,o,a),intersectsImpl(l[0],c[1],i+1,s,o,a),intersectsImpl(l[1],c[0],i+1,s,o,a),intersectsImpl(l[1],c[1],i+1,s,o,a)}}PolynomialBezier.prototype.intersections=function(e,t,i){t===void 0&&(t=2),i===void 0&&(i=7);var s=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,s,i),s},PolynomialBezier.shapeSegment=function(e,t){var i=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[i],e.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var i=(t+1)%e.length();return new PolynomialBezier(e.v[i],e.i[i],e.o[t],e.v[t],!0)};function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,i,s){var o=[e[0],e[1],1],a=[t[0],t[1],1],l=[i[0],i[1],1],c=[s[0],s[1],1],u=crossProduct(crossProduct(o,a),crossProduct(l,c));return floatZero(u[2])?null:[u[0]/u[2],u[1]/u[2]]}function polarOffset(e,t,i){return[e[0]+Math.cos(t)*i,e[1]-Math.sin(t)*i]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(e,t,i,s,o,a,l){var c=i-Math.PI/2,u=i+Math.PI/2,f=t[0]+Math.cos(i)*s*o,d=t[1]-Math.sin(i)*s*o;e.setTripleAt(f,d,f+Math.cos(c)*a,d-Math.sin(c)*a,f+Math.cos(u)*l,d-Math.sin(u)*l,e.length())}function getPerpendicularVector(e,t){var i=[t[0]-e[0],t[1]-e[1]],s=-Math.PI*.5,o=[Math.cos(s)*i[0]-Math.sin(s)*i[1],Math.sin(s)*i[0]+Math.cos(s)*i[1]];return o}function getProjectingAngle(e,t){var i=t===0?e.length()-1:t-1,s=(t+1)%e.length(),o=e.v[i],a=e.v[s],l=getPerpendicularVector(o,a);return Math.atan2(0,1)-Math.atan2(l[1],l[0])}function zigZagCorner(e,t,i,s,o,a,l){var c=getProjectingAngle(t,i),u=t.v[i%t._length],f=t.v[i===0?t._length-1:i-1],d=t.v[(i+1)%t._length],h=a===2?Math.sqrt(Math.pow(u[0]-f[0],2)+Math.pow(u[1]-f[1],2)):0,p=a===2?Math.sqrt(Math.pow(u[0]-d[0],2)+Math.pow(u[1]-d[1],2)):0;setPoint(e,t.v[i%t._length],c,l,s,p/((o+1)*2),h/((o+1)*2))}function zigZagSegment(e,t,i,s,o,a){for(var l=0;l<s;l+=1){var c=(l+1)/(s+1),u=o===2?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,f=t.normalAngle(c),d=t.point(c);setPoint(e,d,f,a,i,u/((s+1)*2),u/((s+1)*2)),a=-a}return a}ZigZagModifier.prototype.processPath=function(e,t,i,s){var o=e._length,a=shapePool.newElement();if(a.c=e.c,e.c||(o-=1),o===0)return a;var l=-1,c=PolynomialBezier.shapeSegment(e,0);zigZagCorner(a,e,0,t,i,s,l);for(var u=0;u<o;u+=1)l=zigZagSegment(a,c,t,i,s,-l),u===o-1&&!e.c?c=null:c=PolynomialBezier.shapeSegment(e,(u+1)%o),zigZagCorner(a,e,u+1,t,i,s,l);return a},ZigZagModifier.prototype.processShapes=function(e){var t,i,s=this.shapes.length,o,a,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),u=this.pointsType.v;if(l!==0){var f,d;for(i=0;i<s;i+=1){if(f=this.shapes[i],d=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!e))for(d.releaseShapes(),f.shape._mdf=!0,t=f.shape.paths.shapes,a=f.shape.paths._length,o=0;o<a;o+=1)d.addShape(this.processPath(t[o],l,c,u));f.shape.paths=f.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(e,t,i){var s=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,s,i),polarOffset(t,s,i)]}function offsetSegment(e,t){var i,s,o,a,l,c,u;u=linearOffset(e.points[0],e.points[1],t),i=u[0],s=u[1],u=linearOffset(e.points[1],e.points[2],t),o=u[0],a=u[1],u=linearOffset(e.points[2],e.points[3],t),l=u[0],c=u[1];var f=lineIntersection(i,s,o,a);f===null&&(f=s);var d=lineIntersection(l,c,o,a);return d===null&&(d=l),new PolynomialBezier(i,f,d,c)}function joinLines(e,t,i,s,o){var a=t.points[3],l=i.points[0];if(s===3||pointEqual(a,l))return a;if(s===2){var c=-t.tangentAngle(1),u=-i.tangentAngle(0)+Math.PI,f=lineIntersection(a,polarOffset(a,c+Math.PI/2,100),l,polarOffset(l,c+Math.PI/2,100)),d=f?pointDistance(f,a):pointDistance(a,l)/2,h=polarOffset(a,c,2*d*roundCorner);return e.setXYAt(h[0],h[1],"o",e.length()-1),h=polarOffset(l,u,2*d*roundCorner),e.setTripleAt(l[0],l[1],l[0],l[1],h[0],h[1],e.length()),l}var p=pointEqual(a,t.points[2])?t.points[0]:t.points[2],m=pointEqual(l,i.points[1])?i.points[3]:i.points[1],g=lineIntersection(p,a,l,m);return g&&pointDistance(g,a)<o?(e.setTripleAt(g[0],g[1],g[0],g[1],g[0],g[1],e.length()),g):a}function getIntersection(e,t){var i=e.intersections(t);return i.length&&floatEqual(i[0][0],1)&&i.shift(),i.length?i[0]:null}function pruneSegmentIntersection(e,t){var i=e.slice(),s=t.slice(),o=getIntersection(e[e.length-1],t[0]);return o&&(i[e.length-1]=e[e.length-1].split(o[0])[0],s[0]=t[0].split(o[1])[1]),e.length>1&&t.length>1&&(o=getIntersection(e[0],t[t.length-1]),o)?[[e[0].split(o[0])[0]],[t[t.length-1].split(o[1])[1]]]:[i,s]}function pruneIntersections(e){for(var t,i=1;i<e.length;i+=1)t=pruneSegmentIntersection(e[i-1],e[i]),e[i-1]=t[0],e[i]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var i=e.inflectionPoints(),s,o,a,l;if(i.length===0)return[offsetSegment(e,t)];if(i.length===1||floatEqual(i[1],1))return a=e.split(i[0]),s=a[0],o=a[1],[offsetSegment(s,t),offsetSegment(o,t)];a=e.split(i[0]),s=a[0];var c=(i[1]-i[0])/(1-i[0]);return a=a[1].split(c),l=a[0],o=a[1],[offsetSegment(s,t),offsetSegment(l,t),offsetSegment(o,t)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,i,s){var o=shapePool.newElement();o.c=e.c;var a=e.length();e.c||(a-=1);var l,c,u,f=[];for(l=0;l<a;l+=1)u=PolynomialBezier.shapeSegment(e,l),f.push(offsetSegmentSplit(u,t));if(!e.c)for(l=a-1;l>=0;l-=1)u=PolynomialBezier.shapeSegmentInverted(e,l),f.push(offsetSegmentSplit(u,t));f=pruneIntersections(f);var d=null,h=null;for(l=0;l<f.length;l+=1){var p=f[l];for(h&&(d=joinLines(o,h,p[0],i,s)),h=p[p.length-1],c=0;c<p.length;c+=1)u=p[c],d&&pointEqual(u.points[0],d)?o.setXYAt(u.points[1][0],u.points[1][1],"o",o.length()-1):o.setTripleAt(u.points[0][0],u.points[0][1],u.points[1][0],u.points[1][1],u.points[0][0],u.points[0][1],o.length()),o.setTripleAt(u.points[3][0],u.points[3][1],u.points[3][0],u.points[3][1],u.points[2][0],u.points[2][1],o.length()),d=u.points[3]}return f.length&&joinLines(o,h,f[0][0],i,s),o},OffsetPathModifier.prototype.processShapes=function(e){var t,i,s=this.shapes.length,o,a,l=this.amount.v,c=this.miterLimit.v,u=this.lineJoin;if(l!==0){var f,d;for(i=0;i<s;i+=1){if(f=this.shapes[i],d=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!e))for(d.releaseShapes(),f.shape._mdf=!0,t=f.shape.paths.shapes,a=f.shape.paths._length,o=0;o<a;o+=1)d.addShape(this.processPath(t[o],l,u,c));f.shape.paths=f.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],i="normal",s="normal",o=t.length,a,l=0;l<o;l+=1)switch(a=t[l].toLowerCase(),a){case"italic":s="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200";break}return{style:s,weight:e.fWeight||i}}var FontManager=function(){var e=5e3,t={w:0,size:0,shapes:[],data:{shapes:[]}},i=[];i=i.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var s=127988,o=917631,a=917601,l=917626,c=65039,u=8205,f=127462,d=127487,h=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function p(M){var k=M.split(","),T,P=k.length,F=[];for(T=0;T<P;T+=1)k[T]!=="sans-serif"&&k[T]!=="monospace"&&F.push(k[T]);return F.join(",")}function m(M,k){var T=createTag("span");T.setAttribute("aria-hidden",!0),T.style.fontFamily=k;var P=createTag("span");P.innerText="giItT1WQy@!-/#",T.style.position="absolute",T.style.left="-10000px",T.style.top="-10000px",T.style.fontSize="300px",T.style.fontVariant="normal",T.style.fontStyle="normal",T.style.fontWeight="normal",T.style.letterSpacing="0",T.appendChild(P),document.body.appendChild(T);var F=P.offsetWidth;return P.style.fontFamily=p(M)+", "+k,{node:P,w:F,parent:T}}function g(){var M,k=this.fonts.length,T,P,F=k;for(M=0;M<k;M+=1)this.fonts[M].loaded?F-=1:this.fonts[M].fOrigin==="n"||this.fonts[M].origin===0?this.fonts[M].loaded=!0:(T=this.fonts[M].monoCase.node,P=this.fonts[M].monoCase.w,T.offsetWidth!==P?(F-=1,this.fonts[M].loaded=!0):(T=this.fonts[M].sansCase.node,P=this.fonts[M].sansCase.w,T.offsetWidth!==P&&(F-=1,this.fonts[M].loaded=!0)),this.fonts[M].loaded&&(this.fonts[M].sansCase.parent.parentNode.removeChild(this.fonts[M].sansCase.parent),this.fonts[M].monoCase.parent.parentNode.removeChild(this.fonts[M].monoCase.parent)));F!==0&&Date.now()-this.initTime<e?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function v(M,k){var T=document.body&&k?"svg":"canvas",P,F=getFontProperties(M);if(T==="svg"){var N=createNS("text");N.style.fontSize="100px",N.setAttribute("font-family",M.fFamily),N.setAttribute("font-style",F.style),N.setAttribute("font-weight",F.weight),N.textContent="1",M.fClass?(N.style.fontFamily="inherit",N.setAttribute("class",M.fClass)):N.style.fontFamily=M.fFamily,k.appendChild(N),P=N}else{var H=new OffscreenCanvas(500,500).getContext("2d");H.font=F.style+" "+F.weight+" 100px "+M.fFamily,P=H}function q(Y){return T==="svg"?(P.textContent=Y,P.getComputedTextLength()):P.measureText(Y).width}return{measureText:q}}function b(M,k){if(!M){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=M.list;return}if(!document.body){this.isLoaded=!0,M.list.forEach(function(z){z.helper=v(z),z.cache={}}),this.fonts=M.list;return}var T=M.list,P,F=T.length,N=F;for(P=0;P<F;P+=1){var H=!0,q,Y;if(T[P].loaded=!1,T[P].monoCase=m(T[P].fFamily,"monospace"),T[P].sansCase=m(T[P].fFamily,"sans-serif"),!T[P].fPath)T[P].loaded=!0,N-=1;else if(T[P].fOrigin==="p"||T[P].origin===3){if(q=document.querySelectorAll('style[f-forigin="p"][f-family="'+T[P].fFamily+'"], style[f-origin="3"][f-family="'+T[P].fFamily+'"]'),q.length>0&&(H=!1),H){var Q=createTag("style");Q.setAttribute("f-forigin",T[P].fOrigin),Q.setAttribute("f-origin",T[P].origin),Q.setAttribute("f-family",T[P].fFamily),Q.type="text/css",Q.innerText="@font-face {font-family: "+T[P].fFamily+"; font-style: normal; src: url('"+T[P].fPath+"');}",k.appendChild(Q)}}else if(T[P].fOrigin==="g"||T[P].origin===1){for(q=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Y=0;Y<q.length;Y+=1)q[Y].href.indexOf(T[P].fPath)!==-1&&(H=!1);if(H){var re=createTag("link");re.setAttribute("f-forigin",T[P].fOrigin),re.setAttribute("f-origin",T[P].origin),re.type="text/css",re.rel="stylesheet",re.href=T[P].fPath,document.body.appendChild(re)}}else if(T[P].fOrigin==="t"||T[P].origin===2){for(q=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Y=0;Y<q.length;Y+=1)T[P].fPath===q[Y].src&&(H=!1);if(H){var ee=createTag("link");ee.setAttribute("f-forigin",T[P].fOrigin),ee.setAttribute("f-origin",T[P].origin),ee.setAttribute("rel","stylesheet"),ee.setAttribute("href",T[P].fPath),k.appendChild(ee)}}T[P].helper=v(T[P],k),T[P].cache={},this.fonts.push(T[P])}N===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function y(M){if(M){this.chars||(this.chars=[]);var k,T=M.length,P,F=this.chars.length,N;for(k=0;k<T;k+=1){for(P=0,N=!1;P<F;)this.chars[P].style===M[k].style&&this.chars[P].fFamily===M[k].fFamily&&this.chars[P].ch===M[k].ch&&(N=!0),P+=1;N||(this.chars.push(M[k]),F+=1)}}}function E(M,k,T){for(var P=0,F=this.chars.length;P<F;){if(this.chars[P].ch===M&&this.chars[P].style===k&&this.chars[P].fFamily===T)return this.chars[P];P+=1}return(typeof M=="string"&&M.charCodeAt(0)!==13||!M)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",M,k,T)),t}function S(M,k,T){var P=this.getFontByName(k),F=M;if(!P.cache[F]){var N=P.helper;if(M===" "){var H=N.measureText("|"+M+"|"),q=N.measureText("||");P.cache[F]=(H-q)/100}else P.cache[F]=N.measureText(M)/100}return P.cache[F]*T}function w(M){for(var k=0,T=this.fonts.length;k<T;){if(this.fonts[k].fName===M)return this.fonts[k];k+=1}return this.fonts[0]}function C(M){var k=0,T=M.charCodeAt(0);if(T>=55296&&T<=56319){var P=M.charCodeAt(1);P>=56320&&P<=57343&&(k=(T-55296)*1024+P-56320+65536)}return k}function A(M,k){var T=M.toString(16)+k.toString(16);return h.indexOf(T)!==-1}function O(M){return M===u}function I(M){return M===c}function L(M){var k=C(M);return k>=f&&k<=d}function $(M){return L(M.substr(0,2))&&L(M.substr(2,2))}function V(M){return i.indexOf(M)!==-1}function W(M,k){var T=C(M.substr(k,2));if(T!==s)return!1;var P=0;for(k+=2;P<5;){if(T=C(M.substr(k,2)),T<a||T>l)return!1;P+=1,k+=2}return C(M.substr(k,2))===o}function K(){this.isLoaded=!0}var j=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};j.isModifier=A,j.isZeroWidthJoiner=O,j.isFlagEmoji=$,j.isRegionalCode=L,j.isCombinedCharacter=V,j.isRegionalFlag=W,j.isVariationSelector=I,j.BLACK_FLAG_CODE_POINT=s;var D={addChars:y,addFonts:b,getCharData:E,getFontByName:w,measureText:S,checkLoadedFonts:g,setIsLoaded:K};return j.prototype=D,j}();function SlotManager(e){this.animationData=e}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e};function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){this.renderableComponents.indexOf(t)===-1&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){this.renderableComponents.indexOf(t)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,i=this.renderableComponents.length;for(t=0;t<i;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var e={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(t){return e[t]||""}}();function SliderEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function AngleEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function ColorEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,1,0,i)}function PointEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,1,0,i)}function LayerIndexEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function MaskIndexEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function CheckboxEffect(e,t,i){this.p=PropertyFactory.getProp(t,e.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var i=e.ef||[];this.effectElements=[];var s,o=i.length,a;for(s=0;s<o;s+=1)a=new GroupEffect(i[s],t),this.effectElements.push(a)}function GroupEffect(e,t){this.init(e,t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var i,s=this.data.ef.length,o,a=this.data.ef;for(i=0;i<s;i+=1){switch(o=null,a[i].ty){case 0:o=new SliderEffect(a[i],t,this);break;case 1:o=new AngleEffect(a[i],t,this);break;case 2:o=new ColorEffect(a[i],t,this);break;case 3:o=new PointEffect(a[i],t,this);break;case 4:case 7:o=new CheckboxEffect(a[i],t,this);break;case 10:o=new LayerIndexEffect(a[i],t,this);break;case 11:o=new MaskIndexEffect(a[i],t,this);break;case 5:o=new EffectsManager(a[i],t);break;default:o=new NoValueEffect(a[i]);break}o&&this.effectElements.push(o)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,i=this.data.masksProperties.length;t<i;){if(this.data.masksProperties[t].mode!=="n"&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var i=t("layer"),s=t("effects"),o=t("shape"),a=t("text"),l=t("comp");this.layerInterface=i(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var c=s.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(c),this.data.ty===0||this.data.xt?this.compInterface=l(this):this.data.ty===4?(this.layerInterface.shapeInterface=o(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=a(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm),i=this.baseElement||this.layerElement;i.style["mix-blend-mode"]=t},initBaseData:function(t,i,s){this.globalData=i,this.comp=s,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,i){var s,o=this.dynamicProperties.length;for(s=0;s<o;s+=1)(i||this._isParent&&this.dynamicProperties[s].propType==="transform")&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&this.dynamicProperties.push(t)}};function FootageElement(e,t,i){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,i)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(e,t,i){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,i),this._isPlaying=!1,this._canPlay=!1;var s=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(s),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(e){var t,i=this.layers.length,s;for(this.completeLayers=!0,t=i-1;t>=0;t-=1)this.elements[t]||(s=this.layers[t],s.ip-s.st<=e-this.layers[t].st&&s.op-s.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){this.completeLayers=!1;var t,i=e.length,s,o=this.layers.length;for(t=0;t<i;t+=1)for(s=0;s<o;){if(this.layers[s].id===e[t].id){this.layers[s]=e[t];break}s+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,i){for(var s=this.elements,o=this.layers,a=0,l=o.length;a<l;)o[a].ind==t&&(!s[a]||s[a]===!0?(this.buildItem(a),this.addPendingElement(e)):(i.push(s[a]),s[a].setAsParent(),o[a].parent!==void 0?this.buildElementParenting(e,o[a].parent,i):e.setHierarchy(i))),a+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,i=e.length;for(t=0;t<i;t+=1)if(e[t].xt){var s=this.createComp(e[t]);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},BaseRenderer.prototype.getElementById=function(e){var t,i=this.elements.length;for(t=0;t<i;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t=e.shift(),i;if(typeof t=="number")i=this.elements[t];else{var s,o=this.elements.length;for(s=0;s<o;s+=1)if(this.elements[s].data.nm===t){i=this.elements[s];break}}return e.length===0?i:i.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,i=this.finalTransform.mat,s=0,o=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<o;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,i.cloneFromProps(t),s=0;s<o;s+=1)i.multiply(this.hierarchy[s].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var t=0,i=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<i;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),t+=1;if(this.finalTransform._localMatMdf){var s=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(s),t=1;t<i;t+=1){var o=this.localTransforms[t].matrix;s.multiply(o)}s.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var a=this.finalTransform.localOpacity;for(t=0;t<i;t+=1)a*=this.localTransforms[t].opacity*.01;this.finalTransform.localOpacity=a}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var t=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(t.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var i=0,s=t.length;for(i=0;i<s;i+=1)this.localTransforms.push(t[i])}}},globalToLocal:function(t){var i=[];i.push(this.finalTransform);for(var s=!0,o=this.comp;s;)o.finalTransform?(o.data.hasMask&&i.splice(0,0,o.finalTransform),o=o.comp):s=!1;var a,l=i.length,c;for(a=0;a<l;a+=1)c=i[a].mat.applyToPointArray(0,0,0),t=[t[0]-c[0],t[1]-c[1],0];return t},mHelper:new Matrix};function MaskElement(e,t,i){this.data=e,this.element=t,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var s=this.globalData.defs,o,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var l,c=this.masksProperties,u=0,f=[],d,h,p=createElementID(),m,g,v,b,y="clipPath",E="clip-path";for(o=0;o<a;o+=1)if((c[o].mode!=="a"&&c[o].mode!=="n"||c[o].inv||c[o].o.k!==100||c[o].o.x)&&(y="mask",E="mask"),(c[o].mode==="s"||c[o].mode==="i")&&u===0?(m=createNS("rect"),m.setAttribute("fill","#ffffff"),m.setAttribute("width",this.element.comp.data.w||0),m.setAttribute("height",this.element.comp.data.h||0),f.push(m)):m=null,l=createNS("path"),c[o].mode==="n")this.viewData[o]={op:PropertyFactory.getProp(this.element,c[o].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[o],3),elem:l,lastPath:""},s.appendChild(l);else{u+=1,l.setAttribute("fill",c[o].mode==="s"?"#000000":"#ffffff"),l.setAttribute("clip-rule","nonzero");var S;if(c[o].x.k!==0?(y="mask",E="mask",b=PropertyFactory.getProp(this.element,c[o].x,0,null,this.element),S=createElementID(),g=createNS("filter"),g.setAttribute("id",S),v=createNS("feMorphology"),v.setAttribute("operator","erode"),v.setAttribute("in","SourceGraphic"),v.setAttribute("radius","0"),g.appendChild(v),s.appendChild(g),l.setAttribute("stroke",c[o].mode==="s"?"#000000":"#ffffff")):(v=null,b=null),this.storedData[o]={elem:l,x:b,expan:v,lastPath:"",lastOperator:"",filterId:S,lastRadius:0},c[o].mode==="i"){h=f.length;var w=createNS("g");for(d=0;d<h;d+=1)w.appendChild(f[d]);var C=createNS("mask");C.setAttribute("mask-type","alpha"),C.setAttribute("id",p+"_"+u),C.appendChild(l),s.appendChild(C),w.setAttribute("mask","url("+getLocationHref()+"#"+p+"_"+u+")"),f.length=0,f.push(w)}else f.push(l);c[o].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[o]={elem:l,lastPath:"",op:PropertyFactory.getProp(this.element,c[o].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[o],3),invRect:m},this.viewData[o].prop.k||this.drawPath(c[o],this.viewData[o].prop.v,this.viewData[o])}for(this.maskElement=createNS(y),a=f.length,o=0;o<a;o+=1)this.maskElement.appendChild(f[o]);u>0&&(this.maskElement.setAttribute("id",p),this.element.maskedElement.setAttribute(E,"url("+getLocationHref()+"#"+p+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,i,s=this.masksProperties.length;for(i=0;i<s;i+=1)if((this.viewData[i].prop._mdf||e)&&this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]),(this.viewData[i].op._mdf||e)&&this.viewData[i].elem.setAttribute("fill-opacity",this.viewData[i].op.v),this.masksProperties[i].mode!=="n"&&(this.viewData[i].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[i].invRect.setAttribute("transform",t.getInverseMatrix().to2dCSS()),this.storedData[i].x&&(this.storedData[i].x._mdf||e))){var o=this.storedData[i].expan;this.storedData[i].x.v<0?(this.storedData[i].lastOperator!=="erode"&&(this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[i].filterId+")")),o.setAttribute("radius",-this.storedData[i].x.v)):(this.storedData[i].lastOperator!=="dilate"&&(this.storedData[i].lastOperator="dilate",this.storedData[i].elem.setAttribute("filter",null)),this.storedData[i].elem.setAttribute("stroke-width",this.storedData[i].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" ",e},MaskElement.prototype.drawPath=function(e,t,i){var s=" M"+t.v[0][0]+","+t.v[0][1],o,a;for(a=t._length,o=1;o<a;o+=1)s+=" C"+t.o[o-1][0]+","+t.o[o-1][1]+" "+t.i[o][0]+","+t.i[o][1]+" "+t.v[o][0]+","+t.v[o][1];if(t.c&&a>1&&(s+=" C"+t.o[o-1][0]+","+t.o[o-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),i.lastPath!==s){var l="";i.elem&&(t.c&&(l=e.inv?this.solidPath+s:s),i.elem.setAttribute("d",l)),i.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=i;function t(s,o){var a=createNS("filter");return a.setAttribute("id",s),o!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function i(){var s=createNS("feColorMatrix");return s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),s}return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,i="SourceGraphic",s=e.data.ef?e.data.ef.length:0,o=createElementID(),a=filtersFactory.createFilter(o,!0),l=0;this.filters=[];var c;for(t=0;t<s;t+=1){c=null;var u=e.data.ef[t].ty;if(registeredEffects$1[u]){var f=registeredEffects$1[u].effect;c=new f(a,e.effectsManager.effectElements[t],e,idPrefix+l,i),i=idPrefix+l,registeredEffects$1[u].countsAsEffect&&(l+=1)}c&&this.filters.push(c)}l&&(e.globalData.defs.appendChild(a),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+o+")")),this.filters.length&&e.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(e){var t,i=this.filters.length;for(t=0;t<i;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,i=this.filters.length,s=[];for(t=0;t<i;t+=1)this.filters[t].type===e&&s.push(this.filters[t]);return s};function registerEffect$1(e,t,i){registeredEffects$1[e]={effect:t,countsAsEffect:i}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var i=createNS("g");i.setAttribute("id",this.layerId),i.appendChild(this.layerElement),t=i,this.globalData.defs.appendChild(i)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var s=createNS("clipPath"),o=createNS("path");o.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var a=createElementID();if(s.setAttribute("id",a),s.appendChild(o),this.globalData.defs.appendChild(s),this.checkMasks()){var l=createNS("g");l.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),l.appendChild(this.layerElement),this.transformedElement=l,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(t){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[t]){var i=this.layerId+"_"+t,s,o,a,l;if(t===1||t===3){var c=createNS("mask");c.setAttribute("id",i),c.setAttribute("mask-type",t===3?"luminance":"alpha"),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),c.appendChild(a),this.globalData.defs.appendChild(c),!featureSupport.maskType&&t===1&&(c.setAttribute("mask-type","luminance"),s=createElementID(),o=filtersFactory.createFilter(s),this.globalData.defs.appendChild(o),o.appendChild(filtersFactory.createAlphaToLuminanceFilter()),l=createNS("g"),l.appendChild(a),c.appendChild(l),l.setAttribute("filter","url("+getLocationHref()+"#"+s+")"))}else if(t===2){var u=createNS("mask");u.setAttribute("id",i),u.setAttribute("mask-type","alpha");var f=createNS("g");u.appendChild(f),s=createElementID(),o=filtersFactory.createFilter(s);var d=createNS("feComponentTransfer");d.setAttribute("in","SourceGraphic"),o.appendChild(d);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),d.appendChild(h),this.globalData.defs.appendChild(o);var p=createNS("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),f.setAttribute("filter","url("+getLocationHref()+"#"+s+")"),f.appendChild(p),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),f.appendChild(a),featureSupport.maskType||(u.setAttribute("mask-type","luminance"),o.appendChild(filtersFactory.createAlphaToLuminanceFilter()),l=createNS("g"),f.appendChild(p),l.appendChild(this.layerElement),f.appendChild(l)),this.globalData.defs.appendChild(u)}this.matteMasks[t]=i}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var e={initElement:function(i,s,o){this.initFrame(),this.initBaseData(i,s,o),this.initTransform(i,s,o),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var i=this.baseElement||this.layerElement;i.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var i=this.baseElement||this.layerElement;i.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(e)],RenderableDOMElement)})();function IImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(t){var i,s=this.shapeModifiers.length;for(i=0;i<s;i+=1)this.shapeModifiers[i].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var i=0,s=this.shapeModifiers.length;i<s;)if(this.shapeModifiers[i].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,i=this.shapes.length;for(t=0;t<i;t+=1)this.shapes[t].sh.reset();i=this.shapeModifiers.length;var s;for(t=i-1;t>=0&&(s=this.shapeModifiers[t].processShapes(this._isFirstFrame),!s);t-=1);}},searchProcessedElement:function(t){for(var i=this.processedElements,s=0,o=i.length;s<o;){if(i[s].elem===t)return i[s].pos;s+=1}return 0},addProcessedElement:function(t,i){for(var s=this.processedElements,o=s.length;o;)if(o-=1,s[o].elem===t){s[o].pos=i;return}s.push(new ProcessedElement(t,i))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,i){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=i,this.lvl=t,this._isAnimated=!!i.k;for(var s=0,o=e.length;s<o;){if(e[s].mProps.dynamicProperties.length){this._isAnimated=!0;break}s+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(e,t,i,s){this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(s);var o,a=t.length||0,l;for(o=0;o<a;o+=1)l=PropertyFactory.getProp(e,t[o].v,0,0,this),this.k=l.k||this.k,this.dataProps[o]={n:t[o].n,p:l};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(e){if(!(this.elem.globalData.frameId===this.frameId&&!e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,i=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),t=0;t<i;t+=1)this.dataProps[t].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=i}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=i}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(e,t,i){this.data=t,this.c=createTypedArray("uint8c",t.p*4);var s=t.k.k[0].s?t.k.k[0].s.length-t.p*4:t.k.k.length-t.p*4;this.o=createTypedArray("float32",s),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(e,t){for(var i=0,s=this.o.length/2,o;i<s;){if(o=Math.abs(e[i*4]-e[t*4+i*2]),o>.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,i=this.data.p*4,s,o;for(t=0;t<i;t+=1)s=t%4===0?100:255,o=Math.round(this.prop.v[t]*s),this.c[t]!==o&&(this.c[t]=o,this._cmdf=!e);if(this.o.length)for(i=this.prop.v.length,t=this.data.p*4;t<i;t+=1)s=t%2===0?100:1,o=t%2===0?Math.round(this.prop.v[t]*100):this.prop.v[t],this.o[t-this.data.p*4]!==o&&(this.o[t-this.data.p*4]=o,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,i)}SVGGradientFillStyleData.prototype.initGradientData=function(e,t,i){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,t),this.setGradientOpacity(t,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var i=createElementID(),s=createNS(t.t===1?"linearGradient":"radialGradient");s.setAttribute("id",i),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var o=[],a,l,c;for(c=t.g.p*4,l=0;l<c;l+=4)a=createNS("stop"),s.appendChild(a),o.push(a);e.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=s,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var i,s,o,a=createNS("mask"),l=createNS("path");a.appendChild(l);var c=createElementID(),u=createElementID();a.setAttribute("id",u);var f=createNS(e.t===1?"linearGradient":"radialGradient");f.setAttribute("id",c),f.setAttribute("spreadMethod","pad"),f.setAttribute("gradientUnits","userSpaceOnUse"),o=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var d=this.stops;for(s=e.g.p*4;s<o;s+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),f.appendChild(i),d.push(i);l.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+c+")"),e.ty==="gs"&&(l.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),l.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),e.lj===1&&l.setAttribute("stroke-miterlimit",e.ml)),this.of=f,this.ms=a,this.ost=d,this.maskId=u,t.msElem=l}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(e,t,i){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,i),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,i){this.transform={mProps:e,op:t,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(t,i,s,o){if(i===0)return"";var a=t.o,l=t.i,c=t.v,u,f=" M"+o.applyToPointStringified(c[0][0],c[0][1]);for(u=1;u<i;u+=1)f+=" C"+o.applyToPointStringified(a[u-1][0],a[u-1][1])+" "+o.applyToPointStringified(l[u][0],l[u][1])+" "+o.applyToPointStringified(c[u][0],c[u][1]);return s&&i&&(f+=" C"+o.applyToPointStringified(a[u-1][0],a[u-1][1])+" "+o.applyToPointStringified(l[0][0],l[0][1])+" "+o.applyToPointStringified(c[0][0],c[0][1]),f+="z"),f},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix,i={createRenderFunction:s};function s(h){switch(h.ty){case"fl":return c;case"gf":return f;case"gs":return u;case"st":return d;case"sh":case"el":case"rc":case"sr":return l;case"tr":return o;case"no":return a;default:return null}}function o(h,p,m){(m||p.transform.op._mdf)&&p.transform.container.setAttribute("opacity",p.transform.op.v),(m||p.transform.mProps._mdf)&&p.transform.container.setAttribute("transform",p.transform.mProps.v.to2dCSS())}function a(){}function l(h,p,m){var g,v,b,y,E,S,w=p.styles.length,C=p.lvl,A,O,I,L;for(S=0;S<w;S+=1){if(y=p.sh._mdf||m,p.styles[S].lvl<C){for(O=t.reset(),I=C-p.styles[S].lvl,L=p.transformers.length-1;!y&&I>0;)y=p.transformers[L].mProps._mdf||y,I-=1,L-=1;if(y)for(I=C-p.styles[S].lvl,L=p.transformers.length-1;I>0;)O.multiply(p.transformers[L].mProps.v),I-=1,L-=1}else O=e;if(A=p.sh.paths,v=A._length,y){for(b="",g=0;g<v;g+=1)E=A.shapes[g],E&&E._length&&(b+=buildShapeString(E,E._length,E.c,O));p.caches[S]=b}else b=p.caches[S];p.styles[S].d+=h.hd===!0?"":b,p.styles[S]._mdf=y||p.styles[S]._mdf}}function c(h,p,m){var g=p.style;(p.c._mdf||m)&&g.pElem.setAttribute("fill","rgb("+bmFloor(p.c.v[0])+","+bmFloor(p.c.v[1])+","+bmFloor(p.c.v[2])+")"),(p.o._mdf||m)&&g.pElem.setAttribute("fill-opacity",p.o.v)}function u(h,p,m){f(h,p,m),d(h,p,m)}function f(h,p,m){var g=p.gf,v=p.g._hasOpacity,b=p.s.v,y=p.e.v;if(p.o._mdf||m){var E=h.ty==="gf"?"fill-opacity":"stroke-opacity";p.style.pElem.setAttribute(E,p.o.v)}if(p.s._mdf||m){var S=h.t===1?"x1":"cx",w=S==="x1"?"y1":"cy";g.setAttribute(S,b[0]),g.setAttribute(w,b[1]),v&&!p.g._collapsable&&(p.of.setAttribute(S,b[0]),p.of.setAttribute(w,b[1]))}var C,A,O,I;if(p.g._cmdf||m){C=p.cst;var L=p.g.c;for(O=C.length,A=0;A<O;A+=1)I=C[A],I.setAttribute("offset",L[A*4]+"%"),I.setAttribute("stop-color","rgb("+L[A*4+1]+","+L[A*4+2]+","+L[A*4+3]+")")}if(v&&(p.g._omdf||m)){var $=p.g.o;for(p.g._collapsable?C=p.cst:C=p.ost,O=C.length,A=0;A<O;A+=1)I=C[A],p.g._collapsable||I.setAttribute("offset",$[A*2]+"%"),I.setAttribute("stop-opacity",$[A*2+1])}if(h.t===1)(p.e._mdf||m)&&(g.setAttribute("x2",y[0]),g.setAttribute("y2",y[1]),v&&!p.g._collapsable&&(p.of.setAttribute("x2",y[0]),p.of.setAttribute("y2",y[1])));else{var V;if((p.s._mdf||p.e._mdf||m)&&(V=Math.sqrt(Math.pow(b[0]-y[0],2)+Math.pow(b[1]-y[1],2)),g.setAttribute("r",V),v&&!p.g._collapsable&&p.of.setAttribute("r",V)),p.s._mdf||p.e._mdf||p.h._mdf||p.a._mdf||m){V||(V=Math.sqrt(Math.pow(b[0]-y[0],2)+Math.pow(b[1]-y[1],2)));var W=Math.atan2(y[1]-b[1],y[0]-b[0]),K=p.h.v;K>=1?K=.99:K<=-1&&(K=-.99);var j=V*K,D=Math.cos(W+p.a.v)*j+b[0],M=Math.sin(W+p.a.v)*j+b[1];g.setAttribute("fx",D),g.setAttribute("fy",M),v&&!p.g._collapsable&&(p.of.setAttribute("fx",D),p.of.setAttribute("fy",M))}}}function d(h,p,m){var g=p.style,v=p.d;v&&(v._mdf||m)&&v.dashStr&&(g.pElem.setAttribute("stroke-dasharray",v.dashStr),g.pElem.setAttribute("stroke-dashoffset",v.dashoffset[0])),p.c&&(p.c._mdf||m)&&g.pElem.setAttribute("stroke","rgb("+bmFloor(p.c.v[0])+","+bmFloor(p.c.v[1])+","+bmFloor(p.c.v[2])+")"),(p.o._mdf||m)&&g.pElem.setAttribute("stroke-opacity",p.o.v),(p.w._mdf||m)&&(g.pElem.setAttribute("stroke-width",p.w.v),g.msElem&&g.msElem.setAttribute("stroke-width",p.w.v))}return i}();function SVGShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,i),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t=this.shapes.length,i,s,o=this.stylesList.length,a,l=[],c=!1;for(s=0;s<o;s+=1){for(a=this.stylesList[s],c=!1,l.length=0,e=0;e<t;e+=1)i=this.shapes[e],i.styles.indexOf(a)!==-1&&(l.push(i),c=i._isAnimated||c);l.length>1&&c&&this.setShapesAsAnimated(l)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var i,s=new SVGStyleData(e,t),o=s.pElem;if(e.ty==="st")i=new SVGStrokeStyleData(this,e,s);else if(e.ty==="fl")i=new SVGFillStyleData(this,e,s);else if(e.ty==="gf"||e.ty==="gs"){var a=e.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;i=new a(this,e,s),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),o.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")"))}else e.ty==="no"&&(i=new SVGNoStyleData(this,e,s));return(e.ty==="st"||e.ty==="gs")&&(o.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),o.setAttribute("fill-opacity","0"),e.lj===1&&o.setAttribute("stroke-miterlimit",e.ml)),e.r===2&&o.setAttribute("fill-rule","evenodd"),e.ln&&o.setAttribute("id",e.ln),e.cl&&o.setAttribute("class",e.cl),e.bm&&(o.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(s),this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var i=TransformPropertyFactory.getTransformProperty(this,e,this),s=new SVGTransformData(i,i.o,t);return this.addToAnimatedContents(e,s),s},SVGShapeElement.prototype.createShapeElement=function(e,t,i){var s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7);var o=ShapePropertyFactory.getShapeProp(this,e,s,this),a=new SVGShapeData(t,i,o);return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(e,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var i=0,s=this.animatedContents.length;i<s;){if(this.animatedContents[i].element===t)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t=e.styles,i,s=this.stylesList.length;for(i=0;i<s;i+=1)t.indexOf(this.stylesList[i])===-1&&!this.stylesList[i].closed&&t.push(this.stylesList[i])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,i,s,o,a,l){var c=[].concat(a),u,f=e.length-1,d,h,p=[],m=[],g,v,b;for(u=f;u>=0;u-=1){if(b=this.searchProcessedElement(e[u]),b?t[u]=i[b-1]:e[u]._render=l,e[u].ty==="fl"||e[u].ty==="st"||e[u].ty==="gf"||e[u].ty==="gs"||e[u].ty==="no")b?t[u].style.closed=e[u].hd:t[u]=this.createStyleElement(e[u],o),e[u]._render&&t[u].style.pElem.parentNode!==s&&s.appendChild(t[u].style.pElem),p.push(t[u].style);else if(e[u].ty==="gr"){if(!b)t[u]=this.createGroupElement(e[u]);else for(h=t[u].it.length,d=0;d<h;d+=1)t[u].prevViewData[d]=t[u].it[d];this.searchShapes(e[u].it,t[u].it,t[u].prevViewData,t[u].gr,o+1,c,l),e[u]._render&&t[u].gr.parentNode!==s&&s.appendChild(t[u].gr)}else e[u].ty==="tr"?(b||(t[u]=this.createTransformElement(e[u],s)),g=t[u].transform,c.push(g)):e[u].ty==="sh"||e[u].ty==="rc"||e[u].ty==="el"||e[u].ty==="sr"?(b||(t[u]=this.createShapeElement(e[u],c,o)),this.setElementStyles(t[u])):e[u].ty==="tm"||e[u].ty==="rd"||e[u].ty==="ms"||e[u].ty==="pb"||e[u].ty==="zz"||e[u].ty==="op"?(b?(v=t[u],v.closed=!1):(v=ShapeModifiers.getModifier(e[u].ty),v.init(this,e[u]),t[u]=v,this.shapeModifiers.push(v)),m.push(v)):e[u].ty==="rp"&&(b?(v=t[u],v.closed=!0):(v=ShapeModifiers.getModifier(e[u].ty),t[u]=v,v.init(this,e,u,t),this.shapeModifiers.push(v),l=!1),m.push(v));this.addProcessedElement(e[u],u+1)}for(f=p.length,u=0;u<f;u+=1)p[u].closed=!0;for(f=m.length,u=0;u<f;u+=1)m[u].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t=this.animatedContents.length,i;for(e=0;e<t;e+=1)i=this.animatedContents[e],(this._isFirstFrame||i.element._isAnimated)&&i.data!==!0&&i.fn(i.data,i.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(e,t,i,s,o,a){this.o=e,this.sw=t,this.sc=i,this.fc=s,this.m=o,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!i,fc:!!s,m:!0,p:!0}}LetterProps.prototype.update=function(e,t,i,s,o,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var l=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,l=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,l=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,l=!0),this.fc!==s&&(this.fc=s,this._mdf.fc=!0,l=!0),this.m!==o&&(this.m=o,this._mdf.m=!0,l=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,l=!0),l};function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!e)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,i=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var s,o=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(s=0;s<o;s+=1)i!==this.keysIndex?a=this.effectsSequence[s](a,a.t):a=this.effectsSequence[s](this.currentData,a.t);t!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,i=0,s=e.length;i<=s-1&&!(i===s-1||e[i+1].t>t);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],i=0,s=e.length,o,a,l=!1,c=!1,u="";i<s;)l=c,c=!1,o=e.charCodeAt(i),u=e.charAt(i),FontManager.isCombinedCharacter(o)?l=!0:o>=55296&&o<=56319?FontManager.isRegionalFlag(e,i)?u=e.substr(i,14):(a=e.charCodeAt(i+1),a>=56320&&a<=57343&&(FontManager.isModifier(o,a)?(u=e.substr(i,2),l=!0):FontManager.isFlagEmoji(e.substr(i,4))?u=e.substr(i,4):u=e.substr(i,2))):o>56319?(a=e.charCodeAt(i+1),FontManager.isVariationSelector(o)&&(l=!0)):FontManager.isZeroWidthJoiner(o)&&(l=!0,c=!0),l?(t[t.length-1]+=u,l=!1):t.push(u),i+=u.length;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,i=this.data,s=[],o,a,l,c=0,u,f=i.m.g,d=0,h=0,p=0,m=[],g=0,v=0,b,y,E=t.getFontByName(e.f),S,w=0,C=getFontProperties(E);e.fWeight=C.weight,e.fStyle=C.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var A=e.tr/1e3*e.finalSize,O;if(e.sz)for(var I=!0,L=e.sz[0],$=e.sz[1],V,W;I;){W=this.buildFinalText(e.t),V=0,g=0,a=W.length,A=e.tr/1e3*e.finalSize;var K=-1;for(o=0;o<a;o+=1)O=W[o].charCodeAt(0),l=!1,W[o]===" "?K=o:(O===13||O===3)&&(g=0,l=!0,V+=e.finalLineHeight||e.finalSize*1.2),t.chars?(S=t.getCharData(W[o],E.fStyle,E.fFamily),w=l?0:S.w*e.finalSize/100):w=t.measureText(W[o],e.f,e.finalSize),g+w>L&&W[o]!==" "?(K===-1?a+=1:o=K,V+=e.finalLineHeight||e.finalSize*1.2,W.splice(o,K===o?1:0,"\r"),K=-1,g=0):(g+=w,g+=A);V+=E.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&$<V?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=W,a=e.finalText.length,I=!1)}g=-A,w=0;var j=0,D;for(o=0;o<a;o+=1)if(l=!1,D=e.finalText[o],O=D.charCodeAt(0),O===13||O===3?(j=0,m.push(g),v=g>v?g:v,g=-2*A,u="",l=!0,p+=1):u=D,t.chars?(S=t.getCharData(D,E.fStyle,t.getFontByName(e.f).fFamily),w=l?0:S.w*e.finalSize/100):w=t.measureText(u,e.f,e.finalSize),D===" "?j+=w+A:(g+=w+A+j,j=0),s.push({l:w,an:w,add:d,n:l,anIndexes:[],val:u,line:p,animatorJustifyOffset:0}),f==2){if(d+=w,u===""||u===" "||o===a-1){for((u===""||u===" ")&&(d-=w);h<=o;)s[h].an=d,s[h].ind=c,s[h].extra=w,h+=1;c+=1,d=0}}else if(f==3){if(d+=w,u===""||o===a-1){for(u===""&&(d-=w);h<=o;)s[h].an=d,s[h].ind=c,s[h].extra=w,h+=1;d=0,c+=1}}else s[c].ind=c,s[c].extra=0,c+=1;if(e.l=s,v=g>v?g:v,m.push(g),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=m;var M=i.a,k,T;y=M.length;var P,F,N=[];for(b=0;b<y;b+=1){for(k=M[b],k.a.sc&&(e.strokeColorAnim=!0),k.a.sw&&(e.strokeWidthAnim=!0),(k.a.fc||k.a.fh||k.a.fs||k.a.fb)&&(e.fillColorAnim=!0),F=0,P=k.s.b,o=0;o<a;o+=1)T=s[o],T.anIndexes[b]=F,(P==1&&T.val!==""||P==2&&T.val!==""&&T.val!==" "||P==3&&(T.n||T.val==" "||o==a-1)||P==4&&(T.n||o==a-1))&&(k.s.rn===1&&N.push(F),F+=1);i.a[b].s.totalChars=F;var H=-1,q;if(k.s.rn===1)for(o=0;o<a;o+=1)T=s[o],H!=T.anIndexes[b]&&(H=T.anIndexes[b],q=N.splice(Math.floor(Math.random()*N.length),1)[0]),T.anIndexes[b]=q}e.yOffset=e.finalLineHeight||e.finalSize*1.2,e.ls=e.ls||0,e.ascent=E.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var i=this.copyData({},this.data.d.k[t].s);i=this.copyData(i,e),this.data.d.k[t].s=i,this.recalculate(t),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,i=Math.floor;function s(a,l){this._currentTextLength=-1,this.k=!1,this.data=l,this.elem=a,this.comp=a.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(a),this.s=PropertyFactory.getProp(a,l.s||{k:0},0,0,this),"e"in l?this.e=PropertyFactory.getProp(a,l.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(a,l.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(a,l.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(a,l.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(a,l.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(a,l.a,0,.01,this),this.dynamicProperties.length||this.getValue()}s.prototype={getMult:function(l){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var c=0,u=0,f=1,d=1;this.ne.v>0?c=this.ne.v/100:u=-this.ne.v/100,this.xe.v>0?f=1-this.xe.v/100:d=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(c,u,f,d).get,p=0,m=this.finalS,g=this.finalE,v=this.data.sh;if(v===2)g===m?p=l>=g?1:0:p=e(0,t(.5/(g-m)+(l-m)/(g-m),1)),p=h(p);else if(v===3)g===m?p=l>=g?0:1:p=1-e(0,t(.5/(g-m)+(l-m)/(g-m),1)),p=h(p);else if(v===4)g===m?p=0:(p=e(0,t(.5/(g-m)+(l-m)/(g-m),1)),p<.5?p*=2:p=1-2*(p-.5)),p=h(p);else if(v===5){if(g===m)p=0;else{var b=g-m;l=t(e(0,l+.5-m),g-m);var y=-b/2+l,E=b/2;p=Math.sqrt(1-y*y/(E*E))}p=h(p)}else v===6?(g===m?p=0:(l=t(e(0,l+.5-m),g-m),p=(1+Math.cos(Math.PI+Math.PI*2*l/(g-m)))/2),p=h(p)):(l>=i(m)&&(l-m<0?p=e(0,t(t(g,1)-(m-l),1)):p=e(0,t(g-l,1))),p=h(p));if(this.sm.v!==100){var S=this.sm.v*.01;S===0&&(S=1e-8);var w=.5-S*.5;p<w?p=0:(p=(p-w)/S,p>1&&(p=1))}return p*this.a.v},getValue:function(l){this.iterateDynamicProperties(),this._mdf=l||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,l&&this.data.r===2&&(this.e.v=this._currentTextLength);var c=this.data.r===2?1:100/this.data.totalChars,u=this.o.v/c,f=this.s.v/c+u,d=this.e.v/c+u;if(f>d){var h=f;f=d,d=h}this.finalS=f,this.finalE=d}},extendPrototype([DynamicPropertyContainer],s);function o(a,l,c){return new s(a,l)}return{getTextSelectorProp:o}}();function TextAnimatorDataProperty(e,t,i){var s={propType:!1},o=PropertyFactory.getProp,a=t.a;this.a={r:a.r?o(e,a.r,0,degToRads,i):s,rx:a.rx?o(e,a.rx,0,degToRads,i):s,ry:a.ry?o(e,a.ry,0,degToRads,i):s,sk:a.sk?o(e,a.sk,0,degToRads,i):s,sa:a.sa?o(e,a.sa,0,degToRads,i):s,s:a.s?o(e,a.s,1,.01,i):s,a:a.a?o(e,a.a,1,0,i):s,o:a.o?o(e,a.o,0,.01,i):s,p:a.p?o(e,a.p,1,0,i):s,sw:a.sw?o(e,a.sw,0,0,i):s,sc:a.sc?o(e,a.sc,1,0,i):s,fc:a.fc?o(e,a.fc,1,0,i):s,fh:a.fh?o(e,a.fh,0,0,i):s,fs:a.fs?o(e,a.fs,0,.01,i):s,fb:a.fb?o(e,a.fb,0,.01,i):s,t:a.t?o(e,a.t,0,0,i):s},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,i),this.s.t=t.s.t}function TextAnimatorProperty(e,t,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}TextAnimatorProperty.prototype.searchProperties=function(){var e,t=this._textData.a.length,i,s=PropertyFactory.getProp;for(e=0;e<t;e+=1)i=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,i,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this),p:s(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,!(!this._mdf&&!this._isFirstFrame&&!t&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var i=this._moreOptions.alignment.v,s=this._animatorsData,o=this._textData,a=this.mHelper,l=this._renderType,c=this.renderedLetters.length,u,f,d,h,p=e.l,m,g,v,b,y,E,S,w,C,A,O,I,L,$,V;if(this._hasMaskedPath){if(V=this._pathData.m,!this._pathData.n||this._pathData._mdf){var W=V.v;this._pathData.r.v&&(W=W.reverse()),m={tLength:0,segments:[]},h=W._length-1;var K;for(I=0,d=0;d<h;d+=1)K=bez.buildBezierData(W.v[d],W.v[d+1],[W.o[d][0]-W.v[d][0],W.o[d][1]-W.v[d][1]],[W.i[d+1][0]-W.v[d+1][0],W.i[d+1][1]-W.v[d+1][1]]),m.tLength+=K.segmentLength,m.segments.push(K),I+=K.segmentLength;d=h,V.v.c&&(K=bez.buildBezierData(W.v[d],W.v[0],[W.o[d][0]-W.v[d][0],W.o[d][1]-W.v[d][1]],[W.i[0][0]-W.v[0][0],W.i[0][1]-W.v[0][1]]),m.tLength+=K.segmentLength,m.segments.push(K),I+=K.segmentLength),this._pathData.pi=m}if(m=this._pathData.pi,g=this._pathData.f.v,S=0,E=1,b=0,y=!0,A=m.segments,g<0&&V.v.c)for(m.tLength<Math.abs(g)&&(g=-Math.abs(g)%m.tLength),S=A.length-1,C=A[S].points,E=C.length-1;g<0;)g+=C[E].partialLength,E-=1,E<0&&(S-=1,C=A[S].points,E=C.length-1);C=A[S].points,w=C[E-1],v=C[E],O=v.partialLength}h=p.length,u=0,f=0;var j=e.finalSize*1.2*.714,D=!0,M,k,T,P,F;P=s.length;var N,H=-1,q,Y,Q,re=g,ee=S,z=E,J=-1,te,X,se,ie,ne,pe,_e,ye,Ae="",xe=this.defaultPropsArray,ae;if(e.j===2||e.j===1){var me=0,Se=0,Te=e.j===2?-.5:-1,ve=0,Re=!0;for(d=0;d<h;d+=1)if(p[d].n){for(me&&(me+=Se);ve<d;)p[ve].animatorJustifyOffset=me,ve+=1;me=0,Re=!0}else{for(T=0;T<P;T+=1)M=s[T].a,M.t.propType&&(Re&&e.j===2&&(Se+=M.t.v*Te),k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),N.length?me+=M.t.v*N[0]*Te:me+=M.t.v*N*Te);Re=!1}for(me&&(me+=Se);ve<d;)p[ve].animatorJustifyOffset=me,ve+=1}for(d=0;d<h;d+=1){if(a.reset(),te=1,p[d].n)u=0,f+=e.yOffset,f+=D?1:0,g=re,D=!1,this._hasMaskedPath&&(S=ee,E=z,C=A[S].points,w=C[E-1],v=C[E],O=v.partialLength,b=0),Ae="",ye="",pe="",ae="",xe=this.defaultPropsArray;else{if(this._hasMaskedPath){if(J!==p[d].line){switch(e.j){case 1:g+=I-e.lineWidths[p[d].line];break;case 2:g+=(I-e.lineWidths[p[d].line])/2;break}J=p[d].line}H!==p[d].ind&&(p[H]&&(g+=p[H].extra),g+=p[d].an/2,H=p[d].ind),g+=i[0]*p[d].an*.005;var Ie=0;for(T=0;T<P;T+=1)M=s[T].a,M.p.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),N.length?Ie+=M.p.v[0]*N[0]:Ie+=M.p.v[0]*N),M.a.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),N.length?Ie+=M.a.v[0]*N[0]:Ie+=M.a.v[0]*N);for(y=!0,this._pathData.a.v&&(g=p[0].an*.5+(I-this._pathData.f.v-p[0].an*.5-p[p.length-1].an*.5)*H/(h-1),g+=this._pathData.f.v);y;)b+O>=g+Ie||!C?(L=(g+Ie-b)/v.partialLength,Y=w.point[0]+(v.point[0]-w.point[0])*L,Q=w.point[1]+(v.point[1]-w.point[1])*L,a.translate(-i[0]*p[d].an*.005,-(i[1]*j)*.01),y=!1):C&&(b+=v.partialLength,E+=1,E>=C.length&&(E=0,S+=1,A[S]?C=A[S].points:V.v.c?(E=0,S=0,C=A[S].points):(b-=v.partialLength,C=null)),C&&(w=v,v=C[E],O=v.partialLength));q=p[d].an/2-p[d].add,a.translate(-q,0,0)}else q=p[d].an/2-p[d].add,a.translate(-q,0,0),a.translate(-i[0]*p[d].an*.005,-i[1]*j*.01,0);for(T=0;T<P;T+=1)M=s[T].a,M.t.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),(u!==0||e.j!==0)&&(this._hasMaskedPath?N.length?g+=M.t.v*N[0]:g+=M.t.v*N:N.length?u+=M.t.v*N[0]:u+=M.t.v*N));for(e.strokeWidthAnim&&(se=e.sw||0),e.strokeColorAnim&&(e.sc?X=[e.sc[0],e.sc[1],e.sc[2]]:X=[0,0,0]),e.fillColorAnim&&e.fc&&(ie=[e.fc[0],e.fc[1],e.fc[2]]),T=0;T<P;T+=1)M=s[T].a,M.a.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),N.length?a.translate(-M.a.v[0]*N[0],-M.a.v[1]*N[1],M.a.v[2]*N[2]):a.translate(-M.a.v[0]*N,-M.a.v[1]*N,M.a.v[2]*N));for(T=0;T<P;T+=1)M=s[T].a,M.s.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),N.length?a.scale(1+(M.s.v[0]-1)*N[0],1+(M.s.v[1]-1)*N[1],1):a.scale(1+(M.s.v[0]-1)*N,1+(M.s.v[1]-1)*N,1));for(T=0;T<P;T+=1){if(M=s[T].a,k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),M.sk.propType&&(N.length?a.skewFromAxis(-M.sk.v*N[0],M.sa.v*N[1]):a.skewFromAxis(-M.sk.v*N,M.sa.v*N)),M.r.propType&&(N.length?a.rotateZ(-M.r.v*N[2]):a.rotateZ(-M.r.v*N)),M.ry.propType&&(N.length?a.rotateY(M.ry.v*N[1]):a.rotateY(M.ry.v*N)),M.rx.propType&&(N.length?a.rotateX(M.rx.v*N[0]):a.rotateX(M.rx.v*N)),M.o.propType&&(N.length?te+=(M.o.v*N[0]-te)*N[0]:te+=(M.o.v*N-te)*N),e.strokeWidthAnim&&M.sw.propType&&(N.length?se+=M.sw.v*N[0]:se+=M.sw.v*N),e.strokeColorAnim&&M.sc.propType)for(ne=0;ne<3;ne+=1)N.length?X[ne]+=(M.sc.v[ne]-X[ne])*N[0]:X[ne]+=(M.sc.v[ne]-X[ne])*N;if(e.fillColorAnim&&e.fc){if(M.fc.propType)for(ne=0;ne<3;ne+=1)N.length?ie[ne]+=(M.fc.v[ne]-ie[ne])*N[0]:ie[ne]+=(M.fc.v[ne]-ie[ne])*N;M.fh.propType&&(N.length?ie=addHueToRGB(ie,M.fh.v*N[0]):ie=addHueToRGB(ie,M.fh.v*N)),M.fs.propType&&(N.length?ie=addSaturationToRGB(ie,M.fs.v*N[0]):ie=addSaturationToRGB(ie,M.fs.v*N)),M.fb.propType&&(N.length?ie=addBrightnessToRGB(ie,M.fb.v*N[0]):ie=addBrightnessToRGB(ie,M.fb.v*N))}}for(T=0;T<P;T+=1)M=s[T].a,M.p.propType&&(k=s[T].s,N=k.getMult(p[d].anIndexes[T],o.a[T].s.totalChars),this._hasMaskedPath?N.length?a.translate(0,M.p.v[1]*N[0],-M.p.v[2]*N[1]):a.translate(0,M.p.v[1]*N,-M.p.v[2]*N):N.length?a.translate(M.p.v[0]*N[0],M.p.v[1]*N[1],-M.p.v[2]*N[2]):a.translate(M.p.v[0]*N,M.p.v[1]*N,-M.p.v[2]*N));if(e.strokeWidthAnim&&(pe=se<0?0:se),e.strokeColorAnim&&(_e="rgb("+Math.round(X[0]*255)+","+Math.round(X[1]*255)+","+Math.round(X[2]*255)+")"),e.fillColorAnim&&e.fc&&(ye="rgb("+Math.round(ie[0]*255)+","+Math.round(ie[1]*255)+","+Math.round(ie[2]*255)+")"),this._hasMaskedPath){if(a.translate(0,-e.ls),a.translate(0,i[1]*j*.01+f,0),this._pathData.p.v){$=(v.point[1]-w.point[1])/(v.point[0]-w.point[0]);var Fe=Math.atan($)*180/Math.PI;v.point[0]<w.point[0]&&(Fe+=180),a.rotate(-Fe*Math.PI/180)}a.translate(Y,Q,0),g-=i[0]*p[d].an*.005,p[d+1]&&H!==p[d+1].ind&&(g+=p[d].an/2,g+=e.tr*.001*e.finalSize)}else{switch(a.translate(u,f,0),e.ps&&a.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:a.translate(p[d].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[p[d].line]),0,0);break;case 2:a.translate(p[d].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[p[d].line])/2,0,0);break}a.translate(0,-e.ls),a.translate(q,0,0),a.translate(i[0]*p[d].an*.005,i[1]*j*.01,0),u+=p[d].l+e.tr*.001*e.finalSize}l==="html"?Ae=a.toCSS():l==="svg"?Ae=a.to2dCSS():xe=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],ae=te}c<=d?(F=new LetterProps(ae,pe,_e,ye,Ae,xe),this.renderedLetters.push(F),c+=1,this.lettersChangedFlag=!0):(F=this.renderedLetters[d],this.lettersChangedFlag=F.update(ae,pe,_e,ye,Ae,xe)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(e,t,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,i),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var i,s=t.length,o,a="";for(i=0;i<s;i+=1)t[i].ty==="sh"&&(o=t[i].ks.k,a+=buildShapeString(o,o.i.length,!0,e));return a},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,i,s,o){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[i]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[i])/2,0,0);break}t.translate(s,o,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(e[0]*255)+","+Math.round(e[1]*255)+","+Math.round(e[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,i){this.textSpans=[],this.renderType="svg",this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,i=e.length,s=[],o="";t<i;)e[t]==="\r"||e[t]===""?(s.push(o),o=""):o+=e[t],t+=1;return s.push(o),s},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var i=e.shapes[0];if(i.it){var s=i.it[i.it.length-1];s.s&&(s.s.k[0]=t,s.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var e,t,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var s=this.globalData.fontManager.getFontByName(i.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var o=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",o)}this.layerElement.setAttribute("aria-label",i.t);var l=i.l||[],c=!!this.globalData.fontManager.chars;t=l.length;var u,f=this.mHelper,d="",h=this.data.singleShape,p=0,m=0,g=!0,v=i.tr*.001*i.finalSize;if(h&&!c&&!i.sz){var b=this.textContainer,y="start";switch(i.j){case 1:y="end";break;case 2:y="middle";break;default:y="start";break}b.setAttribute("text-anchor",y),b.setAttribute("letter-spacing",v);var E=this.buildTextContents(i.finalText);for(t=E.length,m=i.ps?i.ps[1]+i.ascent:0,e=0;e<t;e+=1)u=this.textSpans[e].span||createNS("tspan"),u.textContent=E[e],u.setAttribute("x",0),u.setAttribute("y",m),u.style.display="inherit",b.appendChild(u),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=u,m+=i.finalLineHeight;this.layerElement.appendChild(b)}else{var S=this.textSpans.length,w;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!c||!h||e===0){if(u=S>e?this.textSpans[e].span:createNS(c?"g":"text"),S<=e){if(u.setAttribute("stroke-linecap","butt"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=u,c){var C=createNS("g");u.appendChild(C),this.textSpans[e].childSpan=C}this.textSpans[e].span=u,this.layerElement.appendChild(u)}u.style.display="inherit"}if(f.reset(),h&&(l[e].n&&(p=-v,m+=i.yOffset,m+=g?1:0,g=!1),this.applyTextPropertiesToMatrix(i,f,l[e].line,p,m),p+=l[e].l||0,p+=v),c){w=this.globalData.fontManager.getCharData(i.finalText[e],s.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily);var A;if(w.t===1)A=new SVGCompElement(w.data,this.globalData,this);else{var O=emptyShapeData;w.data&&w.data.shapes&&(O=this.buildShapeData(w.data,i.finalSize)),A=new SVGShapeElement(O,this.globalData,this)}if(this.textSpans[e].glyph){var I=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(I.layerElement),I.destroy()}this.textSpans[e].glyph=A,A._debug=!0,A.prepareFrame(0),A.renderFrame(),this.textSpans[e].childSpan.appendChild(A.layerElement),w.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else h&&u.setAttribute("transform","translate("+f.props[12]+","+f.props[13]+")"),u.textContent=l[e].val,u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&u&&u.setAttribute("d",d)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t=this.textSpans.length,i;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<t;e+=1)i=this.textSpans[e].glyph,i&&(i.prepareFrame(this.comp.renderedFrame-this.data.st),i._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,i=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;t=s.length;var o,a,l;for(e=0;e<t;e+=1)s[e].n||(o=i[e],a=this.textSpans[e].span,l=this.textSpans[e].glyph,l&&l.renderFrame(),o._mdf.m&&a.setAttribute("transform",o.m),o._mdf.o&&a.setAttribute("opacity",o.o),o._mdf.sw&&a.setAttribute("stroke-width",o.sw),o._mdf.sc&&a.setAttribute("stroke",o.sc),o._mdf.fc&&a.setAttribute("fill",o.fc))}};function ISolidElement(e,t,i){this.initElement(e,t,i)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)};function NullElement(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initFrame(),this.initTransform(e,t,i),this.initHierarchy()}NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var i=createNS("clipPath"),s=createNS("rect");s.setAttribute("width",e.w),s.setAttribute("height",e.h),s.setAttribute("x",0),s.setAttribute("y",0);var o=createElementID();i.setAttribute("id",o),i.appendChild(s),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),t.appendChild(i),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,i=this.layers.length;for(t=0;t<i;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){t[e]=!0;var i=this.createItem(this.layers[e]);if(t[e]=i,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,e),this.layers[e].tt){var s="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(s===-1)return;if(!this.elements[s]||this.elements[s]===!0)this.buildItem(s),this.addPendingElement(i);else{var o=t[s],a=o.getMatte(this.layers[e].tt);i.setMatte(a)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,i=this.elements.length;t<i;){if(this.elements[t]===e){var s="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,o=this.elements[s],a=o.getMatte(this.layers[t].tt);e.setMatte(a);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(!(this.renderedFrame===e||this.destroyed)){e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,i=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=i-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<i;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var i=e.getBaseElement();if(i){for(var s=0,o;s<t;)this.elements[s]&&this.elements[s]!==!0&&this.elements[s].getBaseElement()&&(o=this.elements[s].getBaseElement()),s+=1;o?this.layerElement.insertBefore(i,o):this.layerElement.appendChild(i)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initTransform(e,t,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var i,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=s-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(e,t,i){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(t&&t.title){var s=createNS("title"),o=createElementID();s.setAttribute("id",o),s.textContent=t.title,this.svgElement.appendChild(s),i+=o}if(t&&t.description){var a=createNS("desc"),l=createElementID();a.setAttribute("id",l),a.textContent=t.description,this.svgElement.appendChild(a),i+=" "+l}i&&this.svgElement.setAttribute("aria-labelledby",i);var c=createNS("defs");this.svgElement.appendChild(c);var u=createNS("g");this.svgElement.appendChild(u),this.layerElement=u,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:c,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(t){var i,s=t.length,o="_";for(i=0;i<s;i+=1)o+=t[i].transform.key+"_";var a=this.sequences[o];return a||(a={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[o]=a,this.sequenceList.push(a)),a},processSequence:function(t,i){for(var s=0,o=t.transforms.length,a=i;s<o&&!i;){if(t.transforms[s].transform.mProps._mdf){a=!0;break}s+=1}if(a)for(t.finalTransform.reset(),s=o-1;s>=0;s-=1)t.finalTransform.multiply(t.transforms[s].transform.mProps.v);t._mdf=a},processSequences:function(t){var i,s=this.sequenceList.length;for(i=0;i<s;i+=1)this.processSequence(this.sequenceList[i],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var t="__lottie_element_luma_buffer",i=null,s=null,o=null;function a(){var u=createNS("svg"),f=createNS("filter"),d=createNS("feColorMatrix");return f.setAttribute("id",t),d.setAttribute("type","matrix"),d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),f.appendChild(d),u.appendChild(f),u.setAttribute("id",t+"_svg"),featureSupport.svgLumaHidden&&(u.style.display="none"),u}function l(){i||(o=a(),document.body.appendChild(o),i=createTag("canvas"),s=i.getContext("2d"),s.filter="url(#"+t+")",s.fillStyle="rgba(0,0,0,0)",s.fillRect(0,0,1,1))}function c(u){return i||l(),i.width=u.width,i.height=u.height,s.filter="url(#"+t+")",i}return{load:l,get:c}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var i=createTag("canvas");return i.width=e,i.height=t,i}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(e){var t,i=e.data.ef?e.data.ef.length:0;this.filters=[];var s;for(t=0;t<i;t+=1){s=null;var o=e.data.ef[t].ty;if(registeredEffects[o]){var a=registeredEffects[o].effect;s=new a(e.effectsManager.effectElements[t],e)}s&&this.filters.push(s)}this.filters.length&&e.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(e){var t,i=this.filters.length;for(t=0;t<i;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,i=this.filters.length,s=[];for(t=0;t<i;t+=1)this.filters[t].type===e&&s.push(this.filters[t]);return s};function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i,s=this.masksProperties.length,o=!1;for(i=0;i<s;i+=1)this.masksProperties[i].mode!=="n"&&(o=!0),this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);this.hasMasks=o,o&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,i,s=this.masksProperties.length,o,a,l;for(t.beginPath(),i=0;i<s;i+=1)if(this.masksProperties[i].mode!=="n"){this.masksProperties[i].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),l=this.viewData[i].v,o=e.applyToPointArray(l.v[0][0],l.v[0][1],0),t.moveTo(o[0],o[1]);var c,u=l._length;for(c=1;c<u;c+=1)a=e.applyToTriplePoints(l.o[c-1],l.i[c],l.v[c]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=e.applyToTriplePoints(l.o[c-1],l.i[0],l.v[0]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),t.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var t=this.globalData.canvasContext,i=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(i);var s=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var i=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=i}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0],i=t.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],i=t.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var s=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(s.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var o=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=o.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(o,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var i=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(i),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(i),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(e,t,i,s){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var o=4;t.ty==="rc"?o=5:t.ty==="el"?o=6:t.ty==="sr"&&(o=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,o,e);var a,l=i.length,c;for(a=0;a<l;a+=1)i[a].closed||(c={transforms:s.addTransformSequence(i[a].transforms),trNodes:[]},this.styledShapes.push(c),i[a].elements.push(c))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var i={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},s={};if(e.ty==="fl"||e.ty==="st"?(s.c=PropertyFactory.getProp(this,e.c,1,255,this),s.c.k||(i.co="rgb("+bmFloor(s.c.v[0])+","+bmFloor(s.c.v[1])+","+bmFloor(s.c.v[2])+")")):(e.ty==="gf"||e.ty==="gs")&&(s.s=PropertyFactory.getProp(this,e.s,1,null,this),s.e=PropertyFactory.getProp(this,e.e,1,null,this),s.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),s.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),s.g=new GradientProperty(this,e.g,this)),s.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty==="st"||e.ty==="gs"){if(i.lc=lineCapEnum[e.lc||2],i.lj=lineJoinEnum[e.lj||2],e.lj==1&&(i.ml=e.ml),s.w=PropertyFactory.getProp(this,e.w,0,null,this),s.w.k||(i.wi=s.w.v),e.d){var o=new DashProperty(this,e.d,"canvas",this);s.d=o,s.d.k||(i.da=s.d.dashArray,i.do=s.d.dashoffset[0])}}else i.r=e.r===2?"evenodd":"nonzero";return this.stylesList.push(i),s.style=i,s},CVShapeElement.prototype.createGroupElement=function(){var e={it:[],prevViewData:[]};return e},CVShapeElement.prototype.createTransformElement=function(e){var t={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}};return t},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,i=this.stylesList.length;for(t=0;t<i;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,i=e.length;for(t=0;t<i;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,i,s,o){var a,l=e.length-1,c,u,f=[],d=[],h,p,m,g=[].concat(o);for(a=l;a>=0;a-=1){if(h=this.searchProcessedElement(e[a]),h?t[a]=i[h-1]:e[a]._shouldRender=s,e[a].ty==="fl"||e[a].ty==="st"||e[a].ty==="gf"||e[a].ty==="gs")h?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],g),f.push(t[a].style);else if(e[a].ty==="gr"){if(!h)t[a]=this.createGroupElement(e[a]);else for(u=t[a].it.length,c=0;c<u;c+=1)t[a].prevViewData[c]=t[a].it[c];this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,s,g)}else e[a].ty==="tr"?(h||(m=this.createTransformElement(e[a]),t[a]=m),g.push(t[a]),this.addTransformToStyleList(t[a])):e[a].ty==="sh"||e[a].ty==="rc"||e[a].ty==="el"||e[a].ty==="sr"?h||(t[a]=this.createShapeElement(e[a])):e[a].ty==="tm"||e[a].ty==="rd"||e[a].ty==="pb"||e[a].ty==="zz"||e[a].ty==="op"?(h?(p=t[a],p.closed=!1):(p=ShapeModifiers.getModifier(e[a].ty),p.init(this,e[a]),t[a]=p,this.shapeModifiers.push(p)),d.push(p)):e[a].ty==="rp"&&(h?(p=t[a],p.closed=!0):(p=ShapeModifiers.getModifier(e[a].ty),t[a]=p,p.init(this,e,a,t),this.shapeModifiers.push(p),s=!1),d.push(p));this.addProcessedElement(e[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),l=d.length,a=0;a<l;a+=1)d[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t=this.stylesList.length,i,s,o,a,l,c,u=this.globalData.renderer,f=this.globalData.canvasContext,d,h;for(e=0;e<t;e+=1)if(h=this.stylesList[e],d=h.type,!((d==="st"||d==="gs")&&h.wi===0||!h.data._shouldRender||h.coOp===0||this.globalData.currentGlobalAlpha===0)){for(u.save(),l=h.elements,d==="st"||d==="gs"?(u.ctxStrokeStyle(d==="st"?h.co:h.grd),u.ctxLineWidth(h.wi),u.ctxLineCap(h.lc),u.ctxLineJoin(h.lj),u.ctxMiterLimit(h.ml||0)):u.ctxFillStyle(d==="fl"?h.co:h.grd),u.ctxOpacity(h.coOp),d!=="st"&&d!=="gs"&&f.beginPath(),u.ctxTransform(h.preTransforms.finalTransform.props),s=l.length,i=0;i<s;i+=1){for((d==="st"||d==="gs")&&(f.beginPath(),h.da&&(f.setLineDash(h.da),f.lineDashOffset=h.do)),c=l[i].trNodes,a=c.length,o=0;o<a;o+=1)c[o].t==="m"?f.moveTo(c[o].p[0],c[o].p[1]):c[o].t==="c"?f.bezierCurveTo(c[o].pts[0],c[o].pts[1],c[o].pts[2],c[o].pts[3],c[o].pts[4],c[o].pts[5]):f.closePath();(d==="st"||d==="gs")&&(u.ctxStroke(),h.da&&f.setLineDash(this.dashResetter))}d!=="st"&&d!=="gs"&&this.globalData.renderer.ctxFill(h.r),u.restore()}},CVShapeElement.prototype.renderShape=function(e,t,i,s){var o,a=t.length-1,l;for(l=e,o=a;o>=0;o-=1)t[o].ty==="tr"?(l=i[o].transform,this.renderShapeTransform(e,l)):t[o].ty==="sh"||t[o].ty==="el"||t[o].ty==="rc"||t[o].ty==="sr"?this.renderPath(t[o],i[o]):t[o].ty==="fl"?this.renderFill(t[o],i[o],l):t[o].ty==="st"?this.renderStroke(t[o],i[o],l):t[o].ty==="gf"||t[o].ty==="gs"?this.renderGradientFill(t[o],i[o],l):t[o].ty==="gr"?this.renderShape(l,t[o].it,i[o].it):t[o].ty;s&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var i=e.trNodes,s=t.paths,o,a,l,c=s._length;i.length=0;var u=e.transforms.finalTransform;for(l=0;l<c;l+=1){var f=s.shapes[l];if(f&&f.v){for(a=f._length,o=1;o<a;o+=1)o===1&&i.push({t:"m",p:u.applyToPointArray(f.v[0][0],f.v[0][1],0)}),i.push({t:"c",pts:u.applyToTriplePoints(f.o[o-1],f.i[o],f.v[o])});a===1&&i.push({t:"m",p:u.applyToPointArray(f.v[0][0],f.v[0][1],0)}),f.c&&a&&(i.push({t:"c",pts:u.applyToTriplePoints(f.o[o-1],f.i[0],f.v[0])}),i.push({t:"z"}))}}e.trNodes=i}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var i,s=t.styledShapes.length;for(i=0;i<s;i+=1)this.renderStyledShape(t.styledShapes[i],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,i){var s=t.style;(t.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i._opMdf||this._isFirstFrame)&&(s.coOp=t.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,i){var s=t.style,o;if(!s.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var a=this.globalData.canvasContext,l=t.s.v,c=t.e.v;if(e.t===1)o=a.createLinearGradient(l[0],l[1],c[0],c[1]);else{var u=Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)),f=Math.atan2(c[1]-l[1],c[0]-l[0]),d=t.h.v;d>=1?d=.99:d<=-1&&(d=-.99);var h=u*d,p=Math.cos(f+t.a.v)*h+l[0],m=Math.sin(f+t.a.v)*h+l[1];o=a.createRadialGradient(p,m,0,l[0],l[1],u)}var g,v=e.g.p,b=t.g.c,y=1;for(g=0;g<v;g+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[g*2+1]),o.addColorStop(b[g*4]/100,"rgba("+b[g*4+1]+","+b[g*4+2]+","+b[g*4+3]+","+y+")");s.grd=o}s.coOp=t.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(e,t,i){var s=t.style,o=t.d;o&&(o._mdf||this._isFirstFrame)&&(s.da=o.dashArray,s.do=o.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||i._opMdf||this._isFirstFrame)&&(s.coOp=t.o.v*i.opacity),(t.w._mdf||this._isFirstFrame)&&(s.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(e,t,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var i=!1;e.sc&&(i=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var s=this.globalData.fontManager.getFontByName(e.f),o,a,l=e.l,c=this.mHelper;this.stroke=i,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var u,f,d,h,p,m,g,v,b,y,E=this.data.singleShape,S=e.tr*.001*e.finalSize,w=0,C=0,A=!0,O=0;for(o=0;o<a;o+=1){u=this.globalData.fontManager.getCharData(e.finalText[o],s.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),f=u&&u.data||{},c.reset(),E&&l[o].n&&(w=-S,C+=e.yOffset,C+=A?1:0,A=!1),p=f.shapes?f.shapes[0].it:[],g=p.length,c.scale(e.finalSize/100,e.finalSize/100),E&&this.applyTextPropertiesToMatrix(e,c,l[o].line,w,C),b=createSizedArray(g-1);var I=0;for(m=0;m<g;m+=1)if(p[m].ty==="sh"){for(h=p[m].ks.k.i.length,v=p[m].ks.k,y=[],d=1;d<h;d+=1)d===1&&y.push(c.applyToX(v.v[0][0],v.v[0][1],0),c.applyToY(v.v[0][0],v.v[0][1],0)),y.push(c.applyToX(v.o[d-1][0],v.o[d-1][1],0),c.applyToY(v.o[d-1][0],v.o[d-1][1],0),c.applyToX(v.i[d][0],v.i[d][1],0),c.applyToY(v.i[d][0],v.i[d][1],0),c.applyToX(v.v[d][0],v.v[d][1],0),c.applyToY(v.v[d][0],v.v[d][1],0));y.push(c.applyToX(v.o[d-1][0],v.o[d-1][1],0),c.applyToY(v.o[d-1][0],v.o[d-1][1],0),c.applyToX(v.i[0][0],v.i[0][1],0),c.applyToY(v.i[0][0],v.i[0][1],0),c.applyToX(v.v[0][0],v.v[0][1],0),c.applyToY(v.v[0][0],v.v[0][1],0)),b[I]=y,I+=1}E&&(w+=l[o].l,w+=S),this.textSpans[O]?this.textSpans[O].elem=b:this.textSpans[O]={elem:b},O+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var e=this.canvasContext;e.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var t,i,s,o,a,l,c=this.textAnimator.renderedLetters,u=this.textProperty.currentData.l;i=u.length;var f,d=null,h=null,p=null,m,g,v=this.globalData.renderer;for(t=0;t<i;t+=1)if(!u[t].n){if(f=c[t],f&&(v.save(),v.ctxTransform(f.p),v.ctxOpacity(f.o)),this.fill){for(f&&f.fc?d!==f.fc&&(v.ctxFillStyle(f.fc),d=f.fc):d!==this.values.fill&&(d=this.values.fill,v.ctxFillStyle(this.values.fill)),m=this.textSpans[t].elem,o=m.length,this.globalData.canvasContext.beginPath(),s=0;s<o;s+=1)for(g=m[s],l=g.length,this.globalData.canvasContext.moveTo(g[0],g[1]),a=2;a<l;a+=6)this.globalData.canvasContext.bezierCurveTo(g[a],g[a+1],g[a+2],g[a+3],g[a+4],g[a+5]);this.globalData.canvasContext.closePath(),v.ctxFill()}if(this.stroke){for(f&&f.sw?p!==f.sw&&(p=f.sw,v.ctxLineWidth(f.sw)):p!==this.values.sWidth&&(p=this.values.sWidth,v.ctxLineWidth(this.values.sWidth)),f&&f.sc?h!==f.sc&&(h=f.sc,v.ctxStrokeStyle(f.sc)):h!==this.values.stroke&&(h=this.values.stroke,v.ctxStrokeStyle(this.values.stroke)),m=this.textSpans[t].elem,o=m.length,this.globalData.canvasContext.beginPath(),s=0;s<o;s+=1)for(g=m[s],l=g.length,this.globalData.canvasContext.moveTo(g[0],g[1]),a=2;a<l;a+=6)this.globalData.canvasContext.bezierCurveTo(g[a],g[a+1],g[a+2],g[a+3],g[a+4],g[a+5]);this.globalData.canvasContext.closePath(),v.ctxStroke()}f&&this.globalData.renderer.restore()}};function CVImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t=e.getContext("2d"),i=this.img.width,s=this.img.height,o=i/s,a=this.assetData.w/this.assetData.h,l,c,u=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o>a&&u==="xMidYMid slice"||o<a&&u!=="xMidYMid slice"?(c=s,l=c*a):(l=i,c=l/a),t.drawImage(this.img,(i-l)/2,(s-c)/2,l,c,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(e,t,i){this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,i,s){this.canvasContext.fillRect(e,t,i,s)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var i="0px 0px 0px";t.transformOrigin=i,t.mozTransformOrigin=i,t.webkitTransformOrigin=i,t["-webkit-transform"]=i,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){this.reset();var i,s;e?(i=e,s=t,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=s):(this.animationItem.wrapper&&this.animationItem.container?(i=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight):(i=this.canvasContext.canvas.width,s=this.canvasContext.canvas.height),this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=s*this.renderConfig.dpr);var o,a;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var l=this.renderConfig.preserveAspectRatio.split(" "),c=l[1]||"meet",u=l[0]||"xMidYMid",f=u.substr(0,4),d=u.substr(4);o=i/s,a=this.transformCanvas.w/this.transformCanvas.h,a>o&&c==="meet"||a<o&&c==="slice"?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr)),f==="xMid"&&(a<o&&c==="meet"||a>o&&c==="slice")?this.transformCanvas.tx=(i-this.transformCanvas.w*(s/this.transformCanvas.h))/2*this.renderConfig.dpr:f==="xMax"&&(a<o&&c==="meet"||a>o&&c==="slice")?this.transformCanvas.tx=(i-this.transformCanvas.w*(s/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,d==="YMid"&&(a>o&&c==="meet"||a<o&&c==="slice")?this.transformCanvas.ty=(s-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr:d==="YMax"&&(a>o&&c==="meet"||a<o&&c==="slice")?this.transformCanvas.ty=(s-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var e,t=this.layers?this.layers.length:0;for(e=t-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var i,s=this.layers.length;for(this.completeLayers||this.checkLayers(e),i=s-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(e-this.layers[i].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=s-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var i=this.createItem(this.layers[e],this,this.globalData);t[e]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var e,t=15;for(e=0;e<t;e+=1){var i=new CanvasContext;this.stack[e]=i}this._length=t,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var e=this._length*2,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t=this.stack[this.cArrPos],i=t.transform,s,o=this.cTr.props;for(s=0;s<16;s+=1)o[s]=i[s];if(e){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),(e||t.opacity!==-1&&this.currentOpacity!==t.opacity)&&(this.nativeContext.globalAlpha=t.opacity,this.currentOpacity=t.opacity),this.currentFillStyle=t.fillStyle,this.currentStrokeStyle=t.strokeStyle,this.currentLineWidth=t.lineWidth,this.currentLineCap=t.lineCap,this.currentLineJoin=t.lineJoin,this.currentMiterLimit=t.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var i=this.stack[this.cArrPos],s;for(s=0;s<16;s+=1)i.transform[s]=t[s];this.cArrPos+=1;var o=this.stack[this.cArrPos];o.opacity=i.opacity,o.fillStyle=i.fillStyle,o.strokeStyle=i.strokeStyle,o.lineWidth=i.lineWidth,o.lineCap=i.lineCap,o.lineJoin=i.lineJoin,o.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var i=t.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,i,s){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,i,s)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(e,t,i){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();var t,i=this.layers.length;for(t=i-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var e,t=this.layers.length;for(e=t-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var i=this.finalTransform.mat.toCSS();t.transform=i,t.webkitTransform=i}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(e,t,i){this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?(e=createNS("rect"),e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(e=createTag("div"),e.style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)};function HShapeElement(e,t,i){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var i,s=e.length;for(i=0;i<s;i+=1)t=e[i].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var i=e.sh.v,s=e.transformers,o,a=i._length,l,c,u,f;if(!(a<=1)){for(o=0;o<a-1;o+=1)l=this.getTransformedPoint(s,i.v[o]),c=this.getTransformedPoint(s,i.o[o]),u=this.getTransformedPoint(s,i.i[o+1]),f=this.getTransformedPoint(s,i.v[o+1]),this.checkBounds(l,c,u,f,t);i.c&&(l=this.getTransformedPoint(s,i.v[o]),c=this.getTransformedPoint(s,i.o[o]),u=this.getTransformedPoint(s,i.i[0]),f=this.getTransformedPoint(s,i.v[0]),this.checkBounds(l,c,u,f,t))}},HShapeElement.prototype.checkBounds=function(e,t,i,s,o){this.getBoundsOfCurve(e,t,i,s);var a=this.shapeBoundingBox;o.x=bmMin(a.left,o.x),o.xMax=bmMax(a.right,o.xMax),o.y=bmMin(a.top,o.y),o.yMax=bmMax(a.bottom,o.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,i,s){for(var o=[[e[0],s[0]],[e[1],s[1]]],a,l,c,u,f,d,h,p=0;p<2;++p)l=6*e[p]-12*t[p]+6*i[p],a=-3*e[p]+9*t[p]-9*i[p]+3*s[p],c=3*t[p]-3*e[p],l|=0,a|=0,c|=0,a===0&&l===0||(a===0?(u=-c/l,u>0&&u<1&&o[p].push(this.calculateF(u,e,t,i,s,p))):(f=l*l-4*c*a,f>=0&&(d=(-l+bmSqrt(f))/(2*a),d>0&&d<1&&o[p].push(this.calculateF(d,e,t,i,s,p)),h=(-l-bmSqrt(f))/(2*a),h>0&&h<1&&o[p].push(this.calculateF(h,e,t,i,s,p)))));this.shapeBoundingBox.left=bmMin.apply(null,o[0]),this.shapeBoundingBox.top=bmMin.apply(null,o[1]),this.shapeBoundingBox.right=bmMax.apply(null,o[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,o[1])},HShapeElement.prototype.calculateF=function(e,t,i,s,o,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*i[a]+3*(1-e)*bmPow(e,2)*s[a]+bmPow(e,3)*o[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var i,s=e.length;for(i=0;i<s;i+=1)e[i]&&e[i].sh?this.calculateShapeBoundingBox(e[i],t):e[i]&&e[i].it?this.calculateBoundingBox(e[i].it,t):e[i]&&e[i].style&&e[i].w&&this.expandStrokeBoundingBox(e[i].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var i=0;if(e.keyframes){for(var s=0;s<e.keyframes.length;s+=1){var o=e.keyframes[s].s;o>i&&(i=o)}i*=e.mult}else i=e.v*e.mult;t.x-=i,t.xMax+=i,t.y-=i,t.yMax+=i},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var i=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),i=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),i=!0),i||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var s=this.shapeCont.style,o="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";s.transform=o,s.webkitTransform=o}}};function HTextElement(e,t,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,i=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=i,t.color=i,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var s=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{t.fontFamily=s.fFamily;var o=e.fWeight,a=e.fStyle;t.fontStyle=a,t.fontWeight=o}var l,c,u=e.l;c=u.length;var f,d,h,p=this.mHelper,m,g="",v=0;for(l=0;l<c;l+=1){if(this.globalData.fontManager.chars?(this.textPaths[v]?f=this.textPaths[v]:(f=createNS("path"),f.setAttribute("stroke-linecap",lineCapEnum[1]),f.setAttribute("stroke-linejoin",lineJoinEnum[2]),f.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[v]?(d=this.textSpans[v],h=d.children[0]):(d=createTag("div"),d.style.lineHeight=0,h=createNS("svg"),h.appendChild(f),styleDiv(d)))):this.isMasked?f=this.textPaths[v]?this.textPaths[v]:createNS("text"):this.textSpans[v]?(d=this.textSpans[v],f=this.textPaths[v]):(d=createTag("span"),styleDiv(d),f=createTag("span"),styleDiv(f),d.appendChild(f)),this.globalData.fontManager.chars){var b=this.globalData.fontManager.getCharData(e.finalText[l],s.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),y;if(b?y=b.data:y=null,p.reset(),y&&y.shapes&&y.shapes.length&&(m=y.shapes[0].it,p.scale(e.finalSize/100,e.finalSize/100),g=this.createPathShape(p,m),f.setAttribute("d",g)),this.isMasked)this.innerElem.appendChild(f);else{if(this.innerElem.appendChild(d),y&&y.shapes){document.body.appendChild(h);var E=h.getBBox();h.setAttribute("width",E.width+2),h.setAttribute("height",E.height+2),h.setAttribute("viewBox",E.x-1+" "+(E.y-1)+" "+(E.width+2)+" "+(E.height+2));var S=h.style,w="translate("+(E.x-1)+"px,"+(E.y-1)+"px)";S.transform=w,S.webkitTransform=w,u[l].yOffset=E.y-1}else h.setAttribute("width",1),h.setAttribute("height",1);d.appendChild(h)}}else if(f.textContent=u[l].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(f);else{this.innerElem.appendChild(d);var C=f.style,A="translate3d(0,"+-e.finalSize/1.2+"px,0)";C.transform=A,C.webkitTransform=A}this.isMasked?this.textSpans[v]=f:this.textSpans[v]=d,this.textSpans[v].style.display="block",this.textPaths[v]=f,v+=1}for(;v<this.textSpans.length;)this.textSpans[v].style.display="none",v+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var e;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var i,s,o=0,a=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;s=l.length;var c,u,f;for(i=0;i<s;i+=1)l[i].n?o+=1:(u=this.textSpans[i],f=this.textPaths[i],c=a[o],o+=1,c._mdf.m&&(this.isMasked?u.setAttribute("transform",c.m):(u.style.webkitTransform=c.m,u.style.transform=c.m)),u.style.opacity=c.o,c.sw&&c._mdf.sw&&f.setAttribute("stroke-width",c.sw),c.sc&&c._mdf.sc&&f.setAttribute("stroke",c.sc),c.fc&&c._mdf.fc&&(f.setAttribute("fill",c.fc),f.style.color=c.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var d=this.innerElem.getBBox();this.currentBBox.w!==d.width&&(this.currentBBox.w=d.width,this.svgElement.setAttribute("width",d.width)),this.currentBBox.h!==d.height&&(this.currentBBox.h=d.height,this.svgElement.setAttribute("height",d.height));var h=1;if(this.currentBBox.w!==d.width+h*2||this.currentBBox.h!==d.height+h*2||this.currentBBox.x!==d.x-h||this.currentBBox.y!==d.y-h){this.currentBBox.w=d.width+h*2,this.currentBBox.h=d.height+h*2,this.currentBBox.x=d.x-h,this.currentBBox.y=d.y-h,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var p="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=p,e.webkitTransform=p}}}};function HCameraElement(e,t,i){this.initFrame(),this.initBaseData(e,t,i),this.initHierarchy();var s=PropertyFactory.getProp;if(this.pe=s(this,e.pe,0,0,this),e.ks.p.s?(this.px=s(this,e.ks.p.x,1,0,this),this.py=s(this,e.ks.p.y,1,0,this),this.pz=s(this,e.ks.p.z,1,0,this)):this.p=s(this,e.ks.p,1,0,this),e.ks.a&&(this.a=s(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var o,a=e.ks.or.k.length;for(o=0;o<a;o+=1)e.ks.or.k[o].to=null,e.ks.or.k[o].ti=null}this.or=s(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=s(this,e.ks.rx,0,degToRads,this),this.ry=s(this,e.ks.ry,0,degToRads,this),this.rz=s(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t=this.comp.threeDElements.length,i,s,o;for(e=0;e<t;e+=1)if(i=this.comp.threeDElements[e],i.type==="3d"){s=i.perspectiveElem.style,o=i.container.style;var a=this.pe.v+"px",l="0px 0px 0px",c="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.perspective=a,s.webkitPerspective=a,o.transformOrigin=l,o.mozTransformOrigin=l,o.webkitTransformOrigin=l,s.transform=c,s.webkitTransform=c}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e=this._isFirstFrame,t,i;if(this.hierarchy)for(i=this.hierarchy.length,t=0;t<i;t+=1)e=this.hierarchy[t].finalTransform.mProp._mdf||e;if(e||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(i=this.hierarchy.length-1,t=i;t>=0;t-=1){var s=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-s.p.v[0],-s.p.v[1],s.p.v[2]),this.mat.rotateX(-s.or.v[0]).rotateY(-s.or.v[1]).rotateZ(s.or.v[2]),this.mat.rotateX(-s.rx.v).rotateY(-s.ry.v).rotateZ(s.rz.v),this.mat.scale(1/s.s.v[0],1/s.s.v[1],1/s.s.v[2]),this.mat.translate(s.a.v[0],s.a.v[1],s.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var o;this.p?o=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:o=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(o[0],2)+Math.pow(o[1],2)+Math.pow(o[2],2)),l=[o[0]/a,o[1]/a,o[2]/a],c=Math.sqrt(l[2]*l[2]+l[0]*l[0]),u=Math.atan2(l[1],c),f=Math.atan2(l[0],-l[2]);this.mat.rotateY(f).rotateX(-u)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var d=!this._prevMat.equals(this.mat);if((d||this.pe._mdf)&&this.comp.threeDElements){i=this.comp.threeDElements.length;var h,p,m;for(t=0;t<i;t+=1)if(h=this.comp.threeDElements[t],h.type==="3d"){if(d){var g=this.mat.toCSS();m=h.container.style,m.transform=g,m.webkitTransform=g}this.pe._mdf&&(p=h.perspectiveElem.style,p.perspective=this.pe.v+"px",p.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(e,t,i){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(e,t){var i=e.getBaseElement();if(i){var s=this.layers[t];if(!s.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(i,t);else{for(var o=0,a,l,c;o<t;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement&&(l=this.elements[o],c=this.layers[o].ddd?this.getThreeDContainerByPos(o):l.getBaseElement(),a=c||a),o+=1;a?(!s.ddd||!this.supports3d)&&this.layerElement.insertBefore(i,a):(!s.ddd||!this.supports3d)&&this.layerElement.appendChild(i)}else this.addTo3dContainer(i,t)}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,i=this.threeDElements.length;t<i;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var i=createTag("div"),s,o;styleDiv(i);var a=createTag("div");if(styleDiv(a),t==="3d"){s=i.style,s.width=this.globalData.compSize.w+"px",s.height=this.globalData.compSize.h+"px";var l="50% 50%";s.webkitTransformOrigin=l,s.mozTransformOrigin=l,s.transformOrigin=l,o=a.style;var c="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";o.transform=c,o.webkitTransform=c}i.appendChild(a);var u={container:a,perspectiveElem:i,startPos:e,endPos:e,type:t};return this.threeDElements.push(u),u},HybridRendererBase.prototype.build3dContainers=function(){var e,t=this.layers.length,i,s="";for(e=0;e<t;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(s!=="3d"&&(s="3d",i=this.createThreeDContainer(e,"3d")),i.endPos=Math.max(i.endPos,e)):(s!=="2d"&&(s="2d",i=this.createThreeDContainer(e,"2d")),i.endPos=Math.max(i.endPos,e));for(t=this.threeDElements.length,e=t-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var i=0,s=this.threeDElements.length;i<s;){if(t<=this.threeDElements[i].endPos){for(var o=this.threeDElements[i].startPos,a;o<t;)this.elements[o]&&this.elements[o].getBaseElement&&(a=this.elements[o].getBaseElement()),o+=1;a?this.threeDElements[i].container.insertBefore(e,a):this.threeDElements[i].container.appendChild(e);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),i=this.animationItem.wrapper,s=t.style;s.width=e.w+"px",s.height=e.h+"px",this.resizerElem=t,styleDiv(t),s.transformStyle="flat",s.mozTransformStyle="flat",s.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),i.appendChild(t),s.overflow="hidden";var o=createNS("svg");o.setAttribute("width","1"),o.setAttribute("height","1"),styleDiv(o),this.resizerElem.appendChild(o);var a=createNS("defs");o.appendChild(a),this.data=e,this.setupGlobalData(e,o),this.globalData.defs=a,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e=this.animationItem.wrapper.offsetWidth,t=this.animationItem.wrapper.offsetHeight,i=e/t,s=this.globalData.compSize.w/this.globalData.compSize.h,o,a,l,c;s>i?(o=e/this.globalData.compSize.w,a=e/this.globalData.compSize.w,l=0,c=(t-this.globalData.compSize.h*(e/this.globalData.compSize.w))/2):(o=t/this.globalData.compSize.h,a=t/this.globalData.compSize.h,l=(e-this.globalData.compSize.w*(t/this.globalData.compSize.h))/2,c=0);var u=this.resizerElem.style;u.webkitTransform="matrix3d("+o+",0,0,0,0,"+a+",0,0,0,0,1,0,"+l+","+c+",0,1)",u.transform=u.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e=this.globalData.compSize.w,t=this.globalData.compSize.h,i,s=this.threeDElements.length;for(i=0;i<s;i+=1){var o=this.threeDElements[i].perspectiveElem.style;o.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(t,2))+"px",o.perspective=o.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,i=e.length,s=createTag("div");for(t=0;t<i;t+=1)if(e[t].xt){var o=this.createComp(e[t],s,this.globalData.comp,null);o.initExpressions(),this.globalData.projectInterface.registerComposition(o)}};function HCompElement(e,t,i){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,i),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var i=0,s;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(s=this.elements[i].getBaseElement()),i+=1;s?this.layerElement.insertBefore(e,s):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(){return function(e){function t(i){for(var s=0,o=e.layers.length;s<o;){if(e.layers[s].nm===i||e.layers[s].ind===i)return e.elements[s].layerInterface;s+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t}}();function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(e)}function seedRandom(e,t){var i=this,s=256,o=6,a=52,l="random",c=t.pow(s,o),u=t.pow(2,a),f=u*2,d=s-1,h;function p(S,w,C){var A=[];w=w===!0?{entropy:!0}:w||{};var O=b(v(w.entropy?[S,E(e)]:S===null?y():S,3),A),I=new m(A),L=function(){for(var V=I.g(o),W=c,K=0;V<u;)V=(V+K)*s,W*=s,K=I.g(1);for(;V>=f;)V/=2,W/=2,K>>>=1;return(V+K)/W};return L.int32=function(){return I.g(4)|0},L.quick=function(){return I.g(4)/4294967296},L.double=L,b(E(I.S),e),(w.pass||C||function($,V,W,K){return K&&(K.S&&g(K,I),$.state=function(){return g(I,{})}),W?(t[l]=$,V):$})(L,O,"global"in w?w.global:this==t,w.state)}t["seed"+l]=p;function m(S){var w,C=S.length,A=this,O=0,I=A.i=A.j=0,L=A.S=[];for(C||(S=[C++]);O<s;)L[O]=O++;for(O=0;O<s;O++)L[O]=L[I=d&I+S[O%C]+(w=L[O])],L[I]=w;A.g=function($){for(var V,W=0,K=A.i,j=A.j,D=A.S;$--;)V=D[K=d&K+1],W=W*s+D[d&(D[K]=D[j=d&j+V])+(D[j]=V)];return A.i=K,A.j=j,W}}function g(S,w){return w.i=S.i,w.j=S.j,w.S=S.S.slice(),w}function v(S,w){var C=[],A=_typeof$2(S),O;if(w&&A=="object")for(O in S)try{C.push(v(S[O],w-1))}catch{}return C.length?C:A=="string"?S:S+"\0"}function b(S,w){for(var C=S+"",A,O=0;O<C.length;)w[d&O]=d&(A^=w[d&O]*19)+C.charCodeAt(O++);return E(w)}function y(){try{var S=new Uint8Array(s);return(i.crypto||i.msCrypto).getRandomValues(S),E(S)}catch{var w=i.navigator,C=w&&w.plugins;return[+new Date,i,C,i.screen,E(e)]}}function E(S){return String.fromCharCode.apply(0,S)}b(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e==="number"||t instanceof Number||e==="boolean"||e==="string"}function $bm_neg(e){var t=_typeof$1(e);if(t==="number"||e instanceof Number||t==="boolean")return-e;if($bm_isInstanceOfArray(e)){var i,s=e.length,o=[];for(i=0;i<s;i+=1)o[i]=-e[i];return o}return e.propType?e.v:-e}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t)||i==="string"||s==="string")return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t))return e=e.slice(0),e[0]+=t,e;if(isNumerable(i,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,a=e.length,l=t.length,c=[];o<a||o<l;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?c[o]=e[o]+t[o]:c[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return c}return 0}var add=sum;function sub(e,t){var i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t))return i==="string"&&(e=parseInt(e,10)),s==="string"&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t))return e=e.slice(0),e[0]-=t,e;if(isNumerable(i,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,a=e.length,l=t.length,c=[];o<a||o<l;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?c[o]=e[o]-t[o]:c[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return c}return 0}function mul(e,t){var i=_typeof$1(e),s=_typeof$1(t),o;if(isNumerable(i,e)&&isNumerable(s,t))return e*t;var a,l;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(l=e.length,o=createTypedArray("float32",l),a=0;a<l;a+=1)o[a]=e[a]*t;return o}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(l=t.length,o=createTypedArray("float32",l),a=0;a<l;a+=1)o[a]=e*t[a];return o}return 0}function div(e,t){var i=_typeof$1(e),s=_typeof$1(t),o;if(isNumerable(i,e)&&isNumerable(s,t))return e/t;var a,l;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(l=e.length,o=createTypedArray("float32",l),a=0;a<l;a+=1)o[a]=e[a]/t;return o}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(l=t.length,o=createTypedArray("float32",l),a=0;a<l;a+=1)o[a]=e/t[a];return o}return 0}function mod(e,t){return typeof e=="string"&&(e=parseInt(e,10)),typeof t=="string"&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,i){if(t>i){var s=i;i=t,t=s}return Math.min(Math.max(e,t),i)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e=="number"||e instanceof Number)return t=t||0,Math.abs(e-t);t||(t=helperLengthArray);var i,s=Math.min(e.length,t.length),o=0;for(i=0;i<s;i+=1)o+=Math.pow(t[i]-e[i],2);return Math.sqrt(o)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t=e[0],i=e[1],s=e[2],o=Math.max(t,i,s),a=Math.min(t,i,s),l,c,u=(o+a)/2;if(o===a)l=0,c=0;else{var f=o-a;switch(c=u>.5?f/(2-o-a):f/(o+a),o){case t:l=(i-s)/f+(i<s?6:0);break;case i:l=(s-t)/f+2;break;case s:l=(t-i)/f+4;break}l/=6}return[l,c,u,e[3]]}function hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function hslToRgb(e){var t=e[0],i=e[1],s=e[2],o,a,l;if(i===0)o=s,l=s,a=s;else{var c=s<.5?s*(1+i):s+i-s*i,u=2*s-c;o=hue2rgb(u,c,t+1/3),a=hue2rgb(u,c,t),l=hue2rgb(u,c,t-1/3)}return[o,a,l,e[3]]}function linear(e,t,i,s,o){if((s===void 0||o===void 0)&&(s=t,o=i,t=0,i=1),i<t){var a=i;i=t,t=a}if(e<=t)return s;if(e>=i)return o;var l=i===t?0:(e-t)/(i-t);if(!s.length)return s+(o-s)*l;var c,u=s.length,f=createTypedArray("float32",u);for(c=0;c<u;c+=1)f[c]=s[c]+(o[c]-s[c])*l;return f}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var i,s=t.length;e||(e=createTypedArray("float32",s));var o=createTypedArray("float32",s),a=BMMath.random();for(i=0;i<s;i+=1)o[i]=e[i]+a*(t[i]-e[i]);return o}e===void 0&&(e=0);var l=BMMath.random();return e+l*(t-e)}function createPath(e,t,i,s){var o,a=e.length,l=shapePool.newElement();l.setPathData(!!s,a);var c=[0,0],u,f;for(o=0;o<a;o+=1)u=t&&t[o]?t[o]:c,f=i&&i[o]?i[o]:c,l.setTripleAt(e[o][0],e[o][1],f[0]+e[o][0],f[1]+e[o][1],u[0]+e[o][0],u[1]+e[o][1],o,!0);return l}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function e(t,i){var s,o,a=this.pv.length?this.pv.length:1,l=createTypedArray("float32",a);t=5;var c=Math.floor(time*t);for(s=0,o=0;s<c;){for(o=0;o<a;o+=1)l[o]+=-i+i*2*BMMath.random();s+=1}var u=time*t,f=u-Math.floor(u),d=createTypedArray("float32",a);if(a>1){for(o=0;o<a;o+=1)d[o]=this.pv[o]+l[o]+(-i+i*2*BMMath.random())*f;return d}return this.pv+l[0]+(-i+i*2*BMMath.random())*f}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(e,t){var i=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],s=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,o=-Math.atan2(i[1],i[2])/degToRads;return[o,s,0]}function easeOut(e,t,i,s,o){return applyEase(easeOutBez,e,t,i,s,o)}function easeIn(e,t,i,s,o){return applyEase(easeInBez,e,t,i,s,o)}function ease(e,t,i,s,o){return applyEase(easeInOutBez,e,t,i,s,o)}function applyEase(e,t,i,s,o,a){o===void 0?(o=i,a=s):t=(t-i)/(s-i),t>1?t=1:t<0&&(t=0);var l=e(t);if($bm_isInstanceOfArray(o)){var c,u=o.length,f=createTypedArray("float32",u);for(c=0;c<u;c+=1)f[c]=(a[c]-o[c])*l+o[c];return f}return(a-o)*l+o}function nearestKey(e){var t,i=data.k.length,s,o;if(!data.k.length||typeof data.k[0]=="number")s=0,o=0;else if(s=-1,e*=elem.comp.globalData.frameRate,e<data.k[0].t)s=1,o=data.k[0].t;else{for(t=0;t<i-1;t+=1)if(e===data.k[t].t){s=t+1,o=data.k[t].t;break}else if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(s=t+2,o=data.k[t+1].t):(s=t+1,o=data.k[t].t);break}s===-1&&(s=t+1,o=data.k[t].t)}var a={};return a.index=s,a.time=o/elem.comp.globalData.frameRate,a}function key(e){var t,i,s;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var o=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(s=o.length,i=0;i<s;i+=1)t[i]=o[i],t.value[i]=o[i];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return!e&&e!==0&&(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value=="string"?t===void 0?value.substring(e):value.substring(e,t):""}function substr(e,t){return typeof value=="string"?t===void 0?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};e.initExpressions=t,e.resetFrame=ExpressionManager.resetFrame;function t(i){var s=0,o=[];function a(){s+=1}function l(){s-=1,s===0&&u()}function c(f){o.indexOf(f)===-1&&o.push(f)}function u(){var f,d=o.length;for(f=0;f<d;f+=1)o[f].release();o.length=0}i.renderer.compInterface=CompExpressionInterface(i.renderer),i.renderer.globalData.projectInterface.registerComposition(i.renderer),i.renderer.globalData.pushExpression=a,i.renderer.globalData.popExpression=l,i.renderer.globalData.registerExpressionProperty=c}return e}(),MaskManagerInterface=function(){function e(i,s){this._mask=i,this._data=s}Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var t=function(s){var o=createSizedArray(s.viewData.length),a,l=s.viewData.length;for(a=0;a<l;a+=1)o[a]=new e(s.viewData[a],s.masksProperties[a]);var c=function(f){for(a=0;a<l;){if(s.masksProperties[a].nm===f)return o[a];a+=1}return null};return c};return t}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function i(l,c,u){Object.defineProperty(l,"velocity",{get:function(){return c.getVelocityAtTime(c.comp.currentFrame)}}),l.numKeys=c.keyframes?c.keyframes.length:0,l.key=function(f){if(!l.numKeys)return 0;var d="";"s"in c.keyframes[f-1]?d=c.keyframes[f-1].s:"e"in c.keyframes[f-2]?d=c.keyframes[f-2].e:d=c.keyframes[f-2].s;var h=u==="unidimensional"?new Number(d):Object.assign({},d);return h.time=c.keyframes[f-1].t/c.elem.comp.globalData.frameRate,h.value=u==="unidimensional"?d[0]:d,h},l.valueAtTime=c.getValueAtTime,l.speedAtTime=c.getSpeedAtTime,l.velocityAtTime=c.getVelocityAtTime,l.propertyGroup=c.propertyGroup}function s(l){(!l||!("pv"in l))&&(l=e);var c=1/l.mult,u=l.pv*c,f=new Number(u);return f.value=u,i(f,l,"unidimensional"),function(){return l.k&&l.getValue(),u=l.v*c,f.value!==u&&(f=new Number(u),f.value=u,f[0]=u,i(f,l,"unidimensional")),f}}function o(l){(!l||!("pv"in l))&&(l=t);var c=1/l.mult,u=l.data&&l.data.l||l.pv.length,f=createTypedArray("float32",u),d=createTypedArray("float32",u);return f.value=d,i(f,l,"multidimensional"),function(){l.k&&l.getValue();for(var h=0;h<u;h+=1)d[h]=l.v[h]*c,f[h]=d[h];return f}}function a(){return e}return function(l){return l?l.propType==="unidimensional"?s(l):o(l):a}}(),TransformExpressionInterface=function(){return function(e){function t(l){switch(l){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)});var i,s,o,a;return e.p?a=ExpressionPropertyInterface(e.p):(i=ExpressionPropertyInterface(e.px),s=ExpressionPropertyInterface(e.py),e.pz&&(o=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?a():[i(),s(),o?o():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t}}(),LayerExpressionInterface=function(){function e(f){var d=new Matrix;if(f!==void 0){var h=this._elem.finalTransform.mProp.getValueAtTime(f);h.clone(d)}else{var p=this._elem.finalTransform.mProp;p.applyToMatrix(d)}return d}function t(f,d){var h=this.getMatrix(d);return h.props[12]=0,h.props[13]=0,h.props[14]=0,this.applyPoint(h,f)}function i(f,d){var h=this.getMatrix(d);return this.applyPoint(h,f)}function s(f,d){var h=this.getMatrix(d);return h.props[12]=0,h.props[13]=0,h.props[14]=0,this.invertPoint(h,f)}function o(f,d){var h=this.getMatrix(d);return this.invertPoint(h,f)}function a(f,d){if(this._elem.hierarchy&&this._elem.hierarchy.length){var h,p=this._elem.hierarchy.length;for(h=0;h<p;h+=1)this._elem.hierarchy[h].finalTransform.mProp.applyToMatrix(f)}return f.applyToPointArray(d[0],d[1],d[2]||0)}function l(f,d){if(this._elem.hierarchy&&this._elem.hierarchy.length){var h,p=this._elem.hierarchy.length;for(h=0;h<p;h+=1)this._elem.hierarchy[h].finalTransform.mProp.applyToMatrix(f)}return f.inversePoint(d)}function c(f){var d=new Matrix;if(d.reset(),this._elem.finalTransform.mProp.applyToMatrix(d),this._elem.hierarchy&&this._elem.hierarchy.length){var h,p=this._elem.hierarchy.length;for(h=0;h<p;h+=1)this._elem.hierarchy[h].finalTransform.mProp.applyToMatrix(d);return d.inversePoint(f)}return d.inversePoint(f)}function u(){return[1,1,1,1]}return function(f){var d;function h(v){m.mask=new MaskManagerInterface(v,f)}function p(v){m.effect=v}function m(v){switch(v){case"ADBE Root Vectors Group":case"Contents":case 2:return m.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return d;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return m.effect;case"ADBE Text Properties":return m.textInterface;default:return null}}m.getMatrix=e,m.invertPoint=l,m.applyPoint=a,m.toWorld=i,m.toWorldVec=t,m.fromWorld=o,m.fromWorldVec=s,m.toComp=i,m.fromComp=c,m.sampleImage=u,m.sourceRectAtTime=f.sourceRectAtTime.bind(f),m._elem=f,d=TransformExpressionInterface(f.finalTransform.mProp);var g=getDescriptor(d,"anchorPoint");return Object.defineProperties(m,{hasParent:{get:function(){return f.hierarchy.length}},parent:{get:function(){return f.hierarchy[0].layerInterface}},rotation:getDescriptor(d,"rotation"),scale:getDescriptor(d,"scale"),position:getDescriptor(d,"position"),opacity:getDescriptor(d,"opacity"),anchorPoint:g,anchor_point:g,transform:{get:function(){return d}},active:{get:function(){return f.isInRange}}}),m.startTime=f.data.st,m.index=f.data.ind,m.source=f.data.refId,m.height=f.data.ty===0?f.data.h:100,m.width=f.data.ty===0?f.data.w:100,m.inPoint=f.data.ip/f.comp.globalData.frameRate,m.outPoint=f.data.op/f.comp.globalData.frameRate,m._name=f.data.nm,m.registerMaskInterface=h,m.registerEffectsInterface=p,m}}(),propertyGroupFactory=function(){return function(e,t){return function(i){return i=i===void 0?1:i,i<=0?e:t(i-1)}}}(),PropertyInterface=function(){return function(e,t){var i={_name:e};function s(o){return o=o===void 0?1:o,o<=0?i:t(o-1)}return s}}(),EffectsExpressionInterface=function(){var e={createEffectsInterface:t};function t(o,a){if(o.effectsManager){var l=[],c=o.data.ef,u,f=o.effectsManager.effectElements.length;for(u=0;u<f;u+=1)l.push(i(c[u],o.effectsManager.effectElements[u],a,o));var d=o.data.ef||[],h=function(m){for(u=0,f=d.length;u<f;){if(m===d[u].nm||m===d[u].mn||m===d[u].ix)return l[u];u+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return d.length}}),h}return null}function i(o,a,l,c){function u(m){for(var g=o.ef,v=0,b=g.length;v<b;){if(m===g[v].nm||m===g[v].mn||m===g[v].ix)return g[v].ty===5?d[v]:d[v]();v+=1}throw new Error}var f=propertyGroupFactory(u,l),d=[],h,p=o.ef.length;for(h=0;h<p;h+=1)o.ef[h].ty===5?d.push(i(o.ef[h],a.effectElements[h],a.effectElements[h].propertyGroup,c)):d.push(s(a.effectElements[h],o.ef[h].ty,c,f));return o.mn==="ADBE Color Control"&&Object.defineProperty(u,"color",{get:function(){return d[0]()}}),Object.defineProperties(u,{numProperties:{get:function(){return o.np}},_name:{value:o.nm},propertyGroup:{value:f}}),u.enabled=o.en!==0,u.active=u.enabled,u}function s(o,a,l,c){var u=ExpressionPropertyInterface(o.p);function f(){return a===10?l.comp.compInterface(o.p.v):u()}return o.p.setGroupProperty&&o.p.setGroupProperty(PropertyInterface("",c)),f}return e}(),ShapePathInterface=function(){return function(t,i,s){var o=i.sh;function a(c){return c==="Shape"||c==="shape"||c==="Path"||c==="path"||c==="ADBE Vector Shape"||c===2?a.path:null}var l=propertyGroupFactory(a,s);return o.setGroupProperty(PropertyInterface("Path",l)),Object.defineProperties(a,{path:{get:function(){return o.k&&o.getValue(),o}},shape:{get:function(){return o.k&&o.getValue(),o}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:s}}),a}}(),ShapeExpressionInterface=function(){function e(g,v,b){var y=[],E,S=g?g.length:0;for(E=0;E<S;E+=1)g[E].ty==="gr"?y.push(i(g[E],v[E],b)):g[E].ty==="fl"?y.push(s(g[E],v[E],b)):g[E].ty==="st"?y.push(l(g[E],v[E],b)):g[E].ty==="tm"?y.push(c(g[E],v[E],b)):g[E].ty==="tr"||(g[E].ty==="el"?y.push(f(g[E],v[E],b)):g[E].ty==="sr"?y.push(d(g[E],v[E],b)):g[E].ty==="sh"?y.push(ShapePathInterface(g[E],v[E],b)):g[E].ty==="rc"?y.push(h(g[E],v[E],b)):g[E].ty==="rd"?y.push(p(g[E],v[E],b)):g[E].ty==="rp"?y.push(m(g[E],v[E],b)):g[E].ty==="gf"?y.push(o(g[E],v[E],b)):y.push(a(g[E],v[E])));return y}function t(g,v,b){var y,E=function(C){for(var A=0,O=y.length;A<O;){if(y[A]._name===C||y[A].mn===C||y[A].propertyIndex===C||y[A].ix===C||y[A].ind===C)return y[A];A+=1}return typeof C=="number"?y[C-1]:null};E.propertyGroup=propertyGroupFactory(E,b),y=e(g.it,v.it,E.propertyGroup),E.numProperties=y.length;var S=u(g.it[g.it.length-1],v.it[v.it.length-1],E.propertyGroup);return E.transform=S,E.propertyIndex=g.cix,E._name=g.nm,E}function i(g,v,b){var y=function(C){switch(C){case"ADBE Vectors Group":case"Contents":case 2:return y.content;default:return y.transform}};y.propertyGroup=propertyGroupFactory(y,b);var E=t(g,v,y.propertyGroup),S=u(g.it[g.it.length-1],v.it[v.it.length-1],y.propertyGroup);return y.content=E,y.transform=S,Object.defineProperty(y,"_name",{get:function(){return g.nm}}),y.numProperties=g.np,y.propertyIndex=g.ix,y.nm=g.nm,y.mn=g.mn,y}function s(g,v,b){function y(E){return E==="Color"||E==="color"?y.color:E==="Opacity"||E==="opacity"?y.opacity:null}return Object.defineProperties(y,{color:{get:ExpressionPropertyInterface(v.c)},opacity:{get:ExpressionPropertyInterface(v.o)},_name:{value:g.nm},mn:{value:g.mn}}),v.c.setGroupProperty(PropertyInterface("Color",b)),v.o.setGroupProperty(PropertyInterface("Opacity",b)),y}function o(g,v,b){function y(E){return E==="Start Point"||E==="start point"?y.startPoint:E==="End Point"||E==="end point"?y.endPoint:E==="Opacity"||E==="opacity"?y.opacity:null}return Object.defineProperties(y,{startPoint:{get:ExpressionPropertyInterface(v.s)},endPoint:{get:ExpressionPropertyInterface(v.e)},opacity:{get:ExpressionPropertyInterface(v.o)},type:{get:function(){return"a"}},_name:{value:g.nm},mn:{value:g.mn}}),v.s.setGroupProperty(PropertyInterface("Start Point",b)),v.e.setGroupProperty(PropertyInterface("End Point",b)),v.o.setGroupProperty(PropertyInterface("Opacity",b)),y}function a(){function g(){return null}return g}function l(g,v,b){var y=propertyGroupFactory(O,b),E=propertyGroupFactory(A,y);function S(I){Object.defineProperty(A,g.d[I].nm,{get:ExpressionPropertyInterface(v.d.dataProps[I].p)})}var w,C=g.d?g.d.length:0,A={};for(w=0;w<C;w+=1)S(w),v.d.dataProps[w].p.setGroupProperty(E);function O(I){return I==="Color"||I==="color"?O.color:I==="Opacity"||I==="opacity"?O.opacity:I==="Stroke Width"||I==="stroke width"?O.strokeWidth:null}return Object.defineProperties(O,{color:{get:ExpressionPropertyInterface(v.c)},opacity:{get:ExpressionPropertyInterface(v.o)},strokeWidth:{get:ExpressionPropertyInterface(v.w)},dash:{get:function(){return A}},_name:{value:g.nm},mn:{value:g.mn}}),v.c.setGroupProperty(PropertyInterface("Color",y)),v.o.setGroupProperty(PropertyInterface("Opacity",y)),v.w.setGroupProperty(PropertyInterface("Stroke Width",y)),O}function c(g,v,b){function y(S){return S===g.e.ix||S==="End"||S==="end"?y.end:S===g.s.ix?y.start:S===g.o.ix?y.offset:null}var E=propertyGroupFactory(y,b);return y.propertyIndex=g.ix,v.s.setGroupProperty(PropertyInterface("Start",E)),v.e.setGroupProperty(PropertyInterface("End",E)),v.o.setGroupProperty(PropertyInterface("Offset",E)),y.propertyIndex=g.ix,y.propertyGroup=b,Object.defineProperties(y,{start:{get:ExpressionPropertyInterface(v.s)},end:{get:ExpressionPropertyInterface(v.e)},offset:{get:ExpressionPropertyInterface(v.o)},_name:{value:g.nm}}),y.mn=g.mn,y}function u(g,v,b){function y(S){return g.a.ix===S||S==="Anchor Point"?y.anchorPoint:g.o.ix===S||S==="Opacity"?y.opacity:g.p.ix===S||S==="Position"?y.position:g.r.ix===S||S==="Rotation"||S==="ADBE Vector Rotation"?y.rotation:g.s.ix===S||S==="Scale"?y.scale:g.sk&&g.sk.ix===S||S==="Skew"?y.skew:g.sa&&g.sa.ix===S||S==="Skew Axis"?y.skewAxis:null}var E=propertyGroupFactory(y,b);return v.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",E)),v.transform.mProps.p.setGroupProperty(PropertyInterface("Position",E)),v.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",E)),v.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",E)),v.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",E)),v.transform.mProps.sk&&(v.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",E)),v.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",E))),v.transform.op.setGroupProperty(PropertyInterface("Opacity",E)),Object.defineProperties(y,{opacity:{get:ExpressionPropertyInterface(v.transform.mProps.o)},position:{get:ExpressionPropertyInterface(v.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(v.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(v.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(v.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(v.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(v.transform.mProps.sa)},_name:{value:g.nm}}),y.ty="tr",y.mn=g.mn,y.propertyGroup=b,y}function f(g,v,b){function y(w){return g.p.ix===w?y.position:g.s.ix===w?y.size:null}var E=propertyGroupFactory(y,b);y.propertyIndex=g.ix;var S=v.sh.ty==="tm"?v.sh.prop:v.sh;return S.s.setGroupProperty(PropertyInterface("Size",E)),S.p.setGroupProperty(PropertyInterface("Position",E)),Object.defineProperties(y,{size:{get:ExpressionPropertyInterface(S.s)},position:{get:ExpressionPropertyInterface(S.p)},_name:{value:g.nm}}),y.mn=g.mn,y}function d(g,v,b){function y(w){return g.p.ix===w?y.position:g.r.ix===w?y.rotation:g.pt.ix===w?y.points:g.or.ix===w||w==="ADBE Vector Star Outer Radius"?y.outerRadius:g.os.ix===w?y.outerRoundness:g.ir&&(g.ir.ix===w||w==="ADBE Vector Star Inner Radius")?y.innerRadius:g.is&&g.is.ix===w?y.innerRoundness:null}var E=propertyGroupFactory(y,b),S=v.sh.ty==="tm"?v.sh.prop:v.sh;return y.propertyIndex=g.ix,S.or.setGroupProperty(PropertyInterface("Outer Radius",E)),S.os.setGroupProperty(PropertyInterface("Outer Roundness",E)),S.pt.setGroupProperty(PropertyInterface("Points",E)),S.p.setGroupProperty(PropertyInterface("Position",E)),S.r.setGroupProperty(PropertyInterface("Rotation",E)),g.ir&&(S.ir.setGroupProperty(PropertyInterface("Inner Radius",E)),S.is.setGroupProperty(PropertyInterface("Inner Roundness",E))),Object.defineProperties(y,{position:{get:ExpressionPropertyInterface(S.p)},rotation:{get:ExpressionPropertyInterface(S.r)},points:{get:ExpressionPropertyInterface(S.pt)},outerRadius:{get:ExpressionPropertyInterface(S.or)},outerRoundness:{get:ExpressionPropertyInterface(S.os)},innerRadius:{get:ExpressionPropertyInterface(S.ir)},innerRoundness:{get:ExpressionPropertyInterface(S.is)},_name:{value:g.nm}}),y.mn=g.mn,y}function h(g,v,b){function y(w){return g.p.ix===w?y.position:g.r.ix===w?y.roundness:g.s.ix===w||w==="Size"||w==="ADBE Vector Rect Size"?y.size:null}var E=propertyGroupFactory(y,b),S=v.sh.ty==="tm"?v.sh.prop:v.sh;return y.propertyIndex=g.ix,S.p.setGroupProperty(PropertyInterface("Position",E)),S.s.setGroupProperty(PropertyInterface("Size",E)),S.r.setGroupProperty(PropertyInterface("Rotation",E)),Object.defineProperties(y,{position:{get:ExpressionPropertyInterface(S.p)},roundness:{get:ExpressionPropertyInterface(S.r)},size:{get:ExpressionPropertyInterface(S.s)},_name:{value:g.nm}}),y.mn=g.mn,y}function p(g,v,b){function y(w){return g.r.ix===w||w==="Round Corners 1"?y.radius:null}var E=propertyGroupFactory(y,b),S=v;return y.propertyIndex=g.ix,S.rd.setGroupProperty(PropertyInterface("Radius",E)),Object.defineProperties(y,{radius:{get:ExpressionPropertyInterface(S.rd)},_name:{value:g.nm}}),y.mn=g.mn,y}function m(g,v,b){function y(w){return g.c.ix===w||w==="Copies"?y.copies:g.o.ix===w||w==="Offset"?y.offset:null}var E=propertyGroupFactory(y,b),S=v;return y.propertyIndex=g.ix,S.c.setGroupProperty(PropertyInterface("Copies",E)),S.o.setGroupProperty(PropertyInterface("Offset",E)),Object.defineProperties(y,{copies:{get:ExpressionPropertyInterface(S.c)},offset:{get:ExpressionPropertyInterface(S.o)},_name:{value:g.nm}}),y.mn=g.mn,y}return function(g,v,b){var y;function E(w){if(typeof w=="number")return w=w===void 0?1:w,w===0?b:y[w-1];for(var C=0,A=y.length;C<A;){if(y[C]._name===w)return y[C];C+=1}return null}function S(){return b}return E.propertyGroup=propertyGroupFactory(E,S),y=e(g,v,E.propertyGroup),E.numProperties=y.length,E._name="Contents",E}}(),TextExpressionInterface=function(){return function(e){var t;function i(s){switch(s){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){e.textProperty.getValue();var o=e.textProperty.currentData.t;return(!t||o!==t.value)&&(t=new String(o),t.value=o||new String(o),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),i}}();function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(e)}var FootageInterface=function(){var e=function(s){var o="",a=s.getFootageData();function l(){return o="",a=s.getFootageData(),c}function c(u){if(a[u])return o=u,a=a[u],_typeof(a)==="object"?c:a;var f=u.indexOf(o);if(f!==-1){var d=parseInt(u.substr(f+o.length),10);return a=a[d],_typeof(a)==="object"?c:a}return""}return l},t=function(s){function o(a){return a==="Outline"?o.outlineInterface():null}return o._name="Outline",o.outlineInterface=e(s),o};return function(i){function s(o){return o==="Data"?s.dataInterface:null}return s._name="Data",s.dataInterface=t(i),s}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers=function(){function e(l,c,u){c.x&&(u.k=!0,u.x=!0,u.initiateExpression=ExpressionManager.initiateExpression,u.effectsSequence.push(u.initiateExpression(l,c,u).bind(u)))}function t(l){return l*=this.elem.globalData.frameRate,l-=this.offsetTime,l!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<l?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(l,this._cachingAtTime),this._cachingAtTime.lastFrame=l),this._cachingAtTime.value}function i(l){var c=-.01,u=this.getValueAtTime(l),f=this.getValueAtTime(l+c),d=0;if(u.length){var h;for(h=0;h<u.length;h+=1)d+=Math.pow(f[h]-u[h],2);d=Math.sqrt(d)*100}else d=0;return d}function s(l){if(this.vel!==void 0)return this.vel;var c=-.001,u=this.getValueAtTime(l),f=this.getValueAtTime(l+c),d;if(u.length){d=createTypedArray("float32",u.length);var h;for(h=0;h<u.length;h+=1)d[h]=(f[h]-u[h])/c}else d=(f-u)/c;return d}function o(){return this.pv}function a(l){this.propertyGroup=l}return{searchExpressions:e,getSpeedAtTime:i,getVelocityAtTime:s,getValueAtTime:t,getStaticValueAtTime:o,setGroupProperty:a}}();function addPropertyDecorator(){function e(p,m,g){if(!this.k||!this.keyframes)return this.pv;p=p?p.toLowerCase():"";var v=this.comp.renderedFrame,b=this.keyframes,y=b[b.length-1].t;if(v<=y)return this.pv;var E,S;g?(m?E=Math.abs(y-this.elem.comp.globalData.frameRate*m):E=Math.max(0,y-this.elem.data.ip),S=y-E):((!m||m>b.length-1)&&(m=b.length-1),S=b[b.length-1-m].t,E=y-S);var w,C,A;if(p==="pingpong"){var O=Math.floor((v-S)/E);if(O%2!==0)return this.getValueAtTime((E-(v-S)%E+S)/this.comp.globalData.frameRate,0)}else if(p==="offset"){var I=this.getValueAtTime(S/this.comp.globalData.frameRate,0),L=this.getValueAtTime(y/this.comp.globalData.frameRate,0),$=this.getValueAtTime(((v-S)%E+S)/this.comp.globalData.frameRate,0),V=Math.floor((v-S)/E);if(this.pv.length){for(A=new Array(I.length),C=A.length,w=0;w<C;w+=1)A[w]=(L[w]-I[w])*V+$[w];return A}return(L-I)*V+$}else if(p==="continue"){var W=this.getValueAtTime(y/this.comp.globalData.frameRate,0),K=this.getValueAtTime((y-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(A=new Array(W.length),C=A.length,w=0;w<C;w+=1)A[w]=W[w]+(W[w]-K[w])*((v-y)/this.comp.globalData.frameRate)/5e-4;return A}return W+(W-K)*((v-y)/.001)}return this.getValueAtTime(((v-S)%E+S)/this.comp.globalData.frameRate,0)}function t(p,m,g){if(!this.k)return this.pv;p=p?p.toLowerCase():"";var v=this.comp.renderedFrame,b=this.keyframes,y=b[0].t;if(v>=y)return this.pv;var E,S;g?(m?E=Math.abs(this.elem.comp.globalData.frameRate*m):E=Math.max(0,this.elem.data.op-y),S=y+E):((!m||m>b.length-1)&&(m=b.length-1),S=b[m].t,E=S-y);var w,C,A;if(p==="pingpong"){var O=Math.floor((y-v)/E);if(O%2===0)return this.getValueAtTime(((y-v)%E+y)/this.comp.globalData.frameRate,0)}else if(p==="offset"){var I=this.getValueAtTime(y/this.comp.globalData.frameRate,0),L=this.getValueAtTime(S/this.comp.globalData.frameRate,0),$=this.getValueAtTime((E-(y-v)%E+y)/this.comp.globalData.frameRate,0),V=Math.floor((y-v)/E)+1;if(this.pv.length){for(A=new Array(I.length),C=A.length,w=0;w<C;w+=1)A[w]=$[w]-(L[w]-I[w])*V;return A}return $-(L-I)*V}else if(p==="continue"){var W=this.getValueAtTime(y/this.comp.globalData.frameRate,0),K=this.getValueAtTime((y+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(A=new Array(W.length),C=A.length,w=0;w<C;w+=1)A[w]=W[w]+(W[w]-K[w])*(y-v)/.001;return A}return W+(W-K)*(y-v)/.001}return this.getValueAtTime((E-((y-v)%E+y))/this.comp.globalData.frameRate,0)}function i(p,m){if(!this.k)return this.pv;if(p=(p||.4)*.5,m=Math.floor(m||5),m<=1)return this.pv;var g=this.comp.renderedFrame/this.comp.globalData.frameRate,v=g-p,b=g+p,y=m>1?(b-v)/(m-1):1,E=0,S=0,w;this.pv.length?w=createTypedArray("float32",this.pv.length):w=0;for(var C;E<m;){if(C=this.getValueAtTime(v+E*y),this.pv.length)for(S=0;S<this.pv.length;S+=1)w[S]+=C[S];else w+=C;E+=1}if(this.pv.length)for(S=0;S<this.pv.length;S+=1)w[S]/=m;else w/=m;return w}function s(p){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var m=this._transformCachingAtTime.v;if(m.cloneFromProps(this.pre.props),this.appliedTransformations<1){var g=this.a.getValueAtTime(p);m.translate(-g[0]*this.a.mult,-g[1]*this.a.mult,g[2]*this.a.mult)}if(this.appliedTransformations<2){var v=this.s.getValueAtTime(p);m.scale(v[0]*this.s.mult,v[1]*this.s.mult,v[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var b=this.sk.getValueAtTime(p),y=this.sa.getValueAtTime(p);m.skewFromAxis(-b*this.sk.mult,y*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var E=this.r.getValueAtTime(p);m.rotate(-E*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var S=this.rz.getValueAtTime(p),w=this.ry.getValueAtTime(p),C=this.rx.getValueAtTime(p),A=this.or.getValueAtTime(p);m.rotateZ(-S*this.rz.mult).rotateY(w*this.ry.mult).rotateX(C*this.rx.mult).rotateZ(-A[2]*this.or.mult).rotateY(A[1]*this.or.mult).rotateX(A[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var O=this.px.getValueAtTime(p),I=this.py.getValueAtTime(p);if(this.data.p.z){var L=this.pz.getValueAtTime(p);m.translate(O*this.px.mult,I*this.py.mult,-L*this.pz.mult)}else m.translate(O*this.px.mult,I*this.py.mult,0)}else{var $=this.p.getValueAtTime(p);m.translate($[0]*this.p.mult,$[1]*this.p.mult,-$[2]*this.p.mult)}return m}function o(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(p,m,g){var v=a(p,m,g);return v.dynamicProperties.length?v.getValueAtTime=s.bind(v):v.getValueAtTime=o.bind(v),v.setGroupProperty=expressionHelpers.setGroupProperty,v};var l=PropertyFactory.getProp;PropertyFactory.getProp=function(p,m,g,v,b){var y=l(p,m,g,v,b);y.kf?y.getValueAtTime=expressionHelpers.getValueAtTime.bind(y):y.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(y),y.setGroupProperty=expressionHelpers.setGroupProperty,y.loopOut=e,y.loopIn=t,y.smooth=i,y.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(y),y.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(y),y.numKeys=m.a===1?m.k.length:0,y.propertyIndex=m.ix;var E=0;return g!==0&&(E=createTypedArray("float32",m.a===1?m.k[0].s.length:m.k.length)),y._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:E},expressionHelpers.searchExpressions(p,m,y),y.k&&b.addDynamicProperty(y),y};function c(p){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),p*=this.elem.globalData.frameRate,p-=this.offsetTime,p!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<p?this._caching.lastIndex:0,this._cachingAtTime.lastTime=p,this.interpolateShape(p,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var u=ShapePropertyFactory.getConstructorFunction(),f=ShapePropertyFactory.getKeyframedConstructorFunction();function d(){}d.prototype={vertices:function(m,g){this.k&&this.getValue();var v=this.v;g!==void 0&&(v=this.getValueAtTime(g,0));var b,y=v._length,E=v[m],S=v.v,w=createSizedArray(y);for(b=0;b<y;b+=1)m==="i"||m==="o"?w[b]=[E[b][0]-S[b][0],E[b][1]-S[b][1]]:w[b]=[E[b][0],E[b][1]];return w},points:function(m){return this.vertices("v",m)},inTangents:function(m){return this.vertices("i",m)},outTangents:function(m){return this.vertices("o",m)},isClosed:function(){return this.v.c},pointOnPath:function(m,g){var v=this.v;g!==void 0&&(v=this.getValueAtTime(g,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(v));for(var b=this._segmentsLength,y=b.lengths,E=b.totalLength*m,S=0,w=y.length,C=0,A;S<w;){if(C+y[S].addedLength>E){var O=S,I=v.c&&S===w-1?0:S+1,L=(E-C)/y[S].addedLength;A=bez.getPointInSegment(v.v[O],v.v[I],v.o[O],v.i[I],L,y[S]);break}else C+=y[S].addedLength;S+=1}return A||(A=v.c?[v.v[0][0],v.v[0][1]]:[v.v[v._length-1][0],v.v[v._length-1][1]]),A},vectorOnPath:function(m,g,v){m==1?m=this.v.c:m==0&&(m=.999);var b=this.pointOnPath(m,g),y=this.pointOnPath(m+.001,g),E=y[0]-b[0],S=y[1]-b[1],w=Math.sqrt(Math.pow(E,2)+Math.pow(S,2));if(w===0)return[0,0];var C=v==="tangent"?[E/w,S/w]:[-S/w,E/w];return C},tangentOnPath:function(m,g){return this.vectorOnPath(m,g,"tangent")},normalOnPath:function(m,g){return this.vectorOnPath(m,g,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([d],u),extendPrototype([d],f),f.prototype.getValueAtTime=c,f.prototype.initiateExpression=ExpressionManager.initiateExpression;var h=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(p,m,g,v,b){var y=h(p,m,g,v,b);return y.propertyIndex=m.ix,y.lock=!1,g===3?expressionHelpers.searchExpressions(p,m.pt,y):g===4&&expressionHelpers.searchExpressions(p,m.ks,y),y.k&&p.addDynamicProperty(y),y}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(t,i){var s=this.calculateExpression(i);if(t.t!==s){var o={};return this.copyData(o,t),o.t=s.toString(),o.__complete=!1,o}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),i=this.searchExpressions();return this.kf=t||i,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function e(t,i){var s=createNS("feMerge");s.setAttribute("result",t);var o,a;for(a=0;a<i.length;a+=1)o=createNS("feMergeNode"),o.setAttribute("in",i[a]),s.appendChild(o),s.appendChild(o);return s}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,i,s,o){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",s+"_tint_1"),e.appendChild(a),a=createNS("feColorMatrix"),a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",s+"_tint_2"),e.appendChild(a),this.matrixFilter=a;var l=this.createMergeNode(s,[o,s+"_tint_1",s+"_tint_2"]);e.appendChild(l)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+s+" 0"),this.matrixFilter.setAttribute("values",i[0]-t[0]+" 0 0 0 "+t[0]+" "+(i[1]-t[1])+" 0 0 0 "+t[1]+" "+(i[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}};function SVGFillFilter(e,t,i,s){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),o.setAttribute("result",s),e.appendChild(o),this.matrixFilter=o}SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+i+" 0")}};function SVGStrokeEffect(e,t,i){this.initialized=!1,this.filterManager=t,this.elem=i,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var e=this.elem.layerElement.children||this.elem.layerElement.childNodes,t,i,s,o;for(this.filterManager.effectElements[1].p.v===1?(o=this.elem.maskManager.masksProperties.length,s=0):(s=this.filterManager.effectElements[0].p.v-1,o=s+1),i=createNS("g"),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-dashoffset",1),s;s<o;s+=1)t=createNS("path"),i.appendChild(t),this.paths.push({p:t,m:s});if(this.filterManager.effectElements[10].p.v===3){var a=createNS("mask"),l=createElementID();a.setAttribute("id",l),a.setAttribute("mask-type","alpha"),a.appendChild(i),this.elem.globalData.defs.appendChild(a);var c=createNS("g");for(c.setAttribute("mask","url("+getLocationHref()+"#"+l+")");e[0];)c.appendChild(e[0]);this.elem.layerElement.appendChild(c),this.masker=a,i.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(e=this.elem.layerElement.children||this.elem.layerElement.childNodes;e.length;)this.elem.layerElement.removeChild(e[0]);this.elem.layerElement.appendChild(i),this.elem.layerElement.removeAttribute("mask"),i.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=i},SVGStrokeEffect.prototype.renderFrame=function(e){this.initialized||this.initialize();var t,i=this.paths.length,s,o;for(t=0;t<i;t+=1)if(this.paths[t].m!==-1&&(s=this.elem.maskManager.viewData[this.paths[t].m],o=this.paths[t].p,(e||this.filterManager._mdf||s.prop._mdf)&&o.setAttribute("d",s.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||s.prop._mdf)){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var l=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,c=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,u=o.getTotalLength();a="0 0 0 "+u*l+" ";var f=u*(c-l),d=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,h=Math.floor(f/d),p;for(p=0;p<h;p+=1)a+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+u*10+" 0 0"}else a="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;o.setAttribute("stroke-dasharray",a)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var m=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(m[0]*255)+","+bmFloor(m[1]*255)+","+bmFloor(m[2]*255)+")")}};function SVGTritoneFilter(e,t,i,s){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","linearRGB"),o.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(o);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",s),this.matrixFilter=a;var l=createNS("feFuncR");l.setAttribute("type","table"),a.appendChild(l),this.feFuncR=l;var c=createNS("feFuncG");c.setAttribute("type","table"),a.appendChild(c),this.feFuncG=c;var u=createNS("feFuncB");u.setAttribute("type","table"),a.appendChild(u),this.feFuncB=u,e.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,o=s[0]+" "+i[0]+" "+t[0],a=s[1]+" "+i[1]+" "+t[1],l=s[2]+" "+i[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",o),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",l)}};function SVGProLevelsFilter(e,t,i,s){this.filterManager=t;var o=this.filterManager.effectElements,a=createNS("feComponentTransfer");(o[10].p.k||o[10].p.v!==0||o[11].p.k||o[11].p.v!==1||o[12].p.k||o[12].p.v!==1||o[13].p.k||o[13].p.v!==0||o[14].p.k||o[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(o[17].p.k||o[17].p.v!==0||o[18].p.k||o[18].p.v!==1||o[19].p.k||o[19].p.v!==1||o[20].p.k||o[20].p.v!==0||o[21].p.k||o[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(o[24].p.k||o[24].p.v!==0||o[25].p.k||o[25].p.v!==1||o[26].p.k||o[26].p.v!==1||o[27].p.k||o[27].p.v!==0||o[28].p.k||o[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(o[31].p.k||o[31].p.v!==0||o[32].p.k||o[32].p.v!==1||o[33].p.k||o[33].p.v!==1||o[34].p.k||o[34].p.v!==0||o[35].p.k||o[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(a)),(o[3].p.k||o[3].p.v!==0||o[4].p.k||o[4].p.v!==1||o[5].p.k||o[5].p.v!==1||o[6].p.k||o[6].p.v!==0||o[7].p.k||o[7].p.v!==1)&&(a=createNS("feComponentTransfer"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",s),e.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var i=createNS(e);return i.setAttribute("type","table"),t.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(e,t,i,s,o){for(var a=0,l=256,c,u=Math.min(e,t),f=Math.max(e,t),d=Array.call(null,{length:l}),h,p=0,m=o-s,g=t-e;a<=256;)c=a/256,c<=u?h=g<0?o:s:c>=f?h=g<0?s:o:h=s+m*Math.pow((c-e)/g,1/i),d[p]=h,p+=1,a+=256/(l-1);return d.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,i=this.filterManager.effectElements;this.feFuncRComposed&&(e||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(t=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(t=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(t=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(t=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(t=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",t))}};function SVGDropShadowEffect(e,t,i,s,o){var a=t.container.globalData.renderConfig.filterSize,l=t.data.fs||a;e.setAttribute("x",l.x||a.x),e.setAttribute("y",l.y||a.y),e.setAttribute("width",l.width||a.width),e.setAttribute("height",l.height||a.height),this.filterManager=t;var c=createNS("feGaussianBlur");c.setAttribute("in","SourceAlpha"),c.setAttribute("result",s+"_drop_shadow_1"),c.setAttribute("stdDeviation","0"),this.feGaussianBlur=c,e.appendChild(c);var u=createNS("feOffset");u.setAttribute("dx","25"),u.setAttribute("dy","0"),u.setAttribute("in",s+"_drop_shadow_1"),u.setAttribute("result",s+"_drop_shadow_2"),this.feOffset=u,e.appendChild(u);var f=createNS("feFlood");f.setAttribute("flood-color","#00ff00"),f.setAttribute("flood-opacity","1"),f.setAttribute("result",s+"_drop_shadow_3"),this.feFlood=f,e.appendChild(f);var d=createNS("feComposite");d.setAttribute("in",s+"_drop_shadow_3"),d.setAttribute("in2",s+"_drop_shadow_2"),d.setAttribute("operator","in"),d.setAttribute("result",s+"_drop_shadow_4"),e.appendChild(d);var h=this.createMergeNode(s,[s+"_drop_shadow_4",o]);e.appendChild(h)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(t[0]*255),Math.round(t[1]*255),Math.round(t[2]*255)))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*degToRads,o=i*Math.cos(s),a=i*Math.sin(s);this.feOffset.setAttribute("dx",o),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,i){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,i=_svgMatteSymbols.length;t<i;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var i=e.layerElement.parentNode;if(i){for(var s=i.children,o=0,a=s.length;o<a&&s[o]!==e.layerElement;)o+=1;var l;o<=a-2&&(l=s[o+1]);var c=createNS("use");c.setAttribute("href","#"+t),l?i.insertBefore(c,l):i.appendChild(c)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var i=createElementID(),s=createNS("mask");s.setAttribute("id",t.layerId),s.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var o=e.globalData.defs;o.appendChild(s);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(t,i),a.appendChild(t.layerElement),o.appendChild(a);var l=createNS("use");l.setAttribute("href","#"+i),s.appendChild(l),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,i=0,s=t.length;i<s;)t[i]&&t[i].data.ind===e&&this.setElementAsMask(this.elem,t[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(e,t,i,s){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("result",s),e.appendChild(o),this.feGaussianBlur=o}SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3,i=this.filterManager.effectElements[0].p.v*t,s=this.filterManager.effectElements[1].p.v,o=s==3?0:i,a=s==2?0:i;this.feGaussianBlur.setAttribute("stdDeviation",o+" "+a);var l=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",l)}};function TransformEffect(){}TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,i=t[0].p.v,s=t[1].p.v,o=t[2].p.v===1,a=t[3].p.v,l=o?a:t[4].p.v,c=t[5].p.v,u=t[6].p.v,f=t[7].p.v;this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(l*.01,a*.01,1),this.matrix.rotate(-f*degToRads),this.matrix.skewFromAxis(-c*degToRads,(u+90)*degToRads),this.matrix.translate(s[0],s[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(e,t){this.init(t)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(e){this.init(e)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})}(lottie$2,lottie$2.exports)),lottie$2.exports}var lottieExports=requireLottie();const lottie=getDefaultExportFromCjs$3(lottieExports);function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _iterableToArrayLimit(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,o,a,l,c=[],u=!0,f=!1;try{if(a=(i=i.call(e)).next,t!==0)for(;!(u=(s=a.call(i)).done)&&(c.push(s.value),c.length!==t);u=!0);}catch(d){f=!0,o=d}finally{try{if(!u&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(f)throw o}}return c}}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
91
91
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,s)}return i}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach(function(s){_defineProperty(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function _objectWithoutProperties(e,t){if(e==null)return{};var i,s,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)i=a[s],t.includes(i)||{}.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;i[s]=e[s]}return i}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toPrimitive(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,t||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return typeof t=="symbol"?t:t+""}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}var _excluded$1=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],useLottie=function e(t,i){var s=t.animationData,o=t.loop,a=t.autoplay,l=t.initialSegment,c=t.onComplete,u=t.onLoopComplete,f=t.onEnterFrame,d=t.onSegmentStart,h=t.onConfigReady,p=t.onDataReady,m=t.onDataFailed,g=t.onLoadedImages,v=t.onDOMLoaded,b=t.onDestroy;t.lottieRef,t.renderer,t.name,t.assetsPath,t.rendererSettings;var y=_objectWithoutProperties(t,_excluded$1),E=React.useState(!1),S=_slicedToArray(E,2),w=S[0],C=S[1],A=React.useRef(),O=React.useRef(null),I=function(){var H;(H=A.current)===null||H===void 0||H.play()},L=function(){var H;(H=A.current)===null||H===void 0||H.stop()},$=function(){var H;(H=A.current)===null||H===void 0||H.pause()},V=function(H){var q;(q=A.current)===null||q===void 0||q.setSpeed(H)},W=function(H,q){var Y;(Y=A.current)===null||Y===void 0||Y.goToAndPlay(H,q)},K=function(H,q){var Y;(Y=A.current)===null||Y===void 0||Y.goToAndStop(H,q)},j=function(H){var q;(q=A.current)===null||q===void 0||q.setDirection(H)},D=function(H,q){var Y;(Y=A.current)===null||Y===void 0||Y.playSegments(H,q)},M=function(H){var q;(q=A.current)===null||q===void 0||q.setSubframe(H)},k=function(H){var q;return(q=A.current)===null||q===void 0?void 0:q.getDuration(H)},T=function(){var H;(H=A.current)===null||H===void 0||H.destroy(),A.current=void 0},P=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q;if(O.current){(q=A.current)===null||q===void 0||q.destroy();var Y=_objectSpread2(_objectSpread2(_objectSpread2({},t),H),{},{container:O.current});return A.current=lottie.loadAnimation(Y),C(!!A.current),function(){var Q;(Q=A.current)===null||Q===void 0||Q.destroy(),A.current=void 0}}};React.useEffect(function(){var N=P();return function(){return N==null?void 0:N()}},[s,o]),React.useEffect(function(){A.current&&(A.current.autoplay=!!a)},[a]),React.useEffect(function(){if(A.current){if(!l){A.current.resetSegments(!0);return}!Array.isArray(l)||!l.length||((A.current.currentRawFrame<l[0]||A.current.currentRawFrame>l[1])&&(A.current.currentRawFrame=l[0]),A.current.setSegment(l[0],l[1]))}},[l]),React.useEffect(function(){var N=[{name:"complete",handler:c},{name:"loopComplete",handler:u},{name:"enterFrame",handler:f},{name:"segmentStart",handler:d},{name:"config_ready",handler:h},{name:"data_ready",handler:p},{name:"data_failed",handler:m},{name:"loaded_images",handler:g},{name:"DOMLoaded",handler:v},{name:"destroy",handler:b}],H=N.filter(function(Y){return Y.handler!=null});if(H.length){var q=H.map(function(Y){var Q;return(Q=A.current)===null||Q===void 0||Q.addEventListener(Y.name,Y.handler),function(){var re;(re=A.current)===null||re===void 0||re.removeEventListener(Y.name,Y.handler)}});return function(){q.forEach(function(Y){return Y()})}}},[c,u,f,d,h,p,m,g,v,b]);var F=React.createElement("div",_objectSpread2({style:i,ref:O},y));return{View:F,play:I,stop:L,pause:$,setSpeed:V,goToAndStop:K,goToAndPlay:W,setDirection:j,playSegments:D,setSubframe:M,getDuration:k,destroy:T,animationContainerRef:O,animationLoaded:w,animationItem:A.current}};function getContainerVisibility(e){var t=e.getBoundingClientRect(),i=t.top,s=t.height,o=window.innerHeight-i,a=window.innerHeight+s;return o/a}function getContainerCursorPosition(e,t,i){var s=e.getBoundingClientRect(),o=s.top,a=s.left,l=s.width,c=s.height,u=(t-a)/l,f=(i-o)/c;return{x:u,y:f}}var useInitInteractivity=function e(t){var i=t.wrapperRef,s=t.animationItem,o=t.mode,a=t.actions;React.useEffect(function(){var l=i.current;if(!(!l||!s||!a.length)){s.stop();var c=function(){var d=null,h=function(){var m=getContainerVisibility(l),g=a.find(function(b){var y=b.visibility;return y&&m>=y[0]&&m<=y[1]});if(g){if(g.type==="seek"&&g.visibility&&g.frames.length===2){var v=g.frames[0]+Math.ceil((m-g.visibility[0])/(g.visibility[1]-g.visibility[0])*g.frames[1]);//! goToAndStop must be relative to the start of the current segment
92
- s.goToAndStop(v-s.firstFrame-1,!0)}g.type==="loop"&&(d===null||d!==g.frames||s.isPaused)&&(s.playSegments(g.frames,!0),d=g.frames),g.type==="play"&&s.isPaused&&(s.resetSegments(!0),s.play()),g.type==="stop"&&s.goToAndStop(g.frames[0]-s.firstFrame-1,!0)}};return document.addEventListener("scroll",h),function(){document.removeEventListener("scroll",h)}},u=function(){var d=function(g,v){var b=g,y=v;if(b!==-1&&y!==-1){var E=getContainerCursorPosition(l,b,y);b=E.x,y=E.y}var S=a.find(function(A){var O=A.position;return O&&Array.isArray(O.x)&&Array.isArray(O.y)?b>=O.x[0]&&b<=O.x[1]&&y>=O.y[0]&&y<=O.y[1]:O&&!Number.isNaN(O.x)&&!Number.isNaN(O.y)?b===O.x&&y===O.y:!1});if(S){if(S.type==="seek"&&S.position&&Array.isArray(S.position.x)&&Array.isArray(S.position.y)&&S.frames.length===2){var w=(b-S.position.x[0])/(S.position.x[1]-S.position.x[0]),C=(y-S.position.y[0])/(S.position.y[1]-S.position.y[0]);s.playSegments(S.frames,!0),s.goToAndStop(Math.ceil((w+C)/2*(S.frames[1]-S.frames[0])),!0)}S.type==="loop"&&s.playSegments(S.frames,!0),S.type==="play"&&(s.isPaused&&s.resetSegments(!1),s.playSegments(S.frames)),S.type==="stop"&&s.goToAndStop(S.frames[0],!0)}},h=function(g){d(g.clientX,g.clientY)},p=function(){d(-1,-1)};return l.addEventListener("mousemove",h),l.addEventListener("mouseout",p),function(){l.removeEventListener("mousemove",h),l.removeEventListener("mouseout",p)}};switch(o){case"scroll":return c();case"cursor":return u()}}},[o,s])},useLottieInteractivity=function e(t){var i=t.actions,s=t.mode,o=t.lottieObj,a=o.animationItem,l=o.View,c=o.animationContainerRef;return useInitInteractivity({actions:i,animationItem:a,mode:s,wrapperRef:c}),l},_excluded=["style","interactivity"],Lottie=function e(t){var i,s,o,a=t.style,l=t.interactivity,c=_objectWithoutProperties(t,_excluded),u=useLottie(c,a),f=u.View,d=u.play,h=u.stop,p=u.pause,m=u.setSpeed,g=u.goToAndStop,v=u.goToAndPlay,b=u.setDirection,y=u.playSegments,E=u.setSubframe,S=u.getDuration,w=u.destroy,C=u.animationContainerRef,A=u.animationLoaded,O=u.animationItem;return React.useEffect(function(){t.lottieRef&&(t.lottieRef.current={play:d,stop:h,pause:p,setSpeed:m,goToAndPlay:v,goToAndStop:g,setDirection:b,playSegments:y,setSubframe:E,getDuration:S,destroy:w,animationContainerRef:C,animationLoaded:A,animationItem:O})},[(i=t.lottieRef)===null||i===void 0?void 0:i.current]),useLottieInteractivity({lottieObj:{View:f,play:d,stop:h,pause:p,setSpeed:m,goToAndStop:g,goToAndPlay:v,setDirection:b,playSegments:y,setSubframe:E,getDuration:S,destroy:w,animationContainerRef:C,animationLoaded:A,animationItem:O},actions:(s=l==null?void 0:l.actions)!==null&&s!==void 0?s:[],mode:(o=l==null?void 0:l.mode)!==null&&o!==void 0?o:"scroll"})};function LottieSkeleton({height:e=72,width:t=72}){return jsxRuntimeExports.jsx("div",{className:"animate-pulse rounded-full bg-[var(--tgui--plain_background)]",style:{height:typeof e=="number"?`${e}px`:e,width:typeof t=="number"?`${t}px`:t}})}function LazyLottie({asset:e,height:t,width:i,...s}){const{data:o}=useQuery({queryKey:["lottie-asset",e],queryFn:()=>fetch(assetUrl(e)).then(a=>a.json()),staleTime:18e5,gcTime:36e5});return o?jsxRuntimeExports.jsx(Lottie,{animationData:o,height:t,width:i,...s}):jsxRuntimeExports.jsx(LottieSkeleton,{height:t,width:i})}function useCancelNoAds(e){const t=useQueryClient();return useMutation({mutationFn:async()=>await makeRequest("invoice/no_ads/cancel","POST"),onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}function useCreateInvoiceBuyNoAds(e){const t=useQueryClient();return useMutation({mutationFn:async()=>await makeRequest("invoice/no_ads","POST"),onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}const useConfettiStore=create$2(e=>({isVisible:!1,fireConfetti:()=>{e({isVisible:!0})},stopConfetti:()=>{e({isVisible:!1})}})),useFireConfetti=()=>useConfettiStore(e=>e.fireConfetti),PRICE=250,PurchaseAdsFreeModal=({children:e})=>{const t=useFireConfetti(),{data:i}=useProfile(),[s,o]=React.useState(!1),{showSnackbar:a}=useSnackbar(),{t:l}=useTranslation(),{mutate:c,isPending:u}=useCreateInvoiceBuyNoAds({onSuccess(g){var v,b;(b=(v=window.Telegram)==null?void 0:v.WebApp)==null||b.openInvoice(g.invoice_link,y=>{y==="paid"&&(o(!1),t())})}}),{mutate:f,isPending:d}=useCancelNoAds({onError(){a(l("purchaseAdsFreeModal.errorCancelSubscription"),{type:"error"})},onSuccess(){o(!1)}}),h=[l("months.january"),l("months.february"),l("months.march"),l("months.april"),l("months.may"),l("months.june"),l("months.july"),l("months.august"),l("months.september"),l("months.october"),l("months.november"),l("months.december")],p=()=>{c()},m=async()=>{f()};return jsxRuntimeExports.jsx(Drawer,{open:s,onOpenChange:o,trigger:e,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-3 flex-col items-center text-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/newspaper.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("purchaseAdsFreeModal.title")}),!i.ads_free&&!i.ads_disabled_until&&jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("purchaseAdsFreeModal.disableAllInterruptions")}),i.ads_disabled_until&&jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("purchaseAdsFreeModal.noInterruptionsInGames")}),i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.activeRecurring",{price:PRICE})}),jsxRuntimeExports.jsx(IconTelegramStar,{style:{width:12,height:12}}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.aMonth")})]}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.nextPayment",{date:getFormattedDate(i.ads_disabled_until,h)})})]}),!i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center",children:[jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.activeUntil",{date:getFormattedDate(i.ads_disabled_until,h)})}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.subscriptionPaused")})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2.5",children:[!i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsx(Button,{size:"s",mode:"filled",stretched:!0,onClick:p,loading:u,disabled:u,style:{height:42},children:l("purchaseAdsFreeModal.resumeSubscription")}),i.ads_free&&jsxRuntimeExports.jsx(Button,{loading:d,disabled:d,size:"s",stretched:!0,onClick:m,mode:"plain",style:{height:42,color:"var(--tgui--subtitle_text_color)"},children:l("purchaseAdsFreeModal.cancelSubscription")}),!i.ads_free&&!i.ads_disabled_until&&jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:p,loading:u,disabled:u,mode:"filled",style:{height:42},children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[l("purchaseAdsFreeModal.continue"),jsxRuntimeExports.jsx(IconTelegramStar,{style:{width:12,height:12}}),l("purchaseAdsFreeModal.month",{price:PRICE})]})})]})]})})},BuyAdsFreeButton=()=>{const{t:e}=useTranslation(),{data:t}=useProfile();return jsxRuntimeExports.jsx(PurchaseAdsFreeModal,{children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var i,s;(s=(i=window.Telegram)==null?void 0:i.WebApp)==null||s.HapticFeedback.impactOccurred("soft")},className:"cursor-pointer flex justify-between items-center w-full",style:{padding:"10px 16px",borderRadius:24,border:"1px solid var(--tgui--divider)"},children:[jsxRuntimeExports.jsxs(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:["💰 ",e("ads")]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-[6px]",children:[t.ads_free&&jsxRuntimeExports.jsx(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px",color:"rgba(0, 122, 255, 1)"},children:e("adsOff")}),!t.ads_free&&jsxRuntimeExports.jsx(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:e("adsOn")}),jsxRuntimeExports.jsx(Icon,{name:"chevronRight",size:12,className:"mt-0.5"})]})]})})},formatCurrentXP=e=>e>=9999?formatter.format(Math.floor(e/1e3))+"K":formatter.format(e),formatTotalXP=e=>e>9999?formatter.format(Math.floor(e/1e3))+"K":formatter.format(e),FormattedXP=({xp:e,xpNeeded:t})=>{const{t:i}=useTranslation(),s=t-e;return t>9999?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[formatCurrentXP(s)," ",jsxRuntimeExports.jsx(Caption,{className:"opacity-70",children:i("toLevelUp")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[formatCurrentXP(e)," ",jsxRuntimeExports.jsx(Caption,{className:"opacity-70",children:i("xpCounter",{total:formatTotalXP(t)})})]})},boxPng=assetUrl("box.webp"),STORAGE_KEY_PORTRAIT="profile_position_portrait",STORAGE_KEY_LANDSCAPE="profile_position_landscape",mapPositionToInitialPosition=e=>{switch(e){case"topRight":return{x:window.innerWidth,y:0};case"bottomLeft":return{x:0,y:window.innerHeight};case"bottomRight":return{x:window.innerWidth,y:window.innerHeight};default:return{x:0,y:0}}},ANIMATION_DURATION=.3,POSITION_PADDING=20,OverlayProfile=({onOpenProfile:e,variant:t="translucent",initialPosition:i="topLeft",initialCoordinates:s})=>{var Ae,xe;const{t:o}=useTranslation(),{setIsOpen:a}=useTopUpModalStore(),{setIsOpen:l}=useInventoryModalStore(),c=useQueryClient(),u=React.useRef(null),f=React.useRef(!1),d=React.useRef({x:0,y:0}),h=React.useRef({x:0,y:0}),p=React.useRef(0),m=React.useRef(!1),[g,v]=React.useState(!1),[b,y]=React.useState(!1),[E,S]=React.useState(!1),{data:w}=useProfile(),[C]=useAnimateNumber(w.experience),[A]=useAnimateNumber(w.level),[O]=useAnimateNumber(w.balance_gems),{miniApp:I}=useMiniApp(),L=I.colorScheme==="dark",[$,V]=React.useState(!1),[W,K]=React.useState(!0),{safeAreaInset:j,contentSafeAreaInset:D}=I,[M,k]=React.useState(mapPositionToInitialPosition(i)),T=useThrottle(M.x,1e3),P=useThrottle(M.y,1e3),F=React.useCallback(()=>window.innerWidth>window.innerHeight?STORAGE_KEY_LANDSCAPE:STORAGE_KEY_PORTRAIT,[]),N=React.useCallback(ae=>{var Re,Ie;const me=((Re=u.current)==null?void 0:Re.offsetWidth)||0,Se=((Ie=u.current)==null?void 0:Ie.offsetHeight)||0,Te=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--banner-top-height")||"0"),ve=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--banner-bottom-height")||"0");k({x:Math.max(POSITION_PADDING+((j==null?void 0:j.left)||0)+((D==null?void 0:D.left)||0),Math.min(window.innerWidth-me-POSITION_PADDING-((j==null?void 0:j.right)||0)-((D==null?void 0:D.right)||0),ae.x)),y:Math.max(POSITION_PADDING+((j==null?void 0:j.top)||0)+((D==null?void 0:D.top)||0)+Te,Math.min(window.innerHeight-Se-POSITION_PADDING-((j==null?void 0:j.bottom)||0)-((D==null?void 0:D.bottom)||0)-ve,ae.y))})},[j,D]),H=React.useCallback(()=>{N({...M})},[M,N]),q=React.useCallback(async ae=>{try{const me=ae??F(),Se=await CryptoSteamSDK.getValue(me);if(console.log("savedPosition",Se),Se){const Te=JSON.parse(Se);return N(Te),!0}return!1}catch(me){return console.error("Error loading saved position:",me),!1}},[N,F]),Y=React.useRef(null),Q=React.useRef(!1);React.useEffect(()=>{g||(async()=>(await q()||N(s||mapPositionToInitialPosition(i)),v(!0),requestAnimationFrame(()=>{K(!1)})))()},[g,q,N,i,s]),React.useEffect(()=>{if(!$&&g&&!b){const ae=F();CryptoSteamSDK.setValue(ae,JSON.stringify({x:T,y:P}))}},[$,g,b,T,P,F]),React.useEffect(()=>{const ae=async()=>{g&&await q(F())};return window.addEventListener("resize",ae),()=>{window.removeEventListener("resize",ae)}},[g,q,F]),React.useEffect(()=>{const ae=setInterval(()=>{H()},250);return()=>clearInterval(ae)},[H]),React.useEffect(()=>{if(f.current!==b){const ae=setTimeout(()=>{H()},ANIMATION_DURATION*1e3);return()=>clearTimeout(ae)}},[b,H]),React.useEffect(()=>{f.current=b},[b]),React.useEffect(()=>{!b&&Y.current&&!Q.current&&(N(Y.current),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y.current&&N(Y.current)})}))},[b,N]);const re=ae=>{b||(V(!0),d.current=M,h.current={x:ae.clientX,y:ae.clientY},p.current=0,m.current=!1,ae.stopPropagation())},ee=ae=>{if(b)return;ae.target.closest(".cssdk-floating-profile")&&(V(!0),d.current=M,h.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},p.current=0,m.current=!1,ae.stopPropagation())};React.useEffect(()=>{const ae=ve=>{if($&&b){V(!1);return}if($){const Re=ve.clientX-h.current.x,Ie=ve.clientY-h.current.y,Fe=Math.sqrt(Re*Re+Ie*Ie);p.current=Fe,Fe>5&&(m.current=!0),b&&(Q.current=!0),N({x:d.current.x+Re,y:d.current.y+Ie})}},me=ve=>{if($&&b){V(!1);return}if($){ve.preventDefault(),ve.stopPropagation();const Re=ve.touches[0].clientX-h.current.x,Ie=ve.touches[0].clientY-h.current.y,Fe=Math.sqrt(Re*Re+Ie*Ie);p.current=Fe,Fe>5&&(m.current=!0),b&&(Q.current=!0),N({x:d.current.x+Re,y:d.current.y+Ie})}},Se=()=>{$&&V(!1)},Te=()=>{$&&V(!1)};return document.addEventListener("mousemove",ae),document.addEventListener("mouseup",Se),document.addEventListener("touchmove",me),document.addEventListener("touchend",Te),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",Se),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",Te)}},[$,b,N]);const z=()=>{!$&&!m.current&&(Y.current=M,Q.current=!1,y(!0)),setTimeout(()=>{m.current=!1},100)};React.useEffect(()=>{I.disableVerticalSwipes()},[I]),React.useEffect(()=>{const ae=me=>{const Se=document.querySelector("div#overlay-root"),Te=document.querySelector("div.cssdk-floating-profile"),ve=Se==null?void 0:Se.querySelector(".ccsdk-tg-ui-modal-fix"),Re=Te&&!Te.contains(me.target),Ie=Se&&!Se.contains(me.target),Fe=ve==null?void 0:ve.contains(me.target);b&&Re&&(Fe?V(!1):Ie&&y(!1))};return document.addEventListener("mousedown",ae),()=>{document.removeEventListener("mousedown",ae)}},[b]);const te=t==="translucent"?{backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",backgroundColor:"rgba(0, 0, 0, 0.45)"}:{backgroundColor:"var(--tg-theme-secondary-bg-color)"},X=w?(Ae=w.first_name)!=null&&Ae.length?w.first_name[0]:(xe=w.user_name)!=null&&xe.length?w.user_name[0]:void 0:void 0,se=jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center gap-[5px] h-[30px] p-0 pr-[7px] w-fit",style:{background:E?"linear-gradient(90deg, rgba(85, 233, 0, 0.3) 0%, rgba(0, 217, 207, 0.3) 20%, rgba(67, 101, 255, 0.3) 40%, rgba(173, 0, 255, 0.3) 50%, rgba(214, 0, 177, 0.3) 60%, rgba(254, 0, 99, 0.3) 80%, rgba(244, 129, 0, 0.3) 90%, rgba(232, 218, 0, 0.3) 100%), #FFFFFF":void 0,color:E?"#000000":void 0},children:[jsxRuntimeExports.jsx(motion.div,{layoutId:"circle",transition:{layout:{duration:0}},children:jsxRuntimeExports.jsx(XpProgress,{level:w.level,experience:w.experience,xpNeeded:w.level_up_exp,size:30})}),jsxRuntimeExports.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:E?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:boxPng,alt:o("lootBox"),width:25,height:25,className:"size-[25px]"}),jsxRuntimeExports.jsx(Text,{weight:"1",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px",whiteSpace:"nowrap",color:"black"},children:o("lootBox")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text,{weight:"1",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:formatter.format(O)}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{width:16,height:14}})]})})]}),ie=jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-[210px] h-auto items-center gap-[10px] p-[10px_10px_14px_10px]",children:[jsxRuntimeExports.jsxs("div",{className:"flex self-stretch justify-between items-start gap-1",children:[jsxRuntimeExports.jsx(motion.div,{layoutId:"circle",transition:{layout:{duration:0}},children:jsxRuntimeExports.jsx(Avatar,{size:28,src:w==null?void 0:w.avatar,acronym:X,onClick:e,style:{cursor:"pointer"}})}),jsxRuntimeExports.jsxs("button",{type:"button",className:"cssdk-balance-section",style:{width:"auto",background:"none",border:"none",padding:0,cursor:"pointer"},onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),a(!0)},"aria-label":o("balance"),children:[jsxRuntimeExports.jsx(Text,{weight:"3",className:"opacity-70",style:{fontSize:"10px",lineHeight:"13px",letterSpacing:"0.06px"},children:o("balance")}),jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center gap-1",children:[jsxRuntimeExports.jsx(AnimatedBalance,{style:{fontSize:19,lineHeight:"24px",letterSpacing:"-0.45px"},value:O}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{width:18,height:16,marginTop:1}})]})]}),jsxRuntimeExports.jsx(IconButton,{className:"cssdk-close-btn",size:"s",mode:"plain",onClick:ae=>{ae.stopPropagation(),y(!1)},children:jsxRuntimeExports.jsx(IconClosePlain,{})})]}),jsxRuntimeExports.jsx(Button,{size:"s",style:{backgroundColor:"#1EC948",height:40,flexBasis:0,flexGrow:1,alignSelf:"stretch"},onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),a(!0)},before:jsxRuntimeExports.jsx(Icon,{name:"addCircle",size:20}),children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:o("topUp")})}),jsxRuntimeExports.jsx(BuyAdsFreeButton,{}),jsxRuntimeExports.jsx(LevelInfoModal,{children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft")},className:"py-1.5 cursor-pointer flex items-center flex-col gap-1",children:[jsxRuntimeExports.jsx(XpProgress,{level:A,experience:C,xpNeeded:w.level_up_exp}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntimeExports.jsx(Text,{weight:"2",children:o("level")}),jsxRuntimeExports.jsx(Text,{weight:"3",children:jsxRuntimeExports.jsx(FormattedXP,{xp:C,xpNeeded:w.level_up_exp})})]})]})}),E&&jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),S(!1),l(!0)},"aria-label":o("lootBox"),style:{height:40,width:"calc(100% - 20px)",display:"flex",alignItems:"center",justifyContent:"space-between",overflow:"hidden",borderRadius:"100px",padding:"0 10px",background:"linear-gradient(98.06deg, rgba(85, 233, 0, 0.3) 5.56%, rgba(0, 217, 207, 0.3) 19.86%, rgba(67, 101, 255, 0.3) 35.65%, rgba(173, 0, 255, 0.3) 44.6%, rgba(214, 0, 177, 0.3) 54.12%, rgba(254, 0, 99, 0.3) 71.35%, rgba(244, 129, 0, 0.3) 81.79%, rgba(232, 218, 0, 0.3) 96.3%), #FFFFFF",border:"none",cursor:"pointer"},children:[jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start flex-[0.2]",children:jsxRuntimeExports.jsx("img",{src:boxPng,alt:"Loot box",width:25,height:25,className:"size-[25px]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center flex-1",children:[jsxRuntimeExports.jsx(Text,{weight:"1",style:{color:"black",fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:o("lootBox")}),jsxRuntimeExports.jsx(Text,{style:{color:"#00000080",fontSize:13,lineHeight:"13px",letterSpacing:"0.06px"},children:o("forLevel",{level:A})})]}),jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start flex-[0.2]"})]})]}),[ne,pe]=React.useState(!1);React.useEffect(()=>{const ae=WebSocketManager.getInstance(),me=()=>{const Te=ae.isConnected();pe(Te)};me();const Se=setInterval(me,1e3);return()=>clearInterval(Se)},[]),React.useEffect(()=>{if(!(w!=null&&w.id)||!ne)return;console.log("Setting up WebSocket subscriptions for profile:",w.id);const ae=WebSocketManager.getInstance();let me;return(async()=>{try{await ae.waitForConnection();const Te=`user:${w.id}`;me=await ae.subscribe(Te,ve=>{if(console.log("Received user channel message:",ve),(ve==null?void 0:ve.type)==="balance_updated"&&(ve!=null&&ve.data)){if(ve.data.account==="exp"&&ve.data.balance>=w.level_up_exp){c.invalidateQueries({queryKey:[PROFILE_TAG]});return}switch(ve.data.account){case"gems":c.setQueryData([PROFILE_TAG],Re=>({...Re,balance_gems:ve.data.balance}));break;case"coins":c.setQueryData([PROFILE_TAG],Re=>({...Re,balance_coins:ve.data.balance}));break;case"exp":c.setQueryData([PROFILE_TAG],Re=>({...Re,experience:ve.data.balance}));break}}(ve==null?void 0:ve.type)==="box_opened"&&c.invalidateQueries({queryKey:[PROFILE_TAG]}),(ve==null?void 0:ve.type)==="box_received"&&(c.invalidateQueries({queryKey:[PROFILE_TAG]}),S(!0))})}catch(Te){console.error("Failed to setup WebSocket subscriptions:",Te)}})(),()=>{me&&me()}},[w==null?void 0:w.id,w==null?void 0:w.level_up_exp,ne,c]);const _e=b?"expanded":"collapsed",ye=React.useMemo(()=>{switch(_e){case"expanded":return ie;case"collapsed":return se}},[_e,se,ie]);return jsxRuntimeExports.jsx(motion.div,{ref:u,"aria-label":"Profile widget",role:"presentation",tabIndex:0,onMouseDown:re,onClick:z,onTouchStart:ee,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),z())},className:"pointer-events-auto",style:{position:"fixed",top:0,left:0,border:"none",padding:0,cursor:"pointer","--floating-profile-shadow":t==="light"?L?"0px 0px 1px 1px #00000033, 0px 32px 64px 0px rgba(255, 255, 255, 0.1)":"0px 0px 0.5px 0.5px #00000033, 0px 32px 64px 0px rgba(0, 0, 0, 0.34)":void 0,"--floating-profile-shadow-active":t==="light"?L?"0px 0px 0.5px 0.5px #00000033, 0px 4px 16px 0px rgba(255, 255, 255, 0.05)":"0px 0px 0.5px 0.5px #00000033, 0px 4px 16px 0px rgba(0, 0, 0, 0.25)":void 0},initial:{opacity:0},animate:{x:M.x,y:M.y,scale:$?.95:1,opacity:g?1:0,pointerEvents:g?"auto":"none"},transition:{type:"spring",damping:20,stiffness:300,duration:$||!g||W?0:.3,opacity:{type:"tween",duration:.2,ease:"easeOut"}},children:jsxRuntimeExports.jsx(motion.div,{layout:!0,transition:{type:"spring",bounce:0,duration:ANIMATION_DURATION,ease:"easeInOut"},style:{...te,borderRadius:24},className:`mx-auto w-fit overflow-hidden cssdk-floating-profile cssdk-floating-profile--${t}`,children:jsxRuntimeExports.jsx(motion.div,{transition:{type:"spring",bounce:0,duration:ANIMATION_DURATION},initial:{scale:.9,opacity:0,filter:"blur(5px)",originX:.5,originY:.5},animate:{scale:1,opacity:1,filter:"blur(0px)",originX:.5,originY:.5,transition:{delay:.05}},children:ye},_e)})})},iconLandscape=assetUrl("icon-landscape.webp");function OrientationCheck(){const[e,t]=React.useState(!1),[i,s]=React.useState(!1),o=React.useRef(null),a=React.useRef(window.innerWidth);return React.useEffect(()=>((async()=>{try{const c=await CryptoSteamSDK.getConfig(),u=c.supported_screen_formats.includes("landscape"),f=c.supported_screen_formats.includes("portrait");if(u&&f){s(!0),t(!1);return}const d=()=>{const m=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),g=window.innerWidth<window.innerHeight,v=!g;if(u&&!f){t(g&&m);return}if(f&&!u){t(v&&m);return}t(!1)},h=()=>{const m=window.innerWidth;m!==a.current&&(a.current=m,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d()},300))},p=()=>{d()};return d(),window.addEventListener("orientationchange",p),window.addEventListener("resize",h),window.addEventListener("load",d),s(!0),()=>{o.current&&clearTimeout(o.current),window.removeEventListener("orientationchange",p),window.removeEventListener("resize",h),window.removeEventListener("load",d)}}catch(c){console.error("Error checking orientation config:",c),s(!0)}})(),()=>{o.current&&clearTimeout(o.current)}),[]),i?jsxRuntimeExports.jsx("div",{className:"cssdk-orientation-check",children:jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:e&&jsxRuntimeExports.jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"24px",padding:"20px",zIndex:1},children:jsxRuntimeExports.jsx(motion.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.3,ease:"easeOut",delay:.1},style:{backgroundColor:"white",borderRadius:"16px",padding:"32px",display:"flex",justifyContent:"center",alignItems:"center"},children:jsxRuntimeExports.jsx("img",{src:iconLandscape,alt:"Rotate device",style:{maxWidth:"200px",maxHeight:"200px",width:"auto",height:"auto"}})})},"orientation-check")})}):null}function telegramLanguageCodeToFlagEmoji(e){if(!e)return"";const t=e.trim().replace("_","-");if(t.length===0)return"";const i=t.toLowerCase(),s=i.split("-").filter(Boolean),o=s[0],a={"pt-br":"🇧🇷","pt-pt":"🇵🇹","en-us":"🇺🇸","en-gb":"🇬🇧","es-es":"🇪🇸","es-mx":"🇲🇽","zh-cn":"🇨🇳","zh-tw":"🇹🇼","zh-hk":"🇭🇰"},l={en:"🇺🇸",es:"🇪🇸",hi:"🇮🇳",pt:"🇧🇷",ru:"🇷🇺",ar:"🇦🇪",uk:"🇺🇦",de:"🇩🇪",fr:"🇫🇷",it:"🇮🇹",tr:"🇹🇷",fa:"🇮🇷",id:"🇮🇩",ja:"🇯🇵",ko:"🇰🇷",zh:"🇨🇳",pl:"🇵🇱",vi:"🇻🇳",th:"🇹🇭"},c={us:"🇺🇸",es:"🇪🇸",in:"🇮🇳",br:"🇧🇷",ru:"🇷🇺",ae:"🇦🇪",ua:"🇺🇦",de:"🇩🇪",fr:"🇫🇷",it:"🇮🇹",tr:"🇹🇷",ir:"🇮🇷",id:"🇮🇩",jp:"🇯🇵",kr:"🇰🇷",cn:"🇨🇳",pl:"🇵🇱",vn:"🇻🇳",th:"🇹🇭",mx:"🇲🇽",pt:"🇵🇹",gb:"🇬🇧",tw:"🇹🇼",hk:"🇭🇰"};if(a[i])return a[i];if(o&&l[o])return l[o];if(s.length===1&&/^[a-z]{2}$/i.test(t)){const u=i;return c[u]?c[u]:""}return""}function __insertCSS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}const getAsset=e=>{switch(e){case"success":return SuccessIcon;case"info":return InfoIcon;case"warning":return WarningIcon;case"error":return ErrorIcon;default:return null}},bars=Array(12).fill(0),Loader=({visible:e,className:t})=>React.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},React.createElement("div",{className:"sonner-spinner"},bars.map((i,s)=>React.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),SuccessIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WarningIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),InfoIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ErrorIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CloseIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),React.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),useIsDocumentHidden=()=>{const[e,t]=React.useState(document.hidden);return React.useEffect(()=>{const i=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),e};let toastsCounter=1;class Observer{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const i=this.subscribers.indexOf(t);this.subscribers.splice(i,1)}),this.publish=t=>{this.subscribers.forEach(i=>i(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var i;const{message:s,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((i=t.id)==null?void 0:i.length)>0?t.id:toastsCounter++,l=this.toasts.find(u=>u.id===a),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(u=>u.id===a?(this.publish({...u,...t,id:a,title:s}),{...u,...t,id:a,dismissible:c,title:s}):u):this.addToast({title:s,...o,dismissible:c,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:t,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(s=>s({id:i.id,dismiss:!0}))}),t),this.message=(t,i)=>this.create({...i,message:t}),this.error=(t,i)=>this.create({...i,message:t,type:"error"}),this.success=(t,i)=>this.create({...i,type:"success",message:t}),this.info=(t,i)=>this.create({...i,type:"info",message:t}),this.warning=(t,i)=>this.create({...i,type:"warning",message:t}),this.loading=(t,i)=>this.create({...i,type:"loading",message:t}),this.promise=(t,i)=>{if(!i)return;let s;i.loading!==void 0&&(s=this.create({...i,promise:t,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=s!==void 0,l;const c=o.then(async f=>{if(l=["resolve",f],React.isValidElement(f))a=!1,this.create({id:s,type:"default",message:f});else if(isHttpResponse(f)&&!f.ok){a=!1;const h=typeof i.error=="function"?await i.error(`HTTP error! status: ${f.status}`):i.error,p=typeof i.description=="function"?await i.description(`HTTP error! status: ${f.status}`):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:p,...g})}else if(f instanceof Error){a=!1;const h=typeof i.error=="function"?await i.error(f):i.error,p=typeof i.description=="function"?await i.description(f):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:p,...g})}else if(i.success!==void 0){a=!1;const h=typeof i.success=="function"?await i.success(f):i.success,p=typeof i.description=="function"?await i.description(f):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"success",description:p,...g})}}).catch(async f=>{if(l=["reject",f],i.error!==void 0){a=!1;const d=typeof i.error=="function"?await i.error(f):i.error,h=typeof i.description=="function"?await i.description(f):i.description,m=typeof d=="object"&&!React.isValidElement(d)?d:{message:d};this.create({id:s,type:"error",description:h,...m})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),i.finally==null||i.finally.call(i)}),u=()=>new Promise((f,d)=>c.then(()=>l[0]==="reject"?d(l[1]):f(l[1])).catch(d));return typeof s!="string"&&typeof s!="number"?{unwrap:u}:Object.assign(s,{unwrap:u})},this.custom=(t,i)=>{const s=(i==null?void 0:i.id)||toastsCounter++;return this.create({jsx:t(s),id:s,...i}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ToastState=new Observer,toastFunction=(e,t)=>{const i=(t==null?void 0:t.id)||toastsCounter++;return ToastState.addToast({title:e,...t,id:i}),i},isHttpResponse=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});__insertCSS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function isAction(e){return e.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET="24px",MOBILE_VIEWPORT_OFFSET="16px",TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function cn(...e){return e.filter(Boolean).join(" ")}function getDefaultSwipeDirections(e){const[t,i]=e.split("-"),s=[];return t&&s.push(t),i&&s.push(i),s}const Toast=e=>{var t,i,s,o,a,l,c,u,f;const{invert:d,toast:h,unstyled:p,interacting:m,setHeights:g,visibleToasts:v,heights:b,index:y,toasts:E,expanded:S,removeToast:w,defaultRichColors:C,closeButton:A,style:O,cancelButtonStyle:I,actionButtonStyle:L,className:$="",descriptionClassName:V="",duration:W,position:K,gap:j,expandByDefault:D,classNames:M,icons:k,closeButtonAriaLabel:T="Close toast"}=e,[P,F]=React.useState(null),[N,H]=React.useState(null),[q,Y]=React.useState(!1),[Q,re]=React.useState(!1),[ee,z]=React.useState(!1),[J,te]=React.useState(!1),[X,se]=React.useState(!1),[ie,ne]=React.useState(0),[pe,_e]=React.useState(0),ye=React.useRef(h.duration||W||TOAST_LIFETIME),Ae=React.useRef(null),xe=React.useRef(null),ae=y===0,me=y+1<=v,Se=h.type,Te=h.dismissible!==!1,ve=h.className||"",Re=h.descriptionClassName||"",Ie=React.useMemo(()=>b.findIndex(Pe=>Pe.toastId===h.id)||0,[b,h.id]),Fe=React.useMemo(()=>{var Pe;return(Pe=h.closeButton)!=null?Pe:A},[h.closeButton,A]),$e=React.useMemo(()=>h.duration||W||TOAST_LIFETIME,[h.duration,W]),Be=React.useRef(0),Ne=React.useRef(0),Ee=React.useRef(0),ce=React.useRef(null),[fe,be]=K.split("-"),he=React.useMemo(()=>b.reduce((Pe,Ue,ze)=>ze>=Ie?Pe:Pe+Ue.height,0),[b,Ie]),Ce=useIsDocumentHidden(),le=h.invert||d,de=Se==="loading";Ne.current=React.useMemo(()=>Ie*j+he,[Ie,he]),React.useEffect(()=>{ye.current=$e},[$e]),React.useEffect(()=>{Y(!0)},[]),React.useEffect(()=>{const Pe=xe.current;if(Pe){const Ue=Pe.getBoundingClientRect().height;return _e(Ue),g(ze=>[{toastId:h.id,height:Ue,position:h.position},...ze]),()=>g(ze=>ze.filter(Qe=>Qe.toastId!==h.id))}},[g,h.id]),React.useLayoutEffect(()=>{if(!q)return;const Pe=xe.current,Ue=Pe.style.height;Pe.style.height="auto";const ze=Pe.getBoundingClientRect().height;Pe.style.height=Ue,_e(ze),g(Qe=>Qe.find(qe=>qe.toastId===h.id)?Qe.map(qe=>qe.toastId===h.id?{...qe,height:ze}:qe):[{toastId:h.id,height:ze,position:h.position},...Qe])},[q,h.title,h.description,g,h.id,h.jsx,h.action,h.cancel]);const Oe=React.useCallback(()=>{re(!0),ne(Ne.current),g(Pe=>Pe.filter(Ue=>Ue.toastId!==h.id)),setTimeout(()=>{w(h)},TIME_BEFORE_UNMOUNT)},[h,w,g,Ne]);React.useEffect(()=>{if(h.promise&&Se==="loading"||h.duration===1/0||h.type==="loading")return;let Pe;return S||m||Ce?(()=>{if(Ee.current<Be.current){const Qe=new Date().getTime()-Be.current;ye.current=ye.current-Qe}Ee.current=new Date().getTime()})():(()=>{ye.current!==1/0&&(Be.current=new Date().getTime(),Pe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Oe()},ye.current))})(),()=>clearTimeout(Pe)},[S,m,h,Se,Ce,Oe]),React.useEffect(()=>{h.delete&&(Oe(),h.onDismiss==null||h.onDismiss.call(h,h))},[Oe,h.delete]);function He(){var Pe;if(k!=null&&k.loading){var Ue;return React.createElement("div",{className:cn(M==null?void 0:M.loader,h==null||(Ue=h.classNames)==null?void 0:Ue.loader,"sonner-loader"),"data-visible":Se==="loading"},k.loading)}return React.createElement(Loader,{className:cn(M==null?void 0:M.loader,h==null||(Pe=h.classNames)==null?void 0:Pe.loader),visible:Se==="loading"})}const et=h.icon||(k==null?void 0:k[Se])||getAsset(Se);var Je,at;return React.createElement("li",{tabIndex:0,ref:xe,className:cn($,ve,M==null?void 0:M.toast,h==null||(t=h.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[Se],h==null||(i=h.classNames)==null?void 0:i[Se]),"data-sonner-toast":"","data-rich-colors":(Je=h.richColors)!=null?Je:C,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":q,"data-promise":!!h.promise,"data-swiped":X,"data-removed":Q,"data-visible":me,"data-y-position":fe,"data-x-position":be,"data-index":y,"data-front":ae,"data-swiping":ee,"data-dismissible":Te,"data-type":Se,"data-invert":le,"data-swipe-out":J,"data-swipe-direction":N,"data-expanded":!!(S||D&&q),"data-testid":h.testId,style:{"--index":y,"--toasts-before":y,"--z-index":E.length-y,"--offset":`${Q?ie:Ne.current}px`,"--initial-height":D?"auto":`${pe}px`,...O,...h.style},onDragEnd:()=>{z(!1),F(null),ce.current=null},onPointerDown:Pe=>{Pe.button!==2&&(de||!Te||(Ae.current=new Date,ne(Ne.current),Pe.target.setPointerCapture(Pe.pointerId),Pe.target.tagName!=="BUTTON"&&(z(!0),ce.current={x:Pe.clientX,y:Pe.clientY})))},onPointerUp:()=>{var Pe,Ue,ze;if(J||!Te)return;ce.current=null;const Qe=Number(((Pe=xe.current)==null?void 0:Pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Bt=Number(((Ue=xe.current)==null?void 0:Ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qe=new Date().getTime()-((ze=Ae.current)==null?void 0:ze.getTime()),Ye=P==="x"?Qe:Bt,Vt=Math.abs(Ye)/qe;if(Math.abs(Ye)>=SWIPE_THRESHOLD||Vt>.11){ne(Ne.current),h.onDismiss==null||h.onDismiss.call(h,h),H(P==="x"?Qe>0?"right":"left":Bt>0?"down":"up"),Oe(),te(!0);return}else{var We,st;(We=xe.current)==null||We.style.setProperty("--swipe-amount-x","0px"),(st=xe.current)==null||st.style.setProperty("--swipe-amount-y","0px")}se(!1),z(!1),F(null)},onPointerMove:Pe=>{var Ue,ze,Qe;if(!ce.current||!Te||((Ue=window.getSelection())==null?void 0:Ue.toString().length)>0)return;const qe=Pe.clientY-ce.current.y,Ye=Pe.clientX-ce.current.x;var Vt;const We=(Vt=e.swipeDirections)!=null?Vt:getDefaultSwipeDirections(K);!P&&(Math.abs(Ye)>1||Math.abs(qe)>1)&&F(Math.abs(Ye)>Math.abs(qe)?"x":"y");let st={x:0,y:0};const sr=vt=>1/(1.5+Math.abs(vt)/20);if(P==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&qe<0||We.includes("bottom")&&qe>0)st.y=qe;else{const vt=qe*sr(qe);st.y=Math.abs(vt)<Math.abs(qe)?vt:qe}}else if(P==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Ye<0||We.includes("right")&&Ye>0)st.x=Ye;else{const vt=Ye*sr(Ye);st.x=Math.abs(vt)<Math.abs(Ye)?vt:Ye}(Math.abs(st.x)>0||Math.abs(st.y)>0)&&se(!0),(ze=xe.current)==null||ze.style.setProperty("--swipe-amount-x",`${st.x}px`),(Qe=xe.current)==null||Qe.style.setProperty("--swipe-amount-y",`${st.y}px`)}},Fe&&!h.jsx&&Se!=="loading"?React.createElement("button",{"aria-label":T,"data-disabled":de,"data-close-button":!0,onClick:de||!Te?()=>{}:()=>{Oe(),h.onDismiss==null||h.onDismiss.call(h,h)},className:cn(M==null?void 0:M.closeButton,h==null||(s=h.classNames)==null?void 0:s.closeButton)},(at=k==null?void 0:k.close)!=null?at:CloseIcon):null,(Se||h.icon||h.promise)&&h.icon!==null&&((k==null?void 0:k[Se])!==null||h.icon)?React.createElement("div",{"data-icon":"",className:cn(M==null?void 0:M.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||He():null,h.type!=="loading"?et:null):null,React.createElement("div",{"data-content":"",className:cn(M==null?void 0:M.content,h==null||(a=h.classNames)==null?void 0:a.content)},React.createElement("div",{"data-title":"",className:cn(M==null?void 0:M.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?React.createElement("div",{"data-description":"",className:cn(V,Re,M==null?void 0:M.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),React.isValidElement(h.cancel)?h.cancel:h.cancel&&isAction(h.cancel)?React.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:Pe=>{isAction(h.cancel)&&Te&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Pe),Oe())},className:cn(M==null?void 0:M.cancelButton,h==null||(u=h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,React.isValidElement(h.action)?h.action:h.action&&isAction(h.action)?React.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Pe=>{isAction(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Pe),!Pe.defaultPrevented&&Oe())},className:cn(M==null?void 0:M.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function getDocumentDirection(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function assignOffset(e,t){const i={};return[e,t].forEach((s,o)=>{const a=o===1,l=a?"--mobile-offset":"--offset",c=a?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function u(f){["top","right","bottom","left"].forEach(d=>{i[`${l}-${d}`]=typeof f=="number"?`${f}px`:f})}typeof s=="number"||typeof s=="string"?u(s):typeof s=="object"?["top","right","bottom","left"].forEach(f=>{s[f]===void 0?i[`${l}-${f}`]=c:i[`${l}-${f}`]=typeof s[f]=="number"?`${s[f]}px`:s[f]}):u(c)}),i}const Toaster=React.forwardRef(function e(t,i){const{id:s,invert:o,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:u,className:f,offset:d,mobileOffset:h,theme:p="light",richColors:m,duration:g,style:v,visibleToasts:b=VISIBLE_TOASTS_AMOUNT,toastOptions:y,dir:E=getDocumentDirection(),gap:S=GAP,icons:w,containerAriaLabel:C="Notifications"}=t,[A,O]=React.useState([]),I=React.useMemo(()=>s?A.filter(q=>q.toasterId===s):A.filter(q=>!q.toasterId),[A,s]),L=React.useMemo(()=>Array.from(new Set([a].concat(I.filter(q=>q.position).map(q=>q.position)))),[I,a]),[$,V]=React.useState([]),[W,K]=React.useState(!1),[j,D]=React.useState(!1),[M,k]=React.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),T=React.useRef(null),P=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=React.useRef(null),N=React.useRef(!1),H=React.useCallback(q=>{O(Y=>{var Q;return(Q=Y.find(re=>re.id===q.id))!=null&&Q.delete||ToastState.dismiss(q.id),Y.filter(({id:re})=>re!==q.id)})},[]);return React.useEffect(()=>ToastState.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{O(Y=>Y.map(Q=>Q.id===q.id?{...Q,delete:!0}:Q))});return}setTimeout(()=>{ReactDOM.flushSync(()=>{O(Y=>{const Q=Y.findIndex(re=>re.id===q.id);return Q!==-1?[...Y.slice(0,Q),{...Y[Q],...q},...Y.slice(Q+1)]:[q,...Y]})})})}),[A]),React.useEffect(()=>{if(p!=="system"){k(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Y})=>{k(Y?"dark":"light")})}catch{q.addListener(({matches:Q})=>{try{k(Q?"dark":"light")}catch(re){console.error(re)}})}},[p]),React.useEffect(()=>{A.length<=1&&K(!1)},[A]),React.useEffect(()=>{const q=Y=>{var Q;if(l.every(z=>Y[z]||Y.code===z)){var ee;K(!0),(ee=T.current)==null||ee.focus()}Y.code==="Escape"&&(document.activeElement===T.current||(Q=T.current)!=null&&Q.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),React.useEffect(()=>{if(T.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,N.current=!1)}},[T.current]),React.createElement("section",{ref:i,"aria-label":`${C} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((q,Y)=>{var Q;const[re,ee]=q.split("-");return I.length?React.createElement("ol",{key:q,dir:E==="auto"?getDocumentDirection():E,tabIndex:-1,ref:T,className:f,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":re,"data-x-position":ee,style:{"--front-toast-height":`${((Q=$[0])==null?void 0:Q.height)||0}px`,"--width":`${TOAST_WIDTH}px`,"--gap":`${S}px`,...v,...assignOffset(d,h)},onBlur:z=>{N.current&&!z.currentTarget.contains(z.relatedTarget)&&(N.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||N.current||(N.current=!0,F.current=z.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{j||K(!1)},onDragEnd:()=>K(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},I.filter(z=>!z.position&&Y===0||z.position===q).map((z,J)=>{var te,X;return React.createElement(Toast,{key:z.id,icons:w,index:J,toast:z,defaultRichColors:m,duration:(te=y==null?void 0:y.duration)!=null?te:g,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:b,closeButton:(X=y==null?void 0:y.closeButton)!=null?X:u,interacting:j,position:q,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:H,toasts:I.filter(se=>se.position==z.position),heights:$.filter(se=>se.position==z.position),setHeights:V,expandByDefault:c,gap:S,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),box_epic_icon$1=assetUrl("boxes/rewards/box_epic.webp"),box_legend_icon$1=assetUrl("boxes/rewards/box_legend.webp"),box_rare_icon$1=assetUrl("boxes/rewards/box_rare.webp"),coins_1000_icon=assetUrl("boxes/rewards/reward_coins_1000.webp"),usdt_50_icon$1=assetUrl("boxes/rewards/reward_usdt_50.webp");function pickIconByRewardType(e){switch(e){case"coins":return coins_1000_icon;case"usdt":return usdt_50_icon$1;case"box":{const t=[box_epic_icon$1,box_legend_icon$1,box_rare_icon$1];return t[Math.floor(Math.random()*t.length)]}default:return coins_1000_icon}}function EventToast({recentReward:e}){const{t}=useTranslation(),i=`${telegramLanguageCodeToFlagEmoji(e.country_code)} ${e.name}`.trim(),s=formatTimeAgo(e.received_at,t),o=pickIconByRewardType(e.reward_type);return jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_max-content] items-center bg-white rounded-[20px] w-[130px] shadow-[0_0_10px_0_rgba(0,0,0,0.20)] transition-all duration-200 gap-1 py-1.5 pr-1.5 pl-2.5",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"truncate text-[13px] font-[590] leading-[16px] !text-black",children:i}),jsxRuntimeExports.jsx("span",{className:"truncate text-[10px] font-[400] leading-[13px] !text-black/50",children:s})]}),jsxRuntimeExports.jsx("div",{className:"flex-shrink-0",children:jsxRuntimeExports.jsx("img",{src:o,alt:i,className:"object-cover size-6"})})]})}function getEventsBottomOffset(){var e;return((e=window.Telegram.WebApp)==null?void 0:e.safeAreaInset.bottom)+66+16}function EventsStack(){return jsxRuntimeExports.jsx(Toaster,{expand:!0,visibleToasts:2,gap:6,duration:6e3,mobileOffset:{left:window.innerWidth-130-16,bottom:getEventsBottomOffset()},position:"bottom-right"})}const ConfettiParticles=({count:e=50,style:t,delay:i=0,margin:s=8,padding:o=8})=>{const[a,l]=React.useState(!1),c=React.useRef(null),u=React.useRef(null),f=React.useRef([]),d=React.useRef(),h=4,[p,m]=React.useState(360),[g,v]=React.useState(42);return React.useEffect(()=>{const b=()=>{if(u.current){const E=u.current.getBoundingClientRect();m(E.width-(s+o)*2),v(E.height-(s+o)*2)}},y=new ResizeObserver(b);return u.current&&y.observe(u.current),b(),()=>{y.disconnect()}},[s,o]),React.useEffect(()=>{if(i>0){const b=setTimeout(()=>{l(!0)},i);return()=>clearTimeout(b)}l(!0)},[i]),React.useEffect(()=>{const b=["#FAFF00","#FF6FB4","#00FFA3","#504BD7","#6FFFBA","#31FF0D","#00E0FF","#FF7B00","#0DFF6A","#B0FF27"],y=()=>{const w=b[Math.floor(Math.random()*b.length)];let C,A;if(p===g){const O=p/2*Math.sqrt(Math.random()),I=Math.random()*2*Math.PI,L=s+o+p/2;C=(L+O*Math.cos(I))*h,A=(L+O*Math.sin(I))*h}else C=(s+o+Math.random()*p)*h,A=(s+o+Math.random()*g)*h;return{x:C,y:A,size:1.5+Math.random()*1.5,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.1,y:(Math.random()-.5)*.1},fadeOut:!1,type:Math.random()<.5?"circle":"star",color:w}};f.current=Array(e).fill(null).map(y);let E=performance.now();const S=w=>{const C=c.current,A=C==null?void 0:C.getContext("2d",{alpha:!0});if(!C||!A)return;const O=w-E;E=w,A.clearRect(0,0,(p+(o+s)*2)*h,(g+(o+s)*2)*h),f.current.forEach(I=>{if(p===g){const L=(s+o+p/2)*h,$=(p/2+o)*h,V=Math.sqrt((I.x-L)**2+(I.y-L)**2);!I.fadeOut&&V>$&&(I.fadeOut=!0)}else!I.fadeOut&&(I.x<s*h||I.x>(s+o+p+o)*h||I.y<s*h||I.y>(s+o+g+o)*h)&&(I.fadeOut=!0);if(I.x+=I.velocity.x*O,I.y+=I.velocity.y*O,I.fadeOut){const V=.001*(1+Math.sqrt(I.velocity.x*I.velocity.x+I.velocity.y*I.velocity.y)*50);I.opacity=Math.max(0,I.opacity-V*O),I.opacity<=0&&(Object.assign(I,y()),I.fadeOut=!1)}if(A.save(),A.translate(I.x,I.y),A.globalAlpha=I.opacity,I.type==="circle")A.beginPath(),A.arc(0,0,I.size*h,0,Math.PI*2),A.fillStyle=I.color,A.fill();else if(I.type==="star"){const L=I.size*h*1.5;A.beginPath(),A.moveTo(0,-L),A.lineTo(L/3,-L/3),A.lineTo(L,0),A.lineTo(L/3,L/3),A.lineTo(0,L),A.lineTo(-L/3,L/3),A.lineTo(-L,0),A.lineTo(-L/3,-L/3),A.closePath(),A.fillStyle=I.color,A.fill()}A.restore()}),d.current=requestAnimationFrame(S)};return d.current=requestAnimationFrame(S),()=>{d.current&&cancelAnimationFrame(d.current)}},[p,g,e,s,o]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{ref:u,style:{position:"absolute",inset:-(s+o),pointerEvents:"none"}}),jsxRuntimeExports.jsx("canvas",{width:(p+(s+o)*2)*h,height:(g+(s+o)*2)*h,ref:c,style:{position:"absolute",zIndex:1,opacity:a?1:0,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",transform:`scale(${1/h})`,transformOrigin:"top left",inset:-(s+o),imageRendering:"auto",pointerEvents:"none",...t}})]})},BoxOpeningContext=React.createContext(void 0),BoxOpeningProvider=({children:e})=>{const[t,i]=React.useState(void 0),[s,o]=React.useState("IDLE"),[a,l]=React.useState("carousel"),[c,u]=React.useState("wheel"),[f,d]=React.useState(!1),h=(m,g="wheel")=>{i(m),u(g),d(!1),g==="wheel"&&(o("IDLE"),l("carousel")),g==="result"&&(o("STOPPED"),l("carousel"))},p=()=>{i(void 0),u("wheel"),d(!1)};return jsxRuntimeExports.jsx(BoxOpeningContext.Provider,{value:{wheelSpinState:s,animationPhase:a,viewMode:c,isBoxOpeningModalOpen:t!==void 0,currentBoxId:t,isSkipped:f,openBoxModal:h,closeBoxModal:p,setWheelSpinState:o,setAnimationPhase:l,setSkipped:d},children:e})},useBoxOpening=()=>{const e=React.useContext(BoxOpeningContext);if(e===void 0)throw new Error("useBoxOpening must be used within a BoxOpeningProvider");return e};function useBoxRewards(e){return useMutation({mutationFn:async({boxId:t})=>{const i=await makeRequest(`inventory/${t}`,"GET"),s=i.rewards.filter(o=>o.reward_type!=="double_balance"&&o.reward_type!=="telegram_premium").map(o=>({...o,reward_value:o.reward_type==="usdt"?dividePriceResponse(o.reward_value):o.reward_value}));return{...i,rewards:s}},...e})}function useRevealReward(e){const t=useQueryClient();return useMutation({mutationFn:async({boxId:i})=>{const s=await makeRequest(`inventory/${i}/open`,"POST");return{...s,reward_value:s.reward_type==="usdt"?dividePriceResponse(s.reward_value):s.reward_value}},onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}const boxSilverIcon=assetUrl("boxes/rewards/box_epic.webp"),boxGoldIcon=assetUrl("boxes/rewards/box_legend.webp"),boxBronzeIcon=assetUrl("boxes/rewards/box_rare.webp"),boxCommonIcon=assetUrl("boxes/rewards/box_regular.webp"),getBoxImage=e=>e.name==="Bronze box"?e.image||boxBronzeIcon:e.name==="Silver box"?e.image||boxSilverIcon:e.name==="Gold box"?e.image||boxGoldIcon:e.image||boxCommonIcon;function ProfileInventoryModal({...e}){const{t}=useTranslation(),{isOpen:i,setIsOpen:s}=useInventoryModalStore(),{data:{inventory:o}}=useProfile(),{openBoxModal:a}=useBoxOpening(),l=f=>{var d,h;(h=(d=window.Telegram)==null?void 0:d.WebApp)==null||h.HapticFeedback.impactOccurred("soft"),a(f)},c=f=>{switch(f.name){case"Bronze box":return t("unopenedLootBox");case"Silver box":return t("unopenedLootBox");case"Gold box":return t("unopenedLootBox");default:return t("unopenedLootBox")}},u=f=>{switch(f.name){case"Bronze box":return t("reward_type.box_rare");case"Silver box":return t("reward_type.box_epic");case"Gold box":return t("reward_type.box_legend");default:return t("reward_type.box_common")}};return jsxRuntimeExports.jsx(Drawer,{open:i,onOpenChange:s,...e,children:jsxRuntimeExports.jsx(DrawerContent,{className:"min-h-[calc(95dvh-var(--tg-safe-area-inset-top)-var(--tg-safe-area-inset-bottom))] max-h-[calc(95dvh-var(--tg-safe-area-inset-top)-var(--tg-safe-area-inset-bottom))]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Title$1,{level:"2",weight:"1",children:[t("inventoryModal.title")," ",jsxRuntimeExports.jsx("span",{className:"text-hint",children:o.length})]}),jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",className:"opacity-70",children:t("inventoryModal.description")})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-x-[10px] gap-y-[30px] justify-items-center",children:[o.map((f,d)=>jsxRuntimeExports.jsxs(motion.div,{className:"min-w-[96px] min-h-[96px] rounded-full flex flex-col items-center justify-center gap-2.5 relative cursor-pointer",onClick:()=>f&&l(f.id),role:f?"button":void 0,tabIndex:f?0:void 0,"aria-label":f?`${t("openItem")} ${(f==null?void 0:f.name)==="Empty box"?t("emptyBox"):c(f)}`:void 0,onKeyDown:h=>{f&&(h.key==="Enter"||h.key===" ")&&l(f.id)},whileTap:f?{scale:.95}:void 0,transition:{type:"spring",stiffness:400,damping:30},children:[f&&jsxRuntimeExports.jsx("img",{src:getBoxImage(f),alt:c(f),width:96,height:96,className:"size-24 object-contain scale-110"}),jsxRuntimeExports.jsx("div",{className:cn$1("rounded-[40px] flex items-center justify-center px-[6px] py-[3px] absolute","text-rounded","right-0 top-17","font-[800]",f.name==="Gold box"||f.name==="Gold box"?"text-gray-900 ":"text-white"),style:{boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)",background:f.name==="Bronze box"?"linear-gradient(180deg, #00D1ED 0%, #0D31FF 100%)":f.name==="Silver box"?"linear-gradient(180deg, #BE1DE6 0%, #510DFF 100%)":f.name==="Gold box"?"linear-gradient(180deg, #FFFF00 0%, #FF9900 100%)":"linear-gradient(180deg, #CDCDCD 0%, #707070 100%)"},children:jsxRuntimeExports.jsx(Text,{style:{fontWeight:900,fontSize:12},children:u(f)})}),jsxRuntimeExports.jsx(Text,{weight:"2",children:c(f)})]},`inventory-slot-${f?f.id:d}`)),Array.from({length:o.length%3===0&&o.length!==0?0:3-o.length%3}).map((f,d)=>jsxRuntimeExports.jsx("div",{className:"size-24 rounded-full",style:{background:"var(--tgui--secondary_bg_color)"}},`empty-slot-${o.length}-${d}`))]})})]})})})}const AnimatedFullscreen=React.memo(({isOpen:e,children:t,backgroundImage:i,backgroundColor:s="var(--tgui--bg_color)",animationType:o="scale",overlayImage:a,showOverlay:l=!1})=>{const[c,u]=React.useState(!1),[f,d]=React.useState(!1),[h,p]=React.useState(i);React.useEffect(()=>{if(console.log("[AnimatedFullscreen] isOpen changed:",e),e){u(!0);const w=setTimeout(()=>{console.log("[AnimatedFullscreen] Setting isAnimating to true"),d(!0)},50);return()=>clearTimeout(w)}console.log("[AnimatedFullscreen] Closing - setting isAnimating to false"),d(!1);const S=setTimeout(()=>{console.log("[AnimatedFullscreen] Setting isVisible to false"),u(!1)},300);return()=>clearTimeout(S)},[e]),React.useEffect(()=>{console.log("[AnimatedFullscreen] backgroundImage changed:",i),i&&p(i)},[i]);const m=React.useMemo(()=>`${h??""}::${s??""}`,[h,s]),g=React.useMemo(()=>{const S={backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat"};if(o==="circle"){const C=f?"150%":"0%",A={...S,background:h?`radial-gradient(circle at center, ${s} ${C}, transparent ${C}), url(${h})`:`radial-gradient(circle at center, ${s} ${C}, transparent ${C})`,transition:"background 600ms cubic-bezier(0.4, 0, 0.2, 1)"};return console.log("[AnimatedFullscreen] Circle mode background style:",A),A}const w={...S,backgroundImage:h,backgroundColor:s};return console.log("[AnimatedFullscreen] Default mode background style:",w),w},[o,f,h,s]),v=React.useMemo(()=>o==="scale"?f?"scale(1)":"scale(0.6)":"scale(1)",[o,f]),b=React.useMemo(()=>({backgroundImage:`url(${a})`,backgroundSize:"100% 100%",zIndex:2}),[a]),y=React.useMemo(()=>({backgroundColor:"cyan",mixBlendMode:"color",zIndex:3}),[]),E=React.useMemo(()=>({transform:v,transition:"transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1)",paddingLeft:"var(--tg-safe-area-inset-left, 0px)",paddingRight:"var(--tg-safe-area-inset-right, 0px)"}),[v]);return console.log("[AnimatedFullscreen] Rendering with:",{isVisible:c,isAnimating:f,animationType:o,backgroundColor:s,displayedBackground:h,hasBackgroundImage:!!i,opacity:f?1:0,transform:v}),c?jsxRuntimeExports.jsxs("div",{className:cn$1("transition-opacity duration-400 ease-in-out",f?"opacity-100":"opacity-0"),children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-0 bg-white"}),jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0",style:{...g,zIndex:1},initial:{opacity:0},animate:{opacity:f?1:0},exit:{opacity:0},transition:{duration:.4,ease:"easeInOut"}},m)}),jsxRuntimeExports.jsx(AnimatePresence,{children:a&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0 mix-blend-overlay bg-center bg-no-repeat",style:b,initial:{opacity:0},animate:{opacity:l&&f?1:0},exit:{opacity:0},transition:{duration:f?.4:.1,ease:"easeInOut"}}),jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0",style:y,initial:{opacity:0},animate:{opacity:l&&f?.8:0},exit:{opacity:0},transition:{duration:f?.4:.1,ease:"easeInOut"}})]})}),jsxRuntimeExports.jsx("div",{className:"relative w-full h-full flex items-center justify-center z-10",children:jsxRuntimeExports.jsx("div",{className:"w-full h-full flex flex-col",style:E,children:t})})]}):(console.log("[AnimatedFullscreen] Not visible, returning null"),null)}),BOX_OPENING_ANIMATION_DURATION_MS=4e3,BOX_OPENING_SKIPPED_ANIMATION_DURATION_MS=500;function isObject$1(e){return Object.prototype.toString.call(e)==="[object Object]"}function isRecord(e){return isObject$1(e)||Array.isArray(e)}function canUseDOM(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function areOptionsEqual(e,t){const i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==a?!1:i.every(l=>{const c=e[l],u=t[l];return typeof c=="function"?`${c}`==`${u}`:!isRecord(c)||!isRecord(u)?c===u:areOptionsEqual(c,u)})}function sortAndMapPluginToOptions(e){return e.concat().sort((t,i)=>t.name>i.name?1:-1).map(t=>t.options)}function arePluginsEqual(e,t){if(e.length!==t.length)return!1;const i=sortAndMapPluginToOptions(e),s=sortAndMapPluginToOptions(t);return i.every((o,a)=>{const l=s[a];return areOptionsEqual(o,l)})}function isNumber(e){return typeof e=="number"}function isString$1(e){return typeof e=="string"}function isBoolean(e){return typeof e=="boolean"}function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function mathAbs(e){return Math.abs(e)}function mathSign(e){return Math.sign(e)}function deltaAbs(e,t){return mathAbs(e-t)}function factorAbs(e,t){if(e===0||t===0||mathAbs(e)<=mathAbs(t))return 0;const i=deltaAbs(mathAbs(e),mathAbs(t));return mathAbs(i/e)}function roundToTwoDecimals(e){return Math.round(e*100)/100}function arrayKeys(e){return objectKeys(e).map(Number)}function arrayLast(e){return e[arrayLastIndex(e)]}function arrayLastIndex(e){return Math.max(0,e.length-1)}function arrayIsLastIndex(e,t){return t===arrayLastIndex(e)}function arrayFromNumber(e,t=0){return Array.from(Array(e),(i,s)=>t+s)}function objectKeys(e){return Object.keys(e)}function objectsMergeDeep(e,t){return[e,t].reduce((i,s)=>(objectKeys(s).forEach(o=>{const a=i[o],l=s[o],c=isObject(a)&&isObject(l);i[o]=c?objectsMergeDeep(a,l):l}),i),{})}function isMouseEvent(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Alignment(e,t){const i={start:s,center:o,end:a};function s(){return 0}function o(u){return a(u)/2}function a(u){return t-u}function l(u,f){return isString$1(e)?i[e](u):e(t,u,f)}return{measure:l}}function EventStore(){let e=[];function t(o,a,l,c={passive:!0}){let u;if("addEventListener"in o)o.addEventListener(a,l,c),u=()=>o.removeEventListener(a,l,c);else{const f=o;f.addListener(l),u=()=>f.removeListener(l)}return e.push(u),s}function i(){e=e.filter(o=>o())}const s={add:t,clear:i};return s}function Animations(e,t,i,s){const o=EventStore(),a=1e3/60;let l=null,c=0,u=0;function f(){o.add(e,"visibilitychange",()=>{e.hidden&&g()})}function d(){m(),o.clear()}function h(b){if(!u)return;l||(l=b,i(),i());const y=b-l;for(l=b,c+=y;c>=a;)i(),c-=a;const E=c/a;s(E),u&&(u=t.requestAnimationFrame(h))}function p(){u||(u=t.requestAnimationFrame(h))}function m(){t.cancelAnimationFrame(u),l=null,c=0,u=0}function g(){l=null,c=0}return{init:f,destroy:d,start:p,stop:m,update:i,render:s}}function Axis(e,t){const i=t==="rtl",s=e==="y",o=s?"y":"x",a=s?"x":"y",l=!s&&i?-1:1,c=d(),u=h();function f(g){const{height:v,width:b}=g;return s?v:b}function d(){return s?"top":i?"right":"left"}function h(){return s?"bottom":i?"left":"right"}function p(g){return g*l}return{scroll:o,cross:a,startEdge:c,endEdge:u,measureSize:f,direction:p}}function Limit(e=0,t=0){const i=mathAbs(e-t);function s(f){return f<e}function o(f){return f>t}function a(f){return s(f)||o(f)}function l(f){return a(f)?s(f)?e:t:f}function c(f){return i?f-i*Math.ceil((f-t)/i):f}return{length:i,max:t,min:e,constrain:l,reachedAny:a,reachedMax:o,reachedMin:s,removeOffset:c}}function Counter(e,t,i){const{constrain:s}=Limit(0,e),o=e+1;let a=l(t);function l(p){return i?mathAbs((o+p)%o):s(p)}function c(){return a}function u(p){return a=l(p),h}function f(p){return d().set(c()+p)}function d(){return Counter(e,c(),i)}const h={get:c,set:u,add:f,clone:d};return h}function DragHandler(e,t,i,s,o,a,l,c,u,f,d,h,p,m,g,v,b,y,E){const{cross:S,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],A={passive:!1},O=EventStore(),I=EventStore(),L=Limit(50,225).constrain(m.measure(20)),$={mouse:300,touch:400},V={mouse:500,touch:600},W=g?43:25;let K=!1,j=0,D=0,M=!1,k=!1,T=!1,P=!1;function F(se){if(!E)return;function ie(pe){(isBoolean(E)||E(se,pe))&&re(pe)}const ne=t;O.add(ne,"dragstart",pe=>pe.preventDefault(),A).add(ne,"touchmove",()=>{},A).add(ne,"touchend",()=>{}).add(ne,"touchstart",ie).add(ne,"mousedown",ie).add(ne,"touchcancel",z).add(ne,"contextmenu",z).add(ne,"click",J,!0)}function N(){O.clear(),I.clear()}function H(){const se=P?i:t;I.add(se,"touchmove",ee,A).add(se,"touchend",z).add(se,"mousemove",ee,A).add(se,"mouseup",z)}function q(se){const ie=se.nodeName||"";return C.includes(ie)}function Y(){return(g?V:$)[P?"mouse":"touch"]}function Q(se,ie){const ne=h.add(mathSign(se)*-1),pe=d.byDistance(se,!g).distance;return g||mathAbs(se)<L?pe:b&&ie?pe*.5:d.byIndex(ne.get(),0).distance}function re(se){const ie=isMouseEvent(se,s);P=ie,T=g&&ie&&!se.buttons&&K,K=deltaAbs(o.get(),l.get())>=2,!(ie&&se.button!==0)&&(q(se.target)||(M=!0,a.pointerDown(se),f.useFriction(0).useDuration(0),o.set(l),H(),j=a.readPoint(se),D=a.readPoint(se,S),p.emit("pointerDown")))}function ee(se){if(!isMouseEvent(se,s)&&se.touches.length>=2)return z(se);const ne=a.readPoint(se),pe=a.readPoint(se,S),_e=deltaAbs(ne,j),ye=deltaAbs(pe,D);if(!k&&!P&&(!se.cancelable||(k=_e>ye,!k)))return z(se);const Ae=a.pointerMove(se);_e>v&&(T=!0),f.useFriction(.3).useDuration(.75),c.start(),o.add(w(Ae)),se.preventDefault()}function z(se){const ne=d.byDistance(0,!1).index!==h.get(),pe=a.pointerUp(se)*Y(),_e=Q(w(pe),ne),ye=factorAbs(pe,_e),Ae=W-10*ye,xe=y+ye/50;k=!1,M=!1,I.clear(),f.useDuration(Ae).useFriction(xe),u.distance(_e,!g),P=!1,p.emit("pointerUp")}function J(se){T&&(se.stopPropagation(),se.preventDefault(),T=!1)}function te(){return M}return{init:F,destroy:N,pointerDown:te}}function DragTracker(e,t){let s,o;function a(h){return h.timeStamp}function l(h,p){const g=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(isMouseEvent(h,t)?h:h.touches[0])[g]}function c(h){return s=h,o=h,l(h)}function u(h){const p=l(h)-l(o),m=a(h)-a(s)>170;return o=h,m&&(s=h),p}function f(h){if(!s||!o)return 0;const p=l(o)-l(s),m=a(h)-a(s),g=a(h)-a(o)>170,v=p/m;return m&&!g&&mathAbs(v)>.1?v:0}return{pointerDown:c,pointerMove:u,pointerUp:f,readPoint:l}}function NodeRects(){function e(i){const{offsetTop:s,offsetLeft:o,offsetWidth:a,offsetHeight:l}=i;return{top:s,right:o+a,bottom:s+l,left:o,width:a,height:l}}return{measure:e}}function PercentOfView(e){function t(s){return e*(s/100)}return{measure:t}}function ResizeHandler(e,t,i,s,o,a,l){const c=[e].concat(s);let u,f,d=[],h=!1;function p(b){return o.measureSize(l.measure(b))}function m(b){if(!a)return;f=p(e),d=s.map(p);function y(E){for(const S of E){if(h)return;const w=S.target===e,C=s.indexOf(S.target),A=w?f:d[C],O=p(w?e:s[C]);if(mathAbs(O-A)>=.5){b.reInit(),t.emit("resize");break}}}u=new ResizeObserver(E=>{(isBoolean(a)||a(b,E))&&y(E)}),i.requestAnimationFrame(()=>{c.forEach(E=>u.observe(E))})}function g(){h=!0,u&&u.disconnect()}return{init:m,destroy:g}}function ScrollBody(e,t,i,s,o,a){let l=0,c=0,u=o,f=a,d=e.get(),h=0;function p(){const A=s.get()-e.get(),O=!u;let I=0;return O?(l=0,i.set(s),e.set(s),I=A):(i.set(e),l+=A/u,l*=f,d+=l,e.add(l),I=d-h),c=mathSign(I),h=d,C}function m(){const A=s.get()-t.get();return mathAbs(A)<.001}function g(){return u}function v(){return c}function b(){return l}function y(){return S(o)}function E(){return w(a)}function S(A){return u=A,C}function w(A){return f=A,C}const C={direction:v,duration:g,velocity:b,seek:p,settled:m,useBaseFriction:E,useBaseDuration:y,useFriction:w,useDuration:S};return C}function ScrollBounds(e,t,i,s,o){const a=o.measure(10),l=o.measure(50),c=Limit(.1,.99);let u=!1;function f(){return!(u||!e.reachedAny(i.get())||!e.reachedAny(t.get()))}function d(m){if(!f())return;const g=e.reachedMin(t.get())?"min":"max",v=mathAbs(e[g]-t.get()),b=i.get()-t.get(),y=c.constrain(v/l);i.subtract(b*y),!m&&mathAbs(b)<a&&(i.set(e.constrain(i.get())),s.useDuration(25).useBaseFriction())}function h(m){u=!m}return{shouldConstrain:f,constrain:d,toggleActive:h}}function ScrollContain(e,t,i,s,o){const a=Limit(-t+e,0),l=h(),c=d(),u=p();function f(g,v){return deltaAbs(g,v)<=1}function d(){const g=l[0],v=arrayLast(l),b=l.lastIndexOf(g),y=l.indexOf(v)+1;return Limit(b,y)}function h(){return i.map((g,v)=>{const{min:b,max:y}=a,E=a.constrain(g),S=!v,w=arrayIsLastIndex(i,v);return S?y:w||f(b,E)?b:f(y,E)?y:E}).map(g=>parseFloat(g.toFixed(3)))}function p(){if(t<=e+o)return[a.max];if(s==="keepSnaps")return l;const{min:g,max:v}=c;return l.slice(g,v)}return{snapsContained:u,scrollContainLimit:c}}function ScrollLimit(e,t,i){const s=t[0],o=i?s-e:arrayLast(t);return{limit:Limit(o,s)}}function ScrollLooper(e,t,i,s){const a=t.min+.1,l=t.max+.1,{reachedMin:c,reachedMax:u}=Limit(a,l);function f(p){return p===1?u(i.get()):p===-1?c(i.get()):!1}function d(p){if(!f(p))return;const m=e*(p*-1);s.forEach(g=>g.add(m))}return{loop:d}}function ScrollProgress(e){const{max:t,length:i}=e;function s(a){const l=a-t;return i?l/-i:0}return{get:s}}function ScrollSnaps(e,t,i,s,o){const{startEdge:a,endEdge:l}=e,{groupSlides:c}=o,u=h().map(t.measure),f=p(),d=m();function h(){return c(s).map(v=>arrayLast(v)[l]-v[0][a]).map(mathAbs)}function p(){return s.map(v=>i[a]-v[a]).map(v=>-mathAbs(v))}function m(){return c(f).map(v=>v[0]).map((v,b)=>v+u[b])}return{snaps:f,snapsAligned:d}}function SlideRegistry(e,t,i,s,o,a){const{groupSlides:l}=o,{min:c,max:u}=s,f=d();function d(){const p=l(a),m=!e||t==="keepSnaps";return i.length===1?[a]:m?p:p.slice(c,u).map((g,v,b)=>{const y=!v,E=arrayIsLastIndex(b,v);if(y){const S=arrayLast(b[0])+1;return arrayFromNumber(S)}if(E){const S=arrayLastIndex(a)-arrayLast(b)[0]+1;return arrayFromNumber(S,arrayLast(b)[0])}return g})}return{slideRegistry:f}}function ScrollTarget(e,t,i,s,o){const{reachedAny:a,removeOffset:l,constrain:c}=s;function u(g){return g.concat().sort((v,b)=>mathAbs(v)-mathAbs(b))[0]}function f(g){const v=e?l(g):c(g),b=t.map((E,S)=>({diff:d(E-v,0),index:S})).sort((E,S)=>mathAbs(E.diff)-mathAbs(S.diff)),{index:y}=b[0];return{index:y,distance:v}}function d(g,v){const b=[g,g+i,g-i];if(!e)return g;if(!v)return u(b);const y=b.filter(E=>mathSign(E)===v);return y.length?u(y):arrayLast(b)-i}function h(g,v){const b=t[g]-o.get(),y=d(b,v);return{index:g,distance:y}}function p(g,v){const b=o.get()+g,{index:y,distance:E}=f(b),S=!e&&a(b);if(!v||S)return{index:y,distance:g};const w=t[y]-E,C=g+d(w,0);return{index:y,distance:C}}return{byDistance:p,byIndex:h,shortcut:d}}function ScrollTo(e,t,i,s,o,a,l){function c(h){const p=h.distance,m=h.index!==t.get();a.add(p),p&&(s.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(i.set(t.get()),t.set(h.index),l.emit("select"))}function u(h,p){const m=o.byDistance(h,p);c(m)}function f(h,p){const m=t.clone().set(h),g=o.byIndex(m.get(),p);c(g)}return{distance:u,index:f}}function SlideFocus(e,t,i,s,o,a,l,c){const u={passive:!0,capture:!0};let f=0;function d(m){if(!c)return;function g(v){if(new Date().getTime()-f>10)return;l.emit("slideFocusStart"),e.scrollLeft=0;const E=i.findIndex(S=>S.includes(v));isNumber(E)&&(o.useDuration(0),s.index(E,0),l.emit("slideFocus"))}a.add(document,"keydown",h,!1),t.forEach((v,b)=>{a.add(v,"focus",y=>{(isBoolean(c)||c(m,y))&&g(b)},u)})}function h(m){m.code==="Tab"&&(f=new Date().getTime())}return{init:d}}function Vector1D(e){let t=e;function i(){return t}function s(u){t=l(u)}function o(u){t+=l(u)}function a(u){t-=l(u)}function l(u){return isNumber(u)?u:u.get()}return{get:i,set:s,add:o,subtract:a}}function Translate(e,t){const i=e.scroll==="x"?l:c,s=t.style;let o=null,a=!1;function l(p){return`translate3d(${p}px,0px,0px)`}function c(p){return`translate3d(0px,${p}px,0px)`}function u(p){if(a)return;const m=roundToTwoDecimals(e.direction(p));m!==o&&(s.transform=i(m),o=m)}function f(p){a=!p}function d(){a||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:u,toggleActive:f}}function SlideLooper(e,t,i,s,o,a,l,c,u){const d=arrayKeys(o),h=arrayKeys(o).reverse(),p=y().concat(E());function m(O,I){return O.reduce((L,$)=>L-o[$],I)}function g(O,I){return O.reduce((L,$)=>m(L,I)>0?L.concat([$]):L,[])}function v(O){return a.map((I,L)=>({start:I-s[L]+.5+O,end:I+t-.5+O}))}function b(O,I,L){const $=v(I);return O.map(V=>{const W=L?0:-i,K=L?i:0,j=L?"end":"start",D=$[V][j];return{index:V,loopPoint:D,slideLocation:Vector1D(-1),translate:Translate(e,u[V]),target:()=>c.get()>D?W:K}})}function y(){const O=l[0],I=g(h,O);return b(I,i,!1)}function E(){const O=t-l[0]-1,I=g(d,O);return b(I,-i,!0)}function S(){return p.every(({index:O})=>{const I=d.filter(L=>L!==O);return m(I,t)<=.1})}function w(){p.forEach(O=>{const{target:I,translate:L,slideLocation:$}=O,V=I();V!==$.get()&&(L.to(V),$.set(V))})}function C(){p.forEach(O=>O.translate.clear())}return{canLoop:S,clear:C,loop:w,loopPoints:p}}function SlidesHandler(e,t,i){let s,o=!1;function a(u){if(!i)return;function f(d){for(const h of d)if(h.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(d=>{o||(isBoolean(i)||i(u,d))&&f(d)}),s.observe(e,{childList:!0})}function l(){s&&s.disconnect(),o=!0}return{init:a,destroy:l}}function SlidesInView(e,t,i,s){const o={};let a=null,l=null,c,u=!1;function f(){c=new IntersectionObserver(g=>{u||(g.forEach(v=>{const b=t.indexOf(v.target);o[b]=v}),a=null,l=null,i.emit("slidesInView"))},{root:e.parentElement,threshold:s}),t.forEach(g=>c.observe(g))}function d(){c&&c.disconnect(),u=!0}function h(g){return objectKeys(o).reduce((v,b)=>{const y=parseInt(b),{isIntersecting:E}=o[y];return(g&&E||!g&&!E)&&v.push(y),v},[])}function p(g=!0){if(g&&a)return a;if(!g&&l)return l;const v=h(g);return g&&(a=v),g||(l=v),v}return{init:f,destroy:d,get:p}}function SlideSizes(e,t,i,s,o,a){const{measureSize:l,startEdge:c,endEdge:u}=e,f=i[0]&&o,d=g(),h=v(),p=i.map(l),m=b();function g(){if(!f)return 0;const E=i[0];return mathAbs(t[c]-E[c])}function v(){if(!f)return 0;const E=a.getComputedStyle(arrayLast(s));return parseFloat(E.getPropertyValue(`margin-${u}`))}function b(){return i.map((E,S,w)=>{const C=!S,A=arrayIsLastIndex(w,S);return C?p[S]+d:A?p[S]+h:w[S+1][c]-E[c]}).map(mathAbs)}return{slideSizes:p,slideSizesWithGaps:m,startGap:d,endGap:h}}function SlidesToScroll(e,t,i,s,o,a,l,c,u){const{startEdge:f,endEdge:d,direction:h}=e,p=isNumber(i);function m(y,E){return arrayKeys(y).filter(S=>S%E===0).map(S=>y.slice(S,S+E))}function g(y){return y.length?arrayKeys(y).reduce((E,S,w)=>{const C=arrayLast(E)||0,A=C===0,O=S===arrayLastIndex(y),I=o[f]-a[C][f],L=o[f]-a[S][d],$=!s&&A?h(l):0,V=!s&&O?h(c):0,W=mathAbs(L-V-(I+$));return w&&W>t+u&&E.push(S),O&&E.push(y.length),E},[]).map((E,S,w)=>{const C=Math.max(w[S-1]||0);return y.slice(C,E)}):[]}function v(y){return p?m(y,i):g(y)}return{groupSlides:v}}function Engine(e,t,i,s,o,a,l){const{align:c,axis:u,direction:f,startIndex:d,loop:h,duration:p,dragFree:m,dragThreshold:g,inViewThreshold:v,slidesToScroll:b,skipSnaps:y,containScroll:E,watchResize:S,watchSlides:w,watchDrag:C,watchFocus:A}=a,O=2,I=NodeRects(),L=I.measure(t),$=i.map(I.measure),V=Axis(u,f),W=V.measureSize(L),K=PercentOfView(W),j=Alignment(c,W),D=!h&&!!E,M=h||!!E,{slideSizes:k,slideSizesWithGaps:T,startGap:P,endGap:F}=SlideSizes(V,L,$,i,M,o),N=SlidesToScroll(V,W,b,h,L,$,P,F,O),{snaps:H,snapsAligned:q}=ScrollSnaps(V,j,L,$,N),Y=-arrayLast(H)+arrayLast(T),{snapsContained:Q,scrollContainLimit:re}=ScrollContain(W,Y,q,E,O),ee=D?Q:q,{limit:z}=ScrollLimit(Y,ee,h),J=Counter(arrayLastIndex(ee),d,h),te=J.clone(),X=arrayKeys(i),se=({dragHandler:Ne,scrollBody:Ee,scrollBounds:ce,options:{loop:fe}})=>{fe||ce.constrain(Ne.pointerDown()),Ee.seek()},ie=({scrollBody:Ne,translate:Ee,location:ce,offsetLocation:fe,previousLocation:be,scrollLooper:he,slideLooper:Ce,dragHandler:le,animation:de,eventHandler:Oe,scrollBounds:He,options:{loop:et}},Je)=>{const at=Ne.settled(),Pe=!He.shouldConstrain(),Ue=et?at:at&&Pe,ze=Ue&&!le.pointerDown();ze&&de.stop();const Qe=ce.get()*Je+be.get()*(1-Je);fe.set(Qe),et&&(he.loop(Ne.direction()),Ce.loop()),Ee.to(fe.get()),ze&&Oe.emit("settle"),Ue||Oe.emit("scroll")},ne=Animations(s,o,()=>se(Be),Ne=>ie(Be,Ne)),pe=.68,_e=ee[J.get()],ye=Vector1D(_e),Ae=Vector1D(_e),xe=Vector1D(_e),ae=Vector1D(_e),me=ScrollBody(ye,xe,Ae,ae,p,pe),Se=ScrollTarget(h,ee,Y,z,ae),Te=ScrollTo(ne,J,te,me,Se,ae,l),ve=ScrollProgress(z),Re=EventStore(),Ie=SlidesInView(t,i,l,v),{slideRegistry:Fe}=SlideRegistry(D,E,ee,re,N,X),$e=SlideFocus(e,i,Fe,Te,me,Re,l,A),Be={ownerDocument:s,ownerWindow:o,eventHandler:l,containerRect:L,slideRects:$,animation:ne,axis:V,dragHandler:DragHandler(V,e,s,o,ae,DragTracker(V,o),ye,ne,Te,me,Se,J,l,K,m,g,y,pe,C),eventStore:Re,percentOfView:K,index:J,indexPrevious:te,limit:z,location:ye,offsetLocation:xe,previousLocation:Ae,options:a,resizeHandler:ResizeHandler(t,l,o,i,V,S,I),scrollBody:me,scrollBounds:ScrollBounds(z,xe,ae,me,K),scrollLooper:ScrollLooper(Y,z,xe,[ye,xe,Ae,ae]),scrollProgress:ve,scrollSnapList:ee.map(ve.get),scrollSnaps:ee,scrollTarget:Se,scrollTo:Te,slideLooper:SlideLooper(V,W,Y,k,T,H,ee,xe,i),slideFocus:$e,slidesHandler:SlidesHandler(t,l,w),slidesInView:Ie,slideIndexes:X,slideRegistry:Fe,slidesToScroll:N,target:ae,translate:Translate(V,t)};return Be}function EventHandler(){let e={},t;function i(f){t=f}function s(f){return e[f]||[]}function o(f){return s(f).forEach(d=>d(t,f)),u}function a(f,d){return e[f]=s(f).concat([d]),u}function l(f,d){return e[f]=s(f).filter(h=>h!==d),u}function c(){e={}}const u={init:i,emit:o,off:l,on:a,clear:c};return u}const defaultOptions={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function OptionsHandler(e){function t(a,l){return objectsMergeDeep(a,l||{})}function i(a){const l=a.breakpoints||{},c=objectKeys(l).filter(u=>e.matchMedia(u).matches).map(u=>l[u]).reduce((u,f)=>t(u,f),{});return t(a,c)}function s(a){return a.map(l=>objectKeys(l.breakpoints||{})).reduce((l,c)=>l.concat(c),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:i,optionsMediaQueries:s}}function PluginsHandler(e){let t=[];function i(a,l){return t=l.filter(({options:c})=>e.optionsAtMedia(c).active!==!1),t.forEach(c=>c.init(a,e)),l.reduce((c,u)=>Object.assign(c,{[u.name]:u}),{})}function s(){t=t.filter(a=>a.destroy())}return{init:i,destroy:s}}function EmblaCarousel(e,t,i){const s=e.ownerDocument,o=s.defaultView,a=OptionsHandler(o),l=PluginsHandler(a),c=EventStore(),u=EventHandler(),{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:h}=a,{on:p,off:m,emit:g}=u,v=V;let b=!1,y,E=f(defaultOptions,EmblaCarousel.globalOptions),S=f(E),w=[],C,A,O;function I(){const{container:X,slides:se}=S;A=(isString$1(X)?e.querySelector(X):X)||e.children[0];const ne=isString$1(se)?A.querySelectorAll(se):se;O=[].slice.call(ne||A.children)}function L(X){const se=Engine(e,A,O,s,o,X,u);if(X.loop&&!se.slideLooper.canLoop()){const ie=Object.assign({},X,{loop:!1});return L(ie)}return se}function $(X,se){b||(E=f(E,X),S=d(E),w=se||w,I(),y=L(S),h([E,...w.map(({options:ie})=>ie)]).forEach(ie=>c.add(ie,"change",V)),S.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(te),y.eventHandler.init(te),y.resizeHandler.init(te),y.slidesHandler.init(te),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&O.length&&y.dragHandler.init(te),C=l.init(te,w)))}function V(X,se){const ie=N();W(),$(f({startIndex:ie},X),se),u.emit("reInit")}function W(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),l.destroy(),c.clear()}function K(){b||(b=!0,c.clear(),W(),u.emit("destroy"),u.clear())}function j(X,se,ie){!S.active||b||(y.scrollBody.useBaseFriction().useDuration(se===!0?0:S.duration),y.scrollTo.index(X,ie||0))}function D(X){const se=y.index.add(1).get();j(se,X,-1)}function M(X){const se=y.index.add(-1).get();j(se,X,1)}function k(){return y.index.add(1).get()!==N()}function T(){return y.index.add(-1).get()!==N()}function P(){return y.scrollSnapList}function F(){return y.scrollProgress.get(y.offsetLocation.get())}function N(){return y.index.get()}function H(){return y.indexPrevious.get()}function q(){return y.slidesInView.get()}function Y(){return y.slidesInView.get(!1)}function Q(){return C}function re(){return y}function ee(){return e}function z(){return A}function J(){return O}const te={canScrollNext:k,canScrollPrev:T,containerNode:z,internalEngine:re,destroy:K,off:m,on:p,emit:g,plugins:Q,previousScrollSnap:H,reInit:v,rootNode:ee,scrollNext:D,scrollPrev:M,scrollProgress:F,scrollSnapList:P,scrollTo:j,selectedScrollSnap:N,slideNodes:J,slidesInView:q,slidesNotInView:Y};return $(t,i),setTimeout(()=>u.emit("init"),0),te}EmblaCarousel.globalOptions=void 0;function useEmblaCarousel(e={},t=[]){const i=React.useRef(e),s=React.useRef(t),[o,a]=React.useState(),[l,c]=React.useState(),u=React.useCallback(()=>{o&&o.reInit(i.current,s.current)},[o]);return React.useEffect(()=>{areOptionsEqual(i.current,e)||(i.current=e,u())},[e,u]),React.useEffect(()=>{arePluginsEqual(s.current,t)||(s.current=t,u())},[t,u]),React.useEffect(()=>{if(canUseDOM()&&l){EmblaCarousel.globalOptions=useEmblaCarousel.globalOptions;const f=EmblaCarousel(l,i.current,s.current);return a(f),()=>f.destroy()}else a(void 0)},[l,a]),[c,o]}useEmblaCarousel.globalOptions=void 0;function RewardBoxRareBadge({reward:e,className:t}){const{t:i}=useTranslation(),o=(a=>{switch(a){case 12:return i("reward_type.box_rare");case 13:return i("reward_type.box_epic");case 14:return i("reward_type.box_legend");default:return i("reward_type.box_common")}})(e.reward_value);return e.reward_type!=="box"||!o?null:jsxRuntimeExports.jsx("div",{className:cn$1("rounded-[40px] flex items-center justify-center px-[9px] py-[5px] absolute font-[800]",e.reward_value===14?"!text-gray-900 text-rounded -rotate-3 left-0 right-0 bottom-3":"!text-white text-rounded rotate-10 -left-3 bottom-1",t),style:{boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)",background:e.reward_value===12?"linear-gradient(180deg, #00D1ED 0%, #0D31FF 100%)":e.reward_value===13?"linear-gradient(180deg, #BE1DE6 0%, #510DFF 100%)":e.reward_value===14?"linear-gradient(180deg, #FFFF00 0%, #FF9900 100%)":"linear-gradient(180deg, #CDCDCD 0%, #707070 100%)"},children:jsxRuntimeExports.jsx("span",{children:o})})}function RewardTypeBadge({reward:e,className:t,size:i}){const{t:s}=useTranslation(),o=(a,l)=>{switch(a){case"coins":return l>0?s("reward_type.coins",{count:l}):s("reward_type.coins_no_amount");case"usdt":return l>0?s("reward_type.usdt",{count:l}):s("reward_type.usdt_no_amount");case"ton":return s("reward_type.ton",{count:l});case"telegram_premium":return s("reward_type.telegram_premium");case"double_balance":return s("reward_type.double_balance");case"box":return s("reward_type.box");default:return a}};return jsxRuntimeExports.jsx("div",{className:cn$1("bg-white rounded-[40px] inline-flex items-center justify-center px-[12px] py-[5px]","whitespace-nowrap uppercase","font-[800] text-gray-900",t,i==="s"&&"text-[16px]",i==="m"&&"text-[24px]"),style:{boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.2)"},children:jsxRuntimeExports.jsx("span",{className:"text-rounded",children:o(e.reward_type,e.reward_type==="coins"||e.reward_type==="usdt"?0:e.reward_value)})})}const box_epic_icon=assetUrl("boxes/rewards/box_epic.webp"),box_legend_icon=assetUrl("boxes/rewards/box_legend.webp"),box_rare_icon=assetUrl("boxes/rewards/box_rare.webp"),box_regular_icon=assetUrl("boxes/rewards/box_regular.webp"),question_icon=assetUrl("boxes/rewards/question.webp"),coin_50_icon=assetUrl("boxes/rewards/reward_coins_50.webp"),coin_100_icon=assetUrl("boxes/rewards/reward_coins_100.webp"),coin_300_icon=assetUrl("boxes/rewards/reward_coins_300.webp"),coin_1000_icon=assetUrl("boxes/rewards/reward_coins_1000.webp"),usdt_1_icon=assetUrl("boxes/rewards/reward_usdt_1.webp"),usdt_20_icon=assetUrl("boxes/rewards/reward_usdt_20.webp"),usdt_50_icon=assetUrl("boxes/rewards/reward_usdt_50.webp"),telegram_icon=assetUrl("boxes/rewards/telegram.webp");function RewardNumericOverlay({reward:e,badgeSize:t}){if(e.reward_type!=="coins"&&e.reward_type!=="usdt")return null;const i=c=>{if(c==="coins")return e.reward_value>=100&&e.reward_value<300?"rotate-11 left-10 bottom-7":e.reward_value<100?"rotate-11 left-8 bottom-8":"rotate-5 left-7 bottom-6";if(c==="usdt")return e.reward_value<10?"-rotate-3 left-2 bottom-12":e.reward_value>=10&&e.reward_value<50?"-rotate-3 left-10 bottom-10":e.reward_value>=50?"-rotate-12 right-6 bottom-11":"-rotate-3 -left-6 bottom-4"},s=c=>c==="coins"?"linear-gradient(180deg, rgba(255, 208, 78, 1) 0%, rgba(229, 104, 0, 1) 100%)":"linear-gradient(180deg, rgba(25, 164, 0, 1) 0%, rgba(19, 125, 0, 1) 100%)",o=c=>c==="coins"?"#FFFFFF":"linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(182, 255, 122, 1) 100%)",a=c=>c==="coins"?"rgba(229, 104, 0, 1)":"rgba(19, 125, 0, 1)",l=(c,u,f)=>c==="coins"?"text-[3em]":c==="usdt"&&u<10?"text-[6em]":"text-[4em]";return jsxRuntimeExports.jsxs("div",{className:cn$1("absolute inline-flex items-center justify-center pb-2 px-1",i(e.reward_type)),style:{overflow:"visible"},children:[jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num font-[800] whitespace-nowrap",l(e.reward_type,e.reward_value)),style:{color:"#FFFFFF",textShadow:`
92
+ s.goToAndStop(v-s.firstFrame-1,!0)}g.type==="loop"&&(d===null||d!==g.frames||s.isPaused)&&(s.playSegments(g.frames,!0),d=g.frames),g.type==="play"&&s.isPaused&&(s.resetSegments(!0),s.play()),g.type==="stop"&&s.goToAndStop(g.frames[0]-s.firstFrame-1,!0)}};return document.addEventListener("scroll",h),function(){document.removeEventListener("scroll",h)}},u=function(){var d=function(g,v){var b=g,y=v;if(b!==-1&&y!==-1){var E=getContainerCursorPosition(l,b,y);b=E.x,y=E.y}var S=a.find(function(A){var O=A.position;return O&&Array.isArray(O.x)&&Array.isArray(O.y)?b>=O.x[0]&&b<=O.x[1]&&y>=O.y[0]&&y<=O.y[1]:O&&!Number.isNaN(O.x)&&!Number.isNaN(O.y)?b===O.x&&y===O.y:!1});if(S){if(S.type==="seek"&&S.position&&Array.isArray(S.position.x)&&Array.isArray(S.position.y)&&S.frames.length===2){var w=(b-S.position.x[0])/(S.position.x[1]-S.position.x[0]),C=(y-S.position.y[0])/(S.position.y[1]-S.position.y[0]);s.playSegments(S.frames,!0),s.goToAndStop(Math.ceil((w+C)/2*(S.frames[1]-S.frames[0])),!0)}S.type==="loop"&&s.playSegments(S.frames,!0),S.type==="play"&&(s.isPaused&&s.resetSegments(!1),s.playSegments(S.frames)),S.type==="stop"&&s.goToAndStop(S.frames[0],!0)}},h=function(g){d(g.clientX,g.clientY)},p=function(){d(-1,-1)};return l.addEventListener("mousemove",h),l.addEventListener("mouseout",p),function(){l.removeEventListener("mousemove",h),l.removeEventListener("mouseout",p)}};switch(o){case"scroll":return c();case"cursor":return u()}}},[o,s])},useLottieInteractivity=function e(t){var i=t.actions,s=t.mode,o=t.lottieObj,a=o.animationItem,l=o.View,c=o.animationContainerRef;return useInitInteractivity({actions:i,animationItem:a,mode:s,wrapperRef:c}),l},_excluded=["style","interactivity"],Lottie=function e(t){var i,s,o,a=t.style,l=t.interactivity,c=_objectWithoutProperties(t,_excluded),u=useLottie(c,a),f=u.View,d=u.play,h=u.stop,p=u.pause,m=u.setSpeed,g=u.goToAndStop,v=u.goToAndPlay,b=u.setDirection,y=u.playSegments,E=u.setSubframe,S=u.getDuration,w=u.destroy,C=u.animationContainerRef,A=u.animationLoaded,O=u.animationItem;return React.useEffect(function(){t.lottieRef&&(t.lottieRef.current={play:d,stop:h,pause:p,setSpeed:m,goToAndPlay:v,goToAndStop:g,setDirection:b,playSegments:y,setSubframe:E,getDuration:S,destroy:w,animationContainerRef:C,animationLoaded:A,animationItem:O})},[(i=t.lottieRef)===null||i===void 0?void 0:i.current]),useLottieInteractivity({lottieObj:{View:f,play:d,stop:h,pause:p,setSpeed:m,goToAndStop:g,goToAndPlay:v,setDirection:b,playSegments:y,setSubframe:E,getDuration:S,destroy:w,animationContainerRef:C,animationLoaded:A,animationItem:O},actions:(s=l==null?void 0:l.actions)!==null&&s!==void 0?s:[],mode:(o=l==null?void 0:l.mode)!==null&&o!==void 0?o:"scroll"})};function LottieSkeleton({height:e=72,width:t=72}){return jsxRuntimeExports.jsx("div",{className:"animate-pulse rounded-full bg-[var(--tgui--plain_background)]",style:{height:typeof e=="number"?`${e}px`:e,width:typeof t=="number"?`${t}px`:t}})}function LazyLottie({asset:e,height:t,width:i,...s}){const{data:o}=useQuery({queryKey:["lottie-asset",e],queryFn:()=>fetch(assetUrl(e)).then(a=>a.json()),staleTime:18e5,gcTime:36e5});return o?jsxRuntimeExports.jsx(Lottie,{animationData:o,height:t,width:i,...s}):jsxRuntimeExports.jsx(LottieSkeleton,{height:t,width:i})}function useCancelNoAds(e){const t=useQueryClient();return useMutation({mutationFn:async()=>await makeRequest("invoice/no_ads/cancel","POST"),onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}function useCreateInvoiceBuyNoAds(e){const t=useQueryClient();return useMutation({mutationFn:async()=>await makeRequest("invoice/no_ads","POST"),onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}const useConfettiStore=create$2(e=>({isVisible:!1,fireConfetti:()=>{e({isVisible:!0})},stopConfetti:()=>{e({isVisible:!1})}})),useFireConfetti=()=>useConfettiStore(e=>e.fireConfetti),PRICE=250,PurchaseAdsFreeModal=({children:e})=>{const t=useFireConfetti(),{data:i}=useProfile(),[s,o]=React.useState(!1),{showSnackbar:a}=useSnackbar(),{t:l}=useTranslation(),{mutate:c,isPending:u}=useCreateInvoiceBuyNoAds({onSuccess(g){var v,b;(b=(v=window.Telegram)==null?void 0:v.WebApp)==null||b.openInvoice(g.invoice_link,y=>{y==="paid"&&(o(!1),t())})}}),{mutate:f,isPending:d}=useCancelNoAds({onError(){a(l("purchaseAdsFreeModal.errorCancelSubscription"),{type:"error"})},onSuccess(){o(!1)}}),h=[l("months.january"),l("months.february"),l("months.march"),l("months.april"),l("months.may"),l("months.june"),l("months.july"),l("months.august"),l("months.september"),l("months.october"),l("months.november"),l("months.december")],p=()=>{c()},m=async()=>{f()};return jsxRuntimeExports.jsx(Drawer,{open:s,onOpenChange:o,trigger:e,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-3 flex-col items-center text-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/newspaper.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("purchaseAdsFreeModal.title")}),!i.ads_free&&!i.ads_disabled_until&&jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("purchaseAdsFreeModal.disableAllInterruptions")}),i.ads_disabled_until&&jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("purchaseAdsFreeModal.noInterruptionsInGames")}),i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.activeRecurring",{price:PRICE})}),jsxRuntimeExports.jsx(IconTelegramStar,{style:{width:12,height:12}}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.aMonth")})]}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.nextPayment",{date:getFormattedDate(i.ads_disabled_until,h)})})]}),!i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center",children:[jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.activeUntil",{date:getFormattedDate(i.ads_disabled_until,h)})}),jsxRuntimeExports.jsx(Caption,{level:"1",weight:"2",children:l("purchaseAdsFreeModal.subscriptionPaused")})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2.5",children:[!i.ads_free&&i.ads_disabled_until&&jsxRuntimeExports.jsx(Button,{size:"s",mode:"filled",stretched:!0,onClick:p,loading:u,disabled:u,style:{height:42},children:l("purchaseAdsFreeModal.resumeSubscription")}),i.ads_free&&jsxRuntimeExports.jsx(Button,{loading:d,disabled:d,size:"s",stretched:!0,onClick:m,mode:"plain",style:{height:42,color:"var(--tgui--subtitle_text_color)"},children:l("purchaseAdsFreeModal.cancelSubscription")}),!i.ads_free&&!i.ads_disabled_until&&jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:p,loading:u,disabled:u,mode:"filled",style:{height:42},children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[l("purchaseAdsFreeModal.continue"),jsxRuntimeExports.jsx(IconTelegramStar,{style:{width:12,height:12}}),l("purchaseAdsFreeModal.month",{price:PRICE})]})})]})]})})},BuyAdsFreeButton=()=>{const{t:e}=useTranslation(),{data:t}=useProfile();return jsxRuntimeExports.jsx(PurchaseAdsFreeModal,{children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var i,s;(s=(i=window.Telegram)==null?void 0:i.WebApp)==null||s.HapticFeedback.impactOccurred("soft")},className:"cursor-pointer flex justify-between items-center w-full",style:{padding:"10px 16px",borderRadius:24,border:"1px solid var(--tgui--divider)"},children:[jsxRuntimeExports.jsxs(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:["💰 ",e("ads")]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-[6px]",children:[t.ads_free&&jsxRuntimeExports.jsx(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px",color:"rgba(0, 122, 255, 1)"},children:e("adsOff")}),!t.ads_free&&jsxRuntimeExports.jsx(Text,{style:{fontWeight:590,fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:e("adsOn")}),jsxRuntimeExports.jsx(Icon,{name:"chevronRight",size:12,className:"mt-0.5"})]})]})})},formatCurrentXP=e=>e>=9999?formatter.format(Math.floor(e/1e3))+"K":formatter.format(e),formatTotalXP=e=>e>9999?formatter.format(Math.floor(e/1e3))+"K":formatter.format(e),FormattedXP=({xp:e,xpNeeded:t})=>{const{t:i}=useTranslation(),s=t-e;return t>9999?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[formatCurrentXP(s)," ",jsxRuntimeExports.jsx(Caption,{className:"opacity-70",children:i("toLevelUp")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[formatCurrentXP(e)," ",jsxRuntimeExports.jsx(Caption,{className:"opacity-70",children:i("xpCounter",{total:formatTotalXP(t)})})]})},boxPng=assetUrl("box.webp"),STORAGE_KEY_PORTRAIT="profile_position_portrait",STORAGE_KEY_LANDSCAPE="profile_position_landscape",mapPositionToInitialPosition=e=>{switch(e){case"topRight":return{x:window.innerWidth,y:0};case"bottomLeft":return{x:0,y:window.innerHeight};case"bottomRight":return{x:window.innerWidth,y:window.innerHeight};default:return{x:0,y:0}}},ANIMATION_DURATION=.3,POSITION_PADDING=20,OverlayProfile=({onOpenProfile:e,variant:t="translucent",initialPosition:i="topLeft",initialCoordinates:s})=>{var Ae,xe;const{t:o}=useTranslation(),{setIsOpen:a}=useTopUpModalStore(),{setIsOpen:l}=useInventoryModalStore(),c=useQueryClient(),u=React.useRef(null),f=React.useRef(!1),d=React.useRef({x:0,y:0}),h=React.useRef({x:0,y:0}),p=React.useRef(0),m=React.useRef(!1),[g,v]=React.useState(!1),[b,y]=React.useState(!1),[E,S]=React.useState(!1),{data:w}=useProfile(),[C]=useAnimateNumber(w.experience),[A]=useAnimateNumber(w.level),[O]=useAnimateNumber(w.balance_gems),{miniApp:I}=useMiniApp(),L=I.colorScheme==="dark",[$,V]=React.useState(!1),[W,K]=React.useState(!0),{safeAreaInset:j,contentSafeAreaInset:D}=I,[M,k]=React.useState(mapPositionToInitialPosition(i)),T=useThrottle(M.x,1e3),P=useThrottle(M.y,1e3),F=React.useCallback(()=>window.innerWidth>window.innerHeight?STORAGE_KEY_LANDSCAPE:STORAGE_KEY_PORTRAIT,[]),N=React.useCallback(ae=>{var Re,Ie;const me=((Re=u.current)==null?void 0:Re.offsetWidth)||0,Se=((Ie=u.current)==null?void 0:Ie.offsetHeight)||0,Te=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--banner-top-height")||"0"),ve=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--banner-bottom-height")||"0");k({x:Math.max(POSITION_PADDING+((j==null?void 0:j.left)||0)+((D==null?void 0:D.left)||0),Math.min(window.innerWidth-me-POSITION_PADDING-((j==null?void 0:j.right)||0)-((D==null?void 0:D.right)||0),ae.x)),y:Math.max(POSITION_PADDING+((j==null?void 0:j.top)||0)+((D==null?void 0:D.top)||0)+Te,Math.min(window.innerHeight-Se-POSITION_PADDING-((j==null?void 0:j.bottom)||0)-((D==null?void 0:D.bottom)||0)-ve,ae.y))})},[j,D]),H=React.useCallback(()=>{N({...M})},[M,N]),q=React.useCallback(async ae=>{try{const me=ae??F(),Se=await CryptoSteamSDK.getValue(me);if(console.log("savedPosition",Se),Se){const Te=JSON.parse(Se);return N(Te),!0}return!1}catch(me){return console.error("Error loading saved position:",me),!1}},[N,F]),Y=React.useRef(null),Q=React.useRef(!1);React.useEffect(()=>{g||(async()=>(await q()||N(s||mapPositionToInitialPosition(i)),v(!0),requestAnimationFrame(()=>{K(!1)})))()},[g,q,N,i,s]),React.useEffect(()=>{if(!$&&g&&!b){const ae=F();CryptoSteamSDK.setValue(ae,JSON.stringify({x:T,y:P}))}},[$,g,b,T,P,F]),React.useEffect(()=>{const ae=async()=>{g&&await q(F())};return window.addEventListener("resize",ae),()=>{window.removeEventListener("resize",ae)}},[g,q,F]),React.useEffect(()=>{const ae=setInterval(()=>{H()},250);return()=>clearInterval(ae)},[H]),React.useEffect(()=>{if(f.current!==b){const ae=setTimeout(()=>{H()},ANIMATION_DURATION*1e3);return()=>clearTimeout(ae)}},[b,H]),React.useEffect(()=>{f.current=b},[b]),React.useEffect(()=>{!b&&Y.current&&!Q.current&&(N(Y.current),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y.current&&N(Y.current)})}))},[b,N]);const re=ae=>{b||(V(!0),d.current=M,h.current={x:ae.clientX,y:ae.clientY},p.current=0,m.current=!1,ae.stopPropagation())},ee=ae=>{if(b)return;ae.target.closest(".cssdk-floating-profile")&&(V(!0),d.current=M,h.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},p.current=0,m.current=!1,ae.stopPropagation())};React.useEffect(()=>{const ae=ve=>{if($&&b){V(!1);return}if($){const Re=ve.clientX-h.current.x,Ie=ve.clientY-h.current.y,Fe=Math.sqrt(Re*Re+Ie*Ie);p.current=Fe,Fe>5&&(m.current=!0),b&&(Q.current=!0),N({x:d.current.x+Re,y:d.current.y+Ie})}},me=ve=>{if($&&b){V(!1);return}if($){ve.preventDefault(),ve.stopPropagation();const Re=ve.touches[0].clientX-h.current.x,Ie=ve.touches[0].clientY-h.current.y,Fe=Math.sqrt(Re*Re+Ie*Ie);p.current=Fe,Fe>5&&(m.current=!0),b&&(Q.current=!0),N({x:d.current.x+Re,y:d.current.y+Ie})}},Se=()=>{$&&V(!1)},Te=()=>{$&&V(!1)};return document.addEventListener("mousemove",ae),document.addEventListener("mouseup",Se),document.addEventListener("touchmove",me),document.addEventListener("touchend",Te),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",Se),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",Te)}},[$,b,N]);const z=()=>{!$&&!m.current&&(Y.current=M,Q.current=!1,y(!0)),setTimeout(()=>{m.current=!1},100)};React.useEffect(()=>{I.disableVerticalSwipes()},[I]),React.useEffect(()=>{const ae=me=>{const Se=document.querySelector("div#overlay-root"),Te=document.querySelector("div.cssdk-floating-profile"),ve=Se==null?void 0:Se.querySelector(".ccsdk-tg-ui-modal-fix"),Re=Te&&!Te.contains(me.target),Ie=Se&&!Se.contains(me.target),Fe=ve==null?void 0:ve.contains(me.target);b&&Re&&(Fe?V(!1):Ie&&y(!1))};return document.addEventListener("mousedown",ae),()=>{document.removeEventListener("mousedown",ae)}},[b]);const te=t==="translucent"?{backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",backgroundColor:"rgba(0, 0, 0, 0.45)"}:{backgroundColor:"var(--tg-theme-secondary-bg-color)"},X=w?(Ae=w.first_name)!=null&&Ae.length?w.first_name[0]:(xe=w.user_name)!=null&&xe.length?w.user_name[0]:void 0:void 0,se=jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center gap-[5px] h-[30px] p-0 pr-[7px] w-fit",style:{background:E?"linear-gradient(90deg, rgba(85, 233, 0, 0.3) 0%, rgba(0, 217, 207, 0.3) 20%, rgba(67, 101, 255, 0.3) 40%, rgba(173, 0, 255, 0.3) 50%, rgba(214, 0, 177, 0.3) 60%, rgba(254, 0, 99, 0.3) 80%, rgba(244, 129, 0, 0.3) 90%, rgba(232, 218, 0, 0.3) 100%), #FFFFFF":void 0,color:E?"#000000":void 0},children:[jsxRuntimeExports.jsx(motion.div,{layoutId:"circle",transition:{layout:{duration:0}},children:jsxRuntimeExports.jsx(XpProgress,{level:w.level,experience:w.experience-w.current_level_exp,xpNeeded:w.level_up_exp-w.current_level_exp,size:30})}),jsxRuntimeExports.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:E?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:boxPng,alt:o("lootBox"),width:25,height:25,className:"size-[25px]"}),jsxRuntimeExports.jsx(Text,{weight:"1",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px",whiteSpace:"nowrap",color:"black"},children:o("lootBox")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text,{weight:"1",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:formatter.format(O)}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{width:16,height:14}})]})})]}),ie=jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-[210px] h-auto items-center gap-[10px] p-[10px_10px_14px_10px]",children:[jsxRuntimeExports.jsxs("div",{className:"flex self-stretch justify-between items-start gap-1",children:[jsxRuntimeExports.jsx(motion.div,{layoutId:"circle",transition:{layout:{duration:0}},children:jsxRuntimeExports.jsx(Avatar,{size:28,src:w==null?void 0:w.avatar,acronym:X,onClick:e,style:{cursor:"pointer"}})}),jsxRuntimeExports.jsxs("button",{type:"button",className:"cssdk-balance-section",style:{width:"auto",background:"none",border:"none",padding:0,cursor:"pointer"},onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),a(!0)},"aria-label":o("balance"),children:[jsxRuntimeExports.jsx(Text,{weight:"3",className:"opacity-70",style:{fontSize:"10px",lineHeight:"13px",letterSpacing:"0.06px"},children:o("balance")}),jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center gap-1",children:[jsxRuntimeExports.jsx(AnimatedBalance,{style:{fontSize:19,lineHeight:"24px",letterSpacing:"-0.45px"},value:O}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{width:18,height:16,marginTop:1}})]})]}),jsxRuntimeExports.jsx(IconButton,{className:"cssdk-close-btn",size:"s",mode:"plain",onClick:ae=>{ae.stopPropagation(),y(!1)},children:jsxRuntimeExports.jsx(IconClosePlain,{})})]}),jsxRuntimeExports.jsx(Button,{size:"s",style:{backgroundColor:"#1EC948",height:40,flexBasis:0,flexGrow:1,alignSelf:"stretch"},onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),a(!0)},before:jsxRuntimeExports.jsx(Icon,{name:"addCircle",size:20}),children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:o("topUp")})}),jsxRuntimeExports.jsx(BuyAdsFreeButton,{}),jsxRuntimeExports.jsx(LevelInfoModal,{children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft")},className:"py-1.5 cursor-pointer flex items-center flex-col gap-1",children:[jsxRuntimeExports.jsx(XpProgress,{level:A,experience:C-w.current_level_exp,xpNeeded:w.level_up_exp-w.current_level_exp}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntimeExports.jsx(Text,{weight:"2",children:o("level")}),jsxRuntimeExports.jsx(Text,{weight:"3",children:jsxRuntimeExports.jsx(FormattedXP,{xp:C,xpNeeded:w.level_up_exp})})]})]})}),E&&jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{var ae,me;(me=(ae=window.Telegram)==null?void 0:ae.WebApp)==null||me.HapticFeedback.impactOccurred("soft"),S(!1),l(!0)},"aria-label":o("lootBox"),style:{height:40,width:"calc(100% - 20px)",display:"flex",alignItems:"center",justifyContent:"space-between",overflow:"hidden",borderRadius:"100px",padding:"0 10px",background:"linear-gradient(98.06deg, rgba(85, 233, 0, 0.3) 5.56%, rgba(0, 217, 207, 0.3) 19.86%, rgba(67, 101, 255, 0.3) 35.65%, rgba(173, 0, 255, 0.3) 44.6%, rgba(214, 0, 177, 0.3) 54.12%, rgba(254, 0, 99, 0.3) 71.35%, rgba(244, 129, 0, 0.3) 81.79%, rgba(232, 218, 0, 0.3) 96.3%), #FFFFFF",border:"none",cursor:"pointer"},children:[jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start flex-[0.2]",children:jsxRuntimeExports.jsx("img",{src:boxPng,alt:"Loot box",width:25,height:25,className:"size-[25px]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center flex-1",children:[jsxRuntimeExports.jsx(Text,{weight:"1",style:{color:"black",fontSize:15,lineHeight:"20px",letterSpacing:"-0.23px"},children:o("lootBox")}),jsxRuntimeExports.jsx(Text,{style:{color:"#00000080",fontSize:13,lineHeight:"13px",letterSpacing:"0.06px"},children:o("forLevel",{level:A})})]}),jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start flex-[0.2]"})]})]}),[ne,pe]=React.useState(!1);React.useEffect(()=>{const ae=WebSocketManager.getInstance(),me=()=>{const Te=ae.isConnected();pe(Te)};me();const Se=setInterval(me,1e3);return()=>clearInterval(Se)},[]),React.useEffect(()=>{if(!(w!=null&&w.id)||!ne)return;console.log("Setting up WebSocket subscriptions for profile:",w.id);const ae=WebSocketManager.getInstance();let me;return(async()=>{try{await ae.waitForConnection();const Te=`user:${w.id}`;me=await ae.subscribe(Te,ve=>{if(console.log("Received user channel message:",ve),(ve==null?void 0:ve.type)==="balance_updated"&&(ve!=null&&ve.data)){if(ve.data.account==="exp"&&ve.data.balance>=w.level_up_exp){c.invalidateQueries({queryKey:[PROFILE_TAG]});return}switch(ve.data.account){case"gems":c.setQueryData([PROFILE_TAG],Re=>({...Re,balance_gems:ve.data.balance}));break;case"coins":c.setQueryData([PROFILE_TAG],Re=>({...Re,balance_coins:ve.data.balance}));break;case"exp":c.setQueryData([PROFILE_TAG],Re=>({...Re,experience:ve.data.balance}));break}}(ve==null?void 0:ve.type)==="box_opened"&&c.invalidateQueries({queryKey:[PROFILE_TAG]}),(ve==null?void 0:ve.type)==="box_received"&&(c.invalidateQueries({queryKey:[PROFILE_TAG]}),S(!0))})}catch(Te){console.error("Failed to setup WebSocket subscriptions:",Te)}})(),()=>{me&&me()}},[w==null?void 0:w.id,w==null?void 0:w.level_up_exp,ne,c]);const _e=b?"expanded":"collapsed",ye=React.useMemo(()=>{switch(_e){case"expanded":return ie;case"collapsed":return se}},[_e,se,ie]);return jsxRuntimeExports.jsx(motion.div,{ref:u,"aria-label":"Profile widget",role:"presentation",tabIndex:0,onMouseDown:re,onClick:z,onTouchStart:ee,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),z())},className:"pointer-events-auto",style:{position:"fixed",top:0,left:0,border:"none",padding:0,cursor:"pointer","--floating-profile-shadow":t==="light"?L?"0px 0px 1px 1px #00000033, 0px 32px 64px 0px rgba(255, 255, 255, 0.1)":"0px 0px 0.5px 0.5px #00000033, 0px 32px 64px 0px rgba(0, 0, 0, 0.34)":void 0,"--floating-profile-shadow-active":t==="light"?L?"0px 0px 0.5px 0.5px #00000033, 0px 4px 16px 0px rgba(255, 255, 255, 0.05)":"0px 0px 0.5px 0.5px #00000033, 0px 4px 16px 0px rgba(0, 0, 0, 0.25)":void 0},initial:{opacity:0},animate:{x:M.x,y:M.y,scale:$?.95:1,opacity:g?1:0,pointerEvents:g?"auto":"none"},transition:{type:"spring",damping:20,stiffness:300,duration:$||!g||W?0:.3,opacity:{type:"tween",duration:.2,ease:"easeOut"}},children:jsxRuntimeExports.jsx(motion.div,{layout:!0,transition:{type:"spring",bounce:0,duration:ANIMATION_DURATION,ease:"easeInOut"},style:{...te,borderRadius:24},className:`mx-auto w-fit overflow-hidden cssdk-floating-profile cssdk-floating-profile--${t}`,children:jsxRuntimeExports.jsx(motion.div,{transition:{type:"spring",bounce:0,duration:ANIMATION_DURATION},initial:{scale:.9,opacity:0,filter:"blur(5px)",originX:.5,originY:.5},animate:{scale:1,opacity:1,filter:"blur(0px)",originX:.5,originY:.5,transition:{delay:.05}},children:ye},_e)})})},iconLandscape=assetUrl("icon-landscape.webp");function OrientationCheck(){const[e,t]=React.useState(!1),[i,s]=React.useState(!1),o=React.useRef(null),a=React.useRef(window.innerWidth);return React.useEffect(()=>((async()=>{try{const c=await CryptoSteamSDK.getConfig(),u=c.supported_screen_formats.includes("landscape"),f=c.supported_screen_formats.includes("portrait");if(u&&f){s(!0),t(!1);return}const d=()=>{const m=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),g=window.innerWidth<window.innerHeight,v=!g;if(u&&!f){t(g&&m);return}if(f&&!u){t(v&&m);return}t(!1)},h=()=>{const m=window.innerWidth;m!==a.current&&(a.current=m,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d()},300))},p=()=>{d()};return d(),window.addEventListener("orientationchange",p),window.addEventListener("resize",h),window.addEventListener("load",d),s(!0),()=>{o.current&&clearTimeout(o.current),window.removeEventListener("orientationchange",p),window.removeEventListener("resize",h),window.removeEventListener("load",d)}}catch(c){console.error("Error checking orientation config:",c),s(!0)}})(),()=>{o.current&&clearTimeout(o.current)}),[]),i?jsxRuntimeExports.jsx("div",{className:"cssdk-orientation-check",children:jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:e&&jsxRuntimeExports.jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"24px",padding:"20px",zIndex:1},children:jsxRuntimeExports.jsx(motion.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.3,ease:"easeOut",delay:.1},style:{backgroundColor:"white",borderRadius:"16px",padding:"32px",display:"flex",justifyContent:"center",alignItems:"center"},children:jsxRuntimeExports.jsx("img",{src:iconLandscape,alt:"Rotate device",style:{maxWidth:"200px",maxHeight:"200px",width:"auto",height:"auto"}})})},"orientation-check")})}):null}function telegramLanguageCodeToFlagEmoji(e){if(!e)return"";const t=e.trim().replace("_","-");if(t.length===0)return"";const i=t.toLowerCase(),s=i.split("-").filter(Boolean),o=s[0],a={"pt-br":"🇧🇷","pt-pt":"🇵🇹","en-us":"🇺🇸","en-gb":"🇬🇧","es-es":"🇪🇸","es-mx":"🇲🇽","zh-cn":"🇨🇳","zh-tw":"🇹🇼","zh-hk":"🇭🇰"},l={en:"🇺🇸",es:"🇪🇸",hi:"🇮🇳",pt:"🇧🇷",ru:"🇷🇺",ar:"🇦🇪",uk:"🇺🇦",de:"🇩🇪",fr:"🇫🇷",it:"🇮🇹",tr:"🇹🇷",fa:"🇮🇷",id:"🇮🇩",ja:"🇯🇵",ko:"🇰🇷",zh:"🇨🇳",pl:"🇵🇱",vi:"🇻🇳",th:"🇹🇭"},c={us:"🇺🇸",es:"🇪🇸",in:"🇮🇳",br:"🇧🇷",ru:"🇷🇺",ae:"🇦🇪",ua:"🇺🇦",de:"🇩🇪",fr:"🇫🇷",it:"🇮🇹",tr:"🇹🇷",ir:"🇮🇷",id:"🇮🇩",jp:"🇯🇵",kr:"🇰🇷",cn:"🇨🇳",pl:"🇵🇱",vn:"🇻🇳",th:"🇹🇭",mx:"🇲🇽",pt:"🇵🇹",gb:"🇬🇧",tw:"🇹🇼",hk:"🇭🇰"};if(a[i])return a[i];if(o&&l[o])return l[o];if(s.length===1&&/^[a-z]{2}$/i.test(t)){const u=i;return c[u]?c[u]:""}return""}function __insertCSS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}const getAsset=e=>{switch(e){case"success":return SuccessIcon;case"info":return InfoIcon;case"warning":return WarningIcon;case"error":return ErrorIcon;default:return null}},bars=Array(12).fill(0),Loader=({visible:e,className:t})=>React.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},React.createElement("div",{className:"sonner-spinner"},bars.map((i,s)=>React.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),SuccessIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WarningIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),InfoIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ErrorIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CloseIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),React.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),useIsDocumentHidden=()=>{const[e,t]=React.useState(document.hidden);return React.useEffect(()=>{const i=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),e};let toastsCounter=1;class Observer{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const i=this.subscribers.indexOf(t);this.subscribers.splice(i,1)}),this.publish=t=>{this.subscribers.forEach(i=>i(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var i;const{message:s,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((i=t.id)==null?void 0:i.length)>0?t.id:toastsCounter++,l=this.toasts.find(u=>u.id===a),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(u=>u.id===a?(this.publish({...u,...t,id:a,title:s}),{...u,...t,id:a,dismissible:c,title:s}):u):this.addToast({title:s,...o,dismissible:c,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:t,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(s=>s({id:i.id,dismiss:!0}))}),t),this.message=(t,i)=>this.create({...i,message:t}),this.error=(t,i)=>this.create({...i,message:t,type:"error"}),this.success=(t,i)=>this.create({...i,type:"success",message:t}),this.info=(t,i)=>this.create({...i,type:"info",message:t}),this.warning=(t,i)=>this.create({...i,type:"warning",message:t}),this.loading=(t,i)=>this.create({...i,type:"loading",message:t}),this.promise=(t,i)=>{if(!i)return;let s;i.loading!==void 0&&(s=this.create({...i,promise:t,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=s!==void 0,l;const c=o.then(async f=>{if(l=["resolve",f],React.isValidElement(f))a=!1,this.create({id:s,type:"default",message:f});else if(isHttpResponse(f)&&!f.ok){a=!1;const h=typeof i.error=="function"?await i.error(`HTTP error! status: ${f.status}`):i.error,p=typeof i.description=="function"?await i.description(`HTTP error! status: ${f.status}`):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:p,...g})}else if(f instanceof Error){a=!1;const h=typeof i.error=="function"?await i.error(f):i.error,p=typeof i.description=="function"?await i.description(f):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:p,...g})}else if(i.success!==void 0){a=!1;const h=typeof i.success=="function"?await i.success(f):i.success,p=typeof i.description=="function"?await i.description(f):i.description,g=typeof h=="object"&&!React.isValidElement(h)?h:{message:h};this.create({id:s,type:"success",description:p,...g})}}).catch(async f=>{if(l=["reject",f],i.error!==void 0){a=!1;const d=typeof i.error=="function"?await i.error(f):i.error,h=typeof i.description=="function"?await i.description(f):i.description,m=typeof d=="object"&&!React.isValidElement(d)?d:{message:d};this.create({id:s,type:"error",description:h,...m})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),i.finally==null||i.finally.call(i)}),u=()=>new Promise((f,d)=>c.then(()=>l[0]==="reject"?d(l[1]):f(l[1])).catch(d));return typeof s!="string"&&typeof s!="number"?{unwrap:u}:Object.assign(s,{unwrap:u})},this.custom=(t,i)=>{const s=(i==null?void 0:i.id)||toastsCounter++;return this.create({jsx:t(s),id:s,...i}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ToastState=new Observer,toastFunction=(e,t)=>{const i=(t==null?void 0:t.id)||toastsCounter++;return ToastState.addToast({title:e,...t,id:i}),i},isHttpResponse=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});__insertCSS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function isAction(e){return e.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET="24px",MOBILE_VIEWPORT_OFFSET="16px",TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function cn(...e){return e.filter(Boolean).join(" ")}function getDefaultSwipeDirections(e){const[t,i]=e.split("-"),s=[];return t&&s.push(t),i&&s.push(i),s}const Toast=e=>{var t,i,s,o,a,l,c,u,f;const{invert:d,toast:h,unstyled:p,interacting:m,setHeights:g,visibleToasts:v,heights:b,index:y,toasts:E,expanded:S,removeToast:w,defaultRichColors:C,closeButton:A,style:O,cancelButtonStyle:I,actionButtonStyle:L,className:$="",descriptionClassName:V="",duration:W,position:K,gap:j,expandByDefault:D,classNames:M,icons:k,closeButtonAriaLabel:T="Close toast"}=e,[P,F]=React.useState(null),[N,H]=React.useState(null),[q,Y]=React.useState(!1),[Q,re]=React.useState(!1),[ee,z]=React.useState(!1),[J,te]=React.useState(!1),[X,se]=React.useState(!1),[ie,ne]=React.useState(0),[pe,_e]=React.useState(0),ye=React.useRef(h.duration||W||TOAST_LIFETIME),Ae=React.useRef(null),xe=React.useRef(null),ae=y===0,me=y+1<=v,Se=h.type,Te=h.dismissible!==!1,ve=h.className||"",Re=h.descriptionClassName||"",Ie=React.useMemo(()=>b.findIndex(Pe=>Pe.toastId===h.id)||0,[b,h.id]),Fe=React.useMemo(()=>{var Pe;return(Pe=h.closeButton)!=null?Pe:A},[h.closeButton,A]),$e=React.useMemo(()=>h.duration||W||TOAST_LIFETIME,[h.duration,W]),Be=React.useRef(0),Ne=React.useRef(0),Ee=React.useRef(0),ce=React.useRef(null),[fe,be]=K.split("-"),he=React.useMemo(()=>b.reduce((Pe,Ue,ze)=>ze>=Ie?Pe:Pe+Ue.height,0),[b,Ie]),Ce=useIsDocumentHidden(),le=h.invert||d,de=Se==="loading";Ne.current=React.useMemo(()=>Ie*j+he,[Ie,he]),React.useEffect(()=>{ye.current=$e},[$e]),React.useEffect(()=>{Y(!0)},[]),React.useEffect(()=>{const Pe=xe.current;if(Pe){const Ue=Pe.getBoundingClientRect().height;return _e(Ue),g(ze=>[{toastId:h.id,height:Ue,position:h.position},...ze]),()=>g(ze=>ze.filter(Qe=>Qe.toastId!==h.id))}},[g,h.id]),React.useLayoutEffect(()=>{if(!q)return;const Pe=xe.current,Ue=Pe.style.height;Pe.style.height="auto";const ze=Pe.getBoundingClientRect().height;Pe.style.height=Ue,_e(ze),g(Qe=>Qe.find(qe=>qe.toastId===h.id)?Qe.map(qe=>qe.toastId===h.id?{...qe,height:ze}:qe):[{toastId:h.id,height:ze,position:h.position},...Qe])},[q,h.title,h.description,g,h.id,h.jsx,h.action,h.cancel]);const Oe=React.useCallback(()=>{re(!0),ne(Ne.current),g(Pe=>Pe.filter(Ue=>Ue.toastId!==h.id)),setTimeout(()=>{w(h)},TIME_BEFORE_UNMOUNT)},[h,w,g,Ne]);React.useEffect(()=>{if(h.promise&&Se==="loading"||h.duration===1/0||h.type==="loading")return;let Pe;return S||m||Ce?(()=>{if(Ee.current<Be.current){const Qe=new Date().getTime()-Be.current;ye.current=ye.current-Qe}Ee.current=new Date().getTime()})():(()=>{ye.current!==1/0&&(Be.current=new Date().getTime(),Pe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Oe()},ye.current))})(),()=>clearTimeout(Pe)},[S,m,h,Se,Ce,Oe]),React.useEffect(()=>{h.delete&&(Oe(),h.onDismiss==null||h.onDismiss.call(h,h))},[Oe,h.delete]);function He(){var Pe;if(k!=null&&k.loading){var Ue;return React.createElement("div",{className:cn(M==null?void 0:M.loader,h==null||(Ue=h.classNames)==null?void 0:Ue.loader,"sonner-loader"),"data-visible":Se==="loading"},k.loading)}return React.createElement(Loader,{className:cn(M==null?void 0:M.loader,h==null||(Pe=h.classNames)==null?void 0:Pe.loader),visible:Se==="loading"})}const et=h.icon||(k==null?void 0:k[Se])||getAsset(Se);var Je,at;return React.createElement("li",{tabIndex:0,ref:xe,className:cn($,ve,M==null?void 0:M.toast,h==null||(t=h.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[Se],h==null||(i=h.classNames)==null?void 0:i[Se]),"data-sonner-toast":"","data-rich-colors":(Je=h.richColors)!=null?Je:C,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":q,"data-promise":!!h.promise,"data-swiped":X,"data-removed":Q,"data-visible":me,"data-y-position":fe,"data-x-position":be,"data-index":y,"data-front":ae,"data-swiping":ee,"data-dismissible":Te,"data-type":Se,"data-invert":le,"data-swipe-out":J,"data-swipe-direction":N,"data-expanded":!!(S||D&&q),"data-testid":h.testId,style:{"--index":y,"--toasts-before":y,"--z-index":E.length-y,"--offset":`${Q?ie:Ne.current}px`,"--initial-height":D?"auto":`${pe}px`,...O,...h.style},onDragEnd:()=>{z(!1),F(null),ce.current=null},onPointerDown:Pe=>{Pe.button!==2&&(de||!Te||(Ae.current=new Date,ne(Ne.current),Pe.target.setPointerCapture(Pe.pointerId),Pe.target.tagName!=="BUTTON"&&(z(!0),ce.current={x:Pe.clientX,y:Pe.clientY})))},onPointerUp:()=>{var Pe,Ue,ze;if(J||!Te)return;ce.current=null;const Qe=Number(((Pe=xe.current)==null?void 0:Pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Bt=Number(((Ue=xe.current)==null?void 0:Ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qe=new Date().getTime()-((ze=Ae.current)==null?void 0:ze.getTime()),Ye=P==="x"?Qe:Bt,Vt=Math.abs(Ye)/qe;if(Math.abs(Ye)>=SWIPE_THRESHOLD||Vt>.11){ne(Ne.current),h.onDismiss==null||h.onDismiss.call(h,h),H(P==="x"?Qe>0?"right":"left":Bt>0?"down":"up"),Oe(),te(!0);return}else{var We,st;(We=xe.current)==null||We.style.setProperty("--swipe-amount-x","0px"),(st=xe.current)==null||st.style.setProperty("--swipe-amount-y","0px")}se(!1),z(!1),F(null)},onPointerMove:Pe=>{var Ue,ze,Qe;if(!ce.current||!Te||((Ue=window.getSelection())==null?void 0:Ue.toString().length)>0)return;const qe=Pe.clientY-ce.current.y,Ye=Pe.clientX-ce.current.x;var Vt;const We=(Vt=e.swipeDirections)!=null?Vt:getDefaultSwipeDirections(K);!P&&(Math.abs(Ye)>1||Math.abs(qe)>1)&&F(Math.abs(Ye)>Math.abs(qe)?"x":"y");let st={x:0,y:0};const sr=vt=>1/(1.5+Math.abs(vt)/20);if(P==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&qe<0||We.includes("bottom")&&qe>0)st.y=qe;else{const vt=qe*sr(qe);st.y=Math.abs(vt)<Math.abs(qe)?vt:qe}}else if(P==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Ye<0||We.includes("right")&&Ye>0)st.x=Ye;else{const vt=Ye*sr(Ye);st.x=Math.abs(vt)<Math.abs(Ye)?vt:Ye}(Math.abs(st.x)>0||Math.abs(st.y)>0)&&se(!0),(ze=xe.current)==null||ze.style.setProperty("--swipe-amount-x",`${st.x}px`),(Qe=xe.current)==null||Qe.style.setProperty("--swipe-amount-y",`${st.y}px`)}},Fe&&!h.jsx&&Se!=="loading"?React.createElement("button",{"aria-label":T,"data-disabled":de,"data-close-button":!0,onClick:de||!Te?()=>{}:()=>{Oe(),h.onDismiss==null||h.onDismiss.call(h,h)},className:cn(M==null?void 0:M.closeButton,h==null||(s=h.classNames)==null?void 0:s.closeButton)},(at=k==null?void 0:k.close)!=null?at:CloseIcon):null,(Se||h.icon||h.promise)&&h.icon!==null&&((k==null?void 0:k[Se])!==null||h.icon)?React.createElement("div",{"data-icon":"",className:cn(M==null?void 0:M.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||He():null,h.type!=="loading"?et:null):null,React.createElement("div",{"data-content":"",className:cn(M==null?void 0:M.content,h==null||(a=h.classNames)==null?void 0:a.content)},React.createElement("div",{"data-title":"",className:cn(M==null?void 0:M.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?React.createElement("div",{"data-description":"",className:cn(V,Re,M==null?void 0:M.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),React.isValidElement(h.cancel)?h.cancel:h.cancel&&isAction(h.cancel)?React.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:Pe=>{isAction(h.cancel)&&Te&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Pe),Oe())},className:cn(M==null?void 0:M.cancelButton,h==null||(u=h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,React.isValidElement(h.action)?h.action:h.action&&isAction(h.action)?React.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Pe=>{isAction(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Pe),!Pe.defaultPrevented&&Oe())},className:cn(M==null?void 0:M.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function getDocumentDirection(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function assignOffset(e,t){const i={};return[e,t].forEach((s,o)=>{const a=o===1,l=a?"--mobile-offset":"--offset",c=a?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function u(f){["top","right","bottom","left"].forEach(d=>{i[`${l}-${d}`]=typeof f=="number"?`${f}px`:f})}typeof s=="number"||typeof s=="string"?u(s):typeof s=="object"?["top","right","bottom","left"].forEach(f=>{s[f]===void 0?i[`${l}-${f}`]=c:i[`${l}-${f}`]=typeof s[f]=="number"?`${s[f]}px`:s[f]}):u(c)}),i}const Toaster=React.forwardRef(function e(t,i){const{id:s,invert:o,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:u,className:f,offset:d,mobileOffset:h,theme:p="light",richColors:m,duration:g,style:v,visibleToasts:b=VISIBLE_TOASTS_AMOUNT,toastOptions:y,dir:E=getDocumentDirection(),gap:S=GAP,icons:w,containerAriaLabel:C="Notifications"}=t,[A,O]=React.useState([]),I=React.useMemo(()=>s?A.filter(q=>q.toasterId===s):A.filter(q=>!q.toasterId),[A,s]),L=React.useMemo(()=>Array.from(new Set([a].concat(I.filter(q=>q.position).map(q=>q.position)))),[I,a]),[$,V]=React.useState([]),[W,K]=React.useState(!1),[j,D]=React.useState(!1),[M,k]=React.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),T=React.useRef(null),P=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=React.useRef(null),N=React.useRef(!1),H=React.useCallback(q=>{O(Y=>{var Q;return(Q=Y.find(re=>re.id===q.id))!=null&&Q.delete||ToastState.dismiss(q.id),Y.filter(({id:re})=>re!==q.id)})},[]);return React.useEffect(()=>ToastState.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{O(Y=>Y.map(Q=>Q.id===q.id?{...Q,delete:!0}:Q))});return}setTimeout(()=>{ReactDOM.flushSync(()=>{O(Y=>{const Q=Y.findIndex(re=>re.id===q.id);return Q!==-1?[...Y.slice(0,Q),{...Y[Q],...q},...Y.slice(Q+1)]:[q,...Y]})})})}),[A]),React.useEffect(()=>{if(p!=="system"){k(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Y})=>{k(Y?"dark":"light")})}catch{q.addListener(({matches:Q})=>{try{k(Q?"dark":"light")}catch(re){console.error(re)}})}},[p]),React.useEffect(()=>{A.length<=1&&K(!1)},[A]),React.useEffect(()=>{const q=Y=>{var Q;if(l.every(z=>Y[z]||Y.code===z)){var ee;K(!0),(ee=T.current)==null||ee.focus()}Y.code==="Escape"&&(document.activeElement===T.current||(Q=T.current)!=null&&Q.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),React.useEffect(()=>{if(T.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,N.current=!1)}},[T.current]),React.createElement("section",{ref:i,"aria-label":`${C} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((q,Y)=>{var Q;const[re,ee]=q.split("-");return I.length?React.createElement("ol",{key:q,dir:E==="auto"?getDocumentDirection():E,tabIndex:-1,ref:T,className:f,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":re,"data-x-position":ee,style:{"--front-toast-height":`${((Q=$[0])==null?void 0:Q.height)||0}px`,"--width":`${TOAST_WIDTH}px`,"--gap":`${S}px`,...v,...assignOffset(d,h)},onBlur:z=>{N.current&&!z.currentTarget.contains(z.relatedTarget)&&(N.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||N.current||(N.current=!0,F.current=z.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{j||K(!1)},onDragEnd:()=>K(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},I.filter(z=>!z.position&&Y===0||z.position===q).map((z,J)=>{var te,X;return React.createElement(Toast,{key:z.id,icons:w,index:J,toast:z,defaultRichColors:m,duration:(te=y==null?void 0:y.duration)!=null?te:g,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:b,closeButton:(X=y==null?void 0:y.closeButton)!=null?X:u,interacting:j,position:q,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:H,toasts:I.filter(se=>se.position==z.position),heights:$.filter(se=>se.position==z.position),setHeights:V,expandByDefault:c,gap:S,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),box_epic_icon$1=assetUrl("boxes/rewards/box_epic.webp"),box_legend_icon$1=assetUrl("boxes/rewards/box_legend.webp"),box_rare_icon$1=assetUrl("boxes/rewards/box_rare.webp"),coins_1000_icon=assetUrl("boxes/rewards/reward_coins_1000.webp"),usdt_50_icon$1=assetUrl("boxes/rewards/reward_usdt_50.webp");function pickIconByRewardType(e){switch(e){case"coins":return coins_1000_icon;case"usdt":return usdt_50_icon$1;case"box":{const t=[box_epic_icon$1,box_legend_icon$1,box_rare_icon$1];return t[Math.floor(Math.random()*t.length)]}default:return coins_1000_icon}}function EventToast({recentReward:e}){const{t}=useTranslation(),i=`${telegramLanguageCodeToFlagEmoji(e.country_code)} ${e.name}`.trim(),s=formatTimeAgo(e.received_at,t),o=pickIconByRewardType(e.reward_type);return jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_max-content] items-center bg-white rounded-[20px] w-[130px] shadow-[0_0_10px_0_rgba(0,0,0,0.20)] transition-all duration-200 gap-1 py-1.5 pr-1.5 pl-2.5",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"truncate text-[13px] font-[590] leading-[16px] !text-black",children:i}),jsxRuntimeExports.jsx("span",{className:"truncate text-[10px] font-[400] leading-[13px] !text-black/50",children:s})]}),jsxRuntimeExports.jsx("div",{className:"flex-shrink-0",children:jsxRuntimeExports.jsx("img",{src:o,alt:i,className:"object-cover size-6"})})]})}function getEventsBottomOffset(){var e;return((e=window.Telegram.WebApp)==null?void 0:e.safeAreaInset.bottom)+66+16}function EventsStack(){return jsxRuntimeExports.jsx(Toaster,{expand:!0,visibleToasts:2,gap:6,duration:6e3,mobileOffset:{left:window.innerWidth-130-16,bottom:getEventsBottomOffset()},position:"bottom-right"})}const ConfettiParticles=({count:e=50,style:t,delay:i=0,margin:s=8,padding:o=8})=>{const[a,l]=React.useState(!1),c=React.useRef(null),u=React.useRef(null),f=React.useRef([]),d=React.useRef(),h=4,[p,m]=React.useState(360),[g,v]=React.useState(42);return React.useEffect(()=>{const b=()=>{if(u.current){const E=u.current.getBoundingClientRect();m(E.width-(s+o)*2),v(E.height-(s+o)*2)}},y=new ResizeObserver(b);return u.current&&y.observe(u.current),b(),()=>{y.disconnect()}},[s,o]),React.useEffect(()=>{if(i>0){const b=setTimeout(()=>{l(!0)},i);return()=>clearTimeout(b)}l(!0)},[i]),React.useEffect(()=>{const b=["#FAFF00","#FF6FB4","#00FFA3","#504BD7","#6FFFBA","#31FF0D","#00E0FF","#FF7B00","#0DFF6A","#B0FF27"],y=()=>{const w=b[Math.floor(Math.random()*b.length)];let C,A;if(p===g){const O=p/2*Math.sqrt(Math.random()),I=Math.random()*2*Math.PI,L=s+o+p/2;C=(L+O*Math.cos(I))*h,A=(L+O*Math.sin(I))*h}else C=(s+o+Math.random()*p)*h,A=(s+o+Math.random()*g)*h;return{x:C,y:A,size:1.5+Math.random()*1.5,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.1,y:(Math.random()-.5)*.1},fadeOut:!1,type:Math.random()<.5?"circle":"star",color:w}};f.current=Array(e).fill(null).map(y);let E=performance.now();const S=w=>{const C=c.current,A=C==null?void 0:C.getContext("2d",{alpha:!0});if(!C||!A)return;const O=w-E;E=w,A.clearRect(0,0,(p+(o+s)*2)*h,(g+(o+s)*2)*h),f.current.forEach(I=>{if(p===g){const L=(s+o+p/2)*h,$=(p/2+o)*h,V=Math.sqrt((I.x-L)**2+(I.y-L)**2);!I.fadeOut&&V>$&&(I.fadeOut=!0)}else!I.fadeOut&&(I.x<s*h||I.x>(s+o+p+o)*h||I.y<s*h||I.y>(s+o+g+o)*h)&&(I.fadeOut=!0);if(I.x+=I.velocity.x*O,I.y+=I.velocity.y*O,I.fadeOut){const V=.001*(1+Math.sqrt(I.velocity.x*I.velocity.x+I.velocity.y*I.velocity.y)*50);I.opacity=Math.max(0,I.opacity-V*O),I.opacity<=0&&(Object.assign(I,y()),I.fadeOut=!1)}if(A.save(),A.translate(I.x,I.y),A.globalAlpha=I.opacity,I.type==="circle")A.beginPath(),A.arc(0,0,I.size*h,0,Math.PI*2),A.fillStyle=I.color,A.fill();else if(I.type==="star"){const L=I.size*h*1.5;A.beginPath(),A.moveTo(0,-L),A.lineTo(L/3,-L/3),A.lineTo(L,0),A.lineTo(L/3,L/3),A.lineTo(0,L),A.lineTo(-L/3,L/3),A.lineTo(-L,0),A.lineTo(-L/3,-L/3),A.closePath(),A.fillStyle=I.color,A.fill()}A.restore()}),d.current=requestAnimationFrame(S)};return d.current=requestAnimationFrame(S),()=>{d.current&&cancelAnimationFrame(d.current)}},[p,g,e,s,o]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{ref:u,style:{position:"absolute",inset:-(s+o),pointerEvents:"none"}}),jsxRuntimeExports.jsx("canvas",{width:(p+(s+o)*2)*h,height:(g+(s+o)*2)*h,ref:c,style:{position:"absolute",zIndex:1,opacity:a?1:0,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",transform:`scale(${1/h})`,transformOrigin:"top left",inset:-(s+o),imageRendering:"auto",pointerEvents:"none",...t}})]})},BoxOpeningContext=React.createContext(void 0),BoxOpeningProvider=({children:e})=>{const[t,i]=React.useState(void 0),[s,o]=React.useState("IDLE"),[a,l]=React.useState("carousel"),[c,u]=React.useState("wheel"),[f,d]=React.useState(!1),h=(m,g="wheel")=>{i(m),u(g),d(!1),g==="wheel"&&(o("IDLE"),l("carousel")),g==="result"&&(o("STOPPED"),l("carousel"))},p=()=>{i(void 0),u("wheel"),d(!1)};return jsxRuntimeExports.jsx(BoxOpeningContext.Provider,{value:{wheelSpinState:s,animationPhase:a,viewMode:c,isBoxOpeningModalOpen:t!==void 0,currentBoxId:t,isSkipped:f,openBoxModal:h,closeBoxModal:p,setWheelSpinState:o,setAnimationPhase:l,setSkipped:d},children:e})},useBoxOpening=()=>{const e=React.useContext(BoxOpeningContext);if(e===void 0)throw new Error("useBoxOpening must be used within a BoxOpeningProvider");return e};function useBoxRewards(e){return useMutation({mutationFn:async({boxId:t})=>{const i=await makeRequest(`inventory/${t}`,"GET"),s=i.rewards.filter(o=>o.reward_type!=="double_balance"&&o.reward_type!=="telegram_premium").map(o=>({...o,reward_value:o.reward_type==="usdt"?dividePriceResponse(o.reward_value):o.reward_value}));return{...i,rewards:s}},...e})}function useRevealReward(e){const t=useQueryClient();return useMutation({mutationFn:async({boxId:i})=>{const s=await makeRequest(`inventory/${i}/open`,"POST");return{...s,reward_value:s.reward_type==="usdt"?dividePriceResponse(s.reward_value):s.reward_value}},onSettled(){t.invalidateQueries({queryKey:[PROFILE_TAG]})},...e})}const boxSilverIcon=assetUrl("boxes/rewards/box_epic.webp"),boxGoldIcon=assetUrl("boxes/rewards/box_legend.webp"),boxBronzeIcon=assetUrl("boxes/rewards/box_rare.webp"),boxCommonIcon=assetUrl("boxes/rewards/box_regular.webp"),getBoxImage=e=>e.name==="Bronze box"?e.image||boxBronzeIcon:e.name==="Silver box"?e.image||boxSilverIcon:e.name==="Gold box"?e.image||boxGoldIcon:e.image||boxCommonIcon;function ProfileInventoryModal({...e}){const{t}=useTranslation(),{isOpen:i,setIsOpen:s}=useInventoryModalStore(),{data:{inventory:o}}=useProfile(),{openBoxModal:a}=useBoxOpening(),l=f=>{var d,h;(h=(d=window.Telegram)==null?void 0:d.WebApp)==null||h.HapticFeedback.impactOccurred("soft"),a(f)},c=f=>{switch(f.name){case"Bronze box":return t("unopenedLootBox");case"Silver box":return t("unopenedLootBox");case"Gold box":return t("unopenedLootBox");default:return t("unopenedLootBox")}},u=f=>{switch(f.name){case"Bronze box":return t("reward_type.box_rare");case"Silver box":return t("reward_type.box_epic");case"Gold box":return t("reward_type.box_legend");default:return t("reward_type.box_common")}};return jsxRuntimeExports.jsx(Drawer,{open:i,onOpenChange:s,...e,children:jsxRuntimeExports.jsx(DrawerContent,{className:"min-h-[calc(95dvh-var(--tg-safe-area-inset-top)-var(--tg-safe-area-inset-bottom))] max-h-[calc(95dvh-var(--tg-safe-area-inset-top)-var(--tg-safe-area-inset-bottom))]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Title$1,{level:"2",weight:"1",children:[t("inventoryModal.title")," ",jsxRuntimeExports.jsx("span",{className:"text-hint",children:o.length})]}),jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",className:"opacity-70",children:t("inventoryModal.description")})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-x-[10px] gap-y-[30px] justify-items-center",children:[o.map((f,d)=>jsxRuntimeExports.jsxs(motion.div,{className:"min-w-[96px] min-h-[96px] rounded-full flex flex-col items-center justify-center gap-2.5 relative cursor-pointer",onClick:()=>f&&l(f.id),role:f?"button":void 0,tabIndex:f?0:void 0,"aria-label":f?`${t("openItem")} ${(f==null?void 0:f.name)==="Empty box"?t("emptyBox"):c(f)}`:void 0,onKeyDown:h=>{f&&(h.key==="Enter"||h.key===" ")&&l(f.id)},whileTap:f?{scale:.95}:void 0,transition:{type:"spring",stiffness:400,damping:30},children:[f&&jsxRuntimeExports.jsx("img",{src:getBoxImage(f),alt:c(f),width:96,height:96,className:"size-24 object-contain scale-110"}),jsxRuntimeExports.jsx("div",{className:cn$1("rounded-[40px] flex items-center justify-center px-[6px] py-[3px] absolute","text-rounded","right-0 top-17","font-[800]",f.name==="Gold box"||f.name==="Gold box"?"text-gray-900 ":"text-white"),style:{boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)",background:f.name==="Bronze box"?"linear-gradient(180deg, #00D1ED 0%, #0D31FF 100%)":f.name==="Silver box"?"linear-gradient(180deg, #BE1DE6 0%, #510DFF 100%)":f.name==="Gold box"?"linear-gradient(180deg, #FFFF00 0%, #FF9900 100%)":"linear-gradient(180deg, #CDCDCD 0%, #707070 100%)"},children:jsxRuntimeExports.jsx(Text,{style:{fontWeight:900,fontSize:12},children:u(f)})}),jsxRuntimeExports.jsx(Text,{weight:"2",children:c(f)})]},`inventory-slot-${f?f.id:d}`)),Array.from({length:o.length%3===0&&o.length!==0?0:3-o.length%3}).map((f,d)=>jsxRuntimeExports.jsx("div",{className:"size-24 rounded-full",style:{background:"var(--tgui--secondary_bg_color)"}},`empty-slot-${o.length}-${d}`))]})})]})})})}const AnimatedFullscreen=React.memo(({isOpen:e,children:t,backgroundImage:i,backgroundColor:s="var(--tgui--bg_color)",animationType:o="scale",overlayImage:a,showOverlay:l=!1})=>{const[c,u]=React.useState(!1),[f,d]=React.useState(!1),[h,p]=React.useState(i);React.useEffect(()=>{if(console.log("[AnimatedFullscreen] isOpen changed:",e),e){u(!0);const w=setTimeout(()=>{console.log("[AnimatedFullscreen] Setting isAnimating to true"),d(!0)},50);return()=>clearTimeout(w)}console.log("[AnimatedFullscreen] Closing - setting isAnimating to false"),d(!1);const S=setTimeout(()=>{console.log("[AnimatedFullscreen] Setting isVisible to false"),u(!1)},300);return()=>clearTimeout(S)},[e]),React.useEffect(()=>{console.log("[AnimatedFullscreen] backgroundImage changed:",i),i&&p(i)},[i]);const m=React.useMemo(()=>`${h??""}::${s??""}`,[h,s]),g=React.useMemo(()=>{const S={backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat"};if(o==="circle"){const C=f?"150%":"0%",A={...S,background:h?`radial-gradient(circle at center, ${s} ${C}, transparent ${C}), url(${h})`:`radial-gradient(circle at center, ${s} ${C}, transparent ${C})`,transition:"background 600ms cubic-bezier(0.4, 0, 0.2, 1)"};return console.log("[AnimatedFullscreen] Circle mode background style:",A),A}const w={...S,backgroundImage:h,backgroundColor:s};return console.log("[AnimatedFullscreen] Default mode background style:",w),w},[o,f,h,s]),v=React.useMemo(()=>o==="scale"?f?"scale(1)":"scale(0.6)":"scale(1)",[o,f]),b=React.useMemo(()=>({backgroundImage:`url(${a})`,backgroundSize:"100% 100%",zIndex:2}),[a]),y=React.useMemo(()=>({backgroundColor:"cyan",mixBlendMode:"color",zIndex:3}),[]),E=React.useMemo(()=>({transform:v,transition:"transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1)",paddingLeft:"var(--tg-safe-area-inset-left, 0px)",paddingRight:"var(--tg-safe-area-inset-right, 0px)"}),[v]);return console.log("[AnimatedFullscreen] Rendering with:",{isVisible:c,isAnimating:f,animationType:o,backgroundColor:s,displayedBackground:h,hasBackgroundImage:!!i,opacity:f?1:0,transform:v}),c?jsxRuntimeExports.jsxs("div",{className:cn$1("transition-opacity duration-400 ease-in-out",f?"opacity-100":"opacity-0"),children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-0 bg-white"}),jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0",style:{...g,zIndex:1},initial:{opacity:0},animate:{opacity:f?1:0},exit:{opacity:0},transition:{duration:.4,ease:"easeInOut"}},m)}),jsxRuntimeExports.jsx(AnimatePresence,{children:a&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0 mix-blend-overlay bg-center bg-no-repeat",style:b,initial:{opacity:0},animate:{opacity:l&&f?1:0},exit:{opacity:0},transition:{duration:f?.4:.1,ease:"easeInOut"}}),jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0",style:y,initial:{opacity:0},animate:{opacity:l&&f?.8:0},exit:{opacity:0},transition:{duration:f?.4:.1,ease:"easeInOut"}})]})}),jsxRuntimeExports.jsx("div",{className:"relative w-full h-full flex items-center justify-center z-10",children:jsxRuntimeExports.jsx("div",{className:"w-full h-full flex flex-col",style:E,children:t})})]}):(console.log("[AnimatedFullscreen] Not visible, returning null"),null)}),BOX_OPENING_ANIMATION_DURATION_MS=4e3,BOX_OPENING_SKIPPED_ANIMATION_DURATION_MS=500;function isObject$1(e){return Object.prototype.toString.call(e)==="[object Object]"}function isRecord(e){return isObject$1(e)||Array.isArray(e)}function canUseDOM(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function areOptionsEqual(e,t){const i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==a?!1:i.every(l=>{const c=e[l],u=t[l];return typeof c=="function"?`${c}`==`${u}`:!isRecord(c)||!isRecord(u)?c===u:areOptionsEqual(c,u)})}function sortAndMapPluginToOptions(e){return e.concat().sort((t,i)=>t.name>i.name?1:-1).map(t=>t.options)}function arePluginsEqual(e,t){if(e.length!==t.length)return!1;const i=sortAndMapPluginToOptions(e),s=sortAndMapPluginToOptions(t);return i.every((o,a)=>{const l=s[a];return areOptionsEqual(o,l)})}function isNumber(e){return typeof e=="number"}function isString$1(e){return typeof e=="string"}function isBoolean(e){return typeof e=="boolean"}function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function mathAbs(e){return Math.abs(e)}function mathSign(e){return Math.sign(e)}function deltaAbs(e,t){return mathAbs(e-t)}function factorAbs(e,t){if(e===0||t===0||mathAbs(e)<=mathAbs(t))return 0;const i=deltaAbs(mathAbs(e),mathAbs(t));return mathAbs(i/e)}function roundToTwoDecimals(e){return Math.round(e*100)/100}function arrayKeys(e){return objectKeys(e).map(Number)}function arrayLast(e){return e[arrayLastIndex(e)]}function arrayLastIndex(e){return Math.max(0,e.length-1)}function arrayIsLastIndex(e,t){return t===arrayLastIndex(e)}function arrayFromNumber(e,t=0){return Array.from(Array(e),(i,s)=>t+s)}function objectKeys(e){return Object.keys(e)}function objectsMergeDeep(e,t){return[e,t].reduce((i,s)=>(objectKeys(s).forEach(o=>{const a=i[o],l=s[o],c=isObject(a)&&isObject(l);i[o]=c?objectsMergeDeep(a,l):l}),i),{})}function isMouseEvent(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Alignment(e,t){const i={start:s,center:o,end:a};function s(){return 0}function o(u){return a(u)/2}function a(u){return t-u}function l(u,f){return isString$1(e)?i[e](u):e(t,u,f)}return{measure:l}}function EventStore(){let e=[];function t(o,a,l,c={passive:!0}){let u;if("addEventListener"in o)o.addEventListener(a,l,c),u=()=>o.removeEventListener(a,l,c);else{const f=o;f.addListener(l),u=()=>f.removeListener(l)}return e.push(u),s}function i(){e=e.filter(o=>o())}const s={add:t,clear:i};return s}function Animations(e,t,i,s){const o=EventStore(),a=1e3/60;let l=null,c=0,u=0;function f(){o.add(e,"visibilitychange",()=>{e.hidden&&g()})}function d(){m(),o.clear()}function h(b){if(!u)return;l||(l=b,i(),i());const y=b-l;for(l=b,c+=y;c>=a;)i(),c-=a;const E=c/a;s(E),u&&(u=t.requestAnimationFrame(h))}function p(){u||(u=t.requestAnimationFrame(h))}function m(){t.cancelAnimationFrame(u),l=null,c=0,u=0}function g(){l=null,c=0}return{init:f,destroy:d,start:p,stop:m,update:i,render:s}}function Axis(e,t){const i=t==="rtl",s=e==="y",o=s?"y":"x",a=s?"x":"y",l=!s&&i?-1:1,c=d(),u=h();function f(g){const{height:v,width:b}=g;return s?v:b}function d(){return s?"top":i?"right":"left"}function h(){return s?"bottom":i?"left":"right"}function p(g){return g*l}return{scroll:o,cross:a,startEdge:c,endEdge:u,measureSize:f,direction:p}}function Limit(e=0,t=0){const i=mathAbs(e-t);function s(f){return f<e}function o(f){return f>t}function a(f){return s(f)||o(f)}function l(f){return a(f)?s(f)?e:t:f}function c(f){return i?f-i*Math.ceil((f-t)/i):f}return{length:i,max:t,min:e,constrain:l,reachedAny:a,reachedMax:o,reachedMin:s,removeOffset:c}}function Counter(e,t,i){const{constrain:s}=Limit(0,e),o=e+1;let a=l(t);function l(p){return i?mathAbs((o+p)%o):s(p)}function c(){return a}function u(p){return a=l(p),h}function f(p){return d().set(c()+p)}function d(){return Counter(e,c(),i)}const h={get:c,set:u,add:f,clone:d};return h}function DragHandler(e,t,i,s,o,a,l,c,u,f,d,h,p,m,g,v,b,y,E){const{cross:S,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],A={passive:!1},O=EventStore(),I=EventStore(),L=Limit(50,225).constrain(m.measure(20)),$={mouse:300,touch:400},V={mouse:500,touch:600},W=g?43:25;let K=!1,j=0,D=0,M=!1,k=!1,T=!1,P=!1;function F(se){if(!E)return;function ie(pe){(isBoolean(E)||E(se,pe))&&re(pe)}const ne=t;O.add(ne,"dragstart",pe=>pe.preventDefault(),A).add(ne,"touchmove",()=>{},A).add(ne,"touchend",()=>{}).add(ne,"touchstart",ie).add(ne,"mousedown",ie).add(ne,"touchcancel",z).add(ne,"contextmenu",z).add(ne,"click",J,!0)}function N(){O.clear(),I.clear()}function H(){const se=P?i:t;I.add(se,"touchmove",ee,A).add(se,"touchend",z).add(se,"mousemove",ee,A).add(se,"mouseup",z)}function q(se){const ie=se.nodeName||"";return C.includes(ie)}function Y(){return(g?V:$)[P?"mouse":"touch"]}function Q(se,ie){const ne=h.add(mathSign(se)*-1),pe=d.byDistance(se,!g).distance;return g||mathAbs(se)<L?pe:b&&ie?pe*.5:d.byIndex(ne.get(),0).distance}function re(se){const ie=isMouseEvent(se,s);P=ie,T=g&&ie&&!se.buttons&&K,K=deltaAbs(o.get(),l.get())>=2,!(ie&&se.button!==0)&&(q(se.target)||(M=!0,a.pointerDown(se),f.useFriction(0).useDuration(0),o.set(l),H(),j=a.readPoint(se),D=a.readPoint(se,S),p.emit("pointerDown")))}function ee(se){if(!isMouseEvent(se,s)&&se.touches.length>=2)return z(se);const ne=a.readPoint(se),pe=a.readPoint(se,S),_e=deltaAbs(ne,j),ye=deltaAbs(pe,D);if(!k&&!P&&(!se.cancelable||(k=_e>ye,!k)))return z(se);const Ae=a.pointerMove(se);_e>v&&(T=!0),f.useFriction(.3).useDuration(.75),c.start(),o.add(w(Ae)),se.preventDefault()}function z(se){const ne=d.byDistance(0,!1).index!==h.get(),pe=a.pointerUp(se)*Y(),_e=Q(w(pe),ne),ye=factorAbs(pe,_e),Ae=W-10*ye,xe=y+ye/50;k=!1,M=!1,I.clear(),f.useDuration(Ae).useFriction(xe),u.distance(_e,!g),P=!1,p.emit("pointerUp")}function J(se){T&&(se.stopPropagation(),se.preventDefault(),T=!1)}function te(){return M}return{init:F,destroy:N,pointerDown:te}}function DragTracker(e,t){let s,o;function a(h){return h.timeStamp}function l(h,p){const g=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(isMouseEvent(h,t)?h:h.touches[0])[g]}function c(h){return s=h,o=h,l(h)}function u(h){const p=l(h)-l(o),m=a(h)-a(s)>170;return o=h,m&&(s=h),p}function f(h){if(!s||!o)return 0;const p=l(o)-l(s),m=a(h)-a(s),g=a(h)-a(o)>170,v=p/m;return m&&!g&&mathAbs(v)>.1?v:0}return{pointerDown:c,pointerMove:u,pointerUp:f,readPoint:l}}function NodeRects(){function e(i){const{offsetTop:s,offsetLeft:o,offsetWidth:a,offsetHeight:l}=i;return{top:s,right:o+a,bottom:s+l,left:o,width:a,height:l}}return{measure:e}}function PercentOfView(e){function t(s){return e*(s/100)}return{measure:t}}function ResizeHandler(e,t,i,s,o,a,l){const c=[e].concat(s);let u,f,d=[],h=!1;function p(b){return o.measureSize(l.measure(b))}function m(b){if(!a)return;f=p(e),d=s.map(p);function y(E){for(const S of E){if(h)return;const w=S.target===e,C=s.indexOf(S.target),A=w?f:d[C],O=p(w?e:s[C]);if(mathAbs(O-A)>=.5){b.reInit(),t.emit("resize");break}}}u=new ResizeObserver(E=>{(isBoolean(a)||a(b,E))&&y(E)}),i.requestAnimationFrame(()=>{c.forEach(E=>u.observe(E))})}function g(){h=!0,u&&u.disconnect()}return{init:m,destroy:g}}function ScrollBody(e,t,i,s,o,a){let l=0,c=0,u=o,f=a,d=e.get(),h=0;function p(){const A=s.get()-e.get(),O=!u;let I=0;return O?(l=0,i.set(s),e.set(s),I=A):(i.set(e),l+=A/u,l*=f,d+=l,e.add(l),I=d-h),c=mathSign(I),h=d,C}function m(){const A=s.get()-t.get();return mathAbs(A)<.001}function g(){return u}function v(){return c}function b(){return l}function y(){return S(o)}function E(){return w(a)}function S(A){return u=A,C}function w(A){return f=A,C}const C={direction:v,duration:g,velocity:b,seek:p,settled:m,useBaseFriction:E,useBaseDuration:y,useFriction:w,useDuration:S};return C}function ScrollBounds(e,t,i,s,o){const a=o.measure(10),l=o.measure(50),c=Limit(.1,.99);let u=!1;function f(){return!(u||!e.reachedAny(i.get())||!e.reachedAny(t.get()))}function d(m){if(!f())return;const g=e.reachedMin(t.get())?"min":"max",v=mathAbs(e[g]-t.get()),b=i.get()-t.get(),y=c.constrain(v/l);i.subtract(b*y),!m&&mathAbs(b)<a&&(i.set(e.constrain(i.get())),s.useDuration(25).useBaseFriction())}function h(m){u=!m}return{shouldConstrain:f,constrain:d,toggleActive:h}}function ScrollContain(e,t,i,s,o){const a=Limit(-t+e,0),l=h(),c=d(),u=p();function f(g,v){return deltaAbs(g,v)<=1}function d(){const g=l[0],v=arrayLast(l),b=l.lastIndexOf(g),y=l.indexOf(v)+1;return Limit(b,y)}function h(){return i.map((g,v)=>{const{min:b,max:y}=a,E=a.constrain(g),S=!v,w=arrayIsLastIndex(i,v);return S?y:w||f(b,E)?b:f(y,E)?y:E}).map(g=>parseFloat(g.toFixed(3)))}function p(){if(t<=e+o)return[a.max];if(s==="keepSnaps")return l;const{min:g,max:v}=c;return l.slice(g,v)}return{snapsContained:u,scrollContainLimit:c}}function ScrollLimit(e,t,i){const s=t[0],o=i?s-e:arrayLast(t);return{limit:Limit(o,s)}}function ScrollLooper(e,t,i,s){const a=t.min+.1,l=t.max+.1,{reachedMin:c,reachedMax:u}=Limit(a,l);function f(p){return p===1?u(i.get()):p===-1?c(i.get()):!1}function d(p){if(!f(p))return;const m=e*(p*-1);s.forEach(g=>g.add(m))}return{loop:d}}function ScrollProgress(e){const{max:t,length:i}=e;function s(a){const l=a-t;return i?l/-i:0}return{get:s}}function ScrollSnaps(e,t,i,s,o){const{startEdge:a,endEdge:l}=e,{groupSlides:c}=o,u=h().map(t.measure),f=p(),d=m();function h(){return c(s).map(v=>arrayLast(v)[l]-v[0][a]).map(mathAbs)}function p(){return s.map(v=>i[a]-v[a]).map(v=>-mathAbs(v))}function m(){return c(f).map(v=>v[0]).map((v,b)=>v+u[b])}return{snaps:f,snapsAligned:d}}function SlideRegistry(e,t,i,s,o,a){const{groupSlides:l}=o,{min:c,max:u}=s,f=d();function d(){const p=l(a),m=!e||t==="keepSnaps";return i.length===1?[a]:m?p:p.slice(c,u).map((g,v,b)=>{const y=!v,E=arrayIsLastIndex(b,v);if(y){const S=arrayLast(b[0])+1;return arrayFromNumber(S)}if(E){const S=arrayLastIndex(a)-arrayLast(b)[0]+1;return arrayFromNumber(S,arrayLast(b)[0])}return g})}return{slideRegistry:f}}function ScrollTarget(e,t,i,s,o){const{reachedAny:a,removeOffset:l,constrain:c}=s;function u(g){return g.concat().sort((v,b)=>mathAbs(v)-mathAbs(b))[0]}function f(g){const v=e?l(g):c(g),b=t.map((E,S)=>({diff:d(E-v,0),index:S})).sort((E,S)=>mathAbs(E.diff)-mathAbs(S.diff)),{index:y}=b[0];return{index:y,distance:v}}function d(g,v){const b=[g,g+i,g-i];if(!e)return g;if(!v)return u(b);const y=b.filter(E=>mathSign(E)===v);return y.length?u(y):arrayLast(b)-i}function h(g,v){const b=t[g]-o.get(),y=d(b,v);return{index:g,distance:y}}function p(g,v){const b=o.get()+g,{index:y,distance:E}=f(b),S=!e&&a(b);if(!v||S)return{index:y,distance:g};const w=t[y]-E,C=g+d(w,0);return{index:y,distance:C}}return{byDistance:p,byIndex:h,shortcut:d}}function ScrollTo(e,t,i,s,o,a,l){function c(h){const p=h.distance,m=h.index!==t.get();a.add(p),p&&(s.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(i.set(t.get()),t.set(h.index),l.emit("select"))}function u(h,p){const m=o.byDistance(h,p);c(m)}function f(h,p){const m=t.clone().set(h),g=o.byIndex(m.get(),p);c(g)}return{distance:u,index:f}}function SlideFocus(e,t,i,s,o,a,l,c){const u={passive:!0,capture:!0};let f=0;function d(m){if(!c)return;function g(v){if(new Date().getTime()-f>10)return;l.emit("slideFocusStart"),e.scrollLeft=0;const E=i.findIndex(S=>S.includes(v));isNumber(E)&&(o.useDuration(0),s.index(E,0),l.emit("slideFocus"))}a.add(document,"keydown",h,!1),t.forEach((v,b)=>{a.add(v,"focus",y=>{(isBoolean(c)||c(m,y))&&g(b)},u)})}function h(m){m.code==="Tab"&&(f=new Date().getTime())}return{init:d}}function Vector1D(e){let t=e;function i(){return t}function s(u){t=l(u)}function o(u){t+=l(u)}function a(u){t-=l(u)}function l(u){return isNumber(u)?u:u.get()}return{get:i,set:s,add:o,subtract:a}}function Translate(e,t){const i=e.scroll==="x"?l:c,s=t.style;let o=null,a=!1;function l(p){return`translate3d(${p}px,0px,0px)`}function c(p){return`translate3d(0px,${p}px,0px)`}function u(p){if(a)return;const m=roundToTwoDecimals(e.direction(p));m!==o&&(s.transform=i(m),o=m)}function f(p){a=!p}function d(){a||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:u,toggleActive:f}}function SlideLooper(e,t,i,s,o,a,l,c,u){const d=arrayKeys(o),h=arrayKeys(o).reverse(),p=y().concat(E());function m(O,I){return O.reduce((L,$)=>L-o[$],I)}function g(O,I){return O.reduce((L,$)=>m(L,I)>0?L.concat([$]):L,[])}function v(O){return a.map((I,L)=>({start:I-s[L]+.5+O,end:I+t-.5+O}))}function b(O,I,L){const $=v(I);return O.map(V=>{const W=L?0:-i,K=L?i:0,j=L?"end":"start",D=$[V][j];return{index:V,loopPoint:D,slideLocation:Vector1D(-1),translate:Translate(e,u[V]),target:()=>c.get()>D?W:K}})}function y(){const O=l[0],I=g(h,O);return b(I,i,!1)}function E(){const O=t-l[0]-1,I=g(d,O);return b(I,-i,!0)}function S(){return p.every(({index:O})=>{const I=d.filter(L=>L!==O);return m(I,t)<=.1})}function w(){p.forEach(O=>{const{target:I,translate:L,slideLocation:$}=O,V=I();V!==$.get()&&(L.to(V),$.set(V))})}function C(){p.forEach(O=>O.translate.clear())}return{canLoop:S,clear:C,loop:w,loopPoints:p}}function SlidesHandler(e,t,i){let s,o=!1;function a(u){if(!i)return;function f(d){for(const h of d)if(h.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(d=>{o||(isBoolean(i)||i(u,d))&&f(d)}),s.observe(e,{childList:!0})}function l(){s&&s.disconnect(),o=!0}return{init:a,destroy:l}}function SlidesInView(e,t,i,s){const o={};let a=null,l=null,c,u=!1;function f(){c=new IntersectionObserver(g=>{u||(g.forEach(v=>{const b=t.indexOf(v.target);o[b]=v}),a=null,l=null,i.emit("slidesInView"))},{root:e.parentElement,threshold:s}),t.forEach(g=>c.observe(g))}function d(){c&&c.disconnect(),u=!0}function h(g){return objectKeys(o).reduce((v,b)=>{const y=parseInt(b),{isIntersecting:E}=o[y];return(g&&E||!g&&!E)&&v.push(y),v},[])}function p(g=!0){if(g&&a)return a;if(!g&&l)return l;const v=h(g);return g&&(a=v),g||(l=v),v}return{init:f,destroy:d,get:p}}function SlideSizes(e,t,i,s,o,a){const{measureSize:l,startEdge:c,endEdge:u}=e,f=i[0]&&o,d=g(),h=v(),p=i.map(l),m=b();function g(){if(!f)return 0;const E=i[0];return mathAbs(t[c]-E[c])}function v(){if(!f)return 0;const E=a.getComputedStyle(arrayLast(s));return parseFloat(E.getPropertyValue(`margin-${u}`))}function b(){return i.map((E,S,w)=>{const C=!S,A=arrayIsLastIndex(w,S);return C?p[S]+d:A?p[S]+h:w[S+1][c]-E[c]}).map(mathAbs)}return{slideSizes:p,slideSizesWithGaps:m,startGap:d,endGap:h}}function SlidesToScroll(e,t,i,s,o,a,l,c,u){const{startEdge:f,endEdge:d,direction:h}=e,p=isNumber(i);function m(y,E){return arrayKeys(y).filter(S=>S%E===0).map(S=>y.slice(S,S+E))}function g(y){return y.length?arrayKeys(y).reduce((E,S,w)=>{const C=arrayLast(E)||0,A=C===0,O=S===arrayLastIndex(y),I=o[f]-a[C][f],L=o[f]-a[S][d],$=!s&&A?h(l):0,V=!s&&O?h(c):0,W=mathAbs(L-V-(I+$));return w&&W>t+u&&E.push(S),O&&E.push(y.length),E},[]).map((E,S,w)=>{const C=Math.max(w[S-1]||0);return y.slice(C,E)}):[]}function v(y){return p?m(y,i):g(y)}return{groupSlides:v}}function Engine(e,t,i,s,o,a,l){const{align:c,axis:u,direction:f,startIndex:d,loop:h,duration:p,dragFree:m,dragThreshold:g,inViewThreshold:v,slidesToScroll:b,skipSnaps:y,containScroll:E,watchResize:S,watchSlides:w,watchDrag:C,watchFocus:A}=a,O=2,I=NodeRects(),L=I.measure(t),$=i.map(I.measure),V=Axis(u,f),W=V.measureSize(L),K=PercentOfView(W),j=Alignment(c,W),D=!h&&!!E,M=h||!!E,{slideSizes:k,slideSizesWithGaps:T,startGap:P,endGap:F}=SlideSizes(V,L,$,i,M,o),N=SlidesToScroll(V,W,b,h,L,$,P,F,O),{snaps:H,snapsAligned:q}=ScrollSnaps(V,j,L,$,N),Y=-arrayLast(H)+arrayLast(T),{snapsContained:Q,scrollContainLimit:re}=ScrollContain(W,Y,q,E,O),ee=D?Q:q,{limit:z}=ScrollLimit(Y,ee,h),J=Counter(arrayLastIndex(ee),d,h),te=J.clone(),X=arrayKeys(i),se=({dragHandler:Ne,scrollBody:Ee,scrollBounds:ce,options:{loop:fe}})=>{fe||ce.constrain(Ne.pointerDown()),Ee.seek()},ie=({scrollBody:Ne,translate:Ee,location:ce,offsetLocation:fe,previousLocation:be,scrollLooper:he,slideLooper:Ce,dragHandler:le,animation:de,eventHandler:Oe,scrollBounds:He,options:{loop:et}},Je)=>{const at=Ne.settled(),Pe=!He.shouldConstrain(),Ue=et?at:at&&Pe,ze=Ue&&!le.pointerDown();ze&&de.stop();const Qe=ce.get()*Je+be.get()*(1-Je);fe.set(Qe),et&&(he.loop(Ne.direction()),Ce.loop()),Ee.to(fe.get()),ze&&Oe.emit("settle"),Ue||Oe.emit("scroll")},ne=Animations(s,o,()=>se(Be),Ne=>ie(Be,Ne)),pe=.68,_e=ee[J.get()],ye=Vector1D(_e),Ae=Vector1D(_e),xe=Vector1D(_e),ae=Vector1D(_e),me=ScrollBody(ye,xe,Ae,ae,p,pe),Se=ScrollTarget(h,ee,Y,z,ae),Te=ScrollTo(ne,J,te,me,Se,ae,l),ve=ScrollProgress(z),Re=EventStore(),Ie=SlidesInView(t,i,l,v),{slideRegistry:Fe}=SlideRegistry(D,E,ee,re,N,X),$e=SlideFocus(e,i,Fe,Te,me,Re,l,A),Be={ownerDocument:s,ownerWindow:o,eventHandler:l,containerRect:L,slideRects:$,animation:ne,axis:V,dragHandler:DragHandler(V,e,s,o,ae,DragTracker(V,o),ye,ne,Te,me,Se,J,l,K,m,g,y,pe,C),eventStore:Re,percentOfView:K,index:J,indexPrevious:te,limit:z,location:ye,offsetLocation:xe,previousLocation:Ae,options:a,resizeHandler:ResizeHandler(t,l,o,i,V,S,I),scrollBody:me,scrollBounds:ScrollBounds(z,xe,ae,me,K),scrollLooper:ScrollLooper(Y,z,xe,[ye,xe,Ae,ae]),scrollProgress:ve,scrollSnapList:ee.map(ve.get),scrollSnaps:ee,scrollTarget:Se,scrollTo:Te,slideLooper:SlideLooper(V,W,Y,k,T,H,ee,xe,i),slideFocus:$e,slidesHandler:SlidesHandler(t,l,w),slidesInView:Ie,slideIndexes:X,slideRegistry:Fe,slidesToScroll:N,target:ae,translate:Translate(V,t)};return Be}function EventHandler(){let e={},t;function i(f){t=f}function s(f){return e[f]||[]}function o(f){return s(f).forEach(d=>d(t,f)),u}function a(f,d){return e[f]=s(f).concat([d]),u}function l(f,d){return e[f]=s(f).filter(h=>h!==d),u}function c(){e={}}const u={init:i,emit:o,off:l,on:a,clear:c};return u}const defaultOptions={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function OptionsHandler(e){function t(a,l){return objectsMergeDeep(a,l||{})}function i(a){const l=a.breakpoints||{},c=objectKeys(l).filter(u=>e.matchMedia(u).matches).map(u=>l[u]).reduce((u,f)=>t(u,f),{});return t(a,c)}function s(a){return a.map(l=>objectKeys(l.breakpoints||{})).reduce((l,c)=>l.concat(c),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:i,optionsMediaQueries:s}}function PluginsHandler(e){let t=[];function i(a,l){return t=l.filter(({options:c})=>e.optionsAtMedia(c).active!==!1),t.forEach(c=>c.init(a,e)),l.reduce((c,u)=>Object.assign(c,{[u.name]:u}),{})}function s(){t=t.filter(a=>a.destroy())}return{init:i,destroy:s}}function EmblaCarousel(e,t,i){const s=e.ownerDocument,o=s.defaultView,a=OptionsHandler(o),l=PluginsHandler(a),c=EventStore(),u=EventHandler(),{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:h}=a,{on:p,off:m,emit:g}=u,v=V;let b=!1,y,E=f(defaultOptions,EmblaCarousel.globalOptions),S=f(E),w=[],C,A,O;function I(){const{container:X,slides:se}=S;A=(isString$1(X)?e.querySelector(X):X)||e.children[0];const ne=isString$1(se)?A.querySelectorAll(se):se;O=[].slice.call(ne||A.children)}function L(X){const se=Engine(e,A,O,s,o,X,u);if(X.loop&&!se.slideLooper.canLoop()){const ie=Object.assign({},X,{loop:!1});return L(ie)}return se}function $(X,se){b||(E=f(E,X),S=d(E),w=se||w,I(),y=L(S),h([E,...w.map(({options:ie})=>ie)]).forEach(ie=>c.add(ie,"change",V)),S.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(te),y.eventHandler.init(te),y.resizeHandler.init(te),y.slidesHandler.init(te),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&O.length&&y.dragHandler.init(te),C=l.init(te,w)))}function V(X,se){const ie=N();W(),$(f({startIndex:ie},X),se),u.emit("reInit")}function W(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),l.destroy(),c.clear()}function K(){b||(b=!0,c.clear(),W(),u.emit("destroy"),u.clear())}function j(X,se,ie){!S.active||b||(y.scrollBody.useBaseFriction().useDuration(se===!0?0:S.duration),y.scrollTo.index(X,ie||0))}function D(X){const se=y.index.add(1).get();j(se,X,-1)}function M(X){const se=y.index.add(-1).get();j(se,X,1)}function k(){return y.index.add(1).get()!==N()}function T(){return y.index.add(-1).get()!==N()}function P(){return y.scrollSnapList}function F(){return y.scrollProgress.get(y.offsetLocation.get())}function N(){return y.index.get()}function H(){return y.indexPrevious.get()}function q(){return y.slidesInView.get()}function Y(){return y.slidesInView.get(!1)}function Q(){return C}function re(){return y}function ee(){return e}function z(){return A}function J(){return O}const te={canScrollNext:k,canScrollPrev:T,containerNode:z,internalEngine:re,destroy:K,off:m,on:p,emit:g,plugins:Q,previousScrollSnap:H,reInit:v,rootNode:ee,scrollNext:D,scrollPrev:M,scrollProgress:F,scrollSnapList:P,scrollTo:j,selectedScrollSnap:N,slideNodes:J,slidesInView:q,slidesNotInView:Y};return $(t,i),setTimeout(()=>u.emit("init"),0),te}EmblaCarousel.globalOptions=void 0;function useEmblaCarousel(e={},t=[]){const i=React.useRef(e),s=React.useRef(t),[o,a]=React.useState(),[l,c]=React.useState(),u=React.useCallback(()=>{o&&o.reInit(i.current,s.current)},[o]);return React.useEffect(()=>{areOptionsEqual(i.current,e)||(i.current=e,u())},[e,u]),React.useEffect(()=>{arePluginsEqual(s.current,t)||(s.current=t,u())},[t,u]),React.useEffect(()=>{if(canUseDOM()&&l){EmblaCarousel.globalOptions=useEmblaCarousel.globalOptions;const f=EmblaCarousel(l,i.current,s.current);return a(f),()=>f.destroy()}else a(void 0)},[l,a]),[c,o]}useEmblaCarousel.globalOptions=void 0;function RewardBoxRareBadge({reward:e,className:t}){const{t:i}=useTranslation(),o=(a=>{switch(a){case 12:return i("reward_type.box_rare");case 13:return i("reward_type.box_epic");case 14:return i("reward_type.box_legend");default:return i("reward_type.box_common")}})(e.reward_value);return e.reward_type!=="box"||!o?null:jsxRuntimeExports.jsx("div",{className:cn$1("rounded-[40px] flex items-center justify-center px-[9px] py-[5px] absolute font-[800]",e.reward_value===14?"!text-gray-900 text-rounded -rotate-3 left-0 right-0 bottom-3":"!text-white text-rounded rotate-10 -left-3 bottom-1",t),style:{boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)",background:e.reward_value===12?"linear-gradient(180deg, #00D1ED 0%, #0D31FF 100%)":e.reward_value===13?"linear-gradient(180deg, #BE1DE6 0%, #510DFF 100%)":e.reward_value===14?"linear-gradient(180deg, #FFFF00 0%, #FF9900 100%)":"linear-gradient(180deg, #CDCDCD 0%, #707070 100%)"},children:jsxRuntimeExports.jsx("span",{children:o})})}function RewardTypeBadge({reward:e,className:t,size:i}){const{t:s}=useTranslation(),o=(a,l)=>{switch(a){case"coins":return l>0?s("reward_type.coins",{count:l}):s("reward_type.coins_no_amount");case"usdt":return l>0?s("reward_type.usdt",{count:l}):s("reward_type.usdt_no_amount");case"ton":return s("reward_type.ton",{count:l});case"telegram_premium":return s("reward_type.telegram_premium");case"double_balance":return s("reward_type.double_balance");case"box":return s("reward_type.box");default:return a}};return jsxRuntimeExports.jsx("div",{className:cn$1("bg-white rounded-[40px] inline-flex items-center justify-center px-[12px] py-[5px]","whitespace-nowrap uppercase","font-[800] text-gray-900",t,i==="s"&&"text-[16px]",i==="m"&&"text-[24px]"),style:{boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.2)"},children:jsxRuntimeExports.jsx("span",{className:"text-rounded",children:o(e.reward_type,e.reward_type==="coins"||e.reward_type==="usdt"?0:e.reward_value)})})}const box_epic_icon=assetUrl("boxes/rewards/box_epic.webp"),box_legend_icon=assetUrl("boxes/rewards/box_legend.webp"),box_rare_icon=assetUrl("boxes/rewards/box_rare.webp"),box_regular_icon=assetUrl("boxes/rewards/box_regular.webp"),question_icon=assetUrl("boxes/rewards/question.webp"),coin_50_icon=assetUrl("boxes/rewards/reward_coins_50.webp"),coin_100_icon=assetUrl("boxes/rewards/reward_coins_100.webp"),coin_300_icon=assetUrl("boxes/rewards/reward_coins_300.webp"),coin_1000_icon=assetUrl("boxes/rewards/reward_coins_1000.webp"),usdt_1_icon=assetUrl("boxes/rewards/reward_usdt_1.webp"),usdt_20_icon=assetUrl("boxes/rewards/reward_usdt_20.webp"),usdt_50_icon=assetUrl("boxes/rewards/reward_usdt_50.webp"),telegram_icon=assetUrl("boxes/rewards/telegram.webp");function RewardNumericOverlay({reward:e,badgeSize:t}){if(e.reward_type!=="coins"&&e.reward_type!=="usdt")return null;const i=c=>{if(c==="coins")return e.reward_value>=100&&e.reward_value<300?"rotate-11 left-10 bottom-7":e.reward_value<100?"rotate-11 left-8 bottom-8":"rotate-5 left-7 bottom-6";if(c==="usdt")return e.reward_value<10?"-rotate-3 left-2 bottom-12":e.reward_value>=10&&e.reward_value<50?"-rotate-3 left-10 bottom-10":e.reward_value>=50?"-rotate-12 right-6 bottom-11":"-rotate-3 -left-6 bottom-4"},s=c=>c==="coins"?"linear-gradient(180deg, rgba(255, 208, 78, 1) 0%, rgba(229, 104, 0, 1) 100%)":"linear-gradient(180deg, rgba(25, 164, 0, 1) 0%, rgba(19, 125, 0, 1) 100%)",o=c=>c==="coins"?"#FFFFFF":"linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(182, 255, 122, 1) 100%)",a=c=>c==="coins"?"rgba(229, 104, 0, 1)":"rgba(19, 125, 0, 1)",l=(c,u,f)=>c==="coins"?"text-[3em]":c==="usdt"&&u<10?"text-[6em]":"text-[4em]";return jsxRuntimeExports.jsxs("div",{className:cn$1("absolute inline-flex items-center justify-center pb-2 px-1",i(e.reward_type)),style:{overflow:"visible"},children:[jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num font-[800] whitespace-nowrap",l(e.reward_type,e.reward_value)),style:{color:"#FFFFFF",textShadow:`
93
93
  8px 8px 0 #FFFFFF,
94
94
  -3px 3px 0 #FFFFFF,
95
95
  2px 2px 0 #FFFFFF,
@@ -98,7 +98,7 @@ s.goToAndStop(v-s.firstFrame-1,!0)}g.type==="loop"&&(d===null||d!==g.frames||s.i
98
98
  -3px -2px 0 #FFFFFF,
99
99
  `,WebkitBackgroundClip:"text",WebkitTextFillColor:"#FFFFFF",backgroundClip:"text",paddingRight:"0.28em",zIndex:0},children:e.reward_value}),jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num-fill font-[800] whitespace-nowrap",l(e.reward_type,e.reward_value)),style:{background:o(e.reward_type),WebkitBackgroundClip:"text",WebkitTextFillColor:e.reward_type==="usdt"?"transparent":"#FFFFFF",backgroundClip:"text",fontSize:Number(l(e.reward_type,e.reward_value).replace("text-[","").replace("em]",""))+.3+"em",zIndex:2,paddingRight:"0.3em"},children:e.reward_value}),jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num font-[800] whitespace-nowrap",l(e.reward_type,e.reward_value)),style:{background:s(e.reward_type),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",fontSize:Number(l(e.reward_type,e.reward_value).replace("text-[","").replace("em]",""))+.3+"em",textShadow:`0.1em 0.1em 0 ${a(e.reward_type)}`,paddingRight:"0.3em",zIndex:1},children:e.reward_value})]})}const getRewardIcon=e=>{switch(e.reward_type){case"coins":return{icon:e.reward_value>=1e3?coin_1000_icon:e.reward_value>=300?coin_300_icon:e.reward_value>=100?coin_100_icon:(e.reward_value>=50,coin_50_icon),sPosition:e.reward_value>=100&&e.reward_value<300?"-rotate-15 -right-8 bottom-6":e.reward_value<100?"-rotate-15 -right-4 bottom-4":"-rotate-12 -right-8 -bottom"};case"usdt":return{icon:e.reward_value>=50?usdt_50_icon:e.reward_value>=20?usdt_20_icon:usdt_1_icon,sPosition:e.reward_value>=50?"-rotate-8 -left-6 bottom-13":"-rotate-6 right-2 -bottom-2"};case"ton":case"telegram_premium":return{icon:telegram_icon,sPosition:"rotate-3 left-0 bottom-2"};case"double_balance":return{icon:question_icon,sPosition:"-rotate-5 right-0 bottom-0"};case"box":return{icon:e.reward_value===12?box_rare_icon:e.reward_value===13?box_epic_icon:e.reward_value===14?box_legend_icon:box_regular_icon,sPosition:"-rotate-4 -right-4 -bottom-2"};default:return{icon:"",sPosition:""}}},RewardTypeImage=React.memo(({reward:e,className:t,badgeSize:i,wheelSpinState:s,shouldShake:o=!1})=>{const{icon:a,sPosition:l}=getRewardIcon(e);return React.useEffect(()=>{var u,f,d;if(!o)return;(d=(f=(u=window.Telegram)==null?void 0:u.WebApp)==null?void 0:f.HapticFeedback)==null||d.impactOccurred("soft");const c=setInterval(()=>{var h,p,m;(m=(p=(h=window.Telegram)==null?void 0:h.WebApp)==null?void 0:p.HapticFeedback)==null||m.impactOccurred("soft")},2300);return()=>{clearInterval(c)}},[o]),jsxRuntimeExports.jsxs("div",{className:cn$1("relative",t),children:[i!==null&&s!=="SPINNING"&&jsxRuntimeExports.jsx(RewardTypeBadge,{reward:e,size:i??"s",className:cn$1(i==="s"&&`absolute bottom-0 ${l}`,i==="m"&&"mt-5 absolute -bottom-15 left-1/2 transform -translate-x-1/2",(e.reward_type==="coins"||e.reward_type==="usdt")&&"mb-2")}),jsxRuntimeExports.jsx(motion.img,{src:a,alt:"",className:cn$1("w-full h-full",e.reward_type==="box"&&"py-1.5 px-1.5",(e.reward_type==="coins"||e.reward_type==="usdt")&&"pb-3 px-1.5"),animate:{rotate:o?[0,-10,10,-10,10,-6,6,0]:0,scale:o?[1,1.08,1,1.08,1,1.05,1,1]:1,y:o?[0,-8,0,-8,0,-4,0,0]:0,x:o?[0,-2,2,-2,2,-1,1,0]:0},transition:o?{rotate:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:"easeInOut"},scale:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:[.34,1.56,.64,1]},y:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:[.34,1.56,.64,1]},x:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:"easeInOut"}}:{duration:0}}),jsxRuntimeExports.jsx(RewardBoxRareBadge,{reward:e}),(e.reward_type==="coins"||e.reward_type==="usdt")&&jsxRuntimeExports.jsx(RewardNumericOverlay,{reward:e,badgeSize:i})]})});function findPrizeIndex({prizes:e,targetReward:t,currentIndex:i}){const s=e.reduce((a,l,c)=>(t.reward_type==="coins"?l.reward_type==="coins"&&a.push(c):l.reward_type===t.reward_type&&l.reward_value===t.reward_value&&a.push(c),a),[]);if(s.length===0)return null;if(t.reward_type==="coins"){const a=t.reward_value,l=s.reduce((d,h)=>{const p=Math.abs(e[h].reward_value-a),m=Math.abs(e[d].reward_value-a);return p<m?h:d},s[0]),c=e[l].reward_value,u=s.filter(d=>e[d].reward_value===c);return u.find(d=>d>i)??u[0]}return s.find(a=>a>i)??s[0]}function getDistance(e,t,i){const s=Math.abs(e-t);return Math.min(s,i-s)}const PrizeCarousel=React.memo(({prizes:e,wheelSpinState:t,actualReward:i,setSpinState:s,isSkipped:o=!1,animationPhase:a="carousel",isOpeningAnimationComplete:l=!0,onCarouselClick:c,viewMode:u="wheel"})=>{const[f,d]=useEmblaCarousel({axis:"y",loop:!0,dragFree:!1,align:"center",startIndex:Math.floor(e.length/4),watchDrag:!1,skipSnaps:!1,containScroll:!1}),[h,p]=React.useState(0),m=React.useRef(),g=React.useRef(),v=React.useRef(),b=React.useRef(),y=React.useCallback(()=>{var S,w,C,A,O,I;if(!d)return;const E=d.selectedScrollSnap();p(E),E!==h&&(t==="IDLE"?(C=(w=(S=window.Telegram)==null?void 0:S.WebApp)==null?void 0:w.HapticFeedback)==null||C.impactOccurred("soft"):t==="SPINNING"&&((I=(O=(A=window.Telegram)==null?void 0:A.WebApp)==null?void 0:O.HapticFeedback)==null||I.impactOccurred("light")))},[d,h,t]);return React.useEffect(()=>{if(d)return y(),d.on("select",y),()=>{d.off("select",y)}},[d,y]),React.useEffect(()=>{const E=()=>{g.current&&cancelAnimationFrame(g.current),m.current&&clearInterval(m.current)};if(!d)return E;if(t==="IDLE")return m.current=window.setInterval(()=>{d.scrollPrev()},2e3),E;if(t==="SPINNING"&&i){E();const S=findPrizeIndex({prizes:e,targetReward:i,currentIndex:d.selectedScrollSnap()});if(S===null)return s("STOPPED"),E;b.current=S,v.current=Date.now();const w=d.selectedScrollSnap(),C=e.length,I=(w-S+C)%C+(o?0:1)*C,L=()=>o?BOX_OPENING_SKIPPED_ANIMATION_DURATION_MS:BOX_OPENING_ANIMATION_DURATION_MS;let $=0;const V=K=>{const D=T=>{const P=1-T;return 1-P*P*P};if(K<=.7)return D(K);const M=D(.7),k=(K-.7)/(1-.7);return M+k*(1-M)},W=()=>{const K=Date.now(),j=Math.max(1,L()),D=K-(v.current||K),M=Math.min(D/j,1),T=V(M)*I,F=Math.min(I,Math.ceil(T-1e-6)),N=F-$;if(N>0){for(let q=0;q<N;q++)d.scrollPrev();$=F}if(M<1){g.current=requestAnimationFrame(W);return}const H=()=>{var q,Y,Q;d.off("settle",H),s("STOPPED"),(Q=(Y=(q=window.Telegram)==null?void 0:q.WebApp)==null?void 0:Y.HapticFeedback)==null||Q.impactOccurred("medium")};d.on("settle",H)};g.current=requestAnimationFrame(W)}return E},[d,t,i,s,e,o]),jsxRuntimeExports.jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center overflow-hidden cursor-pointer",style:{"--slide-size":"max(160px, min(200px, 25vh))"},onClick:c,onKeyDown:c,onKeyUp:c,children:jsxRuntimeExports.jsxs("div",{className:"overflow-hidden h-full w-full",ref:f,children:[jsxRuntimeExports.jsx("div",{className:"flex h-full flex-col will-change-transform",children:e.map((E,S)=>{const w=getDistance(S,h,e.length),C=w===0,A=S===h,O=t==="IDLE"&&w===1?1:t==="IDLE"&&w>1?.6:t==="IDLE"&&w===0?1:t==="STOPPED"&&!C?0:1,I=t==="IDLE"&&C?.95:t==="IDLE"&&w===1||t==="IDLE"&&w>1?.65:t==="IDLE"&&w===0?.95:t==="STOPPED"&&C?1:t==="STOPPED"&&!C?0:.75,L=(S-h+e.length)%e.length,$=w!==0&&L>e.length/2,V=w!==0&&!$,K=E.reward_type==="box"&&t==="STOPPED"&&a==="final"&&l,j=t==="IDLE"?C||A?5:V?15:-15:0,M=u==="result"||t==="STOPPED"&&(C||A)&&a==="final"&&!(E.reward_type==="coins"||E.reward_type==="usdt");return jsxRuntimeExports.jsx("div",{className:"flex min-h-0 items-center justify-center",style:{flex:"0 0 var(--slide-size)"},"data-prize-index":S,children:jsxRuntimeExports.jsxs(motion.div,{className:"relative will-change-transform will-change-opacity h-full aspect-square origin-center",initial:{scale:1.4,opacity:0,rotate:5},animate:{scale:I,opacity:O,rotate:j},transition:{type:"spring",stiffness:500,damping:35,mass:2},children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-[-1]",style:{transform:"translate(0%, 2%)"},children:jsxRuntimeExports.jsx("div",{className:"rounded-full bg-white aspect-square",style:{width:t==="IDLE"&&C?"130%":"50%",height:t==="IDLE"&&C?"130%":"50%",opacity:t==="IDLE"&&C?.5:0,transition:"opacity 0.3s ease, width 0.3s ease, height 0.3s ease",mixBlendMode:"overlay"}})}),jsxRuntimeExports.jsx(RewardTypeImage,{reward:E,className:"w-full aspect-square",badgeSize:M?"m":"s",wheelSpinState:t,shouldShake:K})]})},`${E.reward_type}-${E.reward_value}-${S}`)})}),jsxRuntimeExports.jsx(Pointers,{wheelSpinState:t})]})})}),Pointers=React.memo(({wheelSpinState:e})=>{const t=e==="SPINNING"?1:0,i=e==="SPINNING"?"200px":"10px";return jsxRuntimeExports.jsxs(motion.div,{className:"pointer-events-none absolute inset-0 flex items-center justify-center z-[-2]",initial:{gap:i,opacity:0},animate:{gap:i,opacity:t},transition:{duration:.4,ease:"easeInOut"},children:[jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",width:"20",height:"24",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:jsxRuntimeExports.jsx("path",{d:"M0 20.535V3.46502C0 1.09775 2.61346 -0.336891 4.61063 0.934038L18.0227 9.46902C19.8752 10.6479 19.8752 13.3521 18.0227 14.531L4.61063 23.066C2.61345 24.3369 0 22.9023 0 20.535Z",fill:"black"})}),jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",width:"20",height:"24",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:jsxRuntimeExports.jsx("path",{d:"M20 20.535V3.46502C20 1.09775 17.3865 -0.336891 15.3894 0.934038L1.97726 9.46902C0.124763 10.6479 0.124767 13.3521 1.97726 14.531L15.3894 23.066C17.3865 24.3369 20 22.9023 20 20.535Z",fill:"black"})})]})});function RaysAnimation({className:e,style:t}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1728 996",preserveAspectRatio:"xMidYMid slice",className:e,style:{...t},children:jsxRuntimeExports.jsxs("g",{"data-idx":"1",children:[jsxRuntimeExports.jsx("g",{transform:"matrix(1,0,0,1,864,498)","data-idx":"2",children:jsxRuntimeExports.jsxs("g",{"data-idx":"3",transform:"scale(1.2)",children:[jsxRuntimeExports.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 0 0",to:"360 0 0",dur:"18s",repeatCount:"indefinite",additive:"sum"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L1296 0 L1167.6556528015353 562.3133258963553 Z","data-idx":"4"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L808.0427832089188 1013.2536012785666 L288.38713040738355 1263.5065741876433 Z","data-idx":"5"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-288.3871304073834 1263.5065741876433 L-808.0427832089186 1013.2536012785667 Z","data-idx":"6"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-1167.655652801535 562.3133258963554 L-1296 1.5871422516949698e-13 Z","data-idx":"7"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-1167.6556528015353 -562.3133258963552 L-808.0427832089189 -1013.2536012785665 Z","data-idx":"8"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-288.3871304073837 -1263.5065741876433 L288.3871304073821 -1263.5065741876438 Z","data-idx":"9"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L808.0427832089184 -1013.2536012785667 L1167.6556528015356 -562.3133258963545 Z","data-idx":"10"}),jsxRuntimeExports.jsx("path",{strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#000000",fill:"#ffffff",d:"M0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0","data-idx":"11"})]})}),jsxRuntimeExports.jsx("g",{"data-idx":"13"})]})})}const DEFAULT_CONFIG$2={excitementChance:.4,excitementDistance:3,excitementMultiplier:3,mode:"progressive"},isExcitingPrize=e=>e.reward_type==="usdt"||e.reward_type==="coins"&&e.reward_value>=1e3||e.reward_type==="box"&&e.reward_value>=12;function generateExcitingPrizes(e,t,i={}){const s={...DEFAULT_CONFIG$2,...i};if(Math.random()>s.excitementChance)return e;const o=[...e],a=o.findIndex(u=>u.reward_type===t.reward_type&&u.reward_value===t.reward_value);if(a===-1)return e;const l=isExcitingPrize(t),c=u=>{const f=["coins","usdt","box"],d=f[Math.floor(Math.random()*f.length)],h=a-u,p=Math.max(1,3-h);switch(d){case"coins":return{reward_type:"coins",reward_value:500*p+Math.floor(Math.random()*500*p),extra:""};case"usdt":return{reward_type:"usdt",reward_value:.5*p+Math.floor(Math.random()*2*p),extra:""};case"box":{const g={1:[11,12,13],2:[11,12,13],3:[14]}[p];return{reward_type:"box",reward_value:g[Math.floor(Math.random()*g.length)],extra:""}}default:return{reward_type:"coins",reward_value:1e3,extra:""}}};if(s.mode==="dramatic"){const f=Math.max(0,a-3);for(let d=f;d<a;d++)d>=0&&d<o.length&&(o[d]=c(d))}else{const u=Math.min(3,a);for(let f=0;f<u;f++){const d=a-u+f;d>=0&&d<o.length&&(o[d]=c(d))}if(!l){const f=s.excitementDistance;if(f<o.length){const d=Math.random();d<.4?o[f]={reward_type:"usdt",reward_value:25+Math.floor(Math.random()*25),extra:""}:d<.7?o[f]={reward_type:"box",reward_value:14,extra:""}:o[f]={reward_type:"coins",reward_value:3e3+Math.floor(Math.random()*2e3),extra:""}}}}return o}function shuffleArray(e){const t=[...e];for(let i=t.length-1;i>0;i--){const s=Math.floor(Math.random()*(i+1));[t[i],t[s]]=[t[s],t[i]]}return t}const sortPrizesDistributed=e=>{const t=e.filter(h=>h.reward_type==="box"),i=e.filter(h=>h.reward_type!=="box");if(t.length===0)return shuffleArray(i);if(i.length===0)return t;const s=[],o=e.length,a=shuffleArray([...i]),l=Math.floor(o/t.length),c=h=>{const p=Math.floor(h*.3);return Math.max(1,h+(Math.random()>.5?1:-1)*Math.floor(Math.random()*p))};let u=0,f=0,d=Math.floor(Math.random()*Math.min(l,o/2));for(let h=0;h<o;h++)if(h===d&&u<t.length){if(s.push(t[u]),u++,u<t.length){const m=c(l);d=h+m,d>=o&&(d=o-1)}}else f<a.length&&(s.push(a[f]),f++);for(;u<t.length;)s.push(t[u]),u++;for(;f<a.length;)s.push(a[f]),f++;return s},boxOpenBg=assetUrl("boxes/boxOpenBg_2.webp"),overlayImage=assetUrl("boxes/overlay.webp"),COMMON_BOX={reward_type:"box",reward_value:11},BoxOpeningModal=()=>{const{t:e}=useTranslation(),{data:{inventory:t}}=useProfile(),{viewMode:i,isBoxOpeningModalOpen:s,closeBoxModal:o,openBoxModal:a,currentBoxId:l,wheelSpinState:c,animationPhase:u,isSkipped:f,setWheelSpinState:d,setAnimationPhase:h,setSkipped:p}=useBoxOpening(),{showSnackbar:m}=useSnackbar(),g=React.useRef(!1),v=useFireConfetti(),[b,y]=React.useState([]),[E,S]=React.useState(null),[w,C]=React.useState([]),A=React.useRef(null),O=React.useRef(0),[I,L]=React.useState(!1),{setIsOpen:$}=useInventoryModalStore(),[V,W]=React.useState(!1),{mutate:K,isPending:j}=useBoxRewards({onSuccess(re){const{rewards:ee,recent_rewards:z}=re,J=[...ee,...ee,...ee,...ee],te=sortPrizesDistributed(J);y(te),C(Array.isArray(z)?z:[])},onError(){m(e("common.error"),{type:"error"}),o()}}),{mutateAsync:D,isPending:M}=useRevealReward({onError(){m(e("common.error"),{type:"error"}),o()}});React.useEffect(()=>{if(l&&i==="wheel"){if(S(null),!l)return;K({boxId:l})}l&&i==="result"&&(S({...COMMON_BOX,extra:`:${l}`}),y([COMMON_BOX]))},[l,i,K]),React.useEffect(()=>{if(s){W(!1);const re=setTimeout(()=>{W(!0)},1700);return()=>clearTimeout(re)}W(!1)},[s]),React.useEffect(()=>{if(c==="STOPPED"&&u==="carousel"){const re=setTimeout(()=>{h("transition")},150);return()=>clearTimeout(re)}},[c,u,h]),React.useEffect(()=>{if(u==="transition"){const re=setTimeout(()=>{var ee,z,J;h("final"),(J=(z=(ee=window.Telegram)==null?void 0:ee.WebApp)==null?void 0:z.HapticFeedback)==null||J.impactOccurred("medium")},330);return()=>clearTimeout(re)}},[u,h]),React.useEffect(()=>{function re(){A.current!==null&&(clearInterval(A.current),A.current=null)}if(s&&i==="wheel"&&c==="IDLE"&&w.length>0){const z=()=>{const J=O.current%w.length,te=w[J];toast.custom(()=>jsxRuntimeExports.jsx(EventToast,{recentReward:te})),O.current=(O.current+1)%w.length};z(),z(),re(),A.current=window.setInterval(()=>{z()},3e3)}else re(),O.current=0,toast.dismiss();return()=>{re(),O.current=0,toast.dismiss()}},[s,i,c,w]),React.useEffect(()=>{s&&(g.current||c==="STOPPED"&&u==="final"&&E&&i==="wheel"&&((E==null?void 0:E.reward_type)==="box"&&v(),(E.reward_type==="coins"||E.reward_type==="usdt")&&(g.current=!0)))},[i,c,u,E,s,v]);const k=React.useCallback(async()=>{var re,ee,z;try{if(!l||M)return;g.current=!1;const J=await D({boxId:l});S(J);const te=Math.random()<.2,X=generateExcitingPrizes([J,...b],J,{mode:te?"dramatic":"progressive",excitementChance:te?1:.45,excitementDistance:te?1:3,excitementMultiplier:te?4:3});y(X),d("SPINNING"),(z=(ee=(re=window.Telegram)==null?void 0:re.WebApp)==null?void 0:ee.HapticFeedback)==null||z.impactOccurred("light")}catch(J){console.error(J),m(e("common.error"),{type:"error"}),o()}},[l,M,D,b,d,o,m,e]),T=()=>{o()},P=React.useCallback(()=>{var re;if(E){const ee=(re=E.extra)==null?void 0:re.match(/:(\d+)/);ee&&a(Number(ee[1]))}else o()},[E,a,o]),F=()=>{var re,ee;(ee=(re=window.Telegram)==null?void 0:re.WebApp)==null||ee.HapticFeedback.impactOccurred("soft"),L(!0),o()},N=React.useCallback(()=>{var re,ee;if(!H){k();return}(ee=(re=window.Telegram)==null?void 0:re.WebApp)==null||ee.HapticFeedback.impactOccurred("soft"),(E==null?void 0:E.reward_type)==="usdt"||(E==null?void 0:E.reward_type)==="coins"?o():(E==null?void 0:E.reward_type)==="box"&&P()},[P,k,E,o]);React.useEffect(()=>{if(!s&&I){const re=setTimeout(()=>{$(!0),L(!1)},100);return()=>clearTimeout(re)}},[s,I,$]);const H=c==="STOPPED"&&u==="final",q=E?E.reward_type==="box":!1,Y=React.useMemo(()=>c==="SPINNING"?`linear-gradient(rgba(187, 255, 255, 0), rgba(168, 255, 157, 0.9)), url(${boxOpenBg})`:E&&E.reward_type==="box"&&E.reward_value===12?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #1AF3FB 36.93%, #1D82FF 100%), url(${boxOpenBg})`:E&&E.reward_type==="box"&&E.reward_value===13?`linear-gradient(rgba(238, 86, 255, 0.6), rgba(238, 206, 243, 0.5)), url(${boxOpenBg})`:E&&E.reward_type==="box"&&E.reward_value===14?`linear-gradient(rgba(255, 206, 133, 0.6), rgba(239, 255, 151, 0.5)), url(${boxOpenBg})`:E&&E.reward_type==="box"&&E.reward_value===11?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #9FFAFC 36.93%, #01DEF6 100%), url(${boxOpenBg})`:E&&E.reward_type==="coins"?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #FF4 36.93%, #F4AB00 100%), url(${boxOpenBg})`:E&&E.reward_type==="usdt"?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #D5FF79 36.93%, #00CA07 100%), url(${boxOpenBg})`:`linear-gradient(rgba(187, 255, 255, 0.9), rgba(168, 255, 157, 0.9)), url(${boxOpenBg})`,[E,c]),Q=j||M;return jsxRuntimeExports.jsxs(Drawer,{open:s,onOpenChange:re=>{re||o()},headerOptions:{before:!f&&c==="SPINNING"&&jsxRuntimeExports.jsx(Button,{size:"s",mode:"white",className:"!h-7 text-tgui-button animate-in fade-in duration-300",onClick:()=>{p(!0)},children:e("box_open.skip")})},style:{backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",maxHeight:"100dvh",borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:11e3},className:"pb-0 box-opening-modal-drawer",closeButtonStyles:{color:"#000"},children:[jsxRuntimeExports.jsx(AnimatedFullscreen,{isOpen:s,backgroundImage:Y,animationType:"scale",overlayImage,showOverlay:c==="SPINNING",children:jsxRuntimeExports.jsxs("div",{className:"relative flex flex-col h-[100dvh] overflow-hidden",children:[jsxRuntimeExports.jsxs(motion.div,{className:cn$1("absolute inset-0"),initial:{y:"-100vh"},animate:{y:0},transition:{type:"spring",stiffness:200,damping:20,mass:1.2},children:[j?jsxRuntimeExports.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-tgui-button"})}):jsxRuntimeExports.jsx(PrizeCarousel,{prizes:b,wheelSpinState:c,setSpinState:d,actualReward:E,isSkipped:f,animationPhase:u,isOpeningAnimationComplete:V,viewMode:i,onCarouselClick:c==="IDLE"||c==="STOPPED"&&u==="final"?N:void 0}),jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0 flex items-center justify-center",initial:{opacity:0,scale:1.3,y:100},animate:{opacity:H?1:0,scale:H?1:1.3,y:H?-0:100},transition:{duration:.6,ease:[.34,1.56,.64,1]},style:{pointerEvents:H?"auto":"none",zIndex:-1},children:jsxRuntimeExports.jsx("div",{className:"text-center flex flex-col items-center",children:jsxRuntimeExports.jsx("div",{className:"will-change-transform will-change-opacity",children:jsxRuntimeExports.jsx(Title$1,{style:{fontSize:36,lineHeight:"41px",color:"#000",fontWeight:700,zIndex:1,marginBottom:q?"40vh":"32vh"},children:e("box_open.you_ve_got")})})})}),jsxRuntimeExports.jsx(motion.div,{className:"absolute left-1/2 top-1/2 pointer-events-none",style:{width:"110vw",height:"110vh",maxWidth:"110vw",maxHeight:"110vh",zIndex:-2,x:"-50%",y:"-50%"},initial:{opacity:0,scale:1},animate:{opacity:H&&s?.4:0},transition:{opacity:{duration:.6,ease:"easeOut",delay:H&&s?.3:1}},children:jsxRuntimeExports.jsx(RaysAnimation,{className:"w-full h-full",style:{mixBlendMode:"overlay"}})})]}),jsxRuntimeExports.jsxs("div",{className:"fixed bottom-0 left-0 right-0 w-full",children:[jsxRuntimeExports.jsx(motion.div,{className:"pb-6",style:{paddingLeft:10,paddingRight:10},initial:{y:0},animate:{y:j||c==="SPINNING"||c==="STOPPED"&&u!=="final"?200:0},transition:{type:"spring",stiffness:300,damping:30},children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntimeExports.jsx(AnimatePresence,{children:(t==null?void 0:t.length)&&t.length>1&&H&&c==="STOPPED"&&u==="final"&&jsxRuntimeExports.jsx(motion.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},transition:{duration:.3,ease:"easeOut"},children:jsxRuntimeExports.jsx(Button,{size:"s",mode:"white",onClick:F,className:"text-black",style:{height:42,outline:"1px solid rgba(0, 0, 0, 0.1)",boxShadow:"0px 2px 6px 0px rgba(0, 0, 0, 0.1)",paddingLeft:"5px"},loading:Q,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-0 w-full",children:[jsxRuntimeExports.jsx(Badge,{type:"number",mode:"primary",large:!0,children:t.length}),jsxRuntimeExports.jsx(Subheadline,{weight:"2",className:"text-black whitespace-nowrap",children:e("box_open.button_unopened_boxes")}),jsxRuntimeExports.jsx("div",{className:"flex items-center overflow-hidden px-1.5",children:t.slice(0,3).map((re,ee)=>jsxRuntimeExports.jsx("div",{className:cn$1("flex items-center justify-center flex-shrink-0",ee!==0&&"-ml-3"),children:jsxRuntimeExports.jsx("img",{src:getBoxImage(re),alt:"",className:"size-7 object-contain"})},`inventory-preview-${re.id}`))}),jsxRuntimeExports.jsx(Icon,{name:"chevronRight",size:14,className:"opacity-40 flex-shrink-0"})]})})})}),jsxRuntimeExports.jsx(motion.div,{layout:!0,transition:{duration:.3,ease:"easeOut"},className:"w-full flex items-start justify-between gap-2.5",children:jsxRuntimeExports.jsxs(motion.div,{layout:!0,className:"flex-1",style:{paddingLeft:H&&((E==null?void 0:E.reward_type)==="coins"||(E==null?void 0:E.reward_type)==="usdt")?0:20,paddingRight:H&&((E==null?void 0:E.reward_type)==="coins"||(E==null?void 0:E.reward_type)==="usdt")?0:20},transition:{duration:.3,ease:"easeOut"},children:[(!H||q)&&jsxRuntimeExports.jsx(ConfettiParticles,{count:40,margin:8,padding:8}),jsxRuntimeExports.jsx(Button,{size:"l",stretched:!0,mode:H?"white":"filled",onClick:q?P:H?T:k,style:{borderRadius:"25px",background:H?"#FFFFFF":"var(--tgui--button_color)",outline:H?"var(--retina-separator-width) solid rgba(0, 0, 0, 0.15)":"var(--retina-separator-width) solid rgba(0,0,0,0)",color:H?"#000":"var(--tgui--button_text_color)",boxShadow:H?"0 10px 20px 0 rgba(0, 0, 0, 0.40)":"none",transition:"background 0.3s ease, outline 0.3s ease, color 0.3s ease, box-shadow 0.3s ease"},loading:Q,children:e(q&&H?"box_open.button_open_now":H?"common.ok":"box_open.button_reveal_reward")})]})})]})}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})]})}),jsxRuntimeExports.jsx(AnimatePresence,{children:s&&i==="wheel"&&c==="IDLE"&&w.length>0&&jsxRuntimeExports.jsx(motion.div,{className:"absolute w-[130px] pl-2.5 text-left",style:{bottom:getEventsBottomOffset()+94,right:16,zIndex:12001},initial:{y:40,opacity:0},animate:{y:0,opacity:1},exit:{y:60,opacity:0},transition:{duration:.25,ease:"easeInOut"},children:jsxRuntimeExports.jsx(Caption,{weight:"2",className:"!text-black whitespace-nowrap",children:e("box_open.recent_rewards")})},"recent-rewards-label")})]})};var reactConfetti_min$1={exports:{}},reactConfetti_min=reactConfetti_min$1.exports,hasRequiredReactConfetti_min;function requireReactConfetti_min(){return hasRequiredReactConfetti_min||(hasRequiredReactConfetti_min=1,function(e,t){(function(i,s){e.exports=s(React)})(typeof self<"u"?self:reactConfetti_min,function(i){return function(s){var o={};function a(l){if(o[l])return o[l].exports;var c=o[l]={i:l,l:!1,exports:{}};return s[l].call(c.exports,c,c.exports,a),c.l=!0,c.exports}return a.m=s,a.c=o,a.d=function(l,c,u){a.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:u})},a.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},a.t=function(l,c){if(1&c&&(l=a(l)),8&c||4&c&&typeof l=="object"&&l&&l.__esModule)return l;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:l}),2&c&&typeof l!="string")for(var f in l)a.d(u,f,(function(d){return l[d]}).bind(null,f));return u},a.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(c,"a",c),c},a.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},a.p="",a(a.s=2)}([function(s,o){s.exports=i},function(s,o,a){var l={linear:function(c,u,f,d){return(f-u)*c/d+u},easeInQuad:function(c,u,f,d){return(f-u)*(c/=d)*c+u},easeOutQuad:function(c,u,f,d){return-(f-u)*(c/=d)*(c-2)+u},easeInOutQuad:function(c,u,f,d){var h=f-u;return(c/=d/2)<1?h/2*c*c+u:-h/2*(--c*(c-2)-1)+u},easeInCubic:function(c,u,f,d){return(f-u)*(c/=d)*c*c+u},easeOutCubic:function(c,u,f,d){return(f-u)*((c=c/d-1)*c*c+1)+u},easeInOutCubic:function(c,u,f,d){var h=f-u;return(c/=d/2)<1?h/2*c*c*c+u:h/2*((c-=2)*c*c+2)+u},easeInQuart:function(c,u,f,d){return(f-u)*(c/=d)*c*c*c+u},easeOutQuart:function(c,u,f,d){return-(f-u)*((c=c/d-1)*c*c*c-1)+u},easeInOutQuart:function(c,u,f,d){var h=f-u;return(c/=d/2)<1?h/2*c*c*c*c+u:-h/2*((c-=2)*c*c*c-2)+u},easeInQuint:function(c,u,f,d){return(f-u)*(c/=d)*c*c*c*c+u},easeOutQuint:function(c,u,f,d){return(f-u)*((c=c/d-1)*c*c*c*c+1)+u},easeInOutQuint:function(c,u,f,d){var h=f-u;return(c/=d/2)<1?h/2*c*c*c*c*c+u:h/2*((c-=2)*c*c*c*c+2)+u},easeInSine:function(c,u,f,d){var h=f-u;return-h*Math.cos(c/d*(Math.PI/2))+h+u},easeOutSine:function(c,u,f,d){return(f-u)*Math.sin(c/d*(Math.PI/2))+u},easeInOutSine:function(c,u,f,d){return-(f-u)/2*(Math.cos(Math.PI*c/d)-1)+u},easeInExpo:function(c,u,f,d){return c==0?u:(f-u)*Math.pow(2,10*(c/d-1))+u},easeOutExpo:function(c,u,f,d){var h=f-u;return c==d?u+h:h*(1-Math.pow(2,-10*c/d))+u},easeInOutExpo:function(c,u,f,d){var h=f-u;return c===0?u:c===d?u+h:(c/=d/2)<1?h/2*Math.pow(2,10*(c-1))+u:h/2*(2-Math.pow(2,-10*--c))+u},easeInCirc:function(c,u,f,d){return-(f-u)*(Math.sqrt(1-(c/=d)*c)-1)+u},easeOutCirc:function(c,u,f,d){return(f-u)*Math.sqrt(1-(c=c/d-1)*c)+u},easeInOutCirc:function(c,u,f,d){var h=f-u;return(c/=d/2)<1?-h/2*(Math.sqrt(1-c*c)-1)+u:h/2*(Math.sqrt(1-(c-=2)*c)+1)+u},easeInElastic:function(c,u,f,d){var h,p,m,g=f-u;return m=1.70158,c===0?u:(c/=d)==1?u+g:((p=0)||(p=.3*d),(h=g)<Math.abs(g)?(h=g,m=p/4):m=p/(2*Math.PI)*Math.asin(g/h),-h*Math.pow(2,10*(c-=1))*Math.sin((c*d-m)*(2*Math.PI)/p)+u)},easeOutElastic:function(c,u,f,d){var h,p,m,g=f-u;return m=1.70158,c===0?u:(c/=d)==1?u+g:((p=0)||(p=.3*d),(h=g)<Math.abs(g)?(h=g,m=p/4):m=p/(2*Math.PI)*Math.asin(g/h),h*Math.pow(2,-10*c)*Math.sin((c*d-m)*(2*Math.PI)/p)+g+u)},easeInOutElastic:function(c,u,f,d){var h,p,m,g=f-u;return m=1.70158,c===0?u:(c/=d/2)==2?u+g:((p=0)||(p=d*.44999999999999996),(h=g)<Math.abs(g)?(h=g,m=p/4):m=p/(2*Math.PI)*Math.asin(g/h),c<1?h*Math.pow(2,10*(c-=1))*Math.sin((c*d-m)*(2*Math.PI)/p)*-.5+u:h*Math.pow(2,-10*(c-=1))*Math.sin((c*d-m)*(2*Math.PI)/p)*.5+g+u)},easeInBack:function(c,u,f,d,h){return h===void 0&&(h=1.70158),(f-u)*(c/=d)*c*((h+1)*c-h)+u},easeOutBack:function(c,u,f,d,h){return h===void 0&&(h=1.70158),(f-u)*((c=c/d-1)*c*((h+1)*c+h)+1)+u},easeInOutBack:function(c,u,f,d,h){var p=f-u;return h===void 0&&(h=1.70158),(c/=d/2)<1?p/2*(c*c*((1+(h*=1.525))*c-h))+u:p/2*((c-=2)*c*((1+(h*=1.525))*c+h)+2)+u},easeInBounce:function(c,u,f,d){var h=f-u;return h-l.easeOutBounce(d-c,0,h,d)+u},easeOutBounce:function(c,u,f,d){var h=f-u;return(c/=d)<.36363636363636365?h*(7.5625*c*c)+u:c<.7272727272727273?h*(7.5625*(c-=.5454545454545454)*c+.75)+u:c<.9090909090909091?h*(7.5625*(c-=.8181818181818182)*c+.9375)+u:h*(7.5625*(c-=.9545454545454546)*c+.984375)+u},easeInOutBounce:function(c,u,f,d){var h=f-u;return c<d/2?.5*l.easeInBounce(2*c,0,h,d)+u:.5*l.easeOutBounce(2*c-d,0,h,d)+.5*h+u}};s.exports=l},function(s,o,a){s.exports=a(3)},function(s,o,a){a.r(o),a.d(o,"ReactConfetti",function(){return ee});var l,c,u=a(0),f=a.n(u),d=a(1),h=a.n(d);function p(z,J){return z+Math.random()*(J-z)}function m(z,J){for(var te=0;te<J.length;te++){var X=J[te];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(z,X.key,X)}}function g(z,J,te){return J in z?Object.defineProperty(z,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):z[J]=te,z}(function(z){z[z.Circle=0]="Circle",z[z.Square=1]="Square",z[z.Strip=2]="Strip"})(l||(l={})),function(z){z[z.Positive=1]="Positive",z[z.Negative=-1]="Negative"}(c||(c={}));var v=function(){function z(X,se,ie,ne){(function(me,Se){if(!(me instanceof Se))throw new TypeError("Cannot call a class as a function")})(this,z),g(this,"context",void 0),g(this,"radius",void 0),g(this,"x",void 0),g(this,"y",void 0),g(this,"w",void 0),g(this,"h",void 0),g(this,"vx",void 0),g(this,"vy",void 0),g(this,"shape",void 0),g(this,"angle",void 0),g(this,"angularSpin",void 0),g(this,"color",void 0),g(this,"rotateY",void 0),g(this,"rotationDirection",void 0),g(this,"getOptions",void 0),this.getOptions=se;var pe,_e,ye=this.getOptions(),Ae=ye.colors,xe=ye.initialVelocityX,ae=ye.initialVelocityY;this.context=X,this.x=ie,this.y=ne,this.w=p(5,20),this.h=p(5,20),this.radius=p(5,10),this.vx=typeof xe=="number"?p(-xe,xe):p(xe.min,xe.max),this.vy=typeof ae=="number"?p(-ae,0):p(ae.min,ae.max),this.shape=(pe=0,_e=2,Math.floor(pe+Math.random()*(_e-pe+1))),this.angle=p(0,360)*Math.PI/180,this.angularSpin=p(-.2,.2),this.color=Ae[Math.floor(Math.random()*Ae.length)],this.rotateY=p(0,1),this.rotationDirection=p(0,1)?c.Positive:c.Negative}var J,te;return J=z,(te=[{key:"update",value:function(){var X=this.getOptions(),se=X.gravity,ie=X.wind,ne=X.friction,pe=X.opacity,_e=X.drawShape;this.x+=this.vx,this.y+=this.vy,this.vy+=se,this.vx+=ie,this.vx*=ne,this.vy*=ne,this.rotateY>=1&&this.rotationDirection===c.Positive?this.rotationDirection=c.Negative:this.rotateY<=-1&&this.rotationDirection===c.Negative&&(this.rotationDirection=c.Positive);var ye=.1*this.rotationDirection;if(this.rotateY+=ye,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=pe,this.context.lineCap="round",this.context.lineWidth=2,_e&&typeof _e=="function")_e.call(this,this.context);else switch(this.shape){case l.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case l.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case l.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}this.context.closePath(),this.context.restore()}}])&&m(J.prototype,te),z}();function b(z,J,te){return J in z?Object.defineProperty(z,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):z[J]=te,z}var y=function z(J,te){var X=this;(function(ie,ne){if(!(ie instanceof ne))throw new TypeError("Cannot call a class as a function")})(this,z),b(this,"canvas",void 0),b(this,"context",void 0),b(this,"getOptions",void 0),b(this,"x",0),b(this,"y",0),b(this,"w",0),b(this,"h",0),b(this,"lastNumberOfPieces",0),b(this,"tweenInitTime",Date.now()),b(this,"particles",[]),b(this,"particlesGenerated",0),b(this,"removeParticleAt",function(ie){X.particles.splice(ie,1)}),b(this,"getParticle",function(){var ie=p(X.x,X.w+X.x),ne=p(X.y,X.h+X.y);return new v(X.context,X.getOptions,ie,ne)}),b(this,"animate",function(){var ie=X.canvas,ne=X.context,pe=X.particlesGenerated,_e=X.lastNumberOfPieces,ye=X.getOptions(),Ae=ye.run,xe=ye.recycle,ae=ye.numberOfPieces,me=ye.debug,Se=ye.tweenFunction,Te=ye.tweenDuration;if(!Ae)return!1;var ve=X.particles.length,Re=xe?ve:pe,Ie=Date.now();if(Re<ae){_e!==ae&&(X.tweenInitTime=Ie,X.lastNumberOfPieces=ae);for(var Fe=X.tweenInitTime,$e=Se(Ie-Fe>Te?Te:Math.max(0,Ie-Fe),Re,ae,Te),Be=Math.round($e-Re),Ne=0;Ne<Be;Ne++)X.particles.push(X.getParticle());X.particlesGenerated+=Be}return me&&(ne.font="12px sans-serif",ne.fillStyle="#333",ne.textAlign="right",ne.fillText("Particles: ".concat(ve),ie.width-10,ie.height-20)),X.particles.forEach(function(Ee,ce){Ee.update(),(Ee.y>ie.height||Ee.y<-100||Ee.x>ie.width+100||Ee.x<-100)&&(xe&&Re<=ae?X.particles[ce]=X.getParticle():X.removeParticleAt(ce))}),ve>0||Re<ae}),this.canvas=J;var se=this.canvas.getContext("2d");if(!se)throw new Error("Could not get canvas context");this.context=se,this.getOptions=te};function E(z,J){var te=Object.keys(z);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(z);J&&(X=X.filter(function(se){return Object.getOwnPropertyDescriptor(z,se).enumerable})),te.push.apply(te,X)}return te}function S(z){for(var J=1;J<arguments.length;J++){var te=arguments[J]!=null?arguments[J]:{};J%2?E(Object(te),!0).forEach(function(X){C(z,X,te[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(te)):E(Object(te)).forEach(function(X){Object.defineProperty(z,X,Object.getOwnPropertyDescriptor(te,X))})}return z}function w(z,J){for(var te=0;te<J.length;te++){var X=J[te];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(z,X.key,X)}}function C(z,J,te){return J in z?Object.defineProperty(z,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):z[J]=te,z}var A={width:typeof window<"u"?window.innerWidth:300,height:typeof window<"u"?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:h.a.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0},O=function(){function z(X,se){var ie=this;(function(pe,_e){if(!(pe instanceof _e))throw new TypeError("Cannot call a class as a function")})(this,z),C(this,"canvas",void 0),C(this,"context",void 0),C(this,"_options",void 0),C(this,"generator",void 0),C(this,"rafId",void 0),C(this,"setOptionsWithDefaults",function(pe){var _e={confettiSource:{x:0,y:0,w:ie.canvas.width,h:0}};ie._options=S(S(S({},_e),A),pe),Object.assign(ie,pe.confettiSource)}),C(this,"update",function(){var pe=ie.options,_e=pe.run,ye=pe.onConfettiComplete,Ae=ie.canvas,xe=ie.context;_e&&(xe.fillStyle="white",xe.clearRect(0,0,Ae.width,Ae.height)),ie.generator.animate()?ie.rafId=requestAnimationFrame(ie.update):(ye&&typeof ye=="function"&&ie.generator.particlesGenerated>0&&ye.call(ie,ie),ie._options.run=!1)}),C(this,"reset",function(){ie.generator&&ie.generator.particlesGenerated>0&&(ie.generator.particlesGenerated=0,ie.generator.particles=[],ie.generator.lastNumberOfPieces=0)}),C(this,"stop",function(){ie.options={run:!1},ie.rafId&&(cancelAnimationFrame(ie.rafId),ie.rafId=void 0)}),this.canvas=X;var ne=this.canvas.getContext("2d");if(!ne)throw new Error("Could not get canvas context");this.context=ne,this.generator=new y(this.canvas,function(){return ie.options}),this.options=se,this.update()}var J,te;return J=z,(te=[{key:"options",get:function(){return this._options},set:function(X){var se=this._options&&this._options.run,ie=this._options&&this._options.recycle;this.setOptionsWithDefaults(X),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof X.recycle=="boolean"&&X.recycle&&ie===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof X.run=="boolean"&&X.run&&se===!1&&this.update()}}])&&w(J.prototype,te),z}();function I(z){return function(J){if(Array.isArray(J))return D(J)}(z)||function(J){if(typeof Symbol<"u"&&Symbol.iterator in Object(J))return Array.from(J)}(z)||j(z)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
100
100
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function L(z){return(L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J})(z)}function $(){return($=Object.assign||function(z){for(var J=1;J<arguments.length;J++){var te=arguments[J];for(var X in te)Object.prototype.hasOwnProperty.call(te,X)&&(z[X]=te[X])}return z}).apply(this,arguments)}function V(z,J){var te=Object.keys(z);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(z);J&&(X=X.filter(function(se){return Object.getOwnPropertyDescriptor(z,se).enumerable})),te.push.apply(te,X)}return te}function W(z){for(var J=1;J<arguments.length;J++){var te=arguments[J]!=null?arguments[J]:{};J%2?V(Object(te),!0).forEach(function(X){q(z,X,te[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(te)):V(Object(te)).forEach(function(X){Object.defineProperty(z,X,Object.getOwnPropertyDescriptor(te,X))})}return z}function K(z,J){return function(te){if(Array.isArray(te))return te}(z)||function(te,X){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(te)))){var se=[],ie=!0,ne=!1,pe=void 0;try{for(var _e,ye=te[Symbol.iterator]();!(ie=(_e=ye.next()).done)&&(se.push(_e.value),!X||se.length!==X);ie=!0);}catch(Ae){ne=!0,pe=Ae}finally{try{ie||ye.return==null||ye.return()}finally{if(ne)throw pe}}return se}}(z,J)||j(z,J)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
101
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function j(z,J){if(z){if(typeof z=="string")return D(z,J);var te=Object.prototype.toString.call(z).slice(8,-1);return te==="Object"&&z.constructor&&(te=z.constructor.name),te==="Map"||te==="Set"?Array.from(z):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?D(z,J):void 0}}function D(z,J){(J==null||J>z.length)&&(J=z.length);for(var te=0,X=new Array(J);te<J;te++)X[te]=z[te];return X}function M(z,J){if(!(z instanceof J))throw new TypeError("Cannot call a class as a function")}function k(z,J){for(var te=0;te<J.length;te++){var X=J[te];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(z,X.key,X)}}function T(z,J){return(T=Object.setPrototypeOf||function(te,X){return te.__proto__=X,te})(z,J)}function P(z){var J=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var te,X=H(z);if(J){var se=H(this).constructor;te=Reflect.construct(X,arguments,se)}else te=X.apply(this,arguments);return F(this,te)}}function F(z,J){return!J||L(J)!=="object"&&typeof J!="function"?N(z):J}function N(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function H(z){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)})(z)}function q(z,J,te){return J in z?Object.defineProperty(z,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):z[J]=te,z}var Y=f.a.createRef(),Q=function(z){(function(ie,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(ne&&ne.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),ne&&T(ie,ne)})(se,z);var J,te,X=P(se);function se(ie){var ne;M(this,se);for(var pe=arguments.length,_e=new Array(pe>1?pe-1:0),ye=1;ye<pe;ye++)_e[ye-1]=arguments[ye];return q(N(ne=X.call.apply(X,[this,ie].concat(_e))),"canvas",f.a.createRef()),q(N(ne),"confetti",void 0),ne.canvas=ie.canvasRef||Y,ne}return J=se,(te=[{key:"componentDidMount",value:function(){if(this.canvas.current){var ie=re(this.props)[0];this.confetti=new O(this.canvas.current,ie)}}},{key:"componentDidUpdate",value:function(){var ie=re(this.props)[0];this.confetti&&(this.confetti.options=ie)}},{key:"componentWillUnmount",value:function(){this.confetti&&this.confetti.stop(),this.confetti=void 0}},{key:"render",value:function(){var ie=K(re(this.props),2),ne=ie[0],pe=ie[1],_e=W({zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0},pe.style);return f.a.createElement("canvas",$({width:ne.width,height:ne.height,ref:this.canvas},pe,{style:_e}))}}])&&k(J.prototype,te),se}(u.Component);function re(z){var J={},te={},X=[].concat(I(Object.keys(A)),["confettiSource","drawShape","onConfettiComplete"]),se=["canvasRef"];for(var ie in z){var ne=z[ie];X.includes(ie)?J[ie]=ne:se.includes(ie)?se[ie]=ne:te[ie]=ne}return[J,te,{}]}q(Q,"defaultProps",W({},A)),q(Q,"displayName","ReactConfetti");var ee=f.a.forwardRef(function(z,J){return f.a.createElement(Q,$({canvasRef:J},z))});o.default=ee}]).default})}(reactConfetti_min$1)),reactConfetti_min$1.exports}var reactConfetti_minExports=requireReactConfetti_min();const Confetti=getDefaultExportFromCjs$3(reactConfetti_minExports),ConfettiProvider=({children:e})=>{const{isVisible:t,stopConfetti:i}=useConfettiStore(s=>s);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[e,t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:999999},children:jsxRuntimeExports.jsx(Confetti,{recycle:!1,onConfettiComplete:()=>i()})}),document.body)]})};function BalanceHeader({type:e,balanceId:t}){const{t:i}=useTranslation(),{data:s}=useProfile();return jsxRuntimeExports.jsxs("div",{className:"absolute top-3 left-4 z-1 flex flex-col items-start",children:[jsxRuntimeExports.jsx(Caption,{weight:"3",children:i("topUpModal.balance")}),jsxRuntimeExports.jsxs("div",{id:t,className:"flex flex-row gap-0.5 items-center justify-center",children:[jsxRuntimeExports.jsx("div",{className:"size-5 flex items-center justify-center",children:e==="coins"?jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:18}}):e==="gems"?jsxRuntimeExports.jsx(IconBalanceGems,{width:18,height:18}):jsxRuntimeExports.jsx(IconUsdt,{style:{height:18,width:19}})}),jsxRuntimeExports.jsx(AnimatedBalance,{className:"text-rounded",style:{fontSize:"17px",lineHeight:"22px"},value:e==="coins"?s.balance_coins:e==="gems"?s.balance_gems:s.balance_usdt,noRounding:e==="usdt"})]})]})}const StarParticles=({count:e=50,width:t,height:i,style:s,delay:o=0})=>{const[a,l]=React.useState(!1),c=React.useRef(null),u=React.useRef([]),f=React.useRef();return React.useEffect(()=>{const d=setTimeout(()=>{l(!0)},o);return()=>clearTimeout(d)},[o]),React.useEffect(()=>{const d=()=>({x:Math.random()*t,y:Math.random()*i,scale:.6+Math.random()*.9,rotation:Math.random()*360,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.24,y:(Math.random()-.5)*.24},fadeOut:!1});u.current=Array(e).fill(null).map(d);let h=performance.now();const p=m=>{const g=c.current;if(!g)return;const v=(m-h)/16.67;h=m;const b=window.devicePixelRatio||1;g.width=t*b,g.height=i*b;const y=g.getContext("2d",{alpha:!0});y&&(y.scale(b,b),y.clearRect(0,0,t,i),y.imageSmoothingEnabled=!1,u.current.forEach(E=>{!E.fadeOut&&(E.x<10||E.x>t-10||E.y<10||E.y>i-10)&&(E.fadeOut=!0),E.fadeOut&&(E.opacity=Math.max(0,E.opacity-.03*v)),y.save(),y.translate(E.x,E.y),y.rotate(E.rotation*Math.PI/180),y.scale(E.scale,E.scale),y.globalAlpha=E.opacity,y.beginPath(),y.moveTo(3,0),y.lineTo(2.635,2.635),y.lineTo(0,3),y.lineTo(2.635,3.365),y.lineTo(3,6),y.lineTo(3.365,3.365),y.lineTo(6,3),y.lineTo(3.365,2.635),y.closePath(),y.fillStyle="#FFB700",y.fill(),y.restore(),E.x+=E.velocity.x*v,E.y+=E.velocity.y*v,E.rotation+=.24*v,E.opacity<=0&&Object.assign(E,d())}),f.current=requestAnimationFrame(p))};return f.current=requestAnimationFrame(p),()=>{f.current&&cancelAnimationFrame(f.current)}},[t,i,e]),jsxRuntimeExports.jsx("canvas",{ref:c,width:t,height:i,style:{position:"absolute",pointerEvents:"none",zIndex:2,width:`${t}px`,height:`${i}px`,opacity:a?1:0,transform:`scale(${a?1:.9})`,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",...s}})},PRICES_TAG="prices";function usePrices(){return useQuery({queryKey:[PRICES_TAG],queryFn:async()=>await makeRequest("prices","GET")})}const IconCurrencyStar=e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:[jsxRuntimeExports.jsx("title",{children:"Currency star"}),jsxRuntimeExports.jsx("path",{d:"M5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.4577 6.87807 15.3708 7.0569 15.2342 7.19238L12.5446 9.86072C12.436 9.96845 12.3835 10.1211 12.4024 10.2737L12.8494 13.8758C12.9133 14.3915 12.5515 14.8621 12.0415 14.9267C11.8481 14.9512 11.652 14.9139 11.4807 14.8198L8.63941 13.2578C8.4337 13.1449 8.18638 13.1416 7.97785 13.2492L5.034 14.7687C4.61977 14.9826 4.11233 14.8163 3.90077 14.3976C3.82165 14.2408 3.79239 14.0633 3.8171 13.889L4.0525 12.2364C4.1676 11.4281 4.66464 10.7269 5.38472 10.3569L8.65458 8.67676C8.74194 8.6319 8.77662 8.52416 8.73219 8.43594C8.69794 8.36744 8.62424 8.32886 8.54924 8.3397L4.55019 8.91585C3.93892 9.00408 3.31898 8.83045 2.83971 8.43681L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235Z",fill:"url(#paint0_linear_4259_226)"}),jsxRuntimeExports.jsx("path",{d:"M8.98273 9.42344C9.05773 9.4126 9.13143 9.45119 9.16568 9.51968C9.21012 9.6079 9.17544 9.71564 9.08808 9.76051L5.81822 11.4406C5.09813 11.8106 4.6011 12.5119 4.486 13.3202L4.27899 14.7742C4.1214 14.6962 3.98658 14.5676 3.90074 14.3975C3.82162 14.2408 3.79236 14.0632 3.81707 13.889L4.05247 12.2364C4.16757 11.4281 4.66461 10.7268 5.38469 10.3568L6.50687 9.78001L8.98273 9.42344Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.472 6.75777 15.4544 6.82778 15.4288 6.89454C15.351 6.85856 15.2667 6.83407 15.1774 6.82323L11.7749 6.41246C11.4773 6.37648 11.2178 6.19115 11.0851 5.91955L9.46007 2.59463C9.38356 2.43791 9.25848 2.31045 9.10415 2.23177C8.71051 2.03105 8.2306 2.1908 8.03226 2.58856L6.3116 6.03617C6.21232 6.23559 6.02135 6.37193 5.80242 6.40033L2.38776 6.84252C2.1619 6.87178 1.95576 6.98775 1.81226 7.16636C1.73921 7.25719 1.68675 7.3582 1.65402 7.46333L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.2883 1.34987C7.5727 0.779997 8.26244 0.550446 8.82797 0.83874C9.04972 0.951673 9.22855 1.13419 9.33823 1.35832L10.9631 4.68324C11.0444 4.8495 11.2024 4.96243 11.3829 4.98432L14.7855 5.39487C15.4381 5.47377 15.9024 6.0703 15.8248 6.72644C15.793 6.99631 15.6709 7.24754 15.4785 7.43851L12.7889 10.1066C12.7568 10.1387 12.7407 10.1847 12.7466 10.2308L13.1936 13.833C13.2809 14.5377 12.7856 15.1819 12.085 15.2708C11.8189 15.3044 11.5492 15.253 11.3138 15.1236L8.47226 13.5618C8.368 13.5044 8.24271 13.5027 8.13693 13.5573L5.19308 15.0768C4.60695 15.3792 3.88947 15.1442 3.5912 14.554C3.48 14.3337 3.43904 14.0844 3.47372 13.8402L3.70912 12.1873C3.84005 11.268 4.4058 10.4699 5.22624 10.0483L7.60521 8.82579L4.5998 9.25909C3.91721 9.3575 3.22531 9.17391 2.67972 8.75252L2.61967 8.70483L1.28767 7.61105C0.760502 7.17839 0.680517 6.3974 1.10841 5.86503C1.30783 5.61683 1.59482 5.45535 1.90956 5.4146L5.32422 4.9724C5.42848 4.95896 5.51974 4.89371 5.56786 4.79747L7.2883 1.34987ZM8.51301 1.45673C8.2917 1.3438 8.02161 1.43375 7.9089 1.65962L6.18845 5.10723C6.03758 5.40961 5.74734 5.61705 5.41331 5.66019L1.99865 6.10238C1.86187 6.12016 1.73658 6.1906 1.64901 6.29964C1.45913 6.53569 1.49489 6.88381 1.72791 7.075L3.05992 8.16878C3.46396 8.50043 3.98593 8.64674 4.50074 8.57261L8.49957 7.99624C8.72284 7.96416 8.9409 8.07861 9.04213 8.27998C9.17175 8.53771 9.07009 8.8531 8.81301 8.98532L5.54337 10.6652C4.92343 10.9837 4.4951 11.588 4.39583 12.2853L4.16042 13.9379C4.14568 14.0417 4.16324 14.1477 4.21028 14.2412C4.33513 14.4883 4.63231 14.5856 4.87487 14.4603L7.81894 12.941C8.12978 12.7804 8.49957 12.7852 8.80651 12.9538L11.6478 14.5156C11.7549 14.5745 11.8772 14.5977 11.9979 14.5826C12.3174 14.542 12.5457 14.2453 12.5051 13.9184L12.0582 10.3162C12.0261 10.0572 12.1154 9.79775 12.3005 9.61437L14.9899 6.94602C15.0707 6.86582 15.1225 6.75961 15.136 6.64494C15.1689 6.36705 14.9736 6.11647 14.7024 6.08352L11.2997 5.67298C10.885 5.6229 10.5241 5.36496 10.3399 4.98779L8.71504 1.66287C8.67125 1.57356 8.60037 1.50117 8.51301 1.45673Z",fill:"url(#paint1_linear_4259_226)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_4259_226",x1:"6.38247",y1:"4.31269",x2:"12.2351",y2:"14.7173",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_4259_226",x1:"8.33333",y1:"1.06114",x2:"8.33333",y2:"14.7172",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),XsButton=React.forwardRef(({className:e,children:t,...i},s)=>jsxRuntimeExports.jsx(Button,{...i,ref:s,className:`xs-button ${e||""}`,size:"s",children:t}));XsButton.displayName="XsButton";const Ribbon=({text:e})=>jsxRuntimeExports.jsxs("svg",{style:{position:"absolute",top:-2,right:-2,width:48,height:48,overflow:"visible"},children:[jsxRuntimeExports.jsx("title",{children:"Ribbon"}),jsxRuntimeExports.jsx("path",{d:"M46.83 24.5L23.5 1.17C22.75 0.42 21.73 0 20.68 0C19.62 0 2.73 0.05 1.55 0.05C0.36 0.05 -0.23 1.4885 0.6 2.32L45.72 47.44C46.56 48.28 48 47.68 48 46.5C48 45.31 48 28.38 48 27.32C48 26.26 47.5 25.24 46.82 24.5Z",fill:"#1EC948"}),jsxRuntimeExports.jsx("text",{x:"21",y:"21",textAnchor:"middle",transform:"rotate(45 24 24)",style:{fill:"white",fontSize:"13px",fontWeight:700,fontFamily:"-apple-system, system-ui, sans-serif"},children:e})]}),BuyOption=({amount:e,price:t,onClick:i,loading:s,discount:o,optionIcon:a})=>{const{t:l}=useTranslation();return jsxRuntimeExports.jsxs(motion.button,{whileTap:{scale:.95},className:"relative flex flex-col items-center bg-tgui-section-bg cursor-pointer rounded-lg w-full px-1 pb-2.5 pt-1",onClick:i,type:"button",children:[o&&jsxRuntimeExports.jsx(Ribbon,{text:o}),jsxRuntimeExports.jsx("div",{className:"h-12.5 flex justify-center items-center",children:jsxRuntimeExports.jsx("img",{className:"max-w-20 max-h-12.5 object-cover",src:a,alt:"Option icon"})}),jsxRuntimeExports.jsx(Text,{weight:"1",className:"text-rounded",style:{fontSize:"20px",lineHeight:"25px"},children:formatter.format(e)}),jsxRuntimeExports.jsx(Text,{weight:"3",style:{fontSize:"10px",lineHeight:"13px"},children:l("topUpModal.gems")}),jsxRuntimeExports.jsx(XsButton,{onClick:c=>{c.stopPropagation(),i()},mode:"bezeled",style:{color:"#F36200",backgroundColor:"rgba(255, 190, 0, 0.20)",marginTop:10},before:jsxRuntimeExports.jsx(IconCurrencyStar,{style:{width:16,height:16}}),loading:s,children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:"10px",lineHeight:"13px"},children:formatter.format(t)})})]})},optionIcon1=assetUrl("buyOptions/buyOption1.webp"),optionIcon2=assetUrl("buyOptions/buyOption2.webp"),optionIcon3=assetUrl("buyOptions/buyOption3.webp"),optionIcon4=assetUrl("buyOptions/buyOption4.webp"),optionIcon5=assetUrl("buyOptions/buyOption5.webp"),optionIcon6=assetUrl("buyOptions/buyOption6.webp"),icons=[optionIcon1,optionIcon2,optionIcon3,optionIcon4,optionIcon5,optionIcon6],getIconByIndex=e=>icons[e%icons.length],TopUpModal=({...e})=>{const{t}=useTranslation(),{isOpen:i,setIsOpen:s}=useTopUpModalStore(),{showSnackbar:o}=useSnackbar(),a=useQueryClient(),l=useFireConfetti(),[c,u]=React.useState(null),{data:f,isLoading:d,error:h}=usePrices(),p=async(m,g)=>{var v,b;u(1),(b=(v=window.Telegram)==null?void 0:v.WebApp)==null||b.openInvoice(m,y=>{y==="paid"&&(a.invalidateQueries({queryKey:[PROFILE_TAG]}),s(!1),l(),o(t("snackbar.purchase.walletPurchaseGems"),{type:"success_top",gems:g.toString()}))}),u(null)};return jsxRuntimeExports.jsx(Drawer,{open:i,onOpenChange:s,headerOptions:{before:jsxRuntimeExports.jsx(BalanceHeader,{type:"gems"})},variant:"secondary",...e,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 items-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/moneyTongue.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:t("topUpModal.topUpBalance")})]}),d?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center w-full",style:{height:282},children:jsxRuntimeExports.jsx(Spinner,{size:"m"})}):h?jsxRuntimeExports.jsx("div",{className:"text-red-500 text-center p-4",children:t("common.error")}):f!=null&&f.items?jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-1.5 w-full",children:f.items.map((m,g)=>jsxRuntimeExports.jsxs("div",{className:"relative z-1 overflow-visible",children:[g>=f.items.length-2&&jsxRuntimeExports.jsx(StarParticles,{width:100,height:58,count:30,delay:300,style:{bottom:0,left:"50%",transform:"translateX(-50%) scale(1)"}}),jsxRuntimeExports.jsx(BuyOption,{amount:m.gems,price:m.stars,onClick:()=>p(m.invoice_url,m.gems),loading:c===m.gems,discount:m.discount?`–${m.discount}%`:void 0,optionIcon:getIconByIndex(g)},m.gems)]},m.invoice_url))}):null]})})},supportedLanguages=["en","ru","hi","es","pt"];function mapTelegramLanguageToSupported(e){return{"pt-br":"pt","pt-pt":"pt"}[e]||e}const getTelegramLanguage=()=>{var s,o,a;const e=(a=(o=(s=window.Telegram)==null?void 0:s.WebApp)==null?void 0:o.initDataUnsafe.user)==null?void 0:a.language_code,t=e?mapTelegramLanguageToSupported(e):null;return t&&supportedLanguages.includes(t)?t:"en"};function I18nBackendLanguageProvider({children:e}){const{i18n:t}=useTranslation(),{data:i}=useProfile(),s=React.useRef(!1),o=React.useRef(null),a=getTelegramLanguage(),l=i.language===t.language,c=i.language===null&&t.language===a;if(React.useEffect(()=>{!s.current&&(l||c)&&(s.current=!0)},[l,c]),!s.current&&!l&&!c){if(o.current)throw o.current;const u=i.language===null?a:i.language;throw o.current=t.changeLanguage(u),o.current}return o.current=null,e}class APIRequestError extends Error{constructor({message:t,status:i,responseText:s}){super(t),this.status=i,this.responseText=s}}function createMakeRequest(e){return async function(i,s,o){e.waitUntilReady&&await e.waitUntilReady();const a=`${e.baseUrl}/${i}`;try{const l=e.getAuthData(),c=e.getBotId(),u={"X-Auth":l||e.getInitData(),"Content-Type":"application/json"};if(c&&(u["X-Bot-ID"]=c),l){console.warn("WARNING: AUTH_DATA is used for requests!!!"),console.log("=== API Request Debug ==="),console.log("externalAuthData:",l),console.log("externalAuthData type:",typeof l),console.log("externalAuthData truthy?",!!l),console.log("externalAuthData length:",l==null?void 0:l.length),console.log("config.getInitData():",e.getInitData()),console.log("config.getInitData() type:",typeof e.getInitData()),console.log("config.getInitData() truthy?",!!e.getInitData());const d=l||e.getInitData();console.log("X-Auth value (before headers):",d),console.log("X-Auth value type:",typeof d),console.log("X-Auth value truthy?",!!d),console.log("X-Auth value length:",d==null?void 0:d.length),u["a-deb"]=l,u["a-deb-string"]=String(l),console.log("Final headers object:",u),u["X-Auth"]||(u["X-Auth"]=l),console.log("Final X-Auth header:",u["X-Auth"])}const f=await fetch(a,{method:s,headers:u,body:o?JSON.stringify(o):null});if(!f.ok)throw new APIRequestError({message:`Request to ${i} failed with status ${f.status}`,status:f.status,responseText:await(async()=>{try{return await f.text()}catch{return}})()});return f.json()}catch(l){throw l instanceof APIRequestError||console.error(`Error during request to ${i}:`,l),l}}}const queryClient=new QueryClient({mutationCache:new MutationCache({onError:e=>{captureException(e)}}),queryCache:new QueryCache({onError:e=>{captureException(e)}}),defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0,retry:(e,t)=>{if(t instanceof APIRequestError&&t.status===401)return e<3;if(t instanceof Error&&"status"in t){const i=t.status;if(i&&i>=400&&i<500)return!1}return e<3},retryDelay:(e,t)=>t instanceof APIRequestError&&t.status===401?Math.min(1e3*2**e,4e3):Math.min(1e3*2**e,3e4)},mutations:{retry:1,retryDelay:1e3}}});function createOverlay(e){let t=document.getElementById("overlay-root");t=document.createElement("div"),t.id="overlay-root",document.body.appendChild(t),clientExports.createRoot(t).render(jsxRuntimeExports.jsx(OverlayManager,{options:e}))}const OverlayManager=({options:e})=>{const t=React.useCallback(()=>{var i;(i=window.Telegram.WebApp)==null||i.openTelegramLink("https://t.me/orbit_portal_bot/app?startapp=profile")},[]);return React.useEffect(()=>{const i=s=>{s.shiftKey&&s.key==="Tab"&&(s.preventDefault(),t())};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[t]),jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsxs(AppRoot,{children:[jsxRuntimeExports.jsx(OrientationCheck,{}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-top",className:"cssdk-banner-container cssdk-banner-top"}),jsxRuntimeExports.jsx(React.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(I18nBackendLanguageProvider,{children:[jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(BoxOpeningProvider,{children:jsxRuntimeExports.jsxs(ConfettiProvider,{children:[jsxRuntimeExports.jsx(OverlayProfile,{variant:(e==null?void 0:e.variant)||"translucent",onOpenProfile:()=>t(),initialPosition:e==null?void 0:e.initialPosition,initialCoordinates:e==null?void 0:e.initialCoordinates}),jsxRuntimeExports.jsx(TopUpModal,{}),jsxRuntimeExports.jsx(BoxOpeningModal,{}),jsxRuntimeExports.jsx(ProfileInventoryModal,{})]})})}),jsxRuntimeExports.jsx(EventsStack,{})]})}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-bottom",className:"cssdk-banner-container cssdk-banner-bottom"})]})})};class AbortError extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}function delay(e,{signal:t}={}){return new Promise((i,s)=>{const o=()=>{s(new AbortError)},a=()=>{clearTimeout(l),o()};if(t!=null&&t.aborted)return o();const l=setTimeout(()=>{t==null||t.removeEventListener("abort",a),i()},e);t==null||t.addEventListener("abort",a,{once:!0})})}var define_process_env_default$3={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},win;if(typeof window>"u"){var loc={hostname:""};win={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:loc,referrer:""},screen:{width:0,height:0},location:loc,addEventListener:function(){},removeEventListener:function(){}}}else win=window;function _array_like_to_array(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function asyncGeneratorStep(e,t,i,s,o,a,l){try{var c=e[a](l),u=c.value}catch(f){i(f);return}c.done?t(u):Promise.resolve(u).then(s,o)}function _async_to_generator(e){return function(){var t=this,i=arguments;return new Promise(function(s,o){var a=e.apply(t,i);function l(u){asyncGeneratorStep(a,s,o,l,c,"next",u)}function c(u){asyncGeneratorStep(a,s,o,l,c,"throw",u)}l(void 0)})}}function _construct(e,t,i){return _is_native_reflect_construct()?_construct=Reflect.construct:_construct=function(o,a,l){var c=[null];c.push.apply(c,a);var u=Function.bind.apply(o,c),f=new u;return l&&_set_prototype_of(f,l.prototype),f},_construct.apply(null,arguments)}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function _create_class(e,t,i){return t&&_defineProperties(e.prototype,t),e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},_extends.apply(this,arguments)}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},_get_prototype_of(e)}function _inherits(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _object_without_properties_loose(e,t){if(e==null)return{};var i={},s=Object.keys(e),o,a;for(a=0;a<s.length;a++)o=s[a],!(t.indexOf(o)>=0)&&(i[o]=e[o]);return i}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},_set_prototype_of(e,t)}function _type_of(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if(typeof e=="string")return _array_like_to_array(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _array_like_to_array(e,t)}}function _wrap_native_super(e){var t=typeof Map=="function"?new Map:void 0;return _wrap_native_super=function(s){if(s===null||!_is_native_function(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(s))return t.get(s);t.set(s,o)}function o(){return _construct(s,arguments,_get_prototype_of(this).constructor)}return o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(o,s)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_is_native_reflect_construct=function(){return!!e})()}function _create_for_of_iterator_helper_loose(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=_unsupported_iterable_to_array(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _ts_generator(e,t){var i,s,o,a,l={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(f){return function(d){return u([f,d])}}function u(f){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return l.label++,{value:f[1],done:!1};case 5:l.label++,s=f[1],f=[0];continue;case 7:f=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){l=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){l.label=f[1];break}if(f[0]===6&&l.label<o[1]){l.label=o[1],o=f;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(f);break}o[2]&&l.ops.pop(),l.trys.pop();continue}f=t.call(e,l)}catch(d){f=[6,d],s=0}finally{i=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function _ts_values(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],s=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var __defProp=Object.defineProperty,__defNormalProp=function(e,t,i){return t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i},__publicField=function(e,t,i){return __defNormalProp(e,(typeof t>"u"?"undefined":_type_of(t))!=="symbol"?t+"":t,i)},_a,__defProp$1=Object.defineProperty,__defNormalProp$1=function(e,t,i){return t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i},__publicField$1=function(e,t,i){return __defNormalProp$1(e,(typeof t>"u"?"undefined":_type_of(t))!=="symbol"?t+"":t,i)},NodeType$3=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(NodeType$3||{}),testableAccessors$1={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},testableMethods$1={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},untaintedBasePrototype$1={},isAngularZonePresent$1=function(){return!!globalThis.Zone};function getUntaintedPrototype$1(e){if(untaintedBasePrototype$1[e])return untaintedBasePrototype$1[e];var t=globalThis[e],i=t.prototype,s=e in testableAccessors$1?testableAccessors$1[e]:void 0,o=!!(s&&s.every(function(d){var h,p;return!!((p=(h=Object.getOwnPropertyDescriptor(i,d))==null?void 0:h.get)!=null&&p.toString().includes("[native code]"))})),a=e in testableMethods$1?testableMethods$1[e]:void 0,l=!!(a&&a.every(function(d){var h;return typeof i[d]=="function"&&((h=i[d])==null?void 0:h.toString().includes("[native code]"))}));if(o&&l&&!isAngularZonePresent$1())return untaintedBasePrototype$1[e]=t.prototype,t.prototype;try{var c=document.createElement("iframe");document.body.appendChild(c);var u=c.contentWindow;if(!u)return t.prototype;var f=u[e].prototype;return document.body.removeChild(c),f?untaintedBasePrototype$1[e]=f:i}catch{return i}}var untaintedAccessorCache$1={};function getUntaintedAccessor$1(e,t,i){var s,o=e+"."+String(i);if(untaintedAccessorCache$1[o])return untaintedAccessorCache$1[o].call(t);var a=getUntaintedPrototype$1(e),l=(s=Object.getOwnPropertyDescriptor(a,i))==null?void 0:s.get;return l?(untaintedAccessorCache$1[o]=l,l.call(t)):t[i]}var untaintedMethodCache$1={};function getUntaintedMethod$1(e,t,i){var s=e+"."+String(i);if(untaintedMethodCache$1[s])return untaintedMethodCache$1[s].bind(t);var o=getUntaintedPrototype$1(e),a=o[i];return typeof a!="function"?t[i]:(untaintedMethodCache$1[s]=a,a.bind(t))}function childNodes$1(e){return getUntaintedAccessor$1("Node",e,"childNodes")}function parentNode$1(e){return getUntaintedAccessor$1("Node",e,"parentNode")}function parentElement$1(e){return getUntaintedAccessor$1("Node",e,"parentElement")}function textContent$1(e){return getUntaintedAccessor$1("Node",e,"textContent")}function contains$1(e,t){return getUntaintedMethod$1("Node",e,"contains")(t)}function getRootNode$1(e){return getUntaintedMethod$1("Node",e,"getRootNode")()}function host$1(e){return!e||!("host"in e)?null:getUntaintedAccessor$1("ShadowRoot",e,"host")}function styleSheets$1(e){return e.styleSheets}function shadowRoot$1(e){return!e||!("shadowRoot"in e)?null:getUntaintedAccessor$1("Element",e,"shadowRoot")}function querySelector$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelector")(t)}function querySelectorAll$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelectorAll")(t)}function mutationObserverCtor$1(){return getUntaintedPrototype$1("MutationObserver").constructor}var index$1={childNodes:childNodes$1,parentNode:parentNode$1,parentElement:parentElement$1,textContent:textContent$1,contains:contains$1,getRootNode:getRootNode$1,host:host$1,styleSheets:styleSheets$1,shadowRoot:shadowRoot$1,querySelector:querySelector$1,querySelectorAll:querySelectorAll$1,mutationObserver:mutationObserverCtor$1};function isElement(e){return e.nodeType===e.ELEMENT_NODE}function isShadowRoot(e){var t=e&&"host"in e&&"mode"in e&&index$1.host(e)||null;return!!(t&&"shadowRoot"in t&&index$1.shadowRoot(t)===e)}function isNativeShadowDom(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fixBrowserCompatibilityIssuesInCSS(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function escapeImportStatement(e){var t=e.cssText;if(t.split('"').length<3)return t;var i=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?i.push("layer"):e.layerName&&i.push("layer("+e.layerName+")"),e.supportsText&&i.push("supports("+e.supportsText+")"),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function stringifyStylesheet(e){try{var t=e.rules||e.cssRules;if(!t)return null;var i=e.href;!i&&e.ownerNode&&e.ownerNode.ownerDocument&&(i=e.ownerNode.ownerDocument.location.href);var s=Array.from(t,function(o){return stringifyRule(o,i)}).join("");return fixBrowserCompatibilityIssuesInCSS(s)}catch{return null}}function stringifyRule(e,t){if(isCSSImportRule(e)){var i;try{i=stringifyStylesheet(e.styleSheet)||escapeImportStatement(e)}catch{i=e.cssText}return e.styleSheet.href?absolutifyURLs(i,e.styleSheet.href):i}else{var s=e.cssText;return isCSSStyleRule(e)&&e.selectorText.includes(":")&&(s=fixSafariColons(s)),t?absolutifyURLs(s,t):s}}function fixSafariColons(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function isCSSImportRule(e){return"styleSheet"in e}function isCSSStyleRule(e){return"selectorText"in e}var Mirror=function(){function e(){__publicField$1(this,"idNodeMap",new Map),__publicField$1(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(s){var o;if(!s)return-1;var a=(o=this.getMeta(s))==null?void 0:o.id;return a??-1},t.getNode=function(s){return this.idNodeMap.get(s)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(s){return this.nodeMetaMap.get(s)||null},t.removeNodeFromMap=function(s){var o=this,a=this.getId(s);this.idNodeMap.delete(a),s.childNodes&&s.childNodes.forEach(function(l){return o.removeNodeFromMap(l)})},t.has=function(s){return this.idNodeMap.has(s)},t.hasNode=function(s){return this.nodeMetaMap.has(s)},t.add=function(s,o){var a=o.id;this.idNodeMap.set(a,s),this.nodeMetaMap.set(s,o)},t.replace=function(s,o){var a=this.getNode(s);if(a){var l=this.nodeMetaMap.get(a);l&&this.nodeMetaMap.set(o,l)}this.idNodeMap.set(s,o)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function createMirror$2(){return new Mirror}function maskInputValue(e){var t=e.element,i=e.maskInputOptions,s=e.tagName,o=e.type,a=e.value,l=e.maskInputFn,c=a||"",u=o&&toLowerCase(o);return(i[s.toLowerCase()]||u&&i[u])&&(l?c=l(c,t):c="*".repeat(c.length)),c}function toLowerCase(e){return e.toLowerCase()}var ORIGINAL_ATTRIBUTE_NAME="__rrweb_original__";function is2DCanvasBlank(e){var t=e.getContext("2d");if(!t)return!0;for(var i=50,s=0;s<e.width;s+=i)for(var o=0;o<e.height;o+=i){var a=t.getImageData,l=ORIGINAL_ATTRIBUTE_NAME in a?a[ORIGINAL_ATTRIBUTE_NAME]:a,c=new Uint32Array(l.call(t,s,o,Math.min(i,e.width-s),Math.min(i,e.height-o)).data.buffer);if(c.some(function(u){return u!==0}))return!1}return!0}function getInputType(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?toLowerCase(t):null}function extractFileExtension(e,t){var i;try{i=new URL(e,t??window.location.href)}catch{return null}var s=/\.([0-9a-z]+)(?:$)/i,o=i.pathname.match(s),a;return(a=o==null?void 0:o[1])!=null?a:null}function extractOrigin(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var URL_IN_CSS_REF=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,URL_PROTOCOL_MATCH=/^(?:[a-z+]+:)?\/\//i,URL_WWW_MATCH=/^www\..*/i,DATA_URI=/^(data:)([^,]*),(.*)/i;function absolutifyURLs(e,t){return(e||"").replace(URL_IN_CSS_REF,function(i,s,o,a,l,c){var u=o||l||c,f=s||a||"";if(!u)return i;if(URL_PROTOCOL_MATCH.test(u)||URL_WWW_MATCH.test(u)||DATA_URI.test(u))return"url("+f+u+f+")";if(u[0]==="/")return"url("+f+(extractOrigin(t)+u)+f+")";var d=t.split("/"),h=u.split("/");d.pop();for(var p=_create_for_of_iterator_helper_loose(h),m;!(m=p()).done;){var g=m.value;g!=="."&&(g===".."?d.pop():d.push(g))}return"url("+f+d.join("/")+f+")"})}function normalizeCssString(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function splitCssText(e,t){var i=Array.from(t.childNodes),s=[];if(i.length>1&&e&&typeof e=="string"){for(var o=normalizeCssString(e),a=1;a<i.length;a++)if(i[a].textContent&&typeof i[a].textContent=="string")for(var l=normalizeCssString(i[a].textContent),c=3;c<l.length;c++){var u=l.substring(0,c);if(o.split(u).length===2){for(var f=o.indexOf(u),d=f;d<e.length;d++)if(normalizeCssString(e.substring(0,d)).length===f){s.push(e.substring(0,d)),e=e.substring(d);break}break}}}return s.push(e),s}function markCssSplits(e,t){return splitCssText(e,t).join("/* rr_split */")}var _id=1,tagNameRegex=new RegExp("[^a-z0-9-_:]"),IGNORED_NODE=-2;function genId(){return _id++}function getValidTagName$1(e){if(_instanceof(e,HTMLFormElement))return"form";var t=toLowerCase(e.tagName);return tagNameRegex.test(t)?"div":t}var canvasService,canvasCtx,SRCSET_NOT_SPACES=/^[^ \t\n\r\u000c]+/,SRCSET_COMMAS_OR_SPACES=/^[, \t\n\r\u000c]+/;function getAbsoluteSrcsetString(e,t){if(t.trim()==="")return t;var i=0;function s(f){var d,h=f.exec(t.substring(i));return h?(d=h[0],i+=d.length,d):""}for(var o=[];s(SRCSET_COMMAS_OR_SPACES),!(i>=t.length);){var a=s(SRCSET_NOT_SPACES);if(a.slice(-1)===",")a=absoluteToDoc(e,a.substring(0,a.length-1)),o.push(a);else{var l="";a=absoluteToDoc(e,a);for(var c=!1;;){var u=t.charAt(i);if(u===""){o.push((a+l).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){i+=1,o.push((a+l).trim());break}else u==="("&&(c=!0);l+=u,i+=1}}}return o.join(", ")}var cachedDocument=new WeakMap;function absoluteToDoc(e,t){return!t||t.trim()===""?t:getHref(e,t)}function isSVGElement(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function getHref(e,t){var i=cachedDocument.get(e);if(i||(i=e.createElement("a"),cachedDocument.set(e,i)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return i.setAttribute("href",t),i.href}function transformAttribute(e,t,i,s){return s&&(i==="src"||i==="href"&&!(t==="use"&&s[0]==="#")||i==="xlink:href"&&s[0]!=="#"||i==="background"&&(t==="table"||t==="td"||t==="th")?absoluteToDoc(e,s):i==="srcset"?getAbsoluteSrcsetString(e,s):i==="style"?absolutifyURLs(s,getHref(e)):t==="object"&&i==="data"?absoluteToDoc(e,s):s)}function ignoreAttribute(e,t,i){return(e==="video"||e==="audio")&&t==="autoplay"}function _isBlockedElement(e,t,i){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var s=e.classList.length;s--;){var o=e.classList[s];if(t.test(o))return!0}if(i)return e.matches(i)}catch{}return!1}function classMatchesRegex(e,t,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return i?classMatchesRegex(index$1.parentNode(e),t,i):!1;for(var s=e.classList.length;s--;){var o=e.classList[s];if(t.test(o))return!0}return i?classMatchesRegex(index$1.parentNode(e),t,i):!1}function needMaskingText(e,t,i,s){var o;if(isElement(e)){if(o=e,!index$1.childNodes(o).length)return!1}else{if(index$1.parentElement(e)===null)return!1;o=index$1.parentElement(e)}try{if(typeof t=="string"){if(s){if(o.closest("."+t))return!0}else if(o.classList.contains(t))return!0}else if(classMatchesRegex(o,t,s))return!0;if(i){if(s){if(o.closest(i))return!0}else if(o.matches(i))return!0}}catch{}return!1}function onceIframeLoaded(e,t,i){var s=e.contentWindow;if(s){var o=!1,a;try{a=s.document.readyState}catch{return}if(a!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},i);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function onceStylesheetLoaded(e,t,i){var s=!1,o;try{o=e.sheet}catch{return}if(!o){var a=setTimeout(function(){s||(t(),s=!0)},i);e.addEventListener("load",function(){clearTimeout(a),s=!0,t()})}}function serializeNode(e,t){var i=t.doc,s=t.mirror,o=t.blockClass,a=t.blockSelector,l=t.needsMask,c=t.inlineStylesheet,u=t.maskInputOptions,f=u===void 0?{}:u,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,m=p===void 0?{}:p,g=t.inlineImages,v=t.recordCanvas,b=t.keepIframeSrcFn,y=t.newlyAddedElement,E=y===void 0?!1:y,S=t.cssCaptured,w=S===void 0?!1:S,C=getRootId(i,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:NodeType$3.Document,childNodes:[],compatMode:e.compatMode}:{type:NodeType$3.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType$3.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return serializeElementNode(e,{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:c,maskInputOptions:f,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:E,rootId:C});case e.TEXT_NODE:return serializeTextNode(e,{doc:i,needsMask:l,maskTextFn:d,rootId:C,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:NodeType$3.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:NodeType$3.Comment,textContent:index$1.textContent(e)||"",rootId:C};default:return!1}}function getRootId(e,t){if(t.hasNode(e)){var i=t.getId(e);return i===1?void 0:i}}function serializeTextNode(e,t){var i=t.needsMask,s=t.maskTextFn,o=t.rootId,a=t.cssCaptured,l=index$1.parentNode(e),c=l&&l.tagName,u="",f=c==="STYLE"?!0:void 0,d=c==="SCRIPT"?!0:void 0;return d?u="SCRIPT_PLACEHOLDER":a||(u=index$1.textContent(e),f&&u&&(u=absolutifyURLs(u,getHref(t.doc)))),!f&&!d&&u&&i&&(u=s?s(u,index$1.parentElement(e)):u.replace(/[\S]/g,"*")),{type:NodeType$3.Text,textContent:u||"",rootId:o}}function serializeElementNode(e,t){for(var i=t.doc,s=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,l=t.maskInputOptions,c=l===void 0?{}:l,u=t.maskInputFn,f=t.dataURLOptions,d=f===void 0?{}:f,h=t.inlineImages,p=t.recordCanvas,m=t.keepIframeSrcFn,g=t.newlyAddedElement,v=g===void 0?!1:g,b=t.rootId,y=_isBlockedElement(e,s,o),E=getValidTagName$1(e),S={},w=e.attributes.length,C=0;C<w;C++){var A=e.attributes[C];ignoreAttribute(E,A.name,A.value)||(S[A.name]=transformAttribute(i,E,toLowerCase(A.name),A.value))}if(E==="link"&&a){var O=Array.from(i.styleSheets).find(function(Y){return Y.href===e.href}),I=null;O&&(I=stringifyStylesheet(O)),I&&(delete S.rel,delete S.href,S._cssText=I)}if(E==="style"&&e.sheet){var L=stringifyStylesheet(e.sheet);L&&(e.childNodes.length>1&&(L=markCssSplits(L,e)),S._cssText=L)}if(E==="input"||E==="textarea"||E==="select"){var $=e.value,V=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&$?S.value=maskInputValue({element:e,type:getInputType(e),tagName:E,value:$,maskInputOptions:c,maskInputFn:u}):V&&(S.checked=V)}if(E==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),E==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(e.__context==="2d")is2DCanvasBlank(e)||(S.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var W=e.toDataURL(d.type,d.quality),K=i.createElement("canvas");K.width=e.width,K.height=e.height;var j=K.toDataURL(d.type,d.quality);W!==j&&(S.rr_dataURL=W)}}if(E==="img"&&h){canvasService||(canvasService=i.createElement("canvas"),canvasCtx=canvasService.getContext("2d"));var D=e,M=D.currentSrc||D.getAttribute("src")||"<unknown-src>",k=D.crossOrigin,T=function(){D.removeEventListener("load",T);try{canvasService.width=D.naturalWidth,canvasService.height=D.naturalHeight,canvasCtx.drawImage(D,0,0),S.rr_dataURL=canvasService.toDataURL(d.type,d.quality)}catch(Y){if(D.crossOrigin!=="anonymous"){D.crossOrigin="anonymous",D.complete&&D.naturalWidth!==0?T():D.addEventListener("load",T);return}else console.warn("Cannot inline img src="+M+"! Error: "+Y)}D.crossOrigin==="anonymous"&&(k?S.crossOrigin=k:D.removeAttribute("crossorigin"))};D.complete&&D.naturalWidth!==0?T():D.addEventListener("load",T)}if(E==="audio"||E==="video"){var P=S;P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime,P.rr_mediaPlaybackRate=e.playbackRate,P.rr_mediaMuted=e.muted,P.rr_mediaLoop=e.loop,P.rr_mediaVolume=e.volume}if(v||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),y){var F=e.getBoundingClientRect(),N=F.width,H=F.height;S={class:S.class,rr_width:""+N+"px",rr_height:""+H+"px"}}E==="iframe"&&!m(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);var q;try{customElements.get(E)&&(q=!0)}catch{}return{type:NodeType$3.Element,tagName:E,attributes:S,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:y,rootId:b,isCustom:q}}function lowerIfExists(e){return e==null?"":e.toLowerCase()}function slimDOMExcluded(e,t){if(t.comment&&e.type===NodeType$3.Comment)return!0;if(e.type===NodeType$3.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(lowerIfExists(e.attributes.name).match(/^msapplication-tile(image|color)$/)||lowerIfExists(e.attributes.name)==="application-name"||lowerIfExists(e.attributes.rel)==="icon"||lowerIfExists(e.attributes.rel)==="apple-touch-icon"||lowerIfExists(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&lowerIfExists(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(lowerIfExists(e.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(e.attributes.name).match(/^(og|twitter):/)||lowerIfExists(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(lowerIfExists(e.attributes.name)==="robots"||lowerIfExists(e.attributes.name)==="googlebot"||lowerIfExists(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(lowerIfExists(e.attributes.name)==="author"||lowerIfExists(e.attributes.name)==="generator"||lowerIfExists(e.attributes.name)==="framework"||lowerIfExists(e.attributes.name)==="publisher"||lowerIfExists(e.attributes.name)==="progid"||lowerIfExists(e.attributes.property).match(/^article:/)||lowerIfExists(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(lowerIfExists(e.attributes.name)==="google-site-verification"||lowerIfExists(e.attributes.name)==="yandex-verification"||lowerIfExists(e.attributes.name)==="csrf-token"||lowerIfExists(e.attributes.name)==="p:domain_verify"||lowerIfExists(e.attributes.name)==="verify-v1"||lowerIfExists(e.attributes.name)==="verification"||lowerIfExists(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function serializeNodeWithId(e,t){var i=t.doc,s=t.mirror,o=t.blockClass,a=t.blockSelector,l=t.maskTextClass,c=t.maskTextSelector,u=t.skipChild,f=u===void 0?!1:u,d=t.inlineStylesheet,h=d===void 0?!0:d,p=t.maskInputOptions,m=p===void 0?{}:p,g=t.maskTextFn,v=t.maskInputFn,b=t.slimDOMOptions,y=t.dataURLOptions,E=y===void 0?{}:y,S=t.inlineImages,w=S===void 0?!1:S,C=t.recordCanvas,A=C===void 0?!1:C,O=t.onSerialize,I=t.onIframeLoad,L=t.iframeLoadTimeout,$=L===void 0?5e3:L,V=t.onStylesheetLoad,W=t.stylesheetLoadTimeout,K=W===void 0?5e3:W,j=t.keepIframeSrcFn,D=j===void 0?function(){return!1}:j,M=t.newlyAddedElement,k=M===void 0?!1:M,T=t.cssCaptured,P=T===void 0?!1:T,F=t.needsMask,N=t.preserveWhiteSpace,H=N===void 0?!0:N;if(!F){var q=F===void 0;F=needMaskingText(e,l,c,q)}var Y=serializeNode(e,{doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,dataURLOptions:E,inlineImages:w,recordCanvas:A,keepIframeSrcFn:D,newlyAddedElement:k,cssCaptured:P});if(!Y)return console.warn(e,"not serialized"),null;var Q;s.hasNode(e)?Q=s.getId(e):slimDOMExcluded(Y,b)||!H&&Y.type===NodeType$3.Text&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?Q=IGNORED_NODE:Q=genId();var re=Object.assign(Y,{id:Q});if(s.add(e,re),Q===IGNORED_NODE)return null;O&&O(e);var ee=!f;if(re.type===NodeType$3.Element){ee=ee&&!re.needBlock,delete re.needBlock;var z=index$1.shadowRoot(e);z&&isNativeShadowDom(z)&&(re.isShadowHost=!0)}if((re.type===NodeType$3.Document||re.type===NodeType$3.Element)&&ee){b.headWhitespace&&re.type===NodeType$3.Element&&re.tagName==="head"&&(H=!1);var J={doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:f,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D,cssCaptured:!1};if(!(re.type===NodeType$3.Element&&re.tagName==="textarea"&&re.attributes.value!==void 0)){re.type===NodeType$3.Element&&re.attributes._cssText!==void 0&&typeof re.attributes._cssText=="string"&&(J.cssCaptured=!0);for(var te=_create_for_of_iterator_helper_loose(Array.from(index$1.childNodes(e))),X;!(X=te()).done;){var se=X.value,ie=serializeNodeWithId(se,J);ie&&re.childNodes.push(ie)}}var ne=null;if(isElement(e)&&(ne=index$1.shadowRoot(e)))for(var pe=_create_for_of_iterator_helper_loose(Array.from(index$1.childNodes(ne))),_e;!(_e=pe()).done;){var ye=_e.value,Ae=serializeNodeWithId(ye,J);Ae&&(isNativeShadowDom(ne)&&(Ae.isShadow=!0),re.childNodes.push(Ae))}}var xe=index$1.parentNode(e);return xe&&isShadowRoot(xe)&&isNativeShadowDom(xe)&&(re.isShadow=!0),re.type===NodeType$3.Element&&re.tagName==="iframe"&&onceIframeLoaded(e,function(){var ae=e.contentDocument;if(ae&&I){var me=serializeNodeWithId(ae,{doc:ae,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D});me&&I(e,me)}},$),re.type===NodeType$3.Element&&re.tagName==="link"&&typeof re.attributes.rel=="string"&&(re.attributes.rel==="stylesheet"||re.attributes.rel==="preload"&&typeof re.attributes.href=="string"&&extractFileExtension(re.attributes.href)==="css")&&onceStylesheetLoaded(e,function(){if(V){var ae=serializeNodeWithId(e,{doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D});ae&&V(e,ae)}},K),re}function snapshot(e,t){var i=t,s=i.mirror,o=s===void 0?new Mirror:s,a=i.blockClass,l=a===void 0?"rr-block":a,c=i.blockSelector,u=c===void 0?null:c,f=i.maskTextClass,d=f===void 0?"rr-mask":f,h=i.maskTextSelector,p=h===void 0?null:h,m=i.inlineStylesheet,g=m===void 0?!0:m,v=i.inlineImages,b=v===void 0?!1:v,y=i.recordCanvas,E=y===void 0?!1:y,S=i.maskAllInputs,w=S===void 0?!1:S,C=i.maskTextFn,A=i.maskInputFn,O=i.slimDOM,I=O===void 0?!1:O,L=i.dataURLOptions,$=i.preserveWhiteSpace,V=i.onSerialize,W=i.onIframeLoad,K=i.iframeLoadTimeout,j=i.onStylesheetLoad,D=i.stylesheetLoadTimeout,M=i.keepIframeSrcFn,k=M===void 0?function(){return!1}:M,T=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,P=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return serializeNodeWithId(e,{doc:e,mirror:o,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:g,maskInputOptions:T,maskTextFn:C,maskInputFn:A,slimDOMOptions:P,dataURLOptions:L,inlineImages:b,recordCanvas:E,preserveWhiteSpace:$,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:K,onStylesheetLoad:j,stylesheetLoadTimeout:D,keepIframeSrcFn:k,newlyAddedElement:!1})}function getDefaultExportFromCjs$1(e){return e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace$1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var i=function s(){return _instanceof(this,s)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(i,s,o.get?o:{enumerable:!0,get:function(){return e[s]}})}),i}var picocolors_browser$1={exports:{}},x$1=String,create$1=function e(){return{isColorSupported:!1,reset:x$1,bold:x$1,dim:x$1,italic:x$1,underline:x$1,inverse:x$1,hidden:x$1,strikethrough:x$1,black:x$1,red:x$1,green:x$1,yellow:x$1,blue:x$1,magenta:x$1,cyan:x$1,white:x$1,gray:x$1,bgBlack:x$1,bgRed:x$1,bgGreen:x$1,bgYellow:x$1,bgBlue:x$1,bgMagenta:x$1,bgCyan:x$1,bgWhite:x$1}};picocolors_browser$1.exports=create$1(),picocolors_browser$1.exports.createColors=create$1;var picocolors_browserExports$1=picocolors_browser$1.exports,__viteBrowserExternal$2={},__viteBrowserExternal$1$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal$2},Symbol.toStringTag,{value:"Module"})),require$$2$1=getAugmentedNamespace$1(__viteBrowserExternal$1$1),pico$1=picocolors_browserExports$1,terminalHighlight$1$1=require$$2$1,CssSyntaxError$3$1=function(e){_inherits(t,e);function t(s,o,a,l,c,u){var f;return f=e.call(this,s)||this,f.name="CssSyntaxError",f.reason=s,c&&(f.file=c),l&&(f.source=l),u&&(f.plugin=u),typeof o<"u"&&typeof a<"u"&&(typeof o=="number"?(f.line=o,f.column=a):(f.line=o.line,f.column=o.column,f.endLine=a.line,f.endColumn=a.column)),f.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(f,t),f}var i=t.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(o){var a=this;if(!this.source)return"";var l=this.source;o==null&&(o=pico$1.isColorSupported),terminalHighlight$1$1&&o&&(l=terminalHighlight$1$1(l));var c=l.split(/\r?\n/),u=Math.max(this.line-3,0),f=Math.min(this.line+2,c.length),d=String(f).length,h,p;if(o){var m=pico$1.createColors(!0),g=m.bold,v=m.gray,b=m.red;h=function(y){return g(b(y))},p=function(y){return v(y)}}else h=p=function(y){return y};return c.slice(u,f).map(function(y,E){var S=u+1+E,w=" "+(" "+S).slice(-d)+" | ";if(S===a.line){var C=p(w.replace(/\d/g," "))+y.slice(0,a.column-1).replace(/[^\t]/g," ");return h(">")+p(w)+y+`
101
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function j(z,J){if(z){if(typeof z=="string")return D(z,J);var te=Object.prototype.toString.call(z).slice(8,-1);return te==="Object"&&z.constructor&&(te=z.constructor.name),te==="Map"||te==="Set"?Array.from(z):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?D(z,J):void 0}}function D(z,J){(J==null||J>z.length)&&(J=z.length);for(var te=0,X=new Array(J);te<J;te++)X[te]=z[te];return X}function M(z,J){if(!(z instanceof J))throw new TypeError("Cannot call a class as a function")}function k(z,J){for(var te=0;te<J.length;te++){var X=J[te];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(z,X.key,X)}}function T(z,J){return(T=Object.setPrototypeOf||function(te,X){return te.__proto__=X,te})(z,J)}function P(z){var J=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var te,X=H(z);if(J){var se=H(this).constructor;te=Reflect.construct(X,arguments,se)}else te=X.apply(this,arguments);return F(this,te)}}function F(z,J){return!J||L(J)!=="object"&&typeof J!="function"?N(z):J}function N(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function H(z){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)})(z)}function q(z,J,te){return J in z?Object.defineProperty(z,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):z[J]=te,z}var Y=f.a.createRef(),Q=function(z){(function(ie,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(ne&&ne.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),ne&&T(ie,ne)})(se,z);var J,te,X=P(se);function se(ie){var ne;M(this,se);for(var pe=arguments.length,_e=new Array(pe>1?pe-1:0),ye=1;ye<pe;ye++)_e[ye-1]=arguments[ye];return q(N(ne=X.call.apply(X,[this,ie].concat(_e))),"canvas",f.a.createRef()),q(N(ne),"confetti",void 0),ne.canvas=ie.canvasRef||Y,ne}return J=se,(te=[{key:"componentDidMount",value:function(){if(this.canvas.current){var ie=re(this.props)[0];this.confetti=new O(this.canvas.current,ie)}}},{key:"componentDidUpdate",value:function(){var ie=re(this.props)[0];this.confetti&&(this.confetti.options=ie)}},{key:"componentWillUnmount",value:function(){this.confetti&&this.confetti.stop(),this.confetti=void 0}},{key:"render",value:function(){var ie=K(re(this.props),2),ne=ie[0],pe=ie[1],_e=W({zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0},pe.style);return f.a.createElement("canvas",$({width:ne.width,height:ne.height,ref:this.canvas},pe,{style:_e}))}}])&&k(J.prototype,te),se}(u.Component);function re(z){var J={},te={},X=[].concat(I(Object.keys(A)),["confettiSource","drawShape","onConfettiComplete"]),se=["canvasRef"];for(var ie in z){var ne=z[ie];X.includes(ie)?J[ie]=ne:se.includes(ie)?se[ie]=ne:te[ie]=ne}return[J,te,{}]}q(Q,"defaultProps",W({},A)),q(Q,"displayName","ReactConfetti");var ee=f.a.forwardRef(function(z,J){return f.a.createElement(Q,$({canvasRef:J},z))});o.default=ee}]).default})}(reactConfetti_min$1)),reactConfetti_min$1.exports}var reactConfetti_minExports=requireReactConfetti_min();const Confetti=getDefaultExportFromCjs$3(reactConfetti_minExports),ConfettiProvider=({children:e})=>{const{isVisible:t,stopConfetti:i}=useConfettiStore(s=>s);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[e,t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:999999},children:jsxRuntimeExports.jsx(Confetti,{recycle:!1,onConfettiComplete:()=>i()})}),document.body)]})};function BalanceHeader({type:e,balanceId:t}){const{t:i}=useTranslation(),{data:s}=useProfile();return jsxRuntimeExports.jsxs("div",{className:"absolute top-3 left-4 z-1 flex flex-col items-start",children:[jsxRuntimeExports.jsx(Caption,{weight:"3",children:i("topUpModal.balance")}),jsxRuntimeExports.jsxs("div",{id:t,className:"flex flex-row gap-0.5 items-center justify-center",children:[jsxRuntimeExports.jsx("div",{className:"size-5 flex items-center justify-center",children:e==="coins"?jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:18}}):e==="gems"?jsxRuntimeExports.jsx(IconBalanceGems,{width:18,height:18}):jsxRuntimeExports.jsx(IconUsdt,{style:{height:18,width:19}})}),jsxRuntimeExports.jsx(AnimatedBalance,{className:"text-rounded",style:{fontSize:"17px",lineHeight:"22px"},value:e==="coins"?s.balance_coins:e==="gems"?s.balance_gems:s.balance_usdt,noRounding:e==="usdt"})]})]})}const StarParticles=({count:e=50,width:t,height:i,style:s,delay:o=0})=>{const[a,l]=React.useState(!1),c=React.useRef(null),u=React.useRef([]),f=React.useRef();return React.useEffect(()=>{const d=setTimeout(()=>{l(!0)},o);return()=>clearTimeout(d)},[o]),React.useEffect(()=>{const d=()=>({x:Math.random()*t,y:Math.random()*i,scale:.6+Math.random()*.9,rotation:Math.random()*360,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.24,y:(Math.random()-.5)*.24},fadeOut:!1});u.current=Array(e).fill(null).map(d);let h=performance.now();const p=m=>{const g=c.current;if(!g)return;const v=(m-h)/16.67;h=m;const b=window.devicePixelRatio||1;g.width=t*b,g.height=i*b;const y=g.getContext("2d",{alpha:!0});y&&(y.scale(b,b),y.clearRect(0,0,t,i),y.imageSmoothingEnabled=!1,u.current.forEach(E=>{!E.fadeOut&&(E.x<10||E.x>t-10||E.y<10||E.y>i-10)&&(E.fadeOut=!0),E.fadeOut&&(E.opacity=Math.max(0,E.opacity-.03*v)),y.save(),y.translate(E.x,E.y),y.rotate(E.rotation*Math.PI/180),y.scale(E.scale,E.scale),y.globalAlpha=E.opacity,y.beginPath(),y.moveTo(3,0),y.lineTo(2.635,2.635),y.lineTo(0,3),y.lineTo(2.635,3.365),y.lineTo(3,6),y.lineTo(3.365,3.365),y.lineTo(6,3),y.lineTo(3.365,2.635),y.closePath(),y.fillStyle="#FFB700",y.fill(),y.restore(),E.x+=E.velocity.x*v,E.y+=E.velocity.y*v,E.rotation+=.24*v,E.opacity<=0&&Object.assign(E,d())}),f.current=requestAnimationFrame(p))};return f.current=requestAnimationFrame(p),()=>{f.current&&cancelAnimationFrame(f.current)}},[t,i,e]),jsxRuntimeExports.jsx("canvas",{ref:c,width:t,height:i,style:{position:"absolute",pointerEvents:"none",zIndex:2,width:`${t}px`,height:`${i}px`,opacity:a?1:0,transform:`scale(${a?1:.9})`,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",...s}})},PRICES_TAG="prices";function usePrices(){return useQuery({queryKey:[PRICES_TAG],queryFn:async()=>await makeRequest("prices","GET")})}const IconCurrencyStar=e=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:[jsxRuntimeExports.jsx("title",{children:"Currency star"}),jsxRuntimeExports.jsx("path",{d:"M5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.4577 6.87807 15.3708 7.0569 15.2342 7.19238L12.5446 9.86072C12.436 9.96845 12.3835 10.1211 12.4024 10.2737L12.8494 13.8758C12.9133 14.3915 12.5515 14.8621 12.0415 14.9267C11.8481 14.9512 11.652 14.9139 11.4807 14.8198L8.63941 13.2578C8.4337 13.1449 8.18638 13.1416 7.97785 13.2492L5.034 14.7687C4.61977 14.9826 4.11233 14.8163 3.90077 14.3976C3.82165 14.2408 3.79239 14.0633 3.8171 13.889L4.0525 12.2364C4.1676 11.4281 4.66464 10.7269 5.38472 10.3569L8.65458 8.67676C8.74194 8.6319 8.77662 8.52416 8.73219 8.43594C8.69794 8.36744 8.62424 8.32886 8.54924 8.3397L4.55019 8.91585C3.93892 9.00408 3.31898 8.83045 2.83971 8.43681L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235Z",fill:"url(#paint0_linear_4259_226)"}),jsxRuntimeExports.jsx("path",{d:"M8.98273 9.42344C9.05773 9.4126 9.13143 9.45119 9.16568 9.51968C9.21012 9.6079 9.17544 9.71564 9.08808 9.76051L5.81822 11.4406C5.09813 11.8106 4.6011 12.5119 4.486 13.3202L4.27899 14.7742C4.1214 14.6962 3.98658 14.5676 3.90074 14.3975C3.82162 14.2408 3.79236 14.0632 3.81707 13.889L4.05247 12.2364C4.16757 11.4281 4.66461 10.7268 5.38469 10.3568L6.50687 9.78001L8.98273 9.42344Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.472 6.75777 15.4544 6.82778 15.4288 6.89454C15.351 6.85856 15.2667 6.83407 15.1774 6.82323L11.7749 6.41246C11.4773 6.37648 11.2178 6.19115 11.0851 5.91955L9.46007 2.59463C9.38356 2.43791 9.25848 2.31045 9.10415 2.23177C8.71051 2.03105 8.2306 2.1908 8.03226 2.58856L6.3116 6.03617C6.21232 6.23559 6.02135 6.37193 5.80242 6.40033L2.38776 6.84252C2.1619 6.87178 1.95576 6.98775 1.81226 7.16636C1.73921 7.25719 1.68675 7.3582 1.65402 7.46333L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.2883 1.34987C7.5727 0.779997 8.26244 0.550446 8.82797 0.83874C9.04972 0.951673 9.22855 1.13419 9.33823 1.35832L10.9631 4.68324C11.0444 4.8495 11.2024 4.96243 11.3829 4.98432L14.7855 5.39487C15.4381 5.47377 15.9024 6.0703 15.8248 6.72644C15.793 6.99631 15.6709 7.24754 15.4785 7.43851L12.7889 10.1066C12.7568 10.1387 12.7407 10.1847 12.7466 10.2308L13.1936 13.833C13.2809 14.5377 12.7856 15.1819 12.085 15.2708C11.8189 15.3044 11.5492 15.253 11.3138 15.1236L8.47226 13.5618C8.368 13.5044 8.24271 13.5027 8.13693 13.5573L5.19308 15.0768C4.60695 15.3792 3.88947 15.1442 3.5912 14.554C3.48 14.3337 3.43904 14.0844 3.47372 13.8402L3.70912 12.1873C3.84005 11.268 4.4058 10.4699 5.22624 10.0483L7.60521 8.82579L4.5998 9.25909C3.91721 9.3575 3.22531 9.17391 2.67972 8.75252L2.61967 8.70483L1.28767 7.61105C0.760502 7.17839 0.680517 6.3974 1.10841 5.86503C1.30783 5.61683 1.59482 5.45535 1.90956 5.4146L5.32422 4.9724C5.42848 4.95896 5.51974 4.89371 5.56786 4.79747L7.2883 1.34987ZM8.51301 1.45673C8.2917 1.3438 8.02161 1.43375 7.9089 1.65962L6.18845 5.10723C6.03758 5.40961 5.74734 5.61705 5.41331 5.66019L1.99865 6.10238C1.86187 6.12016 1.73658 6.1906 1.64901 6.29964C1.45913 6.53569 1.49489 6.88381 1.72791 7.075L3.05992 8.16878C3.46396 8.50043 3.98593 8.64674 4.50074 8.57261L8.49957 7.99624C8.72284 7.96416 8.9409 8.07861 9.04213 8.27998C9.17175 8.53771 9.07009 8.8531 8.81301 8.98532L5.54337 10.6652C4.92343 10.9837 4.4951 11.588 4.39583 12.2853L4.16042 13.9379C4.14568 14.0417 4.16324 14.1477 4.21028 14.2412C4.33513 14.4883 4.63231 14.5856 4.87487 14.4603L7.81894 12.941C8.12978 12.7804 8.49957 12.7852 8.80651 12.9538L11.6478 14.5156C11.7549 14.5745 11.8772 14.5977 11.9979 14.5826C12.3174 14.542 12.5457 14.2453 12.5051 13.9184L12.0582 10.3162C12.0261 10.0572 12.1154 9.79775 12.3005 9.61437L14.9899 6.94602C15.0707 6.86582 15.1225 6.75961 15.136 6.64494C15.1689 6.36705 14.9736 6.11647 14.7024 6.08352L11.2997 5.67298C10.885 5.6229 10.5241 5.36496 10.3399 4.98779L8.71504 1.66287C8.67125 1.57356 8.60037 1.50117 8.51301 1.45673Z",fill:"url(#paint1_linear_4259_226)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_4259_226",x1:"6.38247",y1:"4.31269",x2:"12.2351",y2:"14.7173",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_4259_226",x1:"8.33333",y1:"1.06114",x2:"8.33333",y2:"14.7172",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),XsButton=React.forwardRef(({className:e,children:t,...i},s)=>jsxRuntimeExports.jsx(Button,{...i,ref:s,className:`xs-button ${e||""}`,size:"s",children:t}));XsButton.displayName="XsButton";const Ribbon=({text:e})=>jsxRuntimeExports.jsxs("svg",{style:{position:"absolute",top:-2,right:-2,width:48,height:48,overflow:"visible"},children:[jsxRuntimeExports.jsx("title",{children:"Ribbon"}),jsxRuntimeExports.jsx("path",{d:"M46.83 24.5L23.5 1.17C22.75 0.42 21.73 0 20.68 0C19.62 0 2.73 0.05 1.55 0.05C0.36 0.05 -0.23 1.4885 0.6 2.32L45.72 47.44C46.56 48.28 48 47.68 48 46.5C48 45.31 48 28.38 48 27.32C48 26.26 47.5 25.24 46.82 24.5Z",fill:"#1EC948"}),jsxRuntimeExports.jsx("text",{x:"21",y:"21",textAnchor:"middle",transform:"rotate(45 24 24)",style:{fill:"white",fontSize:"13px",fontWeight:700,fontFamily:"-apple-system, system-ui, sans-serif"},children:e})]}),BuyOption=({amount:e,price:t,onClick:i,loading:s,discount:o,optionIcon:a})=>{const{t:l}=useTranslation();return jsxRuntimeExports.jsxs(motion.button,{whileTap:{scale:.95},className:"relative flex flex-col items-center bg-tgui-section-bg cursor-pointer rounded-lg w-full px-1 pb-2.5 pt-1",onClick:i,type:"button",children:[o&&jsxRuntimeExports.jsx(Ribbon,{text:o}),jsxRuntimeExports.jsx("div",{className:"h-12.5 flex justify-center items-center",children:jsxRuntimeExports.jsx("img",{className:"max-w-20 max-h-12.5 object-cover",src:a,alt:"Option icon"})}),jsxRuntimeExports.jsx(Text,{weight:"1",className:"text-rounded",style:{fontSize:"20px",lineHeight:"25px"},children:formatter.format(e)}),jsxRuntimeExports.jsx(Text,{weight:"3",style:{fontSize:"10px",lineHeight:"13px"},children:l("topUpModal.gems")}),jsxRuntimeExports.jsx(XsButton,{onClick:c=>{c.stopPropagation(),i()},mode:"bezeled",style:{color:"#F36200",backgroundColor:"rgba(255, 190, 0, 0.20)",marginTop:10},before:jsxRuntimeExports.jsx(IconCurrencyStar,{style:{width:16,height:16}}),loading:s,children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:"10px",lineHeight:"13px"},children:formatter.format(t)})})]})},optionIcon1=assetUrl("buyOptions/buyOption1.webp"),optionIcon2=assetUrl("buyOptions/buyOption2.webp"),optionIcon3=assetUrl("buyOptions/buyOption3.webp"),optionIcon4=assetUrl("buyOptions/buyOption4.webp"),optionIcon5=assetUrl("buyOptions/buyOption5.webp"),optionIcon6=assetUrl("buyOptions/buyOption6.webp"),icons=[optionIcon1,optionIcon2,optionIcon3,optionIcon4,optionIcon5,optionIcon6],getIconByIndex=e=>icons[e%icons.length],TopUpModal=({...e})=>{const{t}=useTranslation(),{isOpen:i,setIsOpen:s}=useTopUpModalStore(),{showSnackbar:o}=useSnackbar(),a=useQueryClient(),l=useFireConfetti(),[c,u]=React.useState(null),{data:f,isLoading:d,error:h}=usePrices(),p=async(m,g)=>{var v,b;u(1),(b=(v=window.Telegram)==null?void 0:v.WebApp)==null||b.openInvoice(m,y=>{y==="paid"&&(a.invalidateQueries({queryKey:[PROFILE_TAG]}),s(!1),l(),o(t("snackbar.purchase.walletPurchaseGems"),{type:"success_top",gems:g.toString()}))}),u(null)};return jsxRuntimeExports.jsx(Drawer,{open:i,onOpenChange:s,headerOptions:{before:jsxRuntimeExports.jsx(BalanceHeader,{type:"gems"})},variant:"secondary",...e,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 items-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/moneyTongue.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:t("topUpModal.topUpBalance")})]}),d?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center w-full",style:{height:282},children:jsxRuntimeExports.jsx(Spinner,{size:"m"})}):h?jsxRuntimeExports.jsx("div",{className:"text-red-500 text-center p-4",children:t("common.error")}):f!=null&&f.items?jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-1.5 w-full",children:f.items.map((m,g)=>jsxRuntimeExports.jsxs("div",{className:"relative z-1 overflow-visible",children:[g>=f.items.length-2&&jsxRuntimeExports.jsx(StarParticles,{width:100,height:58,count:30,delay:300,style:{bottom:0,left:"50%",transform:"translateX(-50%) scale(1)"}}),jsxRuntimeExports.jsx(BuyOption,{amount:m.gems,price:m.stars,onClick:()=>p(m.invoice_url,m.gems),loading:c===m.gems,discount:m.discount?`–${m.discount}%`:void 0,optionIcon:getIconByIndex(g)},m.gems)]},m.invoice_url))}):null]})})},supportedLanguages=["en","ru","hi","es","pt"];function mapTelegramLanguageToSupported(e){return{"pt-br":"pt","pt-pt":"pt"}[e]||e}const getTelegramLanguage=()=>{var s,o,a;const e=(a=(o=(s=window.Telegram)==null?void 0:s.WebApp)==null?void 0:o.initDataUnsafe.user)==null?void 0:a.language_code,t=e?mapTelegramLanguageToSupported(e):null;return t&&supportedLanguages.includes(t)?t:"en"};function I18nBackendLanguageProvider({children:e}){const{i18n:t}=useTranslation(),{data:i}=useProfile(),s=React.useRef(!1),o=React.useRef(null),a=getTelegramLanguage(),l=i.language===t.language,c=i.language===null&&t.language===a;if(React.useEffect(()=>{!s.current&&(l||c)&&(s.current=!0)},[l,c]),!s.current&&!l&&!c){if(o.current)throw o.current;const u=i.language===null?a:i.language;throw o.current=t.changeLanguage(u),o.current}return o.current=null,e}class APIRequestError extends Error{constructor({message:t,status:i,responseText:s}){super(t),this.status=i,this.responseText=s}}function createMakeRequest(e){return async function(i,s,o){e.waitUntilReady&&await e.waitUntilReady();const a=`${e.baseUrl}/${i}`;try{const l=e.getAuthData(),c=e.getBotId(),u={"X-Auth":l||e.getInitData(),"Content-Type":"application/json"};if(c&&(u["X-Bot-ID"]=c),l){console.warn("WARNING: AUTH_DATA is used for requests!!!"),console.log("=== API Request Debug ==="),console.log("externalAuthData:",l),console.log("externalAuthData type:",typeof l),console.log("externalAuthData truthy?",!!l),console.log("externalAuthData length:",l==null?void 0:l.length),console.log("config.getInitData():",e.getInitData()),console.log("config.getInitData() type:",typeof e.getInitData()),console.log("config.getInitData() truthy?",!!e.getInitData());const d=l||e.getInitData();console.log("X-Auth value (before headers):",d),console.log("X-Auth value type:",typeof d),console.log("X-Auth value truthy?",!!d),console.log("X-Auth value length:",d==null?void 0:d.length),u["a-deb"]=l,u["a-deb-string"]=String(l),console.log("Final headers object:",u),u["X-Auth"]||(u["X-Auth"]=l),console.log("Final X-Auth header:",u["X-Auth"])}const f=await fetch(a,{method:s,headers:u,body:o?JSON.stringify(o):null});if(!f.ok)throw new APIRequestError({message:`Request to ${i} failed with status ${f.status}`,status:f.status,responseText:await(async()=>{try{return await f.text()}catch{return}})()});return f.json()}catch(l){throw l instanceof APIRequestError||console.error(`Error during request to ${i}:`,l),l}}}const queryClient=new QueryClient({mutationCache:new MutationCache({onError:e=>{captureException(e)}}),queryCache:new QueryCache({onError:e=>{captureException(e)}}),defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0,retry:(e,t)=>{if(t instanceof APIRequestError&&t.status===401)return e<3;if(t instanceof Error&&"status"in t){const i=t.status;if(i&&i>=400&&i<500)return!1}return e<3},retryDelay:(e,t)=>t instanceof APIRequestError&&t.status===401?Math.min(1e3*2**e,4e3):Math.min(1e3*2**e,3e4)},mutations:{retry:1,retryDelay:1e3}}});function createOverlay(e){let t=document.getElementById("overlay-root");t=document.createElement("div"),t.id="overlay-root",document.body.appendChild(t),clientExports.createRoot(t).render(jsxRuntimeExports.jsx(OverlayManager,{options:e}))}const OverlayManager=({options:e})=>{const t=React.useCallback(()=>{var i;(i=window.Telegram.WebApp)==null||i.openTelegramLink("https://t.me/orbit_portal_bot/app?startapp=profile")},[]);return React.useEffect(()=>{const i=s=>{s.shiftKey&&s.key==="Tab"&&(s.preventDefault(),t())};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[t]),jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsxs(AppRoot,{children:[jsxRuntimeExports.jsx(OrientationCheck,{}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-top",className:"cssdk-banner-container cssdk-banner-top"}),jsxRuntimeExports.jsx(React.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(I18nBackendLanguageProvider,{children:[jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(BoxOpeningProvider,{children:jsxRuntimeExports.jsxs(ConfettiProvider,{children:[jsxRuntimeExports.jsx(OverlayProfile,{variant:(e==null?void 0:e.variant)||"translucent",onOpenProfile:()=>t(),initialPosition:e==null?void 0:e.initialPosition,initialCoordinates:e==null?void 0:e.initialCoordinates}),jsxRuntimeExports.jsx(TopUpModal,{}),jsxRuntimeExports.jsx(BoxOpeningModal,{}),jsxRuntimeExports.jsx(ProfileInventoryModal,{})]})})}),jsxRuntimeExports.jsx(EventsStack,{})]})}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-bottom",className:"cssdk-banner-container cssdk-banner-bottom"})]})})};class AbortError extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}function delay(e,{signal:t}={}){return new Promise((i,s)=>{const o=()=>{s(new AbortError)},a=()=>{clearTimeout(l),o()};if(t!=null&&t.aborted)return o();const l=setTimeout(()=>{t==null||t.removeEventListener("abort",a),i()},e);t==null||t.addEventListener("abort",a,{once:!0})})}var define_process_env_default$3={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},win;if(typeof window>"u"){var loc={hostname:""};win={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:loc,referrer:""},screen:{width:0,height:0},location:loc,addEventListener:function(){},removeEventListener:function(){}}}else win=window;function _array_like_to_array(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function asyncGeneratorStep(e,t,i,s,o,a,l){try{var c=e[a](l),u=c.value}catch(f){i(f);return}c.done?t(u):Promise.resolve(u).then(s,o)}function _async_to_generator(e){return function(){var t=this,i=arguments;return new Promise(function(s,o){var a=e.apply(t,i);function l(u){asyncGeneratorStep(a,s,o,l,c,"next",u)}function c(u){asyncGeneratorStep(a,s,o,l,c,"throw",u)}l(void 0)})}}function _construct(e,t,i){return _is_native_reflect_construct()?_construct=Reflect.construct:_construct=function(o,a,l){var c=[null];c.push.apply(c,a);var u=Function.bind.apply(o,c),f=new u;return l&&_set_prototype_of(f,l.prototype),f},_construct.apply(null,arguments)}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function _create_class(e,t,i){return t&&_defineProperties(e.prototype,t),e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},_extends.apply(this,arguments)}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},_get_prototype_of(e)}function _inherits(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _object_without_properties_loose(e,t){if(e==null)return{};var i={},s=Object.keys(e),o,a;for(a=0;a<s.length;a++)o=s[a],!(t.indexOf(o)>=0)&&(i[o]=e[o]);return i}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},_set_prototype_of(e,t)}function _type_of(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if(typeof e=="string")return _array_like_to_array(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _array_like_to_array(e,t)}}function _wrap_native_super(e){var t=typeof Map=="function"?new Map:void 0;return _wrap_native_super=function(s){if(s===null||!_is_native_function(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(s))return t.get(s);t.set(s,o)}function o(){return _construct(s,arguments,_get_prototype_of(this).constructor)}return o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(o,s)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_is_native_reflect_construct=function(){return!!e})()}function _create_for_of_iterator_helper_loose(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=_unsupported_iterable_to_array(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _ts_generator(e,t){var i,s,o,a,l={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(f){return function(d){return u([f,d])}}function u(f){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return l.label++,{value:f[1],done:!1};case 5:l.label++,s=f[1],f=[0];continue;case 7:f=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){l=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){l.label=f[1];break}if(f[0]===6&&l.label<o[1]){l.label=o[1],o=f;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(f);break}o[2]&&l.ops.pop(),l.trys.pop();continue}f=t.call(e,l)}catch(d){f=[6,d],s=0}finally{i=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function _ts_values(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],s=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var __defProp=Object.defineProperty,__defNormalProp=function(e,t,i){return t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i},__publicField=function(e,t,i){return __defNormalProp(e,(typeof t>"u"?"undefined":_type_of(t))!=="symbol"?t+"":t,i)},_a,__defProp$1=Object.defineProperty,__defNormalProp$1=function(e,t,i){return t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i},__publicField$1=function(e,t,i){return __defNormalProp$1(e,(typeof t>"u"?"undefined":_type_of(t))!=="symbol"?t+"":t,i)},NodeType$3=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(NodeType$3||{}),testableAccessors$1={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},testableMethods$1={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},untaintedBasePrototype$1={},isAngularZonePresent$1=function(){return!!globalThis.Zone};function getUntaintedPrototype$1(e){if(untaintedBasePrototype$1[e])return untaintedBasePrototype$1[e];var t=globalThis[e],i=t.prototype,s=e in testableAccessors$1?testableAccessors$1[e]:void 0,o=!!(s&&s.every(function(d){var h,p;return!!((p=(h=Object.getOwnPropertyDescriptor(i,d))==null?void 0:h.get)!=null&&p.toString().includes("[native code]"))})),a=e in testableMethods$1?testableMethods$1[e]:void 0,l=!!(a&&a.every(function(d){var h;return typeof i[d]=="function"&&((h=i[d])==null?void 0:h.toString().includes("[native code]"))}));if(o&&l&&!isAngularZonePresent$1())return untaintedBasePrototype$1[e]=t.prototype,t.prototype;try{var c=document.createElement("iframe");document.body.appendChild(c);var u=c.contentWindow;if(!u)return t.prototype;var f=u[e].prototype;return document.body.removeChild(c),f?untaintedBasePrototype$1[e]=f:i}catch{return i}}var untaintedAccessorCache$1={};function getUntaintedAccessor$1(e,t,i){var s,o=e+"."+String(i);if(untaintedAccessorCache$1[o])return untaintedAccessorCache$1[o].call(t);var a=getUntaintedPrototype$1(e),l=(s=Object.getOwnPropertyDescriptor(a,i))==null?void 0:s.get;return l?(untaintedAccessorCache$1[o]=l,l.call(t)):t[i]}var untaintedMethodCache$1={};function getUntaintedMethod$1(e,t,i){var s=e+"."+String(i);if(untaintedMethodCache$1[s])return untaintedMethodCache$1[s].bind(t);var o=getUntaintedPrototype$1(e),a=o[i];return typeof a!="function"?t[i]:(untaintedMethodCache$1[s]=a,a.bind(t))}function childNodes$1(e){return getUntaintedAccessor$1("Node",e,"childNodes")}function parentNode$1(e){return getUntaintedAccessor$1("Node",e,"parentNode")}function parentElement$1(e){return getUntaintedAccessor$1("Node",e,"parentElement")}function textContent$1(e){return getUntaintedAccessor$1("Node",e,"textContent")}function contains$1(e,t){return getUntaintedMethod$1("Node",e,"contains")(t)}function getRootNode$1(e){return getUntaintedMethod$1("Node",e,"getRootNode")()}function host$1(e){return!e||!("host"in e)?null:getUntaintedAccessor$1("ShadowRoot",e,"host")}function styleSheets$1(e){return e.styleSheets}function shadowRoot$1(e){return!e||!("shadowRoot"in e)?null:getUntaintedAccessor$1("Element",e,"shadowRoot")}function querySelector$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelector")(t)}function querySelectorAll$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelectorAll")(t)}function mutationObserverCtor$1(){return getUntaintedPrototype$1("MutationObserver").constructor}var index$1={childNodes:childNodes$1,parentNode:parentNode$1,parentElement:parentElement$1,textContent:textContent$1,contains:contains$1,getRootNode:getRootNode$1,host:host$1,styleSheets:styleSheets$1,shadowRoot:shadowRoot$1,querySelector:querySelector$1,querySelectorAll:querySelectorAll$1,mutationObserver:mutationObserverCtor$1};function isElement(e){return e.nodeType===e.ELEMENT_NODE}function isShadowRoot(e){var t=e&&"host"in e&&"mode"in e&&index$1.host(e)||null;return!!(t&&"shadowRoot"in t&&index$1.shadowRoot(t)===e)}function isNativeShadowDom(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fixBrowserCompatibilityIssuesInCSS(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function escapeImportStatement(e){var t=e.cssText;if(t.split('"').length<3)return t;var i=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?i.push("layer"):e.layerName&&i.push("layer("+e.layerName+")"),e.supportsText&&i.push("supports("+e.supportsText+")"),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function stringifyStylesheet(e){try{var t=e.rules||e.cssRules;if(!t)return null;var i=e.href;!i&&e.ownerNode&&e.ownerNode.ownerDocument&&(i=e.ownerNode.ownerDocument.location.href);var s=Array.from(t,function(o){return stringifyRule(o,i)}).join("");return fixBrowserCompatibilityIssuesInCSS(s)}catch{return null}}function stringifyRule(e,t){if(isCSSImportRule(e)){var i;try{i=stringifyStylesheet(e.styleSheet)||escapeImportStatement(e)}catch{i=e.cssText}return e.styleSheet.href?absolutifyURLs(i,e.styleSheet.href):i}else{var s=e.cssText;return isCSSStyleRule(e)&&e.selectorText.includes(":")&&(s=fixSafariColons(s)),t?absolutifyURLs(s,t):s}}function fixSafariColons(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function isCSSImportRule(e){return"styleSheet"in e}function isCSSStyleRule(e){return"selectorText"in e}var Mirror=function(){function e(){__publicField$1(this,"idNodeMap",new Map),__publicField$1(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(s){var o;if(!s)return-1;var a=(o=this.getMeta(s))==null?void 0:o.id;return a??-1},t.getNode=function(s){return this.idNodeMap.get(s)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(s){return this.nodeMetaMap.get(s)||null},t.removeNodeFromMap=function(s){var o=this,a=this.getId(s);this.idNodeMap.delete(a),s.childNodes&&s.childNodes.forEach(function(l){return o.removeNodeFromMap(l)})},t.has=function(s){return this.idNodeMap.has(s)},t.hasNode=function(s){return this.nodeMetaMap.has(s)},t.add=function(s,o){var a=o.id;this.idNodeMap.set(a,s),this.nodeMetaMap.set(s,o)},t.replace=function(s,o){var a=this.getNode(s);if(a){var l=this.nodeMetaMap.get(a);l&&this.nodeMetaMap.set(o,l)}this.idNodeMap.set(s,o)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function createMirror$2(){return new Mirror}function maskInputValue(e){var t=e.element,i=e.maskInputOptions,s=e.tagName,o=e.type,a=e.value,l=e.maskInputFn,c=a||"",u=o&&toLowerCase(o);return(i[s.toLowerCase()]||u&&i[u])&&(l?c=l(c,t):c="*".repeat(c.length)),c}function toLowerCase(e){return e.toLowerCase()}var ORIGINAL_ATTRIBUTE_NAME="__rrweb_original__";function is2DCanvasBlank(e){var t=e.getContext("2d");if(!t)return!0;for(var i=50,s=0;s<e.width;s+=i)for(var o=0;o<e.height;o+=i){var a=t.getImageData,l=ORIGINAL_ATTRIBUTE_NAME in a?a[ORIGINAL_ATTRIBUTE_NAME]:a,c=new Uint32Array(l.call(t,s,o,Math.min(i,e.width-s),Math.min(i,e.height-o)).data.buffer);if(c.some(function(u){return u!==0}))return!1}return!0}function getInputType(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?toLowerCase(t):null}function extractFileExtension(e,t){var i;try{i=new URL(e,t??window.location.href)}catch{return null}var s=/\.([0-9a-z]+)(?:$)/i,o=i.pathname.match(s),a;return(a=o==null?void 0:o[1])!=null?a:null}function extractOrigin(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var URL_IN_CSS_REF=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,URL_PROTOCOL_MATCH=/^(?:[a-z+]+:)?\/\//i,URL_WWW_MATCH=/^www\..*/i,DATA_URI=/^(data:)([^,]*),(.*)/i;function absolutifyURLs(e,t){return(e||"").replace(URL_IN_CSS_REF,function(i,s,o,a,l,c){var u=o||l||c,f=s||a||"";if(!u)return i;if(URL_PROTOCOL_MATCH.test(u)||URL_WWW_MATCH.test(u)||DATA_URI.test(u))return"url("+f+u+f+")";if(u[0]==="/")return"url("+f+(extractOrigin(t)+u)+f+")";var d=t.split("/"),h=u.split("/");d.pop();for(var p=_create_for_of_iterator_helper_loose(h),m;!(m=p()).done;){var g=m.value;g!=="."&&(g===".."?d.pop():d.push(g))}return"url("+f+d.join("/")+f+")"})}function normalizeCssString(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function splitCssText(e,t){var i=Array.from(t.childNodes),s=[];if(i.length>1&&e&&typeof e=="string"){for(var o=normalizeCssString(e),a=1;a<i.length;a++)if(i[a].textContent&&typeof i[a].textContent=="string")for(var l=normalizeCssString(i[a].textContent),c=3;c<l.length;c++){var u=l.substring(0,c);if(o.split(u).length===2){for(var f=o.indexOf(u),d=f;d<e.length;d++)if(normalizeCssString(e.substring(0,d)).length===f){s.push(e.substring(0,d)),e=e.substring(d);break}break}}}return s.push(e),s}function markCssSplits(e,t){return splitCssText(e,t).join("/* rr_split */")}var _id=1,tagNameRegex=new RegExp("[^a-z0-9-_:]"),IGNORED_NODE=-2;function genId(){return _id++}function getValidTagName$1(e){if(_instanceof(e,HTMLFormElement))return"form";var t=toLowerCase(e.tagName);return tagNameRegex.test(t)?"div":t}var canvasService,canvasCtx,SRCSET_NOT_SPACES=/^[^ \t\n\r\u000c]+/,SRCSET_COMMAS_OR_SPACES=/^[, \t\n\r\u000c]+/;function getAbsoluteSrcsetString(e,t){if(t.trim()==="")return t;var i=0;function s(f){var d,h=f.exec(t.substring(i));return h?(d=h[0],i+=d.length,d):""}for(var o=[];s(SRCSET_COMMAS_OR_SPACES),!(i>=t.length);){var a=s(SRCSET_NOT_SPACES);if(a.slice(-1)===",")a=absoluteToDoc(e,a.substring(0,a.length-1)),o.push(a);else{var l="";a=absoluteToDoc(e,a);for(var c=!1;;){var u=t.charAt(i);if(u===""){o.push((a+l).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){i+=1,o.push((a+l).trim());break}else u==="("&&(c=!0);l+=u,i+=1}}}return o.join(", ")}var cachedDocument=new WeakMap;function absoluteToDoc(e,t){return!t||t.trim()===""?t:getHref(e,t)}function isSVGElement(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function getHref(e,t){var i=cachedDocument.get(e);if(i||(i=e.createElement("a"),cachedDocument.set(e,i)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return i.setAttribute("href",t),i.href}function transformAttribute(e,t,i,s){return s&&(i==="src"||i==="href"&&!(t==="use"&&s[0]==="#")||i==="xlink:href"&&s[0]!=="#"||i==="background"&&(t==="table"||t==="td"||t==="th")?absoluteToDoc(e,s):i==="srcset"?getAbsoluteSrcsetString(e,s):i==="style"?absolutifyURLs(s,getHref(e)):t==="object"&&i==="data"?absoluteToDoc(e,s):s)}function ignoreAttribute(e,t,i){return(e==="video"||e==="audio")&&t==="autoplay"}function _isBlockedElement(e,t,i){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var s=e.classList.length;s--;){var o=e.classList[s];if(t.test(o))return!0}if(i)return e.matches(i)}catch{}return!1}function classMatchesRegex(e,t,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return i?classMatchesRegex(index$1.parentNode(e),t,i):!1;for(var s=e.classList.length;s--;){var o=e.classList[s];if(t.test(o))return!0}return i?classMatchesRegex(index$1.parentNode(e),t,i):!1}function needMaskingText(e,t,i,s){var o;if(isElement(e)){if(o=e,!index$1.childNodes(o).length)return!1}else{if(index$1.parentElement(e)===null)return!1;o=index$1.parentElement(e)}try{if(typeof t=="string"){if(s){if(o.closest("."+t))return!0}else if(o.classList.contains(t))return!0}else if(classMatchesRegex(o,t,s))return!0;if(i){if(s){if(o.closest(i))return!0}else if(o.matches(i))return!0}}catch{}return!1}function onceIframeLoaded(e,t,i){var s=e.contentWindow;if(s){var o=!1,a;try{a=s.document.readyState}catch{return}if(a!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},i);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function onceStylesheetLoaded(e,t,i){var s=!1,o;try{o=e.sheet}catch{return}if(!o){var a=setTimeout(function(){s||(t(),s=!0)},i);e.addEventListener("load",function(){clearTimeout(a),s=!0,t()})}}function serializeNode(e,t){var i=t.doc,s=t.mirror,o=t.blockClass,a=t.blockSelector,l=t.needsMask,c=t.inlineStylesheet,u=t.maskInputOptions,f=u===void 0?{}:u,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,m=p===void 0?{}:p,g=t.inlineImages,v=t.recordCanvas,b=t.keepIframeSrcFn,y=t.newlyAddedElement,E=y===void 0?!1:y,S=t.cssCaptured,w=S===void 0?!1:S,C=getRootId(i,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:NodeType$3.Document,childNodes:[],compatMode:e.compatMode}:{type:NodeType$3.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType$3.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return serializeElementNode(e,{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:c,maskInputOptions:f,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:E,rootId:C});case e.TEXT_NODE:return serializeTextNode(e,{doc:i,needsMask:l,maskTextFn:d,rootId:C,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:NodeType$3.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:NodeType$3.Comment,textContent:index$1.textContent(e)||"",rootId:C};default:return!1}}function getRootId(e,t){if(t.hasNode(e)){var i=t.getId(e);return i===1?void 0:i}}function serializeTextNode(e,t){var i=t.needsMask,s=t.maskTextFn,o=t.rootId,a=t.cssCaptured,l=index$1.parentNode(e),c=l&&l.tagName,u="",f=c==="STYLE"?!0:void 0,d=c==="SCRIPT"?!0:void 0;return d?u="SCRIPT_PLACEHOLDER":a||(u=index$1.textContent(e),f&&u&&(u=absolutifyURLs(u,getHref(t.doc)))),!f&&!d&&u&&i&&(u=s?s(u,index$1.parentElement(e)):u.replace(/[\S]/g,"*")),{type:NodeType$3.Text,textContent:u||"",rootId:o}}function serializeElementNode(e,t){for(var i=t.doc,s=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,l=t.maskInputOptions,c=l===void 0?{}:l,u=t.maskInputFn,f=t.dataURLOptions,d=f===void 0?{}:f,h=t.inlineImages,p=t.recordCanvas,m=t.keepIframeSrcFn,g=t.newlyAddedElement,v=g===void 0?!1:g,b=t.rootId,y=_isBlockedElement(e,s,o),E=getValidTagName$1(e),S={},w=e.attributes.length,C=0;C<w;C++){var A=e.attributes[C];ignoreAttribute(E,A.name,A.value)||(S[A.name]=transformAttribute(i,E,toLowerCase(A.name),A.value))}if(E==="link"&&a){var O=Array.from(i.styleSheets).find(function(Y){return Y.href===e.href}),I=null;O&&(I=stringifyStylesheet(O)),I&&(delete S.rel,delete S.href,S._cssText=I)}if(E==="style"&&e.sheet){var L=stringifyStylesheet(e.sheet);L&&(e.childNodes.length>1&&(L=markCssSplits(L,e)),S._cssText=L)}if(E==="input"||E==="textarea"||E==="select"){var $=e.value,V=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&$?S.value=maskInputValue({element:e,type:getInputType(e),tagName:E,value:$,maskInputOptions:c,maskInputFn:u}):V&&(S.checked=V)}if(E==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),E==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(e.__context==="2d")is2DCanvasBlank(e)||(S.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var W=e.toDataURL(d.type,d.quality),K=i.createElement("canvas");K.width=e.width,K.height=e.height;var j=K.toDataURL(d.type,d.quality);W!==j&&(S.rr_dataURL=W)}}if(E==="img"&&h){canvasService||(canvasService=i.createElement("canvas"),canvasCtx=canvasService.getContext("2d"));var D=e,M=D.currentSrc||D.getAttribute("src")||"<unknown-src>",k=D.crossOrigin,T=function(){D.removeEventListener("load",T);try{canvasService.width=D.naturalWidth,canvasService.height=D.naturalHeight,canvasCtx.drawImage(D,0,0),S.rr_dataURL=canvasService.toDataURL(d.type,d.quality)}catch(Y){if(D.crossOrigin!=="anonymous"){D.crossOrigin="anonymous",D.complete&&D.naturalWidth!==0?T():D.addEventListener("load",T);return}else console.warn("Cannot inline img src="+M+"! Error: "+Y)}D.crossOrigin==="anonymous"&&(k?S.crossOrigin=k:D.removeAttribute("crossorigin"))};D.complete&&D.naturalWidth!==0?T():D.addEventListener("load",T)}if(E==="audio"||E==="video"){var P=S;P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime,P.rr_mediaPlaybackRate=e.playbackRate,P.rr_mediaMuted=e.muted,P.rr_mediaLoop=e.loop,P.rr_mediaVolume=e.volume}if(v||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),y){var F=e.getBoundingClientRect(),N=F.width,H=F.height;S={class:S.class,rr_width:""+N+"px",rr_height:""+H+"px"}}E==="iframe"&&!m(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);var q;try{customElements.get(E)&&(q=!0)}catch{}return{type:NodeType$3.Element,tagName:E,attributes:S,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:y,rootId:b,isCustom:q}}function lowerIfExists(e){return e==null?"":e.toLowerCase()}function slimDOMExcluded(e,t){if(t.comment&&e.type===NodeType$3.Comment)return!0;if(e.type===NodeType$3.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(lowerIfExists(e.attributes.name).match(/^msapplication-tile(image|color)$/)||lowerIfExists(e.attributes.name)==="application-name"||lowerIfExists(e.attributes.rel)==="icon"||lowerIfExists(e.attributes.rel)==="apple-touch-icon"||lowerIfExists(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&lowerIfExists(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(lowerIfExists(e.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(e.attributes.name).match(/^(og|twitter):/)||lowerIfExists(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(lowerIfExists(e.attributes.name)==="robots"||lowerIfExists(e.attributes.name)==="googlebot"||lowerIfExists(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(lowerIfExists(e.attributes.name)==="author"||lowerIfExists(e.attributes.name)==="generator"||lowerIfExists(e.attributes.name)==="framework"||lowerIfExists(e.attributes.name)==="publisher"||lowerIfExists(e.attributes.name)==="progid"||lowerIfExists(e.attributes.property).match(/^article:/)||lowerIfExists(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(lowerIfExists(e.attributes.name)==="google-site-verification"||lowerIfExists(e.attributes.name)==="yandex-verification"||lowerIfExists(e.attributes.name)==="csrf-token"||lowerIfExists(e.attributes.name)==="p:domain_verify"||lowerIfExists(e.attributes.name)==="verify-v1"||lowerIfExists(e.attributes.name)==="verification"||lowerIfExists(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function serializeNodeWithId(e,t){var i=t.doc,s=t.mirror,o=t.blockClass,a=t.blockSelector,l=t.maskTextClass,c=t.maskTextSelector,u=t.skipChild,f=u===void 0?!1:u,d=t.inlineStylesheet,h=d===void 0?!0:d,p=t.maskInputOptions,m=p===void 0?{}:p,g=t.maskTextFn,v=t.maskInputFn,b=t.slimDOMOptions,y=t.dataURLOptions,E=y===void 0?{}:y,S=t.inlineImages,w=S===void 0?!1:S,C=t.recordCanvas,A=C===void 0?!1:C,O=t.onSerialize,I=t.onIframeLoad,L=t.iframeLoadTimeout,$=L===void 0?5e3:L,V=t.onStylesheetLoad,W=t.stylesheetLoadTimeout,K=W===void 0?5e3:W,j=t.keepIframeSrcFn,D=j===void 0?function(){return!1}:j,M=t.newlyAddedElement,k=M===void 0?!1:M,T=t.cssCaptured,P=T===void 0?!1:T,F=t.needsMask,N=t.preserveWhiteSpace,H=N===void 0?!0:N;if(!F){var q=F===void 0;F=needMaskingText(e,l,c,q)}var Y=serializeNode(e,{doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,dataURLOptions:E,inlineImages:w,recordCanvas:A,keepIframeSrcFn:D,newlyAddedElement:k,cssCaptured:P});if(!Y)return console.warn(e,"not serialized"),null;var Q;s.hasNode(e)?Q=s.getId(e):slimDOMExcluded(Y,b)||!H&&Y.type===NodeType$3.Text&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?Q=IGNORED_NODE:Q=genId();var re=Object.assign(Y,{id:Q});if(s.add(e,re),Q===IGNORED_NODE)return null;O&&O(e);var ee=!f;if(re.type===NodeType$3.Element){ee=ee&&!re.needBlock,delete re.needBlock;var z=index$1.shadowRoot(e);z&&isNativeShadowDom(z)&&(re.isShadowHost=!0)}if((re.type===NodeType$3.Document||re.type===NodeType$3.Element)&&ee){b.headWhitespace&&re.type===NodeType$3.Element&&re.tagName==="head"&&(H=!1);var J={doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:f,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D,cssCaptured:!1};if(!(re.type===NodeType$3.Element&&re.tagName==="textarea"&&re.attributes.value!==void 0)){re.type===NodeType$3.Element&&re.attributes._cssText!==void 0&&typeof re.attributes._cssText=="string"&&(J.cssCaptured=!0);for(var te=_create_for_of_iterator_helper_loose(Array.from(index$1.childNodes(e))),X;!(X=te()).done;){var se=X.value,ie=serializeNodeWithId(se,J);ie&&re.childNodes.push(ie)}}var ne=null;if(isElement(e)&&(ne=index$1.shadowRoot(e)))for(var pe=_create_for_of_iterator_helper_loose(Array.from(index$1.childNodes(ne))),_e;!(_e=pe()).done;){var ye=_e.value,Ae=serializeNodeWithId(ye,J);Ae&&(isNativeShadowDom(ne)&&(Ae.isShadow=!0),re.childNodes.push(Ae))}}var xe=index$1.parentNode(e);return xe&&isShadowRoot(xe)&&isNativeShadowDom(xe)&&(re.isShadow=!0),re.type===NodeType$3.Element&&re.tagName==="iframe"&&onceIframeLoaded(e,function(){var ae=e.contentDocument;if(ae&&I){var me=serializeNodeWithId(ae,{doc:ae,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D});me&&I(e,me)}},$),re.type===NodeType$3.Element&&re.tagName==="link"&&typeof re.attributes.rel=="string"&&(re.attributes.rel==="stylesheet"||re.attributes.rel==="preload"&&typeof re.attributes.href=="string"&&extractFileExtension(re.attributes.href)==="css")&&onceStylesheetLoaded(e,function(){if(V){var ae=serializeNodeWithId(e,{doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:F,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:A,preserveWhiteSpace:H,onSerialize:O,onIframeLoad:I,iframeLoadTimeout:$,onStylesheetLoad:V,stylesheetLoadTimeout:K,keepIframeSrcFn:D});ae&&V(e,ae)}},K),re}function snapshot(e,t){var i=t,s=i.mirror,o=s===void 0?new Mirror:s,a=i.blockClass,l=a===void 0?"rr-block":a,c=i.blockSelector,u=c===void 0?null:c,f=i.maskTextClass,d=f===void 0?"rr-mask":f,h=i.maskTextSelector,p=h===void 0?null:h,m=i.inlineStylesheet,g=m===void 0?!0:m,v=i.inlineImages,b=v===void 0?!1:v,y=i.recordCanvas,E=y===void 0?!1:y,S=i.maskAllInputs,w=S===void 0?!1:S,C=i.maskTextFn,A=i.maskInputFn,O=i.slimDOM,I=O===void 0?!1:O,L=i.dataURLOptions,$=i.preserveWhiteSpace,V=i.onSerialize,W=i.onIframeLoad,K=i.iframeLoadTimeout,j=i.onStylesheetLoad,D=i.stylesheetLoadTimeout,M=i.keepIframeSrcFn,k=M===void 0?function(){return!1}:M,T=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,P=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return serializeNodeWithId(e,{doc:e,mirror:o,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:g,maskInputOptions:T,maskTextFn:C,maskInputFn:A,slimDOMOptions:P,dataURLOptions:L,inlineImages:b,recordCanvas:E,preserveWhiteSpace:$,onSerialize:V,onIframeLoad:W,iframeLoadTimeout:K,onStylesheetLoad:j,stylesheetLoadTimeout:D,keepIframeSrcFn:k,newlyAddedElement:!1})}function getDefaultExportFromCjs$1(e){return e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace$1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var i=function s(){return _instanceof(this,s)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(i,s,o.get?o:{enumerable:!0,get:function(){return e[s]}})}),i}var picocolors_browser$1={exports:{}},x$1=String,create$1=function e(){return{isColorSupported:!1,reset:x$1,bold:x$1,dim:x$1,italic:x$1,underline:x$1,inverse:x$1,hidden:x$1,strikethrough:x$1,black:x$1,red:x$1,green:x$1,yellow:x$1,blue:x$1,magenta:x$1,cyan:x$1,white:x$1,gray:x$1,bgBlack:x$1,bgRed:x$1,bgGreen:x$1,bgYellow:x$1,bgBlue:x$1,bgMagenta:x$1,bgCyan:x$1,bgWhite:x$1}};picocolors_browser$1.exports=create$1(),picocolors_browser$1.exports.createColors=create$1;var picocolors_browserExports$1=picocolors_browser$1.exports,__viteBrowserExternal$2={},__viteBrowserExternal$1$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal$2},Symbol.toStringTag,{value:"Module"})),require$$2$1=getAugmentedNamespace$1(__viteBrowserExternal$1$1),pico$1=picocolors_browserExports$1,terminalHighlight$1$1=require$$2$1,CssSyntaxError$3$1=function(e){_inherits(t,e);function t(s,o,a,l,c,u){var f;return f=e.call(this,s)||this,f.name="CssSyntaxError",f.reason=s,c&&(f.file=c),l&&(f.source=l),u&&(f.plugin=u),typeof o<"u"&&typeof a<"u"&&(typeof o=="number"?(f.line=o,f.column=a):(f.line=o.line,f.column=o.column,f.endLine=a.line,f.endColumn=a.column)),f.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(f,t),f}var i=t.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(o){var a=this;if(!this.source)return"";var l=this.source;o==null&&(o=pico$1.isColorSupported),terminalHighlight$1$1&&o&&(l=terminalHighlight$1$1(l));var c=l.split(/\r?\n/),u=Math.max(this.line-3,0),f=Math.min(this.line+2,c.length),d=String(f).length,h,p;if(o){var m=pico$1.createColors(!0),g=m.bold,v=m.gray,b=m.red;h=function(y){return g(b(y))},p=function(y){return v(y)}}else h=p=function(y){return y};return c.slice(u,f).map(function(y,E){var S=u+1+E,w=" "+(" "+S).slice(-d)+" | ";if(S===a.line){var C=p(w.replace(/\d/g," "))+y.slice(0,a.column-1).replace(/[^\t]/g," ");return h(">")+p(w)+y+`
102
102
  `+C+h("^")}return" "+p(w)+y}).join(`
103
103
  `)},i.toString=function(){var o=this.showSourceCode();return o&&(o=`
104
104
 
@@ -159,7 +159,7 @@ or you can use record.mirror to access the mirror instance during recording.`,_m
159
159
  `);var t="",i,s,o=0,a;for(i=s=0,o=e.length,a=0;a<o;a++){var l=e.charCodeAt(a),c=null;l<128?s++:l>127&&l<2048?c=String.fromCharCode(l>>6|192,l&63|128):c=String.fromCharCode(l>>12|224,l>>6&63|128,l&63|128),c!==null&&(s>i&&(t+=e.substring(i,s)),t+=c,i=s=a+1)}return s>i&&(t+=e.substring(i,e.length)),t},_.UUID=function(){try{return win.crypto.randomUUID()}catch{for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",_.map(e,function(s){return s.toString(16)}).join("")}};var BLOCKED_UA_STRS=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];_.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<BLOCKED_UA_STRS.length;t++)if(e.indexOf(BLOCKED_UA_STRS[t])!==-1)return!0;return!1},_.HTTPBuildQuery=function(e,t){var i,s,o=[];return _.isUndefined(t)&&(t="&"),_.each(e,function(a,l){i=encodeURIComponent(a.toString()),s=encodeURIComponent(l),o[o.length]=s+"="+i}),o.join(t)},_.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var i="[\\?&]"+t+"=([^&#]*)",s=new RegExp(i),o=s.exec(e);if(o===null||o&&typeof o[1]!="string"&&o[1].length)return"";var a=o[1];try{a=decodeURIComponent(a)}catch{console$1.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},_.cookie={get:function(e){for(var t=e+"=",i=document$1.cookie.split(";"),s=0;s<i.length;s++){for(var o=i[s];o.charAt(0)==" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return decodeURIComponent(o.substring(t.length,o.length))}return null},parse:function(e){var t;try{t=_.JSONDecode(_.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,i,s,o,a,l){var c="",u="",f="";if(l)c="; domain="+l;else if(s){var d=extract_domain(document$1.location.hostname);c=d?"; domain=."+d:""}if(i){var h=new Date;h.setTime(h.getTime()+i*1e3),u="; expires="+h.toGMTString()}a&&(o=!0,f="; SameSite=None"),o&&(f+="; secure"),document$1.cookie=e+"="+encodeURIComponent(t)+u+"; path=/"+c+f},set:function(e,t,i,s,o,a,l){var c="",u="",f="";if(l)c="; domain="+l;else if(s){var d=extract_domain(document$1.location.hostname);c=d?"; domain=."+d:""}if(i){var h=new Date;h.setTime(h.getTime()+i*24*60*60*1e3),u="; expires="+h.toGMTString()}a&&(o=!0,f="; SameSite=None"),o&&(f+="; secure");var p=e+"="+encodeURIComponent(t)+u+"; path=/"+c+f;return document$1.cookie=p,p},remove:function(e,t,i){_.cookie.set(e,"",-1,t,!1,!1,i)}};var _testStorageSupported=function(e){var t=!0;try{var i="__mplss_"+cheap_guid(8),s="xyz";e.setItem(i,s),e.getItem(i)!==s&&(t=!1),e.removeItem(i)}catch{t=!1}return t},_localStorageSupported=null,localStorageSupported=function(e,t){return _localStorageSupported!==null&&!t?_localStorageSupported:_localStorageSupported=_testStorageSupported(e||win.localStorage)},_sessionStorageSupported=null,sessionStorageSupported=function(e,t){return _sessionStorageSupported!==null&&!t?_sessionStorageSupported:_sessionStorageSupported=_testStorageSupported(e||win.sessionStorage)};function _storageWrapper(e,t,i){var s=function(o){console$1.error(t+" error: "+o)};return{is_supported:function(o){var a=i(e,o);return a||console$1.error(t+" unsupported"),a},error:s,get:function(o){try{return e.getItem(o)}catch(a){s(a)}return null},parse:function(o){try{return _.JSONDecode(e.getItem(o))||{}}catch{}return null},set:function(o,a){try{e.setItem(o,a)}catch(l){s(l)}},remove:function(o){try{e.removeItem(o)}catch(a){s(a)}}}}_.localStorage=_storageWrapper(win.localStorage,"localStorage",localStorageSupported),_.sessionStorage=_storageWrapper(win.sessionStorage,"sessionStorage",sessionStorageSupported),_.register_event=function(){var e=function(s,o,a,l,c){if(!s){console$1.error("No valid element provided to register_event");return}if(s.addEventListener&&!l)s.addEventListener(o,a,!!c);else{var u="on"+o,f=s[u];s[u]=t(s,a,f)}};function t(s,o,a){var l=function(c){if(c=c||i(win.event),!!c){var u=!0,f,d;return _.isFunction(a)&&(f=a(c)),d=o.call(s,c),(f===!1||d===!1)&&(u=!1),u}};return l}function i(s){return s&&(s.preventDefault=i.preventDefault,s.stopPropagation=i.stopPropagation),s}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},e}();var TOKEN_MATCH_REGEX=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');_.dom_query=function(){function e(o){return o.all?o.all:o.getElementsByTagName("*")}var t=/[\t\r\n]/g;function i(o,a){var l=" "+a+" ";return(" "+o.className+" ").replace(t," ").indexOf(l)>=0}function s(o){if(!document$1.getElementsByTagName)return[];var a=o.split(" "),l,c,u,f,d,h,p,m,g,v,b=[document$1];for(h=0;h<a.length;h++){if(l=a[h].replace(/^\s+/,"").replace(/\s+$/,""),l.indexOf("#")>-1){c=l.split("#"),u=c[0];var y=c[1],E=document$1.getElementById(y);if(!E||u&&E.nodeName.toLowerCase()!=u)return[];b=[E];continue}if(l.indexOf(".")>-1){c=l.split("."),u=c[0];var S=c[1];for(u||(u="*"),f=[],d=0,p=0;p<b.length;p++)for(u=="*"?g=e(b[p]):g=b[p].getElementsByTagName(u),m=0;m<g.length;m++)f[d++]=g[m];for(b=[],v=0,p=0;p<f.length;p++)f[p].className&&_.isString(f[p].className)&&i(f[p],S)&&(b[v++]=f[p]);continue}var w=l.match(TOKEN_MATCH_REGEX);if(w){u=w[1];var C=w[2],A=w[3],O=w[4];for(u||(u="*"),f=[],d=0,p=0;p<b.length;p++)for(u=="*"?g=e(b[p]):g=b[p].getElementsByTagName(u),m=0;m<g.length;m++)f[d++]=g[m];b=[],v=0;var I;switch(A){case"=":I=function(L){return L.getAttribute(C)==O};break;case"~":I=function(L){return L.getAttribute(C).match(new RegExp("\\b"+O+"\\b"))};break;case"|":I=function(L){return L.getAttribute(C).match(new RegExp("^"+O+"-?"))};break;case"^":I=function(L){return L.getAttribute(C).indexOf(O)===0};break;case"$":I=function(L){return L.getAttribute(C).lastIndexOf(O)==L.getAttribute(C).length-O.length};break;case"*":I=function(L){return L.getAttribute(C).indexOf(O)>-1};break;default:I=function(L){return L.getAttribute(C)}}for(b=[],v=0,p=0;p<f.length;p++)I(f[p])&&(b[v++]=f[p]);continue}for(u=l,f=[],d=0,p=0;p<b.length;p++)for(g=b[p].getElementsByTagName(u),m=0;m<g.length;m++)f[d++]=g[m];b=f}return b}return function(o){return _.isElement(o)?[o]:_.isObject(o)&&!_.isUndefined(o.length)?o:s.call(this,o)}}();var CAMPAIGN_KEYWORDS=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],CLICK_IDS=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];_.info={campaignParams:function(e){var t="",i={};return _.each(CAMPAIGN_KEYWORDS,function(s){t=_.getQueryParam(document$1.URL,s),t.length?i[s]=t:e!==void 0&&(i[s]=e)}),i},clickParams:function(){var e="",t={};return _.each(CLICK_IDS,function(i){e=_.getQueryParam(document$1.URL,i),e.length&&(t[i]=e)}),t},marketingParams:function(){return _.extend(_.info.campaignParams(),_.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=_.info.searchEngine(e),i=t!="yahoo"?"q":"p",s={};if(t!==null){s.$search_engine=t;var o=_.getQueryParam(e,i);o.length&&(s.mp_keyword=o)}return s},browser:function(e,t,i){return t=t||"",i||_.includes(e," OPR/")?_.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":_.includes(e,"IEMobile")||_.includes(e,"WPDesktop")?"Internet Explorer Mobile":_.includes(e,"SamsungBrowser/")?"Samsung Internet":_.includes(e,"Edge")||_.includes(e,"Edg/")?"Microsoft Edge":_.includes(e,"FBIOS")?"Facebook Mobile":_.includes(e,"Whale/")?"Whale Browser":_.includes(e,"Chrome")?"Chrome":_.includes(e,"CriOS")?"Chrome iOS":_.includes(e,"UCWEB")||_.includes(e,"UCBrowser")?"UC Browser":_.includes(e,"FxiOS")?"Firefox iOS":_.includes(t,"Apple")?_.includes(e,"Mobile")?"Mobile Safari":"Safari":_.includes(e,"Android")?"Android Mobile":_.includes(e,"Konqueror")?"Konqueror":_.includes(e,"Firefox")?"Firefox":_.includes(e,"MSIE")||_.includes(e,"Trident/")?"Internet Explorer":_.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,i){var s=_.info.browser(e,t,i),o={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},a=o[s];if(a===void 0)return null;var l=e.match(a);return l?parseFloat(l[l.length-2]):null},os:function(){var e=userAgent;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return win.location.href},properties:function(e){return typeof e!="object"&&(e={}),_.extend(_.strip_empty_properties({$os:_.info.os(),$browser:_.info.browser(userAgent,navigator$1.vendor,windowOpera),$referrer:document$1.referrer,$referring_domain:_.info.referringDomain(document$1.referrer),$device:_.info.device(userAgent)}),{$current_url:_.info.currentUrl(),$browser_version:_.info.browserVersion(userAgent,navigator$1.vendor,windowOpera),$screen_height:screen.height,$screen_width:screen.width,mp_lib:"web",$lib_version:Config.LIB_VERSION,$insert_id:cheap_guid(),time:_.timestamp()/1e3},_.strip_empty_properties(e))},people_properties:function(){return _.extend(_.strip_empty_properties({$os:_.info.os(),$browser:_.info.browser(userAgent,navigator$1.vendor,windowOpera)}),{$browser_version:_.info.browserVersion(userAgent,navigator$1.vendor,windowOpera)})},mpPageViewProperties:function(){return _.strip_empty_properties({current_page_title:document$1.title,current_domain:win.location.hostname,current_url_path:win.location.pathname,current_url_protocol:win.location.protocol,current_url_search:win.location.search})}};var batchedThrottle=function(e,t){var i=null,s=[];return function(o){var a=this;return s.push(o),i||(i=new PromisePolyfill(function(l){setTimeout(function(){var c=e.apply(a,[s]);i=null,s=[],l(c)},t)})),i}},cheap_guid=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,extract_domain=function(e){var t=DOMAIN_MATCH_REGEX,i=e.split("."),s=i[i.length-1];(s.length>4||s==="com"||s==="org")&&(t=SIMPLE_DOMAIN_MATCH_REGEX);var o=e.match(t);return o?o[0]:""},isOnline=function(){var e=win.navigator.onLine;return _.isUndefined(e)||e},NOOP_FUNC=function(){},JSONStringify=null,JSONParse=null;typeof JSON<"u"&&(JSONStringify=JSON.stringify,JSONParse=JSON.parse),JSONStringify=JSONStringify||_.JSONEncode,JSONParse=JSONParse||_.JSONDecode,_.info=_.info,_.info.browser=_.info.browser,_.info.browserVersion=_.info.browserVersion,_.info.device=_.info.device,_.info.properties=_.info.properties,_.isBlockedUA=_.isBlockedUA,_.isEmptyObject=_.isEmptyObject,_.isObject=_.isObject,_.JSONDecode=_.JSONDecode,_.JSONEncode=_.JSONEncode,_.toArray=_.toArray,_.NPO=NpoPromise;var MIXPANEL_DB_NAME="mixpanelBrowserDb",RECORDING_EVENTS_STORE_NAME="mixpanelRecordingEvents",RECORDING_REGISTRY_STORE_NAME="mixpanelRecordingRegistry",DB_VERSION=1,OBJECT_STORES=[RECORDING_EVENTS_STORE_NAME,RECORDING_REGISTRY_STORE_NAME],IDBStorageWrapper=function(e){this.dbPromise=null,this.storeName=e};IDBStorageWrapper.prototype._openDb=function(){return new PromisePolyfill(function(e,t){var i=win.indexedDB.open(MIXPANEL_DB_NAME,DB_VERSION);i.onerror=function(){t(i.error)},i.onsuccess=function(){e(i.result)},i.onupgradeneeded=function(s){var o=s.target.result;OBJECT_STORES.forEach(function(a){o.createObjectStore(a)})}})},IDBStorageWrapper.prototype.init=function(){return win.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof win.IDBDatabase?PromisePolyfill.resolve():PromisePolyfill.reject(e)})):PromisePolyfill.reject("indexedDB is not supported in this browser")},IDBStorageWrapper.prototype.makeTransaction=function(e,t){var i=this.storeName,s=function(o){return new PromisePolyfill(function(a,l){var c=o.transaction(i,e);c.oncomplete=function(){a(c)},c.onabort=c.onerror=function(){l(c.error)},t(c.objectStore(i))})};return this.dbPromise.then(s).catch((function(o){return o&&o.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(s)):PromisePolyfill.reject(o)}).bind(this))},IDBStorageWrapper.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(i){i.put(t,e)})},IDBStorageWrapper.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(i){t=i.get(e)}).then(function(){return t.result})},IDBStorageWrapper.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},IDBStorageWrapper.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};var GDPR_DEFAULT_PERSISTENCE_PREFIX="__mp_opt_in_out_";function optIn(e,t){_optInOut(!0,e,t)}function optOut(e,t){_optInOut(!1,e,t)}function hasOptedIn(e,t){return _getStorageValue(e,t)==="1"}function hasOptedOut(e,t){if(_hasDoNotTrackFlagOn(t))return console$1.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var i=_getStorageValue(e,t)==="0";return i&&console$1.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function addOptOutCheckMixpanelLib(e){return _addOptOutCheck(e,function(t){return this.get_config(t)})}function addOptOutCheckMixpanelPeople(e){return _addOptOutCheck(e,function(t){return this._get_config(t)})}function addOptOutCheckMixpanelGroup(e){return _addOptOutCheck(e,function(t){return this._get_config(t)})}function clearOptInOut(e,t){t=t||{},_getStorage(t).remove(_getStorageKey(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _getStorage(e){return e=e||{},e.persistenceType==="localStorage"?_.localStorage:_.cookie}function _getStorageKey(e,t){return t=t||{},(t.persistencePrefix||GDPR_DEFAULT_PERSISTENCE_PREFIX)+e}function _getStorageValue(e,t){return _getStorage(t).get(_getStorageKey(e,t))}function _hasDoNotTrackFlagOn(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||win,i=t.navigator||{},s=!1;return _.each([i.doNotTrack,i.msDoNotTrack,t.doNotTrack],function(o){_.includes([!0,1,"1","yes"],o)&&(s=!0)}),s}function _optInOut(e,t,i){if(!_.isString(t)||!t.length){console$1.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}i=i||{},_getStorage(i).set(_getStorageKey(t,i),e?1:0,_.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&e&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})}function _addOptOutCheck(e,t){return function(){var i=!1;try{var s=t.call(this,"token"),o=t.call(this,"ignore_dnt"),a=t.call(this,"opt_out_tracking_persistence_type"),l=t.call(this,"opt_out_tracking_cookie_prefix"),c=t.call(this,"window");s&&(i=hasOptedOut(s,{ignoreDnt:o,persistenceType:a,persistencePrefix:l,window:c}))}catch(f){console$1.error("Unexpected error when checking tracking opt-out status: "+f)}if(!i)return e.apply(this,arguments);var u=arguments[arguments.length-1];typeof u=="function"&&u(0)}}var logger$6=console_with_prefix("lock"),SharedLock=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||win.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||PromisePolyfill};SharedLock.prototype.withLock=function(e,t){var i=this.promiseImpl;return new i(_.bind(function(s,o){var a=t||new Date().getTime()+"|"+Math.random(),l=new Date().getTime(),c=this.storageKey,u=this.pollIntervalMS,f=this.timeoutMS,d=this.storage,h=c+":X",p=c+":Y",m=c+":Z",g=function(S){if(new Date().getTime()-l>f){logger$6.error("Timeout waiting for mutex on "+c+"; clearing lock. ["+a+"]"),d.removeItem(m),d.removeItem(p),y();return}setTimeout(function(){try{S()}catch(w){o(w)}},u*(Math.random()+.1))},v=function(S,w){S()?w():g(function(){v(S,w)})},b=function(){var S=d.getItem(p);return S&&S!==a?!1:(d.setItem(p,a),d.getItem(p)===a?!0:(localStorageSupported(d,!0)||o(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){d.setItem(h,a),v(b,function(){if(d.getItem(h)===a){E();return}g(function(){if(d.getItem(p)!==a){y();return}v(function(){return!d.getItem(m)},E)})})},E=function(){d.setItem(m,"1");var S=function(){d.removeItem(m),d.getItem(p)===a&&d.removeItem(p),d.getItem(h)===a&&d.removeItem(h)};e().then(function(w){S(),s(w)}).catch(function(w){S(),o(w)})};try{if(localStorageSupported(d,!0))y();else throw new Error("localStorage support check failed")}catch(S){o(S)}},this))};var LocalStorageWrapper=function(e){this.storage=e||win.localStorage};LocalStorageWrapper.prototype.init=function(){return PromisePolyfill.resolve()},LocalStorageWrapper.prototype.setItem=function(e,t){return new PromisePolyfill(_.bind(function(i,s){try{this.storage.setItem(e,JSONStringify(t))}catch(o){s(o)}i()},this))},LocalStorageWrapper.prototype.getItem=function(e){return new PromisePolyfill(_.bind(function(t,i){var s;try{s=JSONParse(this.storage.getItem(e))}catch(o){i(o)}t(s)},this))},LocalStorageWrapper.prototype.removeItem=function(e){return new PromisePolyfill(_.bind(function(t,i){try{this.storage.removeItem(e)}catch(s){i(s)}t()},this))};var logger$5=console_with_prefix("batch"),RequestQueue=function(e,t){t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new LocalStorageWrapper,this.lock=new SharedLock(e,{storage:t.sharedLockStorage||win.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||_.bind(logger$5.error,logger$5),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=batchedThrottle(_.bind(this._enqueuePersisted,this),t.enqueueThrottleMs):this.enqueuePersisted=_.bind(function(i){return this._enqueuePersisted([i])},this)};RequestQueue.prototype.ensureInit=function(){return this.initialized?PromisePolyfill.resolve():this.queueStorage.init().then(_.bind(function(){this.initialized=!0},this)).catch(_.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},RequestQueue.prototype.enqueue=function(e,t){var i={id:cheap_guid(),flushAfter:new Date().getTime()+t*2,payload:e};return this.usePersistence?this.enqueuePersisted(i):(this.memQueue.push(i),PromisePolyfill.resolve(!0))},RequestQueue.prototype._enqueuePersisted=function(e){var t=_.bind(function(){return this.ensureInit().then(_.bind(function(){return this.readFromStorage()},this)).then(_.bind(function(i){return this.saveToStorage(i.concat(e))},this)).then(_.bind(function(i){return i&&(this.memQueue=this.memQueue.concat(e)),i},this)).catch(_.bind(function(i){return this.reportError("Error enqueueing items",i,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(_.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))},RequestQueue.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(_.bind(function(){return this.readFromStorage()},this)).then(_.bind(function(i){if(i.length){var s={};_.each(t,function(l){s[l.id]=!0});for(var o=0;o<i.length;o++){var a=i[o];if(new Date().getTime()>a.flushAfter&&!s[a.id]&&(a.orphaned=!0,t.push(a),t.length>=e))break}}return t},this)):PromisePolyfill.resolve(t)};var filterOutIDsAndInvalid=function(e,t){var i=[];return _.each(e,function(s){s.id&&!t[s.id]&&i.push(s)}),i};RequestQueue.prototype.removeItemsByID=function(e){var t={};if(_.each(e,function(s){t[s]=!0}),this.memQueue=filterOutIDsAndInvalid(this.memQueue,t),this.usePersistence){var i=_.bind(function(){return this.ensureInit().then(_.bind(function(){return this.readFromStorage()},this)).then(_.bind(function(s){return s=filterOutIDsAndInvalid(s,t),this.saveToStorage(s)},this)).then(_.bind(function(){return this.readFromStorage()},this)).then(_.bind(function(s){for(var o=0;o<s.length;o++){var a=s[o];if(a.id&&t[a.id])throw new Error("Item not removed from storage")}return!0},this)).catch(_.bind(function(s){return this.reportError("Error removing items",s,e),!1},this))},this);return this.lock.withLock(i,this.pid).catch(_.bind(function(s){return this.reportError("Error acquiring storage lock",s),localStorageSupported(this.lock.storage,!0)?!1:i().then(_.bind(function(o){return o||this.queueStorage.removeItem(this.storageKey).then(function(){return o})},this)).catch(_.bind(function(o){return this.reportError("Error clearing queue",o),!1},this))},this))}else return PromisePolyfill.resolve(!0)};var updatePayloads=function(e,t){var i=[];return _.each(e,function(s){var o=s.id;if(o in t){var a=t[o];a!==null&&(s.payload=a,i.push(s))}else i.push(s)}),i};RequestQueue.prototype.updatePayloads=function(e){return this.memQueue=updatePayloads(this.memQueue,e),this.usePersistence?this.lock.withLock(_.bind(function(){return this.ensureInit().then(_.bind(function(){return this.readFromStorage()},this)).then(_.bind(function(i){return i=updatePayloads(i,e),this.saveToStorage(i)},this)).catch(_.bind(function(i){return this.reportError("Error updating items",e,i),!1},this))},this),this.pid).catch(_.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this)):PromisePolyfill.resolve(!0)},RequestQueue.prototype.readFromStorage=function(){return this.ensureInit().then(_.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(_.bind(function(e){return e&&(_.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(_.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))},RequestQueue.prototype.saveToStorage=function(e){return this.ensureInit().then(_.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(_.bind(function(t){return this.reportError("Error saving queue",t),!1},this))},RequestQueue.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(_.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):PromisePolyfill.resolve()};var MAX_RETRY_INTERVAL_MS=10*60*1e3,logger$4=console_with_prefix("batch"),RequestBatcher=function(e,t){this.errorReporter=t.errorReporter,this.queue=new RequestQueue(e,{errorReporter:_.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};RequestBatcher.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)},RequestBatcher.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},RequestBatcher.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},RequestBatcher.prototype.clear=function(){return this.queue.clear()},RequestBatcher.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},RequestBatcher.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},RequestBatcher.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(_.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},RequestBatcher.prototype.sendRequestPromise=function(e,t){return new PromisePolyfill(_.bind(function(i){this.sendRequest(e,t,i)},this))},RequestBatcher.prototype.flush=function(e){if(this.requestInProgress)return logger$4.log("Flush: Request already in progress"),PromisePolyfill.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,i=new Date().getTime(),s=this.batchSize;return this.queue.fillBatch(s).then(_.bind(function(o){var a=o.length===s,l=[],c={};if(_.each(o,function(h){var p=h.payload;if(this.beforeSendHook&&!h.orphaned&&(p=this.beforeSendHook(p)),p){p.event&&p.properties&&(p.properties=_.extend({},p.properties,{mp_sent_by_lib_version:Config.LIB_VERSION}));var m=!0,g=h.id;g?(this.itemIdsSentSuccessfully[g]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:h,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[g]}),m=!1):this.reportError("[dupe] found item with no ID",{item:h}),m&&l.push(p)}c[h.id]=p},this),l.length<1)return this.requestInProgress=!1,this.resetFlush(),PromisePolyfill.resolve();var u=_.bind(function(){return this.queue.removeItemsByID(_.map(o,function(h){return h.id})).then(_.bind(function(h){return _.each(o,_.bind(function(p){var m=p.id;m?(this.itemIdsSentSuccessfully[m]=this.itemIdsSentSuccessfully[m]||0,this.itemIdsSentSuccessfully[m]++,this.itemIdsSentSuccessfully[m]>5&&this.reportError("[dupe] item ID sent too many times",{item:p,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[m]})):this.reportError("[dupe] found item with no ID while removing",{item:p})},this)),h?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!a?(this.resetFlush(),PromisePolyfill.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),PromisePolyfill.resolve())},this))},this),f=_.bind(function(h){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(c);if(_.isObject(h)&&h.error==="timeout"&&new Date().getTime()-i>=t)return this.reportError("Network timeout; retrying"),this.flush();if(_.isObject(h)&&(h.httpStatusCode>=500||h.httpStatusCode===429||h.httpStatusCode<=0&&!isOnline()||h.error==="timeout")){var p=this.flushInterval*2;return h.retryAfter&&(p=parseInt(h.retryAfter,10)*1e3||p),p=Math.min(MAX_RETRY_INTERVAL_MS,p),this.reportError("Error; retry in "+p+" ms"),this.scheduleFlush(p),PromisePolyfill.resolve()}else if(_.isObject(h)&&h.httpStatusCode===413)if(o.length>1){var m=Math.max(1,Math.floor(s/2));return this.batchSize=Math.min(this.batchSize,m,o.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),PromisePolyfill.resolve()}else return this.reportError("Single-event request too large; dropping",o),this.resetBatchSize(),u();else return u()}catch(g){this.reportError("Error handling API response",g),this.resetFlush()}},this),d={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(d.transport="sendBeacon"),logger$4.log("MIXPANEL REQUEST:",l),this.sendRequestPromise(l,d).then(f)},this)).catch(_.bind(function(o){this.reportError("Error flushing request queue",o),this.resetFlush()},this))},RequestBatcher.prototype.reportError=function(e,t){if(logger$4.error.apply(logger$4.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(i){logger$4.error(i)}};var isRecordingExpired=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},RECORD_ENQUEUE_THROTTLE_MS=250,logger$3=console_with_prefix("recorder"),CompressionStream=win.CompressionStream,RECORDER_BATCHER_LIB_CONFIG={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},ACTIVE_SOURCES=new Set([IncrementalSource.MouseMove,IncrementalSource.MouseInteraction,IncrementalSource.Scroll,IncrementalSource.ViewportResize,IncrementalSource.Input,IncrementalSource.TouchMove,IncrementalSource.MediaInteraction,IncrementalSource.Drag,IncrementalSource.Selection]);function isUserEvent(e){return e.type===EventType.IncrementalSnapshot&&ACTIVE_SOURCES.has(e.data.source)}var SessionRecording=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||NOOP_FUNC,this._onMaxLengthReached=e.onMaxLengthReached||NOOP_FUNC,this._onBatchSent=e.onBatchSent||NOOP_FUNC,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=MAX_RECORDING_MS,this.recordMinMs=0;var t=localStorageSupported(e.sharedLockStorage,!0);this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new IDBStorageWrapper(RECORDING_EVENTS_STORE_NAME),this.batcher=new RequestBatcher(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:RECORDER_BATCHER_LIB_CONFIG,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:RECORD_ENQUEUE_THROTTLE_MS,sharedLockTimeoutMS:10*1e3})};SessionRecording.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))},SessionRecording.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},SessionRecording.prototype.get_config=function(e){return this.getConfig(e)},SessionRecording.prototype.startRecording=function(e){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){logger$3.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>MAX_RECORDING_MS&&(this.recordMaxMs=MAX_RECORDING_MS,logger$3.critical("record_max_ms cannot be greater than "+MAX_RECORDING_MS+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>MAX_VALUE_FOR_MIN_RECORDING_MS&&(this.recordMinMs=MAX_VALUE_FOR_MIN_RECORDING_MS,logger$3.critical("record_min_ms cannot be greater than "+MAX_VALUE_FOR_MIN_RECORDING_MS+"ms. Capping value.")),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=_.info.currentUrl(),this.replayStartUrl=_.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=(function(){clearTimeout(this.idleTimeoutId);var o=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,o),this.idleExpires=new Date().getTime()+o}).bind(this);t();var i=this.getConfig("record_block_selector");(i===""||i===null)&&(i=void 0);try{this._stopRecording=this._rrwebRecord({emit:(function(o){if(this.idleExpires&&this.idleExpires<o.timestamp){this._onIdleTimeout();return}isUserEvent(o)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(o)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:i,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}})}catch(o){this.reportError("Unexpected error when starting rrweb recording.",o)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var s=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),s)},SessionRecording.prototype.stopRecording=function(e){if(!this.isRrwebStopped()){try{this._stopRecording()}catch(i){this.reportError("Error with rrweb stopRecording",i)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},SessionRecording.prototype.isRrwebStopped=function(){return this._stopRecording===null},SessionRecording.prototype.flushEventsWithOptOut=function(e,t,i){var s=(function(o){o===0&&(this.stopRecording(),i({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(e,t,i,s)},SessionRecording.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},SessionRecording.deserialize=function(e,t){var i=new SessionRecording(_.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}));return i},SessionRecording.prototype._sendRequest=function(e,t,i,s){var o=(function(a,l){a.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=_.info.currentUrl()),this._onBatchSent(),s({status:0,httpStatusCode:a.status,responseBody:l,retryAfter:a.headers.get("Retry-After")})}).bind(this);win.fetch(this.getConfig("api_host")+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:i}).then(function(a){a.json().then(function(l){o(a,l)}).catch(function(l){s({error:l})})}).catch(function(a){s({error:a,httpStatusCode:0})})},SessionRecording.prototype._flushEvents=addOptOutCheckMixpanelLib(function(e,t,i){var s=e.length;if(s>0){for(var o=this.replayId,a=1/0,l=-1/0,c=!1,u=0;u<s;u++)a=Math.min(a,e[u].timestamp),l=Math.max(l,e[u].timestamp),e[u].type===EventType.FullSnapshot&&(c=!0);if(this.seqNo===0){if(!c){i({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=a}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=a);var f=l-this.replayStartTime,d={$current_url:this.batchStartUrl,$lib_version:Config.LIB_VERSION,batch_start_time:a/1e3,distinct_id:String(this._mixpanel.get_distinct_id()),mp_lib:"web",replay_id:o,replay_length_ms:f,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},h=JSON.stringify(e),p=this._mixpanel.get_property("$device_id");p&&(d.$device_id=p);var m=this._mixpanel.get_property("$user_id");if(m&&(d.$user_id=m),CompressionStream){var g=new Blob([h],{type:"application/json"}).stream(),v=g.pipeThrough(new CompressionStream("gzip"));new Response(v).blob().then((function(b){d.format="gzip",this._sendRequest(o,d,b,i)}).bind(this))}else d.format="body",this._sendRequest(o,d,h,i)}}),SessionRecording.prototype.reportError=function(e,t){logger$3.error.apply(logger$3.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(i){logger$3.error(i)}};var RecordingRegistry=function(e){this.idb=new IDBStorageWrapper(RECORDING_REGISTRY_STORE_NAME),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};RecordingRegistry.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},RecordingRegistry.prototype.setActiveRecording=function(e){var t=e.tabId;return t?this.idb.init().then((function(){return this.idb.setItem(t,e)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),PromisePolyfill.resolve())},RecordingRegistry.prototype.getActiveRecording=function(){return this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(e){return isRecordingExpired(e)?null:e}).bind(this)).catch(this.handleError.bind(this))},RecordingRegistry.prototype.clearActiveRecording=function(){return this.getActiveRecording().then((function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}).bind(this)).catch(this.handleError.bind(this))},RecordingRegistry.prototype.flushInactiveRecordings=function(){return this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(e){var t=e.filter(function(i){return isRecordingExpired(i)}).map((function(i){var s=SessionRecording.deserialize(i,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return s.unloadPersistedData().then((function(){return this.idb.removeItem(i.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return PromisePolyfill.all(t)}).bind(this)).catch(this.handleError.bind(this))};var logger$2=console_with_prefix("recorder"),MixpanelRecorder=function(e,t,i){this.mixpanelInstance=e,this.rrwebRecord=t||record,this.sharedLockStorage=i,this.recordingRegistry=new RecordingRegistry({mixpanelInstance:this.mixpanelInstance,errorReporter:logger$2.error,sharedLockStorage:i}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null};MixpanelRecorder.prototype.startRecording=function(e){if(e=e||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){logger$2.log("Recording already in progress, skipping startRecording.");return}var t=(function(){logger$2.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),i=(function(){logger$2.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),s=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),o={mixpanelInstance:this.mixpanelInstance,onBatchSent:s,onIdleTimeout:t,onMaxLengthReached:i,replayId:_.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=SessionRecording.deserialize(e.activeSerializedRecording,o):this.activeRecording=new SessionRecording(o),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())},MixpanelRecorder.prototype.stopRecording=function(){var e=this._stopCurrentRecording(!1);return this.recordingRegistry.clearActiveRecording(),this.activeRecording=null,e},MixpanelRecorder.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},MixpanelRecorder.prototype._stopCurrentRecording=function(e){return this.activeRecording?this.activeRecording.stopRecording(e):PromisePolyfill.resolve()},MixpanelRecorder.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),PromisePolyfill.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(t){return t?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(logger$2.log("No resumable recording found."),null)}).bind(this))},MixpanelRecorder.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},MixpanelRecorder.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(MixpanelRecorder.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),win.__mp_recorder=MixpanelRecorder;var EV_CHANGE="change",EV_CLICK="click",EV_HASHCHANGE="hashchange",EV_MP_LOCATION_CHANGE="mp_locationchange",EV_POPSTATE="popstate",EV_SCROLLEND="scrollend",EV_SUBMIT="submit",CLICK_EVENT_PROPS=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],OPT_IN_CLASSES=["mp-include"],OPT_OUT_CLASSES=["mp-no-track"],SENSITIVE_DATA_CLASSES=OPT_OUT_CLASSES.concat(["mp-sensitive"]),TRACKED_ATTRS=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],logger$1=console_with_prefix("autocapture");function getClasses(e){for(var t={},i=getClassName(e).split(" "),s=0;s<i.length;s++){var o=i[s];o&&(t[o]=!0)}return t}function getClassName(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function getPreviousElementSibling(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!isElementNode(e));return e}function getPropertiesFromElement(e,t,i,s,o,a){var l={$classes:getClassName(e).split(" "),$tag_name:e.tagName.toLowerCase()},c=e.id;c&&(l.$id=c),shouldTrackElementDetails(e,t,o,a)&&_.each(TRACKED_ATTRS.concat(s),function(h){if(e.hasAttribute(h)&&!i[h]){var p=e.getAttribute(h);shouldTrackValue(p)&&(l["$attr-"+h]=p)}});for(var u=1,f=1,d=e;d=getPreviousElementSibling(d);)u++,d.tagName===e.tagName&&f++;return l.$nth_child=u,l.$nth_of_type=f,l}function getPropsForDOMEvent(e,t){var i=t.allowElementCallback,s=t.allowSelectors||[],o=t.blockAttrs||[],a=t.blockElementCallback,l=t.blockSelectors||[],c=t.captureTextContent||!1,u=t.captureExtraAttrs||[],f=t.capturedForHeatMap||!1,d={};_.each(o,function(C){d[C]=!0});var h=null,p=typeof e.target>"u"?e.srcElement:e.target;if(isTextNode(p)&&(p=p.parentNode),shouldTrackDomEvent(p,e)&&isElementAllowed(p,e,i,s)&&!isElementBlocked(p,e,a,l)){for(var m=[p],g=p;g.parentNode&&!isTag(g,"body");)m.push(g.parentNode),g=g.parentNode;var v=[],b,y=!1;if(_.each(m,function(C){var A=shouldTrackElementDetails(C,e,i,s);!d.href&&C.tagName.toLowerCase()==="a"&&(b=C.getAttribute("href"),b=A&&shouldTrackValue(b)&&b),isElementBlocked(C,e,a,l)&&(y=!0),v.push(getPropertiesFromElement(C,e,d,u,i,s))},this),!y){var E=document$1.documentElement;if(h={$event_type:e.type,$host:win.location.host,$pathname:win.location.pathname,$elements:v,$el_attr__href:b,$viewportHeight:Math.max(E.clientHeight,win.innerHeight||0),$viewportWidth:Math.max(E.clientWidth,win.innerWidth||0),$pageHeight:document$1.body.offsetHeight||0,$pageWidth:document$1.body.offsetWidth||0},_.each(u,function(C){if(!d[C]&&p.hasAttribute(C)){var A=p.getAttribute(C);shouldTrackValue(A)&&(h["$el_attr__"+C]=A)}}),c&&(S=getSafeText(p,e,i,s),S&&S.length&&(h.$el_text=S)),e.type===EV_CLICK&&(_.each(CLICK_EVENT_PROPS,function(C){C in e&&(h["$"+C]=e[C])}),f&&(h.$captured_for_heatmap=!0),p=guessRealClickTarget(e)),c){var S=getSafeText(p,e,i,s);S&&S.length&&(h.$el_text=S)}if(p){if(!isElementAllowed(p,e,i,s)||isElementBlocked(p,e,a,l))return null;var w=getPropertiesFromElement(p,e,d,u,i,s);h.$target=w,h.$el_classes=w.$classes,_.extend(h,_.strip_empty_properties({$el_id:w.$id,$el_tag_name:w.$tag_name}))}}}return h}function getSafeText(e,t,i,s){var o="";return shouldTrackElementDetails(e,t,i,s)&&e.childNodes&&e.childNodes.length&&_.each(e.childNodes,function(a){isTextNode(a)&&a.textContent&&(o+=_.trim(a.textContent).split(/(\s+)/).filter(shouldTrackValue).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),_.trim(o)}function guessRealClickTarget(e){for(var t=e.target,i=e.composedPath(),s=0;s<i.length;s++){var o=i[s];if(isTag(o,"a")||isTag(o,"button")||isTag(o,"input")||isTag(o,"select")||o.getAttribute&&o.getAttribute("role")==="button"){t=o;break}if(o===t)break}return t}function isElementAllowed(e,t,i,s){if(i)try{if(!i(e,t))return!1}catch(l){return logger$1.critical("Error while checking element in allowElementCallback",l),!1}if(!s.length)return!0;for(var o=0;o<s.length;o++){var a=s[o];try{if(e.matches(a))return!0}catch(l){logger$1.critical("Error while checking selector: "+a,l)}}return!1}function isElementBlocked(e,t,i,s){var o;if(i)try{if(i(e,t))return!0}catch(c){return logger$1.critical("Error while checking element in blockElementCallback",c),!0}if(s&&s.length)for(o=0;o<s.length;o++){var a=s[o];try{if(e.matches(a))return!0}catch(c){logger$1.critical("Error while checking selector: "+a,c)}}var l=getClasses(e);for(o=0;o<OPT_OUT_CLASSES.length;o++)if(l[OPT_OUT_CLASSES[o]])return!0;return!1}function isElementNode(e){return e&&e.nodeType===1}function isTag(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function isTextNode(e){return e&&e.nodeType===3}function minDOMApisSupported(){try{var e=document$1.createElement("div");return!!e.matches}catch{return!1}}function shouldTrackDomEvent(e,t){if(!e||isTag(e,"html")||!isElementNode(e))return!1;var i=e.tagName.toLowerCase();switch(i){case"form":return t.type===EV_SUBMIT;case"input":return["button","submit"].indexOf(e.getAttribute("type"))===-1?t.type===EV_CHANGE:t.type===EV_CLICK;case"select":case"textarea":return t.type===EV_CHANGE;default:return t.type===EV_CLICK}}function shouldTrackElementDetails(e,t,i,s){var o;if(!isElementAllowed(e,t,i,s))return!1;for(var a=e;a.parentNode&&!isTag(a,"body");a=a.parentNode){var l=getClasses(a);for(o=0;o<SENSITIVE_DATA_CLASSES.length;o++)if(l[SENSITIVE_DATA_CLASSES[o]])return!1}var c=getClasses(e);for(o=0;o<OPT_IN_CLASSES.length;o++)if(c[OPT_IN_CLASSES[o]])return!0;if(isTag(e,"input")||isTag(e,"select")||isTag(e,"textarea")||e.getAttribute("contenteditable")==="true")return!1;var u=e.type||"";if(typeof u=="string")switch(u.toLowerCase()){case"hidden":return!1;case"password":return!1}var f=e.name||e.id||"";if(typeof f=="string"){var d=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(d.test(f.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function shouldTrackValue(e){if(e===null||_.isUndefined(e))return!1;if(typeof e=="string"){e=_.trim(e);var t=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(t.test((e||"").replace(/[- ]/g,"")))return!1;var i=/(^\d{3}-?\d{2}-?\d{4}$)/;if(i.test(e))return!1}return!0}var AUTOCAPTURE_CONFIG_KEY="autocapture",LEGACY_PAGEVIEW_CONFIG_KEY="track_pageview",PAGEVIEW_OPTION_FULL_URL="full-url",PAGEVIEW_OPTION_URL_WITH_PATH_AND_QUERY_STRING="url-with-path-and-query-string",PAGEVIEW_OPTION_URL_WITH_PATH="url-with-path",CONFIG_ALLOW_ELEMENT_CALLBACK="allow_element_callback",CONFIG_ALLOW_SELECTORS="allow_selectors",CONFIG_ALLOW_URL_REGEXES="allow_url_regexes",CONFIG_BLOCK_ATTRS="block_attrs",CONFIG_BLOCK_ELEMENT_CALLBACK="block_element_callback",CONFIG_BLOCK_SELECTORS="block_selectors",CONFIG_BLOCK_URL_REGEXES="block_url_regexes",CONFIG_CAPTURE_EXTRA_ATTRS="capture_extra_attrs",CONFIG_CAPTURE_TEXT_CONTENT="capture_text_content",CONFIG_SCROLL_CAPTURE_ALL="scroll_capture_all",CONFIG_SCROLL_CHECKPOINTS="scroll_depth_percent_checkpoints",CONFIG_TRACK_CLICK="click",CONFIG_TRACK_INPUT="input",CONFIG_TRACK_PAGEVIEW="pageview",CONFIG_TRACK_SCROLL="scroll",CONFIG_TRACK_SUBMIT="submit",CONFIG_DEFAULTS$1={};CONFIG_DEFAULTS$1[CONFIG_ALLOW_SELECTORS]=[],CONFIG_DEFAULTS$1[CONFIG_ALLOW_URL_REGEXES]=[],CONFIG_DEFAULTS$1[CONFIG_BLOCK_ATTRS]=[],CONFIG_DEFAULTS$1[CONFIG_BLOCK_ELEMENT_CALLBACK]=null,CONFIG_DEFAULTS$1[CONFIG_BLOCK_SELECTORS]=[],CONFIG_DEFAULTS$1[CONFIG_BLOCK_URL_REGEXES]=[],CONFIG_DEFAULTS$1[CONFIG_CAPTURE_EXTRA_ATTRS]=[],CONFIG_DEFAULTS$1[CONFIG_CAPTURE_TEXT_CONTENT]=!1,CONFIG_DEFAULTS$1[CONFIG_SCROLL_CAPTURE_ALL]=!1,CONFIG_DEFAULTS$1[CONFIG_SCROLL_CHECKPOINTS]=[25,50,75,100],CONFIG_DEFAULTS$1[CONFIG_TRACK_CLICK]=!0,CONFIG_DEFAULTS$1[CONFIG_TRACK_INPUT]=!0,CONFIG_DEFAULTS$1[CONFIG_TRACK_PAGEVIEW]=PAGEVIEW_OPTION_FULL_URL,CONFIG_DEFAULTS$1[CONFIG_TRACK_SCROLL]=!0,CONFIG_DEFAULTS$1[CONFIG_TRACK_SUBMIT]=!0;var DEFAULT_PROPS={$mp_autocapture:!0},MP_EV_CLICK="$mp_click",MP_EV_INPUT="$mp_input_change",MP_EV_SCROLL="$mp_scroll",MP_EV_SUBMIT="$mp_submit",Autocapture=function(e){this.mp=e};Autocapture.prototype.init=function(){if(!minDOMApisSupported()){logger$1.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageviewTracking(),this.initClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking()},Autocapture.prototype.getFullConfig=function(){var e=this.mp.get_config(AUTOCAPTURE_CONFIG_KEY);return e?_.isObject(e)?_.extend({},CONFIG_DEFAULTS$1,e):CONFIG_DEFAULTS$1:{}},Autocapture.prototype.getConfig=function(e){return this.getFullConfig()[e]},Autocapture.prototype.currentUrlBlocked=function(){var e,t=_.info.currentUrl(),i=this.getConfig(CONFIG_ALLOW_URL_REGEXES)||[];if(i.length){var s=!1;for(e=0;e<i.length;e++){var o=i[e];try{if(t.match(o)){s=!0;break}}catch(l){return logger$1.critical("Error while checking block URL regex: "+o,l),!0}}if(!s)return!0}var a=this.getConfig(CONFIG_BLOCK_URL_REGEXES)||[];if(!a||!a.length)return!1;for(e=0;e<a.length;e++)try{if(t.match(a[e]))return!0}catch(l){return logger$1.critical("Error while checking block URL regex: "+a[e],l),!0}return!1},Autocapture.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(AUTOCAPTURE_CONFIG_KEY)?this.getConfig(CONFIG_TRACK_PAGEVIEW):this.mp.get_config(LEGACY_PAGEVIEW_CONFIG_KEY)},Autocapture.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var i=getPropsForDOMEvent(e,{allowElementCallback:this.getConfig(CONFIG_ALLOW_ELEMENT_CALLBACK),allowSelectors:this.getConfig(CONFIG_ALLOW_SELECTORS),blockAttrs:this.getConfig(CONFIG_BLOCK_ATTRS),blockElementCallback:this.getConfig(CONFIG_BLOCK_ELEMENT_CALLBACK),blockSelectors:this.getConfig(CONFIG_BLOCK_SELECTORS),captureExtraAttrs:this.getConfig(CONFIG_CAPTURE_EXTRA_ATTRS),captureTextContent:this.getConfig(CONFIG_CAPTURE_TEXT_CONTENT),capturedForHeatMap:t===MP_EV_CLICK&&!this.getConfig(CONFIG_TRACK_CLICK)&&this.mp.is_recording_heatmap_data()});i&&(_.extend(i,DEFAULT_PROPS),this.mp.track(t,i))}},Autocapture.prototype.initClickTracking=function(){win.removeEventListener(EV_CLICK,this.listenerClick),!(!this.getConfig(CONFIG_TRACK_CLICK)&&!this.mp.get_config("record_heatmap_data"))&&(logger$1.log("Initializing click tracking"),this.listenerClick=win.addEventListener(EV_CLICK,(function(e){!this.getConfig(CONFIG_TRACK_CLICK)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,MP_EV_CLICK)}).bind(this)))},Autocapture.prototype.initInputTracking=function(){win.removeEventListener(EV_CHANGE,this.listenerChange),this.getConfig(CONFIG_TRACK_INPUT)&&(logger$1.log("Initializing input tracking"),this.listenerChange=win.addEventListener(EV_CHANGE,(function(e){this.getConfig(CONFIG_TRACK_INPUT)&&this.trackDomEvent(e,MP_EV_INPUT)}).bind(this)))},Autocapture.prototype.initPageviewTracking=function(){if(win.removeEventListener(EV_POPSTATE,this.listenerPopstate),win.removeEventListener(EV_HASHCHANGE,this.listenerHashchange),win.removeEventListener(EV_MP_LOCATION_CHANGE,this.listenerLocationchange),!!this.pageviewTrackingConfig()){logger$1.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(DEFAULT_PROPS)),t&&(e=_.info.currentUrl()),this.listenerPopstate=win.addEventListener(EV_POPSTATE,function(){win.dispatchEvent(new Event(EV_MP_LOCATION_CHANGE))}),this.listenerHashchange=win.addEventListener(EV_HASHCHANGE,function(){win.dispatchEvent(new Event(EV_MP_LOCATION_CHANGE))});var i=win.history.pushState;typeof i=="function"&&(win.history.pushState=function(o,a,l){i.call(win.history,o,a,l),win.dispatchEvent(new Event(EV_MP_LOCATION_CHANGE))});var s=win.history.replaceState;typeof s=="function"&&(win.history.replaceState=function(o,a,l){s.call(win.history,o,a,l),win.dispatchEvent(new Event(EV_MP_LOCATION_CHANGE))}),this.listenerLocationchange=win.addEventListener(EV_MP_LOCATION_CHANGE,safewrap((function(){if(!this.currentUrlBlocked()){var o=_.info.currentUrl(),a=!1,l=o.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],c=this.pageviewTrackingConfig();if(c===PAGEVIEW_OPTION_FULL_URL?a=o!==e:c===PAGEVIEW_OPTION_URL_WITH_PATH_AND_QUERY_STRING?a=o.split("#")[0]!==e.split("#")[0]:c===PAGEVIEW_OPTION_URL_WITH_PATH&&(a=l),a){var u=this.mp.track_pageview(DEFAULT_PROPS);u&&(e=o),l&&(this.lastScrollCheckpoint=0,logger$1.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)))}},Autocapture.prototype.initScrollTracking=function(){win.removeEventListener(EV_SCROLLEND,this.listenerScroll),this.getConfig(CONFIG_TRACK_SCROLL)&&(logger$1.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0,this.listenerScroll=win.addEventListener(EV_SCROLLEND,safewrap((function(){if(this.getConfig(CONFIG_TRACK_SCROLL)&&!this.currentUrlBlocked()){var e=this.getConfig(CONFIG_SCROLL_CAPTURE_ALL),t=(this.getConfig(CONFIG_SCROLL_CHECKPOINTS)||[]).slice().sort(function(u,f){return u-f}),i=win.scrollY,s=_.extend({$scroll_top:i},DEFAULT_PROPS);try{var o=document$1.body.scrollHeight,a=Math.round(i/(o-win.innerHeight)*100);if(s.$scroll_height=o,s.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var l=0;l<t.length;l++){var c=t[l];a>=c&&this.lastScrollCheckpoint<c&&(s.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,e=!0)}}catch(u){logger$1.critical("Error while calculating scroll percentage",u)}e&&this.mp.track(MP_EV_SCROLL,s)}}).bind(this))))},Autocapture.prototype.initSubmitTracking=function(){win.removeEventListener(EV_SUBMIT,this.listenerSubmit),this.getConfig(CONFIG_TRACK_SUBMIT)&&(logger$1.log("Initializing submit tracking"),this.listenerSubmit=win.addEventListener(EV_SUBMIT,(function(e){this.getConfig(CONFIG_TRACK_SUBMIT)&&this.trackDomEvent(e,MP_EV_SUBMIT)}).bind(this)))},safewrapClass(Autocapture);var fetch$1=win.fetch,logger=console_with_prefix("flags"),FLAGS_CONFIG_KEY="flags",CONFIG_CONTEXT="context",CONFIG_DEFAULTS={};CONFIG_DEFAULTS[CONFIG_CONTEXT]={};var FeatureFlagManager=function(e){this.getMpConfig=e.getConfigFunc,this.getDistinctId=e.getDistinctIdFunc,this.track=e.trackingFunc};FeatureFlagManager.prototype.init=function(){if(!minApisSupported()){logger.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set},FeatureFlagManager.prototype.getFullConfig=function(){var e=this.getMpConfig(FLAGS_CONFIG_KEY);return e?_.isObject(e)?_.extend({},CONFIG_DEFAULTS,e):CONFIG_DEFAULTS:{}},FeatureFlagManager.prototype.getConfig=function(e){return this.getFullConfig()[e]},FeatureFlagManager.prototype.isSystemEnabled=function(){return!!this.getMpConfig(FLAGS_CONFIG_KEY)},FeatureFlagManager.prototype.areFlagsReady=function(){return this.isSystemEnabled()||logger.error("Feature Flags not enabled"),!!this.flags},FeatureFlagManager.prototype.fetchFlags=function(){if(this.isSystemEnabled()){var e=this.getDistinctId();logger.log("Fetching flags for distinct ID: "+e);var t={context:_.extend({distinct_id:e},this.getConfig(CONFIG_CONTEXT))};this.fetchPromise=win.fetch(this.getMpConfig("api_host")+"/"+this.getMpConfig("api_routes").flags,{method:"POST",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),"Content-Type":"application/octet-stream"},body:JSON.stringify(t)}).then((function(i){return i.json().then((function(s){var o=s.flags;if(!o)throw new Error("No flags in API response");var a=new Map;_.each(o,function(l,c){a.set(c,{key:l.variant_key,value:l.variant_value})}),this.flags=a}).bind(this)).catch(function(s){logger.error(s)})}).bind(this)).catch(function(){})}},FeatureFlagManager.prototype.getVariant=function(e,t){return this.fetchPromise?this.fetchPromise.then((function(){return this.getVariantSync(e,t)}).bind(this)).catch(function(i){return logger.error(i),t}):new Promise(function(i){logger.critical("Feature Flags not initialized"),i(t)})},FeatureFlagManager.prototype.getVariantSync=function(e,t){if(!this.areFlagsReady())return logger.log("Flags not loaded yet"),t;var i=this.flags.get(e);return i?(this.trackFeatureCheck(e,i),i):(logger.log('No flag found: "'+e+'"'),t)},FeatureFlagManager.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(i){return i.value}).catch(function(i){return logger.error(i),t})},FeatureFlagManager.prototype.getFeatureData=function(e,t){return logger.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,t)},FeatureFlagManager.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value},FeatureFlagManager.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then((function(){return this.isEnabledSync(e,t)}).bind(this)).catch(function(i){return logger.error(i),t})},FeatureFlagManager.prototype.isEnabledSync=function(e,t){t=t||!1;var i=this.getVariantValueSync(e,t);return i!==!0&&i!==!1&&(logger.error('Feature flag "'+e+'" value: '+i+" is not a boolean; returning fallback value: "+t),i=t),i},FeatureFlagManager.prototype.trackFeatureCheck=function(e,t){this.trackedFeatures.has(e)||(this.trackedFeatures.add(e),this.track("$experiment_started",{"Experiment name":e,"Variant name":t.key,$experiment_type:"feature_flag"}))};function minApisSupported(){return!!fetch$1&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"}safewrapClass(FeatureFlagManager),FeatureFlagManager.prototype.are_flags_ready=FeatureFlagManager.prototype.areFlagsReady,FeatureFlagManager.prototype.get_variant=FeatureFlagManager.prototype.getVariant,FeatureFlagManager.prototype.get_variant_sync=FeatureFlagManager.prototype.getVariantSync,FeatureFlagManager.prototype.get_variant_value=FeatureFlagManager.prototype.getVariantValue,FeatureFlagManager.prototype.get_variant_value_sync=FeatureFlagManager.prototype.getVariantValueSync,FeatureFlagManager.prototype.is_enabled=FeatureFlagManager.prototype.isEnabled,FeatureFlagManager.prototype.is_enabled_sync=FeatureFlagManager.prototype.isEnabledSync,FeatureFlagManager.prototype.get_feature_data=FeatureFlagManager.prototype.getFeatureData;var DomTracker=function(){};DomTracker.prototype.create_properties=function(){},DomTracker.prototype.event_handler=function(){},DomTracker.prototype.after_track_handler=function(){},DomTracker.prototype.init=function(e){return this.mp=e,this},DomTracker.prototype.track=function(e,t,i,s){var o=this,a=_.dom_query(e);if(a.length===0){console$1.error("The DOM query ("+e+") returned 0 elements");return}return _.each(a,function(l){_.register_event(l,this.override_event,function(c){var u={},f=o.create_properties(i,this),d=o.mp.get_config("track_links_timeout");o.event_handler(c,this,u),window.setTimeout(o.track_callback(s,f,u,!0),d),o.mp.track(t,f,o.track_callback(s,f,u))})},this),!0},DomTracker.prototype.track_callback=function(e,t,i,s){s=s||!1;var o=this;return function(){i.callback_fired||(i.callback_fired=!0,!(e&&e(s,t)===!1)&&o.after_track_handler(t,i,s))}},DomTracker.prototype.create_properties=function(e,t){var i;return typeof e=="function"?i=e(t):i=_.extend({},e),i};var LinkTracker=function(){this.override_event="click"};_.inherit(LinkTracker,DomTracker),LinkTracker.prototype.create_properties=function(e,t){var i=LinkTracker.superclass.create_properties.apply(this,arguments);return t.href&&(i.url=t.href),i},LinkTracker.prototype.event_handler=function(e,t,i){i.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",i.href=t.href,i.new_tab||e.preventDefault()},LinkTracker.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var FormTracker=function(){this.override_event="submit"};_.inherit(FormTracker,DomTracker),FormTracker.prototype.event_handler=function(e,t,i){i.element=t,e.preventDefault()},FormTracker.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var SET_ACTION="$set",SET_ONCE_ACTION="$set_once",UNSET_ACTION="$unset",ADD_ACTION="$add",APPEND_ACTION="$append",UNION_ACTION="$union",REMOVE_ACTION="$remove",DELETE_ACTION="$delete",apiActions={set_action:function(e,t){var i={},s={};return _.isObject(e)?_.each(e,function(o,a){this._is_reserved_property(a)||(s[a]=o)},this):s[e]=t,i[SET_ACTION]=s,i},unset_action:function(e){var t={},i=[];return _.isArray(e)||(e=[e]),_.each(e,function(s){this._is_reserved_property(s)||i.push(s)},this),t[UNSET_ACTION]=i,t},set_once_action:function(e,t){var i={},s={};return _.isObject(e)?_.each(e,function(o,a){this._is_reserved_property(a)||(s[a]=o)},this):s[e]=t,i[SET_ONCE_ACTION]=s,i},union_action:function(e,t){var i={},s={};return _.isObject(e)?_.each(e,function(o,a){this._is_reserved_property(a)||(s[a]=_.isArray(o)?o:[o])},this):s[e]=_.isArray(t)?t:[t],i[UNION_ACTION]=s,i},append_action:function(e,t){var i={},s={};return _.isObject(e)?_.each(e,function(o,a){this._is_reserved_property(a)||(s[a]=o)},this):s[e]=t,i[APPEND_ACTION]=s,i},remove_action:function(e,t){var i={},s={};return _.isObject(e)?_.each(e,function(o,a){this._is_reserved_property(a)||(s[a]=o)},this):s[e]=t,i[REMOVE_ACTION]=s,i},delete_action:function(){var e={};return e[DELETE_ACTION]="",e}},MixpanelGroup=function(){};_.extend(MixpanelGroup.prototype,apiActions),MixpanelGroup.prototype._init=function(e,t,i){this._mixpanel=e,this._group_key=t,this._group_id=i},MixpanelGroup.prototype.set=addOptOutCheckMixpanelGroup(function(e,t,i){var s=this.set_action(e,t);return _.isObject(e)&&(i=t),this._send_request(s,i)}),MixpanelGroup.prototype.set_once=addOptOutCheckMixpanelGroup(function(e,t,i){var s=this.set_once_action(e,t);return _.isObject(e)&&(i=t),this._send_request(s,i)}),MixpanelGroup.prototype.unset=addOptOutCheckMixpanelGroup(function(e,t){var i=this.unset_action(e);return this._send_request(i,t)}),MixpanelGroup.prototype.union=addOptOutCheckMixpanelGroup(function(e,t,i){_.isObject(e)&&(i=t);var s=this.union_action(e,t);return this._send_request(s,i)}),MixpanelGroup.prototype.delete=addOptOutCheckMixpanelGroup(function(e){var t=this.delete_action();return this._send_request(t,e)}),MixpanelGroup.prototype.remove=addOptOutCheckMixpanelGroup(function(e,t,i){var s=this.remove_action(e,t);return this._send_request(s,i)}),MixpanelGroup.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var i=_.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},MixpanelGroup.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"},MixpanelGroup.prototype._get_config=function(e){return this._mixpanel.get_config(e)},MixpanelGroup.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},MixpanelGroup.prototype.remove=MixpanelGroup.prototype.remove,MixpanelGroup.prototype.set=MixpanelGroup.prototype.set,MixpanelGroup.prototype.set_once=MixpanelGroup.prototype.set_once,MixpanelGroup.prototype.union=MixpanelGroup.prototype.union,MixpanelGroup.prototype.unset=MixpanelGroup.prototype.unset,MixpanelGroup.prototype.toString=MixpanelGroup.prototype.toString;var MixpanelPeople=function(){};_.extend(MixpanelPeople.prototype,apiActions),MixpanelPeople.prototype._init=function(e){this._mixpanel=e},MixpanelPeople.prototype.set=addOptOutCheckMixpanelPeople(function(e,t,i){var s=this.set_action(e,t);return _.isObject(e)&&(i=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),s[SET_ACTION]=_.extend({},_.info.people_properties(),s[SET_ACTION]),this._send_request(s,i)}),MixpanelPeople.prototype.set_once=addOptOutCheckMixpanelPeople(function(e,t,i){var s=this.set_once_action(e,t);return _.isObject(e)&&(i=t),this._send_request(s,i)}),MixpanelPeople.prototype.unset=addOptOutCheckMixpanelPeople(function(e,t){var i=this.unset_action(e);return this._send_request(i,t)}),MixpanelPeople.prototype.increment=addOptOutCheckMixpanelPeople(function(e,t,i){var s={},o={};return _.isObject(e)?(_.each(e,function(a,l){if(!this._is_reserved_property(l))if(isNaN(parseFloat(a))){console$1.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else o[l]=a},this),i=t):(_.isUndefined(t)&&(t=1),o[e]=t),s[ADD_ACTION]=o,this._send_request(s,i)}),MixpanelPeople.prototype.append=addOptOutCheckMixpanelPeople(function(e,t,i){_.isObject(e)&&(i=t);var s=this.append_action(e,t);return this._send_request(s,i)}),MixpanelPeople.prototype.remove=addOptOutCheckMixpanelPeople(function(e,t,i){_.isObject(e)&&(i=t);var s=this.remove_action(e,t);return this._send_request(s,i)}),MixpanelPeople.prototype.union=addOptOutCheckMixpanelPeople(function(e,t,i){_.isObject(e)&&(i=t);var s=this.union_action(e,t);return this._send_request(s,i)}),MixpanelPeople.prototype.track_charge=addOptOutCheckMixpanelPeople(function(){console$1.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),MixpanelPeople.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},MixpanelPeople.prototype.delete_user=function(){if(!this._identify_called()){console$1.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)},MixpanelPeople.prototype.toString=function(){return this._mixpanel.toString()+".people"},MixpanelPeople.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),s=this._mixpanel.get_property("$user_id"),o=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(e.$device_id=i),s&&(e.$user_id=s),o&&(e.$had_persisted_distinct_id=o);var a=_.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:a,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),_.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),_.truncate(a,255))},MixpanelPeople.prototype._get_config=function(e){return this._mixpanel.get_config(e)},MixpanelPeople.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0},MixpanelPeople.prototype._enqueue=function(e){SET_ACTION in e?this._mixpanel.persistence._add_to_people_queue(SET_ACTION,e):SET_ONCE_ACTION in e?this._mixpanel.persistence._add_to_people_queue(SET_ONCE_ACTION,e):UNSET_ACTION in e?this._mixpanel.persistence._add_to_people_queue(UNSET_ACTION,e):ADD_ACTION in e?this._mixpanel.persistence._add_to_people_queue(ADD_ACTION,e):APPEND_ACTION in e?this._mixpanel.persistence._add_to_people_queue(APPEND_ACTION,e):REMOVE_ACTION in e?this._mixpanel.persistence._add_to_people_queue(REMOVE_ACTION,e):UNION_ACTION in e?this._mixpanel.persistence._add_to_people_queue(UNION_ACTION,e):console$1.error("Invalid call to _enqueue():",e)},MixpanelPeople.prototype._flush_one_queue=function(e,t,i,s){var o=this,a=_.extend({},this._mixpanel.persistence.load_queue(e)),l=a;!_.isUndefined(a)&&_.isObject(a)&&!_.isEmptyObject(a)&&(o._mixpanel.persistence._pop_from_people_queue(e,a),o._mixpanel.persistence.save(),s&&(l=s(a)),t.call(o,l,function(c,u){c===0&&o._mixpanel.persistence._add_to_people_queue(e,a),_.isUndefined(i)||i(c,u)}))},MixpanelPeople.prototype._flush=function(e,t,i,s,o,a,l){var c=this;this._flush_one_queue(SET_ACTION,this.set,e),this._flush_one_queue(SET_ONCE_ACTION,this.set_once,s),this._flush_one_queue(UNSET_ACTION,this.unset,a,function(b){return _.keys(b)}),this._flush_one_queue(ADD_ACTION,this.increment,t),this._flush_one_queue(UNION_ACTION,this.union,o);var u=this._mixpanel.persistence.load_queue(APPEND_ACTION);if(!_.isUndefined(u)&&_.isArray(u)&&u.length)for(var f,d=function(b,y){b===0&&c._mixpanel.persistence._add_to_people_queue(APPEND_ACTION,f),_.isUndefined(i)||i(b,y)},h=u.length-1;h>=0;h--)u=this._mixpanel.persistence.load_queue(APPEND_ACTION),f=u.pop(),c._mixpanel.persistence.save(),_.isEmptyObject(f)||c.append(f,d);var p=this._mixpanel.persistence.load_queue(REMOVE_ACTION);if(!_.isUndefined(p)&&_.isArray(p)&&p.length)for(var m,g=function(b,y){b===0&&c._mixpanel.persistence._add_to_people_queue(REMOVE_ACTION,m),_.isUndefined(l)||l(b,y)},v=p.length-1;v>=0;v--)p=this._mixpanel.persistence.load_queue(REMOVE_ACTION),m=p.pop(),c._mixpanel.persistence.save(),_.isEmptyObject(m)||c.remove(m,g)},MixpanelPeople.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"},MixpanelPeople.prototype.set=MixpanelPeople.prototype.set,MixpanelPeople.prototype.set_once=MixpanelPeople.prototype.set_once,MixpanelPeople.prototype.unset=MixpanelPeople.prototype.unset,MixpanelPeople.prototype.increment=MixpanelPeople.prototype.increment,MixpanelPeople.prototype.append=MixpanelPeople.prototype.append,MixpanelPeople.prototype.remove=MixpanelPeople.prototype.remove,MixpanelPeople.prototype.union=MixpanelPeople.prototype.union,MixpanelPeople.prototype.track_charge=MixpanelPeople.prototype.track_charge,MixpanelPeople.prototype.clear_charges=MixpanelPeople.prototype.clear_charges,MixpanelPeople.prototype.delete_user=MixpanelPeople.prototype.delete_user,MixpanelPeople.prototype.toString=MixpanelPeople.prototype.toString;var SET_QUEUE_KEY="__mps",SET_ONCE_QUEUE_KEY="__mpso",UNSET_QUEUE_KEY="__mpus",ADD_QUEUE_KEY="__mpa",APPEND_QUEUE_KEY="__mpap",REMOVE_QUEUE_KEY="__mpr",UNION_QUEUE_KEY="__mpu",PEOPLE_DISTINCT_ID_KEY="$people_distinct_id",ALIAS_ID_KEY="__alias",EVENT_TIMERS_KEY="__timers",RESERVED_PROPERTIES=[SET_QUEUE_KEY,SET_ONCE_QUEUE_KEY,UNSET_QUEUE_KEY,ADD_QUEUE_KEY,APPEND_QUEUE_KEY,REMOVE_QUEUE_KEY,UNION_QUEUE_KEY,PEOPLE_DISTINCT_ID_KEY,ALIAS_ID_KEY,EVENT_TIMERS_KEY],MixpanelPersistence=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(console$1.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&_.localStorage.is_supported()?this.storage=_.localStorage:this.storage=_.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};MixpanelPersistence.prototype.properties=function(){var e={};return this.load(),_.each(this.props,function(t,i){_.include(RESERVED_PROPERTIES,i)||(e[i]=t)}),e},MixpanelPersistence.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=_.extend({},e))}},MixpanelPersistence.prototype.upgrade=function(){var e,t;this.storage===_.localStorage?(e=_.cookie.parse(this.name),_.cookie.remove(this.name),_.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===_.cookie&&(t=_.localStorage.parse(this.name),_.localStorage.remove(this.name),t&&this.register_once(t))},MixpanelPersistence.prototype.save=function(){this.disabled||this.storage.set(this.name,JSONStringify(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},MixpanelPersistence.prototype.load_prop=function(e){return this.load(),this.props[e]},MixpanelPersistence.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},MixpanelPersistence.prototype.clear=function(){this.remove(),this.props={}},MixpanelPersistence.prototype.register_once=function(e,t,i){return _.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof i>"u"?this.default_expiry:i,this.load(),_.each(e,function(s,o){(!this.props.hasOwnProperty(o)||this.props[o]===t)&&(this.props[o]=s)},this),this.save(),!0):!1},MixpanelPersistence.prototype.register=function(e,t){return _.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),_.extend(this.props,e),this.save(),!0):!1},MixpanelPersistence.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},MixpanelPersistence.prototype.update_search_keyword=function(e){this.register(_.info.searchInfo(e))},MixpanelPersistence.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:_.info.referringDomain(e)||"$direct"},"")},MixpanelPersistence.prototype.get_referrer_info=function(){return _.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},MixpanelPersistence.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},MixpanelPersistence.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},MixpanelPersistence.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},MixpanelPersistence.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},MixpanelPersistence.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},MixpanelPersistence.prototype.get_cross_subdomain=function(){return this.cross_subdomain},MixpanelPersistence.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},MixpanelPersistence.prototype._add_to_people_queue=function(e,t){var i=this._get_queue_key(e),s=t[e],o=this._get_or_create_queue(SET_ACTION),a=this._get_or_create_queue(SET_ONCE_ACTION),l=this._get_or_create_queue(UNSET_ACTION),c=this._get_or_create_queue(ADD_ACTION),u=this._get_or_create_queue(UNION_ACTION),f=this._get_or_create_queue(REMOVE_ACTION,[]),d=this._get_or_create_queue(APPEND_ACTION,[]);i===SET_QUEUE_KEY?(_.extend(o,s),this._pop_from_people_queue(ADD_ACTION,s),this._pop_from_people_queue(UNION_ACTION,s),this._pop_from_people_queue(UNSET_ACTION,s)):i===SET_ONCE_QUEUE_KEY?(_.each(s,function(h,p){p in a||(a[p]=h)}),this._pop_from_people_queue(UNSET_ACTION,s)):i===UNSET_QUEUE_KEY?_.each(s,function(h){_.each([o,a,c,u],function(p){h in p&&delete p[h]}),_.each(d,function(p){h in p&&delete p[h]}),l[h]=!0}):i===ADD_QUEUE_KEY?(_.each(s,function(h,p){p in o?o[p]+=h:(p in c||(c[p]=0),c[p]+=h)},this),this._pop_from_people_queue(UNSET_ACTION,s)):i===UNION_QUEUE_KEY?(_.each(s,function(h,p){_.isArray(h)&&(p in u||(u[p]=[]),_.each(h,function(m){_.include(u[p],m)||u[p].push(m)}))}),this._pop_from_people_queue(UNSET_ACTION,s)):i===REMOVE_QUEUE_KEY?(f.push(s),this._pop_from_people_queue(APPEND_ACTION,s)):i===APPEND_QUEUE_KEY&&(d.push(s),this._pop_from_people_queue(UNSET_ACTION,s)),console$1.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),console$1.log(t),this.save()},MixpanelPersistence.prototype._pop_from_people_queue=function(e,t){var i=this.props[this._get_queue_key(e)];_.isUndefined(i)||_.each(t,function(s,o){e===APPEND_ACTION||e===REMOVE_ACTION?_.each(i,function(a){a[o]===s&&delete a[o]}):delete i[o]},this)},MixpanelPersistence.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},MixpanelPersistence.prototype._get_queue_key=function(e){if(e===SET_ACTION)return SET_QUEUE_KEY;if(e===SET_ONCE_ACTION)return SET_ONCE_QUEUE_KEY;if(e===UNSET_ACTION)return UNSET_QUEUE_KEY;if(e===ADD_ACTION)return ADD_QUEUE_KEY;if(e===APPEND_ACTION)return APPEND_QUEUE_KEY;if(e===REMOVE_ACTION)return REMOVE_QUEUE_KEY;if(e===UNION_ACTION)return UNION_QUEUE_KEY;console$1.error("Invalid queue:",e)},MixpanelPersistence.prototype._get_or_create_queue=function(e,t){var i=this._get_queue_key(e);return t=_.isUndefined(t)?{}:t,this.props[i]||(this.props[i]=t)},MixpanelPersistence.prototype.set_event_timer=function(e,t){var i=this.load_prop(EVENT_TIMERS_KEY)||{};i[e]=t,this.props[EVENT_TIMERS_KEY]=i,this.save()},MixpanelPersistence.prototype.remove_event_timer=function(e){var t=this.load_prop(EVENT_TIMERS_KEY)||{},i=t[e];return _.isUndefined(i)||(delete this.props[EVENT_TIMERS_KEY][e],this.save()),i};var init_type,load_extra_bundle=function(e,t){throw new Error(e+" not available in this build.")},mixpanel_master,INIT_MODULE=0,INIT_SNIPPET=1,IDENTITY_FUNC=function(e){return e},PRIMARY_INSTANCE_NAME="mixpanel",PAYLOAD_TYPE_BASE64="base64",PAYLOAD_TYPE_JSON="json",DEVICE_ID_PREFIX="$device:",USE_XHR=win.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,ENQUEUE_REQUESTS=!USE_XHR&&userAgent.indexOf("MSIE")===-1&&userAgent.indexOf("Mozilla")===-1,sendBeacon=null;navigator$1.sendBeacon&&(sendBeacon=function(){return navigator$1.sendBeacon.apply(navigator$1,arguments)});var DEFAULT_API_ROUTES={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},DEFAULT_CONFIG$1={api_host:"https://api-js.mixpanel.com",api_routes:DEFAULT_API_ROUTES,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:PAYLOAD_TYPE_BASE64,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:NOOP_FUNC,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:NOOP_FUNC,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!1,record_idle_timeout_ms:30*60*1e3,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:MAX_RECORDING_MS,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},DOM_LOADED=!1,MixpanelLib=function(){},create_mplib=function(e,t,i){var s,o=i===PRIMARY_INSTANCE_NAME?mixpanel_master:mixpanel_master[i];if(o&&init_type===INIT_MODULE)s=o;else{if(o&&!_.isArray(o)){console$1.error("You have already initialized "+i);return}s=new MixpanelLib}if(s._cached_groups={},s._init(e,t,i),s.people=new MixpanelPeople,s.people._init(s),!s.get_config("skip_first_touch_marketing")){var a=_.info.campaignParams(null),l={},c=!1;_.each(a,function(u,f){l["initial_"+f]=u,u&&(c=!0)}),c&&s.people.set_once(l)}return Config.DEBUG=Config.DEBUG||s.get_config("debug"),!_.isUndefined(o)&&_.isArray(o)&&(s._execute_array.call(s.people,o.people),s._execute_array(o)),s};MixpanelLib.prototype.init=function(e,t,i){if(_.isUndefined(i)){this.report_error("You must name your new library: init(token, config, name)");return}if(i===PRIMARY_INSTANCE_NAME){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var s=create_mplib(e,t,i);return mixpanel_master[i]=s,s._loaded(),s},MixpanelLib.prototype._init=function(e,t,i){t=t||{},this.__loaded=!0,this.config={};var s={};if(!("api_payload_format"in t)){var o=t.api_host||DEFAULT_CONFIG$1.api_host;o.match(/\.mixpanel\.com/)&&(s.api_payload_format=PAYLOAD_TYPE_JSON)}if(this.set_config(_.extend({},DEFAULT_CONFIG$1,s,t,{name:i,token:e,callback_fn:(i===PRIMARY_INSTANCE_NAME?i:PRIMARY_INSTANCE_NAME+"."+i)+"._jsc"})),this._jsc=NOOP_FUNC,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!_.localStorage.is_supported(!0)||!USE_XHR)this._batch_requests=!1,console$1.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),_.each(this.get_batcher_configs(),function(c){console$1.log("Clearing batch queue "+c.queue_key),_.localStorage.remove(c.queue_key)});else if(this.init_batchers(),sendBeacon&&win.addEventListener){var a=_.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);win.addEventListener("pagehide",function(c){c.persisted&&a()}),win.addEventListener("visibilitychange",function(){document$1.visibilityState==="hidden"&&a()})}}this.persistence=this.cookie=new MixpanelPersistence(this.config),this.unpersisted_superprops={},this._gdpr_init();var l=_.UUID();this.get_distinct_id()||this.register_once({distinct_id:DEVICE_ID_PREFIX+l,$device_id:l},""),this.flags=new FeatureFlagManager({getConfigFunc:_.bind(this.get_config,this),getDistinctIdFunc:_.bind(this.get_distinct_id,this),trackingFunc:_.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Autocapture(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},MixpanelLib.prototype._init_tab_id=function(){if(_.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,i="mp_gen_new_tab_id_"+e;(_.sessionStorage.get(i)||!_.sessionStorage.get(t))&&_.sessionStorage.set(t,"$tab-"+_.UUID()),_.sessionStorage.set(i,"1"),this.tab_id=_.sessionStorage.get(t),win.addEventListener("beforeunload",function(){_.sessionStorage.remove(i)})}catch(s){this.report_error("Error initializing tab id",s)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},MixpanelLib.prototype.get_tab_id=function(){return this.tab_id||null},MixpanelLib.prototype._should_load_recorder=function(){var e=new IDBStorageWrapper(RECORDING_REGISTRY_STORE_NAME),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(i){for(var s=0;s<i.length;s++)if(isRecordingExpired(i[s])||i[s].tabId===t)return!0;return!1}).catch(_.bind(function(i){this.report_error("Error checking recording registry",i)},this))},MixpanelLib.prototype._check_and_start_session_recording=addOptOutCheckMixpanelLib(function(e){if(!win.MutationObserver){console$1.critical("Browser does not support MutationObserver; skipping session recording");return}var t=_.bind(function(s){var o=_.bind(function(){this._recorder=this._recorder||new win.__mp_recorder(this),this._recorder.resumeRecording(s)},this);_.isUndefined(win.__mp_recorder)?load_extra_bundle(this.get_config("recorder_src"),o):o()},this),i=this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent");e||i?t(!0):this._should_load_recorder().then(function(s){s&&t(!1)})}),MixpanelLib.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},MixpanelLib.prototype.stop_session_recording=function(){this._recorder&&this._recorder.stopRecording()},MixpanelLib.prototype.pause_session_recording=function(){this._recorder&&this._recorder.pauseRecording()},MixpanelLib.prototype.resume_session_recording=function(){this._recorder&&this._recorder.resumeRecording()},MixpanelLib.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},MixpanelLib.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},MixpanelLib.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();if(t){var i=_.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")});e="https://mixpanel.com/projects/replay-redirect?"+i}return e},MixpanelLib.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},MixpanelLib.prototype.__get_recorder=function(){return this._recorder},MixpanelLib.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=_.info.campaignParams(null);_.each(e,(function(t,i){this.unregister(i)}).bind(this))}},MixpanelLib.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(document$1.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(_.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(document$1.referrer)},MixpanelLib.prototype._dom_loaded=function(){_.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||_.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},MixpanelLib.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!DOM_LOADED)return this.__dom_loaded_queue.push([e,t]),!1;var i=new e().init(this);return i.track.apply(i,t)},MixpanelLib.prototype._prepare_callback=function(e,t){if(_.isUndefined(e))return null;if(USE_XHR){var i=function(l){e(l,t)};return i}else{var s=this._jsc,o=""+Math.floor(Math.random()*1e8),a=this.get_config("callback_fn")+"["+o+"]";return s[o]=function(l){delete s[o],e(l,t)},a}},MixpanelLib.prototype._send_request=function(e,t,i,s){var o=!0;if(ENQUEUE_REQUESTS)return this.__request_queue.push(arguments),o;var a={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},l=null;!s&&(_.isFunction(i)||typeof i=="string")&&(s=i,i=null),i=_.extend(a,i||{}),USE_XHR||(i.method="GET");var c=i.method==="POST",u=sendBeacon&&c&&i.transport.toLowerCase()==="sendbeacon",f=i.verbose;t.verbose&&(f=!0),this.get_config("test")&&(t.test=1),f&&(t.verbose=1),this.get_config("img")&&(t.img=1),USE_XHR||(s?t.callback=s:(f||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),c&&(l="data="+encodeURIComponent(t.data),delete t.data),_.extend(t,this.get_config("api_extra_query_params")),e+="?"+_.HTTPBuildQuery(t);var d=this;if("img"in t){var h=document$1.createElement("img");h.src=e,document$1.body.appendChild(h)}else if(u){try{o=sendBeacon(e,l)}catch(y){d.report_error(y),o=!1}try{s&&s(o?1:0)}catch(y){d.report_error(y)}}else if(USE_XHR)try{var p=new XMLHttpRequest;p.open(i.method,e,!0);var m=this.get_config("xhr_headers");if(c&&(m["Content-Type"]="application/x-www-form-urlencoded"),_.each(m,function(y,E){p.setRequestHeader(E,y)}),i.timeout_ms&&typeof p.timeout<"u"){p.timeout=i.timeout_ms;var g=new Date().getTime()}p.withCredentials=!0,p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){if(s)if(f){var y;try{y=_.JSONDecode(p.responseText)}catch(w){if(d.report_error(w),i.ignore_json_errors)y=p.responseText;else return}s(y)}else s(Number(p.responseText))}else{var E;if(p.timeout&&!p.status&&new Date().getTime()-g>=p.timeout?E="timeout":E="Bad HTTP status: "+p.status+" "+p.statusText,d.report_error(E),s)if(f){var S=p.responseHeaders||{};s({status:0,httpStatusCode:p.status,error:E,retryAfter:S["Retry-After"]})}else s(0)}},p.send(l)}catch(y){d.report_error(y),o=!1}else{var v=document$1.createElement("script");v.type="text/javascript",v.async=!0,v.defer=!0,v.src=e;var b=document$1.getElementsByTagName("script")[0];b.parentNode.insertBefore(v,b)}return o},MixpanelLib.prototype._execute_array=function(e){var t,i=[],s=[],o=[];_.each(e,function(l){l&&(t=l[0],_.isArray(t)?o.push(l):typeof l=="function"?l.call(this):_.isArray(l)&&t==="alias"?i.push(l):_.isArray(l)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?o.push(l):s.push(l))},this);var a=function(l,c){_.each(l,function(u){if(_.isArray(u[0])){var f=c;_.each(u,function(d){f=f[d[0]].apply(f,d.slice(1))})}else this[u[0]].apply(this,u.slice(1))},c)};a(i,this),a(s,this),a(o,this)},MixpanelLib.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},MixpanelLib.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs},MixpanelLib.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=_.bind(function(i){return new RequestBatcher(i.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:_.bind(function(s,o,a){this._send_request(this.get_config("api_host")+i.endpoint,this._encode_data_for_request(s),o,this._prepare_callback(a,s))},this),beforeSendHook:_.bind(function(s){return this._run_hook("before_send_"+i.type,s)},this),stopAllBatchingFunc:_.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},MixpanelLib.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,_.each(this.request_batchers,function(e){e.start()}))},MixpanelLib.prototype.stop_batch_senders=function(){this._batch_requests=!1,_.each(this.request_batchers,function(e){e.stop(),e.clear()})},MixpanelLib.prototype.push=function(e){this._execute_array([e])},MixpanelLib.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},MixpanelLib.prototype._encode_data_for_request=function(e){var t=JSONStringify(e);return this.get_config("api_payload_format")===PAYLOAD_TYPE_BASE64&&(t=_.base64Encode(t)),{data:t}},MixpanelLib.prototype._track_or_batch=function(e,t){var i=_.truncate(e.data,255),s=e.endpoint,o=e.batcher,a=e.should_send_immediately,l=e.send_request_options||{};t=t||NOOP_FUNC;var c=!0,u=_.bind(function(){return l.skip_hooks||(i=this._run_hook("before_send_"+e.type,i)),i?(console$1.log("MIXPANEL REQUEST:"),console$1.log(i),this._send_request(s,this._encode_data_for_request(i),l,this._prepare_callback(t,i))):null},this);return this._batch_requests&&!a?o.enqueue(i).then(function(f){f?t(1,i):u()}):c=u(),c&&i},MixpanelLib.prototype.track=addOptOutCheckMixpanelLib(function(e,t,i,s){!s&&typeof i=="function"&&(s=i,i=null),i=i||{};var o=i.transport;o&&(i.transport=o);var a=i.send_immediately;if(typeof s!="function"&&(s=NOOP_FUNC),_.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){s(0);return}t=_.extend({},t),t.token=this.get_config("token");var l=this.persistence.remove_event_timer(e);if(!_.isUndefined(l)){var c=new Date().getTime()-l;t.$duration=parseFloat((c/1e3).toFixed(3))}this._set_default_superprops();var u=this.get_config("track_marketing")?_.info.marketingParams():{};t=_.extend({},_.info.properties({mp_loader:this.get_config("mp_loader")}),u,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var f=this.get_config("property_blacklist");_.isArray(f)?_.each(f,function(p){delete t[p]}):this.report_error("Invalid value for property_blacklist config: "+f);var d={event:e,properties:t},h=this._track_or_batch({type:"events",data:d,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:a,send_request_options:i},s);return h}),MixpanelLib.prototype.set_group=addOptOutCheckMixpanelLib(function(e,t,i){_.isArray(t)||(t=[t]);var s={};return s[e]=t,this.register(s),this.people.set(e,t,i)}),MixpanelLib.prototype.add_group=addOptOutCheckMixpanelLib(function(e,t,i){var s=this.get_property(e),o={};return s===void 0?(o[e]=[t],this.register(o)):s.indexOf(t)===-1&&(s.push(t),o[e]=s,this.register(o)),this.people.union(e,t,i)}),MixpanelLib.prototype.remove_group=addOptOutCheckMixpanelLib(function(e,t,i){var s=this.get_property(e);if(s!==void 0){var o=s.indexOf(t);o>-1&&(s.splice(o,1),this.register({group_key:s})),s.length===0&&this.unregister(e)}return this.people.remove(e,t,i)}),MixpanelLib.prototype.track_with_groups=addOptOutCheckMixpanelLib(function(e,t,i,s){var o=_.extend({},t||{});return _.each(i,function(a,l){a!=null&&(o[l]=a)}),this.track(e,o,s)}),MixpanelLib.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},MixpanelLib.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},MixpanelLib.prototype.get_group=function(e,t){var i=this._create_map_key(e,t),s=this._cached_groups[i];return(s===void 0||s._group_key!==e||s._group_id!==t)&&(s=new MixpanelGroup,s._init(this,e,t),this._cached_groups[i]=s),s},MixpanelLib.prototype.track_pageview=addOptOutCheckMixpanelLib(function(e,t){typeof e!="object"&&(e={}),t=t||{};var i=t.event_name||"$mp_web_page_view",s=_.extend(_.info.mpPageViewProperties(),_.info.campaignParams(),_.info.clickParams()),o=_.extend({},s,e);return this.track(i,o)}),MixpanelLib.prototype.track_links=function(){return this._track_dom.call(this,LinkTracker,arguments)},MixpanelLib.prototype.track_forms=function(){return this._track_dom.call(this,FormTracker,arguments)},MixpanelLib.prototype.time_event=function(e){if(_.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var REGISTER_DEFAULTS={persistent:!0},options_for_register=function(e){var t;return _.isObject(e)?t=e:_.isUndefined(e)?t={}:t={days:e},_.extend({},REGISTER_DEFAULTS,t)};MixpanelLib.prototype.register=function(e,t){var i=options_for_register(t);i.persistent?this.persistence.register(e,i.days):_.extend(this.unpersisted_superprops,e)},MixpanelLib.prototype.register_once=function(e,t,i){var s=options_for_register(i);s.persistent?this.persistence.register_once(e,t,s.days):(typeof t>"u"&&(t="None"),_.each(e,function(o,a){(!this.unpersisted_superprops.hasOwnProperty(a)||this.unpersisted_superprops[a]===t)&&(this.unpersisted_superprops[a]=o)},this))},MixpanelLib.prototype.unregister=function(e,t){t=options_for_register(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},MixpanelLib.prototype._register_single=function(e,t){var i={};i[e]=t,this.register(i)},MixpanelLib.prototype.identify=function(e,t,i,s,o,a,l,c){var u=this.get_distinct_id();if(e&&u!==e){if(typeof e=="string"&&e.indexOf(DEVICE_ID_PREFIX)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var f=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:f},"")}e!==u&&e!==this.get_property(ALIAS_ID_KEY)&&(this.unregister(ALIAS_ID_KEY),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,i,s,o,a,l,c),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0}),e!==u&&this.flags.fetchFlags()},MixpanelLib.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=_.UUID();this.register_once({distinct_id:DEVICE_ID_PREFIX+e,$device_id:e},""),this.stop_session_recording(),this._check_and_start_session_recording()},MixpanelLib.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},MixpanelLib.prototype.alias=function(e,t){if(e===this.get_property(PEOPLE_DISTINCT_ID_KEY))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var i=this;return _.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(ALIAS_ID_KEY,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){i.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},MixpanelLib.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},MixpanelLib.prototype.set_config=function(e){if(_.isObject(e)){_.extend(this.config,e);var t=e.batch_size;t&&_.each(this.request_batchers,function(i){i.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Config.DEBUG=Config.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init()}},MixpanelLib.prototype.get_config=function(e){return this.config[e]},MixpanelLib.prototype._run_hook=function(e){var t=(this.config.hooks[e]||IDENTITY_FUNC).apply(this,slice.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t},MixpanelLib.prototype.get_property=function(e){return this.persistence.load_prop([e])},MixpanelLib.prototype.toString=function(){var e=this.get_config("name");return e!==PRIMARY_INSTANCE_NAME&&(e=PRIMARY_INSTANCE_NAME+"."+e),e},MixpanelLib.prototype._event_is_disabled=function(e){return _.isBlockedUA(userAgent)||this._flags.disable_all_events||_.include(this.__disabled_events,e)},MixpanelLib.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&_.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||_.cookie.get("mp_optout"))&&(_.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},MixpanelLib.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},MixpanelLib.prototype._gdpr_call_func=function(e,t){return t=_.extend({track:_.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),_.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},MixpanelLib.prototype.opt_in_tracking=function(e){e=_.extend({enable_persistence:!0},e),this._gdpr_call_func(optIn,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.opt_out_tracking=function(e){e=_.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(optOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(hasOptedIn,e)},MixpanelLib.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(hasOptedOut,e)},MixpanelLib.prototype.clear_opt_in_out_tracking=function(e){e=_.extend({enable_persistence:!0},e),this._gdpr_call_func(clearOptInOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.report_error=function(e,t){console$1.error.apply(console$1.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(i){console$1.error(i)}},MixpanelLib.prototype.init=MixpanelLib.prototype.init,MixpanelLib.prototype.reset=MixpanelLib.prototype.reset,MixpanelLib.prototype.disable=MixpanelLib.prototype.disable,MixpanelLib.prototype.time_event=MixpanelLib.prototype.time_event,MixpanelLib.prototype.track=MixpanelLib.prototype.track,MixpanelLib.prototype.track_links=MixpanelLib.prototype.track_links,MixpanelLib.prototype.track_forms=MixpanelLib.prototype.track_forms,MixpanelLib.prototype.track_pageview=MixpanelLib.prototype.track_pageview,MixpanelLib.prototype.register=MixpanelLib.prototype.register,MixpanelLib.prototype.register_once=MixpanelLib.prototype.register_once,MixpanelLib.prototype.unregister=MixpanelLib.prototype.unregister,MixpanelLib.prototype.identify=MixpanelLib.prototype.identify,MixpanelLib.prototype.alias=MixpanelLib.prototype.alias,MixpanelLib.prototype.name_tag=MixpanelLib.prototype.name_tag,MixpanelLib.prototype.set_config=MixpanelLib.prototype.set_config,MixpanelLib.prototype.get_config=MixpanelLib.prototype.get_config,MixpanelLib.prototype.get_property=MixpanelLib.prototype.get_property,MixpanelLib.prototype.get_distinct_id=MixpanelLib.prototype.get_distinct_id,MixpanelLib.prototype.toString=MixpanelLib.prototype.toString,MixpanelLib.prototype.opt_out_tracking=MixpanelLib.prototype.opt_out_tracking,MixpanelLib.prototype.opt_in_tracking=MixpanelLib.prototype.opt_in_tracking,MixpanelLib.prototype.has_opted_out_tracking=MixpanelLib.prototype.has_opted_out_tracking,MixpanelLib.prototype.has_opted_in_tracking=MixpanelLib.prototype.has_opted_in_tracking,MixpanelLib.prototype.clear_opt_in_out_tracking=MixpanelLib.prototype.clear_opt_in_out_tracking,MixpanelLib.prototype.get_group=MixpanelLib.prototype.get_group,MixpanelLib.prototype.set_group=MixpanelLib.prototype.set_group,MixpanelLib.prototype.add_group=MixpanelLib.prototype.add_group,MixpanelLib.prototype.remove_group=MixpanelLib.prototype.remove_group,MixpanelLib.prototype.track_with_groups=MixpanelLib.prototype.track_with_groups,MixpanelLib.prototype.start_batch_senders=MixpanelLib.prototype.start_batch_senders,MixpanelLib.prototype.stop_batch_senders=MixpanelLib.prototype.stop_batch_senders,MixpanelLib.prototype.start_session_recording=MixpanelLib.prototype.start_session_recording,MixpanelLib.prototype.stop_session_recording=MixpanelLib.prototype.stop_session_recording,MixpanelLib.prototype.pause_session_recording=MixpanelLib.prototype.pause_session_recording,MixpanelLib.prototype.resume_session_recording=MixpanelLib.prototype.resume_session_recording,MixpanelLib.prototype.get_session_recording_properties=MixpanelLib.prototype.get_session_recording_properties,MixpanelLib.prototype.get_session_replay_url=MixpanelLib.prototype.get_session_replay_url,MixpanelLib.prototype.get_tab_id=MixpanelLib.prototype.get_tab_id,MixpanelLib.prototype.DEFAULT_API_ROUTES=DEFAULT_API_ROUTES,MixpanelLib.prototype.__get_recorder=MixpanelLib.prototype.__get_recorder,MixpanelPersistence.prototype.properties=MixpanelPersistence.prototype.properties,MixpanelPersistence.prototype.update_search_keyword=MixpanelPersistence.prototype.update_search_keyword,MixpanelPersistence.prototype.update_referrer_info=MixpanelPersistence.prototype.update_referrer_info,MixpanelPersistence.prototype.get_cross_subdomain=MixpanelPersistence.prototype.get_cross_subdomain,MixpanelPersistence.prototype.clear=MixpanelPersistence.prototype.clear;var instances={},extend_mp=function(){_.each(instances,function(e,t){t!==PRIMARY_INSTANCE_NAME&&(mixpanel_master[t]=e)}),mixpanel_master._=_},override_mp_init_func=function(){mixpanel_master.init=function(e,t,i){if(i)return mixpanel_master[i]||(mixpanel_master[i]=instances[i]=create_mplib(e,t,i),mixpanel_master[i]._loaded()),mixpanel_master[i];var s=mixpanel_master;instances[PRIMARY_INSTANCE_NAME]?s=instances[PRIMARY_INSTANCE_NAME]:e&&(s=create_mplib(e,t,PRIMARY_INSTANCE_NAME),s._loaded(),instances[PRIMARY_INSTANCE_NAME]=s),mixpanel_master=s,init_type===INIT_SNIPPET&&(win[PRIMARY_INSTANCE_NAME]=mixpanel_master),extend_mp()}},add_dom_loaded_handler=function(){function e(){e.done||(e.done=!0,DOM_LOADED=!0,ENQUEUE_REQUESTS=!1,_.each(instances,function(s){s._dom_loaded()}))}function t(){try{document$1.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(document$1.addEventListener)document$1.readyState==="complete"?e():document$1.addEventListener("DOMContentLoaded",e,!1);else if(document$1.attachEvent){document$1.attachEvent("onreadystatechange",e);var i=!1;try{i=win.frameElement===null}catch{}document$1.documentElement.doScroll&&i&&t()}_.register_event(win,"load",e,!0)};function init_as_module(e){return load_extra_bundle=e,init_type=INIT_MODULE,mixpanel_master=new MixpanelLib,override_mp_init_func(),mixpanel_master.init(),add_dom_loaded_handler(),mixpanel_master}function loadNoop(e,t){t()}var mixpanel=init_as_module(loadNoop),lib={},uaParser_min$1={exports:{}},uaParser_min=uaParser_min$1.exports,hasRequiredUaParser_min;function requireUaParser_min(){return hasRequiredUaParser_min||(hasRequiredUaParser_min=1,function(e,t){(function(i,s){var o="1.0.41",a="",l="?",c="function",u="undefined",f="object",d="string",h="major",p="model",m="name",g="type",v="vendor",b="version",y="architecture",E="console",S="mobile",w="tablet",C="smarttv",A="wearable",O="embedded",I=500,L="Amazon",$="Apple",V="ASUS",W="BlackBerry",K="Browser",j="Chrome",D="Edge",M="Firefox",k="Google",T="Honor",P="Huawei",F="Lenovo",N="LG",H="Microsoft",q="Motorola",Y="Nvidia",Q="OnePlus",re="Opera",ee="OPPO",z="Samsung",J="Sharp",te="Sony",X="Xiaomi",se="Zebra",ie="Facebook",ne="Chromium OS",pe="Mac OS",_e=" Browser",ye=function(Ee,ce){var fe={};for(var be in Ee)ce[be]&&ce[be].length%2===0?fe[be]=ce[be].concat(Ee[be]):fe[be]=Ee[be];return fe},Ae=function(Ee){for(var ce={},fe=0;fe<Ee.length;fe++)ce[Ee[fe].toUpperCase()]=Ee[fe];return ce},xe=function(Ee,ce){return typeof Ee===d?ae(ce).indexOf(ae(Ee))!==-1:!1},ae=function(Ee){return Ee.toLowerCase()},me=function(Ee){return typeof Ee===d?Ee.replace(/[^\d\.]/g,a).split(".")[0]:s},Se=function(Ee,ce){if(typeof Ee===d)return Ee=Ee.replace(/^\s\s*/,a),typeof ce===u?Ee:Ee.substring(0,I)},Te=function(Ee,ce){for(var fe=0,be,he,Ce,le,de,Oe;fe<ce.length&&!de;){var He=ce[fe],et=ce[fe+1];for(be=he=0;be<He.length&&!de&&He[be];)if(de=He[be++].exec(Ee),de)for(Ce=0;Ce<et.length;Ce++)Oe=de[++he],le=et[Ce],typeof le===f&&le.length>0?le.length===2?typeof le[1]==c?this[le[0]]=le[1].call(this,Oe):this[le[0]]=le[1]:le.length===3?typeof le[1]===c&&!(le[1].exec&&le[1].test)?this[le[0]]=Oe?le[1].call(this,Oe,le[2]):s:this[le[0]]=Oe?Oe.replace(le[1],le[2]):s:le.length===4&&(this[le[0]]=Oe?le[3].call(this,Oe.replace(le[1],le[2])):s):this[le]=Oe||s;fe+=2}},ve=function(Ee,ce){for(var fe in ce)if(typeof ce[fe]===f&&ce[fe].length>0){for(var be=0;be<ce[fe].length;be++)if(xe(ce[fe][be],Ee))return fe===l?s:fe}else if(xe(ce[fe],Ee))return fe===l?s:fe;return ce.hasOwnProperty("*")?ce["*"]:Ee},Re={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ie={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,b],[/opios[\/ ]+([\w\.]+)/i],[b,[m,re+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[m,re+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[m,re]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[m,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[b,[m,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[m,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[m,"UC"+K]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[m,"Smart Lenovo "+K]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+K],b],[/\bfocus\/([\w\.]+)/i],[b,[m,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[m,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[m,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[m,"MIUI"+_e]],[/fxios\/([\w\.-]+)/i],[b,[m,M]],[/\bqihoobrowser\/?([\w\.]*)/i],[b,[m,"360"]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+_e],b],[/samsungbrowser\/([\w\.]+)/i],[b,[m,z+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[b,[m,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[m,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[m],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[b,m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ie],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[m,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[m,j+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,j+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[m,"Android "+K]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[b,ve,Re]],[/(webkit|khtml)\/([\w\.]+)/i],[m,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],b],[/(wolvic|librewolf)\/([\w\.]+)/i],[m,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[m,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[m,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[b,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,a,ae]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,ae]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,z],[g,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,z],[g,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,$],[g,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,$],[g,w]],[/(macintosh);/i],[p,[v,$]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,J],[g,S]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[p,[v,T],[g,w]],[/honor([-\w ]+)[;\)]/i],[p,[v,T],[g,S]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[p,[v,P],[g,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,P],[g,S]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[p,/_/g," "],[v,X],[g,w]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[p,/_/g," "],[v,X],[g,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,ee],[g,S]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[p,[v,ve,{OnePlus:["304","403","203"],"*":ee}],[g,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[g,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[g,S]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,q],[g,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,q],[g,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,N],[g,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,N],[g,S]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[p,[v,F],[g,w]],[/(nokia) (t[12][01])/i],[v,p,[g,w]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[p,/_/g," "],[g,S],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[p,[v,k],[g,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,k],[g,S]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,te],[g,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,te],[g,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,Q],[g,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,L],[g,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,L],[g,S]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[g,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,W],[g,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,V],[g,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,V],[g,S]],[/(nexus 9)/i],[p,[v,"HTC"],[g,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[g,S]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[v,"TCL"],[g,w]],[/(itel) ((\w+))/i],[[v,ae],p,[g,ve,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[g,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[g,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[v,"Ulefone"],[g,S]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[v,"Energizer"],[g,S]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[v,"Cat"],[g,S]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[v,"Smartfren"],[g,S]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[v,"Nothing"],[g,S]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[p,[v,"Archos"],[g,w]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[p,[v,"Archos"],[g,S]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[v,p,[g,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[g,S]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[g,w]],[/(surface duo)/i],[p,[v,H],[g,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[g,S]],[/(u304aa)/i],[p,[v,"AT&T"],[g,S]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[g,S]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[g,w]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[g,w]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[g,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[g,w]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[g,w]],[/\b(k88) b/i],[p,[v,"ZTE"],[g,w]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[g,S]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[g,S]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[g,w]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[g,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[g,w]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[g,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[g,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[g,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[g,S]],[/\b(ph-1) /i],[p,[v,"Essential"],[g,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[g,w]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[g,w]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[g,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[p,[v,Y],[g,w]],[/(sprint) (\w+)/i],[v,p,[g,S]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,H],[g,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,se],[g,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,se],[g,S]],[/smart-tv.+(samsung)/i],[v,[g,C]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,z],[g,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,N],[g,C]],[/(apple) ?tv/i],[v,[p,$+" TV"],[g,C]],[/crkey/i],[[p,j+"cast"],[v,k],[g,C]],[/droid.+aft(\w+)( bui|\))/i],[p,[v,L],[g,C]],[/(shield \w+ tv)/i],[p,[v,Y],[g,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,J],[g,C]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,te],[g,C]],[/(mi(tv|box)-?\w+) bui/i],[p,[v,X],[g,C]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[g,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,Se],[p,Se],[g,C]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[p,[g,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[g,E]],[/droid.+; (shield)( bui|\))/i],[p,[v,Y],[g,E]],[/(playstation \w+)/i],[p,[v,te],[g,E]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,H],[g,E]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[p,[v,z],[g,A]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,p,[g,A]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[p,[v,ee],[g,A]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,$],[g,A]],[/(opwwe\d{3})/i],[p,[v,Q],[g,A]],[/(moto 360)/i],[p,[v,q],[g,A]],[/(smartwatch 3)/i],[p,[v,te],[g,A]],[/(g watch r)/i],[p,[v,N],[g,A]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,se],[g,A]],[/droid.+; (glass) \d/i],[p,[v,k],[g,A]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,p,[g,A]],[/; (quest( \d| pro)?)/i],[p,[v,ie],[g,A]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,O]],[/(aeobc)\b/i],[p,[v,L],[g,O]],[/(homepod).+mac os/i],[p,[v,$],[g,O]],[/windows iot/i],[[g,O]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[g,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[g,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,S]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[m,D+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[m,b],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,b],[/ladybird\//i],[[m,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,b],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[m,[b,ve,Ie]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,ve,Ie],[m,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,pe],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,m],[/(ubuntu) ([\w\.]+) like android/i],[[m,/(.+)/,"$1 Touch"],b],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[m,b],[/\(bb(10);/i],[b,[m,W]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[b,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[m,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[m,j+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,ne],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[m,b],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,b]]},$e=function(Ee,ce){if(typeof Ee===f&&(ce=Ee,Ee=s),!(this instanceof $e))return new $e(Ee,ce).getResult();var fe=typeof i!==u&&i.navigator?i.navigator:s,be=Ee||(fe&&fe.userAgent?fe.userAgent:a),he=fe&&fe.userAgentData?fe.userAgentData:s,Ce=ce?ye(Fe,ce):Fe,le=fe&&fe.userAgent==be;return this.getBrowser=function(){var de={};return de[m]=s,de[b]=s,Te.call(de,be,Ce.browser),de[h]=me(de[b]),le&&fe&&fe.brave&&typeof fe.brave.isBrave==c&&(de[m]="Brave"),de},this.getCPU=function(){var de={};return de[y]=s,Te.call(de,be,Ce.cpu),de},this.getDevice=function(){var de={};return de[v]=s,de[p]=s,de[g]=s,Te.call(de,be,Ce.device),le&&!de[g]&&he&&he.mobile&&(de[g]=S),le&&de[p]=="Macintosh"&&fe&&typeof fe.standalone!==u&&fe.maxTouchPoints&&fe.maxTouchPoints>2&&(de[p]="iPad",de[g]=w),de},this.getEngine=function(){var de={};return de[m]=s,de[b]=s,Te.call(de,be,Ce.engine),de},this.getOS=function(){var de={};return de[m]=s,de[b]=s,Te.call(de,be,Ce.os),le&&!de[m]&&he&&he.platform&&he.platform!="Unknown"&&(de[m]=he.platform.replace(/chrome os/i,ne).replace(/macos/i,pe)),de},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return be},this.setUA=function(de){return be=typeof de===d&&de.length>I?Se(de,I):de,this},this.setUA(be),this};$e.VERSION=o,$e.BROWSER=Ae([m,b,h]),$e.CPU=Ae([y]),$e.DEVICE=Ae([p,v,g,E,S,C,w,A,O]),$e.ENGINE=$e.OS=Ae([m,b]),e.exports&&(t=e.exports=$e),t.UAParser=$e;var Be=typeof i!==u&&(i.jQuery||i.Zepto);if(Be&&!Be.ua){var Ne=new $e;Be.ua=Ne.getResult(),Be.ua.get=function(){return Ne.getUA()},Be.ua.set=function(Ee){Ne.setUA(Ee);var ce=Ne.getResult();for(var fe in ce)Be.ua[fe]=ce[fe]}}})(typeof window=="object"?window:uaParser_min)}(uaParser_min$1,uaParser_min$1.exports)),uaParser_min$1.exports}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1,Object.defineProperty(lib,"__esModule",{value:!0});function e(Z){return Z&&typeof Z=="object"&&"default"in Z?Z.default:Z}var t=React,i=e(t),s=requireUaParser_min(),o=new s,a=o.getBrowser(),l=o.getCPU(),c=o.getDevice(),u=o.getEngine(),f=o.getOS(),d=o.getUA(),h=function(B){return o.setUA(B)},p=function(B){if(!B){console.error("No userAgent string was provided");return}var G=new s(B);return{UA:G,browser:G.getBrowser(),cpu:G.getCPU(),device:G.getDevice(),engine:G.getEngine(),os:G.getOS(),ua:G.getUA(),setUserAgent:function(ue){return G.setUA(ue)}}},m=Object.freeze({ClientUAInstance:o,browser:a,cpu:l,device:c,engine:u,os:f,ua:d,setUa:h,parseUserAgent:p});function g(Z,B){var G=Object.keys(Z);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(Z);B&&(oe=oe.filter(function(ue){return Object.getOwnPropertyDescriptor(Z,ue).enumerable})),G.push.apply(G,oe)}return G}function v(Z){for(var B=1;B<arguments.length;B++){var G=arguments[B]!=null?arguments[B]:{};B%2?g(Object(G),!0).forEach(function(oe){w(Z,oe,G[oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(G)):g(Object(G)).forEach(function(oe){Object.defineProperty(Z,oe,Object.getOwnPropertyDescriptor(G,oe))})}return Z}function b(Z){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(B){return typeof B}:b=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},b(Z)}function y(Z,B){if(!(Z instanceof B))throw new TypeError("Cannot call a class as a function")}function E(Z,B){for(var G=0;G<B.length;G++){var oe=B[G];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(Z,oe.key,oe)}}function S(Z,B,G){return E(Z.prototype,B),Z}function w(Z,B,G){return B in Z?Object.defineProperty(Z,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):Z[B]=G,Z}function C(){return C=Object.assign||function(Z){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var oe in G)Object.prototype.hasOwnProperty.call(G,oe)&&(Z[oe]=G[oe])}return Z},C.apply(this,arguments)}function A(Z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(B&&B.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),B&&I(Z,B)}function O(Z){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},O(Z)}function I(Z,B){return I=Object.setPrototypeOf||function(oe,ue){return oe.__proto__=ue,oe},I(Z,B)}function L(Z,B){if(Z==null)return{};var G={},oe=Object.keys(Z),ue,ke;for(ke=0;ke<oe.length;ke++)ue=oe[ke],!(B.indexOf(ue)>=0)&&(G[ue]=Z[ue]);return G}function $(Z,B){if(Z==null)return{};var G=L(Z,B),oe,ue;if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(Z);for(ue=0;ue<ke.length;ue++)oe=ke[ue],!(B.indexOf(oe)>=0)&&Object.prototype.propertyIsEnumerable.call(Z,oe)&&(G[oe]=Z[oe])}return G}function V(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function W(Z,B){if(B&&(typeof B=="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(Z)}function K(Z,B){return j(Z)||D(Z,B)||M(Z,B)||T()}function j(Z){if(Array.isArray(Z))return Z}function D(Z,B){var G=Z==null?null:typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(G!=null){var oe=[],ue=!0,ke=!1,Ke,ot;try{for(G=G.call(Z);!(ue=(Ke=G.next()).done)&&(oe.push(Ke.value),!(B&&oe.length===B));ue=!0);}catch(lr){ke=!0,ot=lr}finally{try{!ue&&G.return!=null&&G.return()}finally{if(ke)throw ot}}return oe}}function M(Z,B){if(Z){if(typeof Z=="string")return k(Z,B);var G=Object.prototype.toString.call(Z).slice(8,-1);if(G==="Object"&&Z.constructor&&(G=Z.constructor.name),G==="Map"||G==="Set")return Array.from(Z);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return k(Z,B)}}function k(Z,B){(B==null||B>Z.length)&&(B=Z.length);for(var G=0,oe=new Array(B);G<B;G++)oe[G]=Z[G];return oe}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
160
160
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},F={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},N={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},H={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},q=function(B){switch(B){case P.Mobile:return{isMobile:!0};case P.Tablet:return{isTablet:!0};case P.SmartTv:return{isSmartTV:!0};case P.Console:return{isConsole:!0};case P.Wearable:return{isWearable:!0};case P.Browser:return{isBrowser:!0};case P.Embedded:return{isEmbedded:!0};default:return H}},Y=function(B){return h(B)},Q=function(B){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return B||G},re=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},ee=function(B){var G=re();return G&&G.platform&&(G.platform.indexOf(B)!==-1||G.platform==="MacIntel"&&G.maxTouchPoints>1&&!window.MSStream)},z=function(B,G,oe,ue,ke){return{isBrowser:B,browserMajorVersion:Q(G.major),browserFullVersion:Q(G.version),browserName:Q(G.name),engineName:Q(oe.name),engineVersion:Q(oe.version),osName:Q(ue.name),osVersion:Q(ue.version),userAgent:Q(ke)}},J=function(B,G,oe,ue){return v({},B,{vendor:Q(G.vendor),model:Q(G.model),os:Q(oe.name),osVersion:Q(oe.version),ua:Q(ue)})},te=function(B,G,oe,ue){return{isSmartTV:B,engineName:Q(G.name),engineVersion:Q(G.version),osName:Q(oe.name),osVersion:Q(oe.version),userAgent:Q(ue)}},X=function(B,G,oe,ue){return{isConsole:B,engineName:Q(G.name),engineVersion:Q(G.version),osName:Q(oe.name),osVersion:Q(oe.version),userAgent:Q(ue)}},se=function(B,G,oe,ue){return{isWearable:B,engineName:Q(G.name),engineVersion:Q(G.version),osName:Q(oe.name),osVersion:Q(oe.version),userAgent:Q(ue)}},ie=function(B,G,oe,ue,ke){return{isEmbedded:B,vendor:Q(G.vendor),model:Q(G.model),engineName:Q(oe.name),engineVersion:Q(oe.version),osName:Q(ue.name),osVersion:Q(ue.version),userAgent:Q(ke)}};function ne(Z){var B=Z?p(Z):m,G=B.device,oe=B.browser,ue=B.engine,ke=B.os,Ke=B.ua,ot=q(G.type),lr=ot.isBrowser,Xn=ot.isMobile,Jn=ot.isTablet,Hr=ot.isSmartTV,qr=ot.isConsole,Kr=ot.isWearable,Yr=ot.isEmbedded;if(lr)return z(lr,oe,ue,ke,Ke);if(Hr)return te(Hr,ue,ke,Ke);if(qr)return X(qr,ue,ke,Ke);if(Xn||Jn)return J(ot,G,ke,Ke);if(Kr)return se(Kr,ue,ke,Ke);if(Yr)return ie(Yr,G,ue,ke,Ke)}var pe=function(B){var G=B.type;return G===P.Mobile},_e=function(B){var G=B.type;return G===P.Tablet},ye=function(B){var G=B.type;return G===P.Mobile||G===P.Tablet},Ae=function(B){var G=B.type;return G===P.SmartTv},xe=function(B){var G=B.type;return G===P.Browser},ae=function(B){var G=B.type;return G===P.Wearable},me=function(B){var G=B.type;return G===P.Console},Se=function(B){var G=B.type;return G===P.Embedded},Te=function(B){var G=B.vendor;return Q(G)},ve=function(B){var G=B.model;return Q(G)},Re=function(B){var G=B.type;return Q(G,"browser")},Ie=function(B){var G=B.name;return G===N.Android},Fe=function(B){var G=B.name;return G===N.Windows},$e=function(B){var G=B.name;return G===N.MAC_OS},Be=function(B){var G=B.name;return G===N.WindowsPhone},Ne=function(B){var G=B.name;return G===N.IOS},Ee=function(B){var G=B.version;return Q(G)},ce=function(B){var G=B.name;return Q(G)},fe=function(B){var G=B.name;return G===F.Chrome},be=function(B){var G=B.name;return G===F.Firefox},he=function(B){var G=B.name;return G===F.Chromium},Ce=function(B){var G=B.name;return G===F.Edge},le=function(B){var G=B.name;return G===F.Yandex},de=function(B){var G=B.name;return G===F.Safari||G===F.MobileSafari},Oe=function(B){var G=B.name;return G===F.MobileSafari},He=function(B){var G=B.name;return G===F.Opera},et=function(B){var G=B.name;return G===F.InternetExplorer||G===F.Ie},Je=function(B){var G=B.name;return G===F.MIUI},at=function(B){var G=B.name;return G===F.SamsungBrowser},Pe=function(B){var G=B.version;return Q(G)},Ue=function(B){var G=B.major;return Q(G)},ze=function(B){var G=B.name;return Q(G)},Qe=function(B){var G=B.name;return Q(G)},Bt=function(B){var G=B.version;return Q(G)},qe=function(){var B=re(),G=B&&B.userAgent&&B.userAgent.toLowerCase();return typeof G=="string"?/electron/.test(G):!1},Ye=function(B){return typeof B=="string"&&B.indexOf("Edg/")!==-1},Vt=function(){var B=re();return B&&(/iPad|iPhone|iPod/.test(B.platform)||B.platform==="MacIntel"&&B.maxTouchPoints>1)&&!window.MSStream},We=function(){return ee("iPad")},st=function(){return ee("iPhone")},sr=function(){return ee("iPod")},vt=function(B){return Q(B)};function fr(Z){var B=Z||m,G=B.device,oe=B.browser,ue=B.os,ke=B.engine,Ke=B.ua;return{isSmartTV:Ae(G),isConsole:me(G),isWearable:ae(G),isEmbedded:Se(G),isMobileSafari:Oe(oe)||We(),isChromium:he(oe),isMobile:ye(G)||We(),isMobileOnly:pe(G),isTablet:_e(G)||We(),isBrowser:xe(G),isDesktop:xe(G),isAndroid:Ie(ue),isWinPhone:Be(ue),isIOS:Ne(ue)||We(),isChrome:fe(oe),isFirefox:be(oe),isSafari:de(oe),isOpera:He(oe),isIE:et(oe),osVersion:Ee(ue),osName:ce(ue),fullBrowserVersion:Pe(oe),browserVersion:Ue(oe),browserName:ze(oe),mobileVendor:Te(G),mobileModel:ve(G),engineName:Qe(ke),engineVersion:Bt(ke),getUA:vt(Ke),isEdge:Ce(oe)||Ye(Ke),isYandex:le(oe),deviceType:Re(G),isIOS13:Vt(),isIPad13:We(),isIPhone13:st(),isIPod13:sr(),isElectron:qe(),isEdgeChromium:Ye(Ke),isLegacyEdge:Ce(oe)&&!Ye(Ke),isWindows:Fe(ue),isMacOs:$e(ue),isMIUI:Je(oe),isSamsungBrowser:at(oe)}}var Dr=Ae(c),Nr=me(c),$r=ae(c),Qr=Se(c),Zr=Oe(a)||We(),tn=he(a),ar=ye(c)||We(),Fr=pe(c),jr=_e(c)||We(),Br=xe(c),rn=xe(c),Vr=Ie(f),Ur=Be(f),Gr=Ne(f)||We(),nn=fe(a),sn=be(a),an=de(a),ln=He(a),zr=et(a),un=Ee(f),fn=ce(f),dn=Pe(a),hn=Ue(a),pn=ze(a),mn=Te(c),gn=ve(c),vn=Qe(u),yn=Bt(u),_n=vt(d),bn=Ce(a)||Ye(d),xn=le(a),Sn=Re(c),En=Vt(),wn=We(),Cn=st(),Rn=sr(),Tn=qe(),An=Ye(d),In=Ce(a)&&!Ye(d),Pn=Fe(f),Mn=$e(f),On=Je(a),kn=at(a),Ln=function(B){if(!B||typeof B!="string"){console.error("No valid user agent string was provided");return}var G=p(B),oe=G.device,ue=G.browser,ke=G.os,Ke=G.engine,ot=G.ua;return fr({device:oe,browser:ue,os:ke,engine:Ke,ua:ot})},Dn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Vr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Nn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Br?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},$n=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return zr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Fn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Gr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},jn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return ar?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Bn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return jr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Vn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Ur?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Un=function(B){var G=B.renderWithFragment,oe=B.children;B.viewClassName,B.style;var ue=$(B,["renderWithFragment","children","viewClassName","style"]);return Fr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Gn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Dr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},zn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return Nr?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Wn=function(B){var G=B.renderWithFragment,oe=B.children,ue=$(B,["renderWithFragment","children"]);return $r?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ue,oe):null},Hn=function(B){var G=B.renderWithFragment,oe=B.children;B.viewClassName,B.style;var ue=B.condition,ke=$(B,["renderWithFragment","children","viewClassName","style","condition"]);return ue?G?i.createElement(t.Fragment,null,oe):i.createElement("div",ke,oe):null};function qn(Z){return function(B){A(G,B);function G(oe){var ue;return y(this,G),ue=W(this,O(G).call(this,oe)),ue.isEventListenerAdded=!1,ue.handleOrientationChange=ue.handleOrientationChange.bind(V(ue)),ue.onOrientationChange=ue.onOrientationChange.bind(V(ue)),ue.onPageLoad=ue.onPageLoad.bind(V(ue)),ue.state={isLandscape:!1,isPortrait:!1},ue}return S(G,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var ue=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:ue===0,isLandscape:ue===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":b(window))!==void 0&&ar&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return i.createElement(Z,C({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),G}(i.Component)}function Kn(){var Z=t.useState(function(){var ke=window.innerWidth>window.innerHeight?90:0;return{isPortrait:ke===0,isLandscape:ke===90,orientation:ke===0?"portrait":"landscape"}}),B=K(Z,2),G=B[0],oe=B[1],ue=t.useCallback(function(){var ke=window.innerWidth>window.innerHeight?90:0,Ke={isPortrait:ke===0,isLandscape:ke===90,orientation:ke===0?"portrait":"landscape"};G.orientation!==Ke.orientation&&oe(Ke)},[G.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":b(window))!==void 0&&ar&&(ue(),window.addEventListener("load",ue,!1),window.addEventListener("resize",ue,!1)),function(){window.removeEventListener("resize",ue,!1),window.removeEventListener("load",ue,!1)}},[ue]),G}function Wr(Z){var B=Z||window.navigator.userAgent;return p(B)}function Yn(Z){var B=Z||window.navigator.userAgent,G=Wr(B),oe=fr(G);return[oe,G]}return lib.AndroidView=Dn,lib.BrowserTypes=F,lib.BrowserView=Nn,lib.ConsoleView=zn,lib.CustomView=Hn,lib.IEView=$n,lib.IOSView=Fn,lib.MobileOnlyView=Un,lib.MobileView=jn,lib.OsTypes=N,lib.SmartTVView=Gn,lib.TabletView=Bn,lib.WearableView=Wn,lib.WinPhoneView=Vn,lib.browserName=pn,lib.browserVersion=hn,lib.deviceDetect=ne,lib.deviceType=Sn,lib.engineName=vn,lib.engineVersion=yn,lib.fullBrowserVersion=dn,lib.getSelectorsByUserAgent=Ln,lib.getUA=_n,lib.isAndroid=Vr,lib.isBrowser=Br,lib.isChrome=nn,lib.isChromium=tn,lib.isConsole=Nr,lib.isDesktop=rn,lib.isEdge=bn,lib.isEdgeChromium=An,lib.isElectron=Tn,lib.isEmbedded=Qr,lib.isFirefox=sn,lib.isIE=zr,lib.isIOS=Gr,lib.isIOS13=En,lib.isIPad13=wn,lib.isIPhone13=Cn,lib.isIPod13=Rn,lib.isLegacyEdge=In,lib.isMIUI=On,lib.isMacOs=Mn,lib.isMobile=ar,lib.isMobileOnly=Fr,lib.isMobileSafari=Zr,lib.isOpera=ln,lib.isSafari=an,lib.isSamsungBrowser=kn,lib.isSmartTV=Dr,lib.isTablet=jr,lib.isWearable=$r,lib.isWinPhone=Ur,lib.isWindows=Pn,lib.isYandex=xn,lib.mobileModel=gn,lib.mobileVendor=mn,lib.osName=fn,lib.osVersion=un,lib.parseUserAgent=p,lib.setUserAgent=Y,lib.useDeviceData=Wr,lib.useDeviceSelectors=Yn,lib.useMobileOrientation=Kn,lib.withOrientationChange=qn,lib}var libExports=requireLib(),dist={},ga4={},gtag={},hasRequiredGtag;function requireGtag(){return hasRequiredGtag||(hasRequiredGtag=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];if(typeof window<"u"){var c;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(c=window).gtag.apply(c,a)}},i=t;e.default=i}(gtag)),gtag}var format={},hasRequiredFormat;function requireFormat(){return hasRequiredFormat||(hasRequiredFormat=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function i(c){return c.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(u,f,d){return f>0&&f+u.length!==d.length&&u.search(t)>-1&&d.charAt(f-2)!==":"&&(d.charAt(f+u.length)!=="-"||d.charAt(f-1)==="-")&&d.charAt(f-1).search(/[^\s-]/)<0?u.toLowerCase():u.substr(1).search(/[A-Z]|\../)>-1?u:u.charAt(0).toUpperCase()+u.substr(1)})}function s(c){return typeof c=="string"&&c.indexOf("@")!==-1}var o="REDACTED (Potential Email Address)";function a(c){return s(c)?(console.warn("This arg looks like an email address, redacting."),o):c}function l(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=c||"";return u&&(d=i(c)),f&&(d=a(d)),d}}(format)),format}var hasRequiredGa4;function requireGa4(){return hasRequiredGa4||(hasRequiredGa4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=l(requireGtag()),i=l(requireFormat()),s=["eventCategory","eventAction","eventLabel","eventValue","hitType"],o=["title","location"],a=["page","hitType"];function l(j){return j&&j.__esModule?j:{default:j}}function c(j,D){if(j==null)return{};var M=u(j,D),k,T;if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);for(T=0;T<P.length;T++)k=P[T],!(D.indexOf(k)>=0)&&Object.prototype.propertyIsEnumerable.call(j,k)&&(M[k]=j[k])}return M}function u(j,D){if(j==null)return{};var M={},k=Object.keys(j),T,P;for(P=0;P<k.length;P++)T=k[P],!(D.indexOf(T)>=0)&&(M[T]=j[T]);return M}function f(j){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},f(j)}function d(j){return m(j)||p(j)||E(j)||h()}function h(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
161
161
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(j){if(typeof Symbol<"u"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}function m(j){if(Array.isArray(j))return S(j)}function g(j,D){var M=Object.keys(j);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(j);D&&(k=k.filter(function(T){return Object.getOwnPropertyDescriptor(j,T).enumerable})),M.push.apply(M,k)}return M}function v(j){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?g(Object(M),!0).forEach(function(k){L(j,k,M[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(M)):g(Object(M)).forEach(function(k){Object.defineProperty(j,k,Object.getOwnPropertyDescriptor(M,k))})}return j}function b(j,D){return C(j)||w(j,D)||E(j,D)||y()}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
162
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(j,D){if(j){if(typeof j=="string")return S(j,D);var M=Object.prototype.toString.call(j).slice(8,-1);if(M==="Object"&&j.constructor&&(M=j.constructor.name),M==="Map"||M==="Set")return Array.from(j);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return S(j,D)}}function S(j,D){(D==null||D>j.length)&&(D=j.length);for(var M=0,k=new Array(D);M<D;M++)k[M]=j[M];return k}function w(j,D){var M=j==null?null:typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(M!=null){var k,T,P,F,N=[],H=!0,q=!1;try{if(P=(M=M.call(j)).next,D!==0)for(;!(H=(k=P.call(M)).done)&&(N.push(k.value),N.length!==D);H=!0);}catch(Y){q=!0,T=Y}finally{try{if(!H&&M.return!=null&&(F=M.return(),Object(F)!==F))return}finally{if(q)throw T}}return N}}function C(j){if(Array.isArray(j))return j}function A(j,D){if(!(j instanceof D))throw new TypeError("Cannot call a class as a function")}function O(j,D){for(var M=0;M<D.length;M++){var k=D[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(j,$(k.key),k)}}function I(j,D,M){return O(j.prototype,D),Object.defineProperty(j,"prototype",{writable:!1}),j}function L(j,D,M){return D=$(D),D in j?Object.defineProperty(j,D,{value:M,enumerable:!0,configurable:!0,writable:!0}):j[D]=M,j}function $(j){var D=V(j,"string");return f(D)==="symbol"?D:String(D)}function V(j,D){if(f(j)!=="object"||j===null)return j;var M=j[Symbol.toPrimitive];if(M!==void 0){var k=M.call(j,D||"default");if(f(k)!=="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(j)}var W=function(){function j(){var D=this;A(this,j),L(this,"reset",function(){D.isInitialized=!1,D._testMode=!1,D._currentMeasurementId,D._hasLoadedGA=!1,D._isQueuing=!1,D._queueGtag=[]}),L(this,"_gtag",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];D._testMode||D._isQueuing?D._queueGtag.push(k):t.default.apply(void 0,k)}),L(this,"_loadGA",function(M,k){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!D._hasLoadedGA){var P=document.createElement("script");P.async=!0,P.src="".concat(T,"?id=").concat(M),k&&P.setAttribute("nonce",k),document.body.appendChild(P),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},D._hasLoadedGA=!0}}),L(this,"_toGtagOptions",function(M){if(M){var k={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},T=Object.entries(M).reduce(function(P,F){var N=b(F,2),H=N[0],q=N[1];return k[H]?P[k[H]]=q:P[H]=q,P},{});return T}}),L(this,"initialize",function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!M)throw new Error("Require GA_MEASUREMENT_ID");var T=typeof M=="string"?[{trackingId:M}]:M;D._currentMeasurementId=T[0].trackingId;var P=k.gaOptions,F=k.gtagOptions,N=k.nonce,H=k.testMode,q=H===void 0?!1:H,Y=k.gtagUrl;if(D._testMode=q,q||D._loadGA(D._currentMeasurementId,N,Y),D.isInitialized||(D._gtag("js",new Date),T.forEach(function(ee){var z=v(v(v({},D._toGtagOptions(v(v({},P),ee.gaOptions))),F),ee.gtagOptions);Object.keys(z).length?D._gtag("config",ee.trackingId,z):D._gtag("config",ee.trackingId)})),D.isInitialized=!0,!q){var Q=d(D._queueGtag);for(D._queueGtag=[],D._isQueuing=!1;Q.length;){var re=Q.shift();D._gtag.apply(D,d(re)),re[0]==="get"&&(D._isQueuing=!0)}}}),L(this,"set",function(M){if(!M){console.warn("`fieldsObject` is required in .set()");return}if(f(M)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(M).length===0&&console.warn("empty `fieldsObject` given to .set()"),D._gaCommand("set",M)}),L(this,"_gaCommandSendEvent",function(M,k,T,P,F){D._gtag("event",k,v(v({event_category:M,event_label:T,value:P},F&&{non_interaction:F.nonInteraction}),D._toGtagOptions(F)))}),L(this,"_gaCommandSendEventParameters",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommandSendEvent.apply(D,d(k.slice(1)));else{var P=k[0],F=P.eventCategory,N=P.eventAction,H=P.eventLabel,q=P.eventValue;P.hitType;var Y=c(P,s);D._gaCommandSendEvent(F,N,H,q,Y)}}),L(this,"_gaCommandSendTiming",function(M,k,T,P){D._gtag("event","timing_complete",{name:k,value:T,event_category:M,event_label:P})}),L(this,"_gaCommandSendPageview",function(M,k){if(k&&Object.keys(k).length){var T=D._toGtagOptions(k),P=T.title,F=T.location,N=c(T,o);D._gtag("event","page_view",v(v(v(v({},M&&{page_path:M}),P&&{page_title:P}),F&&{page_location:F}),N))}else M?D._gtag("event","page_view",{page_path:M}):D._gtag("event","page_view")}),L(this,"_gaCommandSendPageviewParameters",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommandSendPageview.apply(D,d(k.slice(1)));else{var P=k[0],F=P.page;P.hitType;var N=c(P,a);D._gaCommandSendPageview(F,N)}}),L(this,"_gaCommandSend",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];var P=typeof k[0]=="string"?k[0]:k[0].hitType;switch(P){case"event":D._gaCommandSendEventParameters.apply(D,k);break;case"pageview":D._gaCommandSendPageviewParameters.apply(D,k);break;case"timing":D._gaCommandSendTiming.apply(D,d(k.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(P));break;default:console.warn("Send command doesn't exist: ".concat(P))}}),L(this,"_gaCommandSet",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];typeof k[0]=="string"&&(k[0]=L({},k[0],k[1])),D._gtag("set",D._toGtagOptions(k[0]))}),L(this,"_gaCommand",function(M){for(var k=arguments.length,T=new Array(k>1?k-1:0),P=1;P<k;P++)T[P-1]=arguments[P];switch(M){case"send":D._gaCommandSend.apply(D,T);break;case"set":D._gaCommandSet.apply(D,T);break;default:console.warn("Command doesn't exist: ".concat(M))}}),L(this,"ga",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommand.apply(D,k);else{var P=k[0];D._gtag("get",D._currentMeasurementId,"client_id",function(F){D._isQueuing=!1;var N=D._queueGtag;for(P({get:function(Y){return Y==="clientId"?F:Y==="trackingId"?D._currentMeasurementId:Y==="apiVersion"?"1":void 0}});N.length;){var H=N.shift();D._gtag.apply(D,d(H))}}),D._isQueuing=!0}return D.ga}),L(this,"event",function(M,k){if(typeof M=="string")D._gtag("event",M,D._toGtagOptions(k));else{var T=M.action,P=M.category,F=M.label,N=M.value,H=M.nonInteraction,q=M.transport;if(!P||!T){console.warn("args.category AND args.action are required in event()");return}var Y={hitType:"event",eventCategory:(0,i.default)(P),eventAction:(0,i.default)(T)};F&&(Y.eventLabel=(0,i.default)(F)),typeof N<"u"&&(typeof N!="number"?console.warn("Expected `args.value` arg to be a Number."):Y.eventValue=N),typeof H<"u"&&(typeof H!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):Y.nonInteraction=H),typeof q<"u"&&(typeof q!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(q)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),Y.transport=q)),D._gaCommand("send",Y)}}),L(this,"send",function(M){D._gaCommand("send",M)}),this.reset()}return I(j,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),j}();e.GA4=W;var K=new W;e.default=K}(ga4)),ga4}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){function t(c){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var i=o(requireGa4());function s(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,f=new WeakMap;return(s=function(h){return h?f:u})(c)}function o(c,u){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var f=s(u);if(f&&f.has(c))return f.get(c);var d={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(p!=="default"&&Object.prototype.hasOwnProperty.call(c,p)){var m=h?Object.getOwnPropertyDescriptor(c,p):null;m&&(m.get||m.set)?Object.defineProperty(d,p,m):d[p]=c[p]}return d.default=c,f&&f.set(c,d),d}var a=i.GA4;e.ReactGAImplementation=a;var l=i.default;e.default=l}(dist)),dist}var distExports=requireDist();const ReactGA=getDefaultExportFromCjs$3(distExports),isString=e=>typeof e=="string",defer=()=>{let e,t;const i=new Promise((s,o)=>{e=s,t=o});return i.resolve=e,i.reject=t,i},makeString=e=>e==null?"":""+e,copy=(e,t,i)=>{e.forEach(s=>{t[s]&&(i[s]=t[s])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString(e),getLastOfPath=(e,t,i)=>{const s=isString(t)?t.split("."):t;let o=0;for(;o<s.length-1;){if(canNotTraverseDeeper(e))return{};const a=cleanKey(s[o]);!e[a]&&i&&(e[a]=new i),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return canNotTraverseDeeper(e)?{}:{obj:e,k:cleanKey(s[o])}},setPath=(e,t,i)=>{const{obj:s,k:o}=getLastOfPath(e,t,Object);if(s!==void 0||t.length===1){s[o]=i;return}let a=t[t.length-1],l=t.slice(0,t.length-1),c=getLastOfPath(e,l,Object);for(;c.obj===void 0&&l.length;)a=`${l[l.length-1]}.${a}`,l=l.slice(0,l.length-1),c=getLastOfPath(e,l,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=i},pushPath=(e,t,i,s)=>{const{obj:o,k:a}=getLastOfPath(e,t,Object);o[a]=o[a]||[],o[a].push(i)},getPath=(e,t)=>{const{obj:i,k:s}=getLastOfPath(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},getPathWithDefaults=(e,t,i)=>{const s=getPath(e,i);return s!==void 0?s:getPath(t,i)},deepExtend=(e,t,i)=>{for(const s in t)s!=="__proto__"&&s!=="constructor"&&(s in e?isString(e[s])||e[s]instanceof String||isString(t[s])||t[s]instanceof String?i&&(e[s]=t[s]):deepExtend(e[s],t[s],i):e[s]=t[s]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const escape=e=>isString(e)?e.replace(/[&<>"'\/]/g,t=>_entityMap[t]):e;class RegExpCache{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,t,i)=>{t=t||"",i=i||"";const s=chars.filter(l=>t.indexOf(l)<0&&i.indexOf(l)<0);if(s.length===0)return!0;const o=looksLikeObjectPathRegExpCache.getRegExp(`(${s.map(l=>l==="?"?"\\?":l).join("|")})`);let a=!o.test(e);if(!a){const l=e.indexOf(i);l>0&&!o.test(e.substring(0,l))&&(a=!0)}return a},deepFind=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const s=t.split(i);let o=e;for(let a=0;a<s.length;){if(!o||typeof o!="object")return;let l,c="";for(let u=a;u<s.length;++u)if(u!==a&&(c+=i),c+=s[u],l=o[c],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&u<s.length-1)continue;a+=u-a+1;break}o=l}return o},getCleanedCode=e=>e==null?void 0:e.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,s;(s=(i=console==null?void 0:console[e])==null?void 0:i.apply)==null||s.call(i,console,t)}};class Logger{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||consoleLogger,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,s,o){return o&&!this.debug?null:(isString(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new Logger(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Logger(this.logger,t)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(i)||0;this.observers[s].set(i,o+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,a])=>{for(let l=0;l<a;l++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let l=0;l<a;l++)o.apply(o,[t,...i])})}}class ResourceStore extends EventEmitter{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,s,o={}){var f,d;const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,i],s&&(Array.isArray(s)?c.push(...s):isString(s)&&a?c.push(...s.split(a)):c.push(s)));const u=getPath(this.data,c);return!u&&!i&&!s&&t.indexOf(".")>-1&&(t=c[0],i=c[1],s=c.slice(2).join(".")),u||!l||!isString(s)?u:deepFind((d=(f=this.data)==null?void 0:f[t])==null?void 0:d[i],s,a)}addResource(t,i,s,o,a={silent:!1}){const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,i];s&&(c=c.concat(l?s.split(l):s)),t.indexOf(".")>-1&&(c=t.split("."),o=i,i=c[1]),this.addNamespaces(i),setPath(this.data,c,o),a.silent||this.emit("added",t,i,s,o)}addResources(t,i,s,o={silent:!1}){for(const a in s)(isString(s[a])||Array.isArray(s[a]))&&this.addResource(t,i,a,s[a],{silent:!0});o.silent||this.emit("added",t,i,s)}addResourceBundle(t,i,s,o,a,l={silent:!1,skipCopy:!1}){let c=[t,i];t.indexOf(".")>-1&&(c=t.split("."),o=s,s=i,i=c[1]),this.addNamespaces(i);let u=getPath(this.data,c)||{};l.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?deepExtend(u,s,a):u={...u,...s},setPath(this.data,c,u),l.silent||this.emit("added",t,i,s)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(o=>i[o]&&Object.keys(i[o]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,o){return e.forEach(a=>{var l;t=((l=this.processors[a])==null?void 0:l.process(t,i,s,o))??t}),t}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const e=[],t=Object.create(null);let i;return t.get=(s,o)=>{var a;return(a=i==null?void 0:i.revoke)==null||a.call(i),o===PATH_KEY?e:(e.push(o),i=Proxy.revocable(s,t),i.proxy)},Proxy.revocable(Object.create(null),t).proxy}function keysFromSelector(e,t){const{[PATH_KEY]:i}=e(createProxy());return i.join((t==null?void 0:t.keySeparator)??".")}const checkedLoadedFor={},shouldHandleAsObject=e=>!isString(e)&&typeof e!="boolean"&&typeof e!="number";class Translator extends EventEmitter{constructor(t,i={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const s={...i};if(t==null)return!1;const o=this.resolve(t,s);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,i){let s=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=i.ns||this.options.defaultNS||[];const l=s&&t.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!looksLikeObjectPath(t,s,o);if(l&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:isString(a)?[a]:a};const f=t.split(s);(s!==o||s===o&&this.options.ns.indexOf(f[0])>-1)&&(a=f.shift()),t=f.join(o)}return{key:t,namespaces:isString(a)?[a]:a}}translate(t,i,s){let o=typeof i=="object"?{...i}:i;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=keysFromSelector(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]);const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:c,namespaces:u}=this.extractFromKey(t[t.length-1],o),f=u[u.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return p?a?{res:`${f}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(o)}:`${f}${d}${c}`:a?{res:c,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(o)}:c;const m=this.resolve(t,o);let g=m==null?void 0:m.res;const v=(m==null?void 0:m.usedKey)||c,b=(m==null?void 0:m.exactUsedKey)||c,y=["[object Number]","[object Function]","[object RegExp]"],E=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w=o.count!==void 0&&!isString(o.count),C=Translator.hasDefaultValue(o),A=w?this.pluralResolver.getSuffix(h,o.count,o):"",O=o.ordinal&&w?this.pluralResolver.getSuffix(h,o.count,{ordinal:!1}):"",I=w&&!o.ordinal&&o.count===0,L=I&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${A}`]||o[`defaultValue${O}`]||o.defaultValue;let $=g;S&&!g&&C&&($=L);const V=shouldHandleAsObject($),W=Object.prototype.toString.apply($);if(S&&$&&V&&y.indexOf(W)<0&&!(isString(E)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,$,{...o,ns:u}):`key '${c} (${this.language})' returned an object instead of string.`;return a?(m.res=K,m.usedParams=this.getUsedParamsDetails(o),m):K}if(l){const K=Array.isArray($),j=K?[]:{},D=K?b:v;for(const M in $)if(Object.prototype.hasOwnProperty.call($,M)){const k=`${D}${l}${M}`;C&&!g?j[M]=this.translate(k,{...o,defaultValue:shouldHandleAsObject(L)?L[M]:void 0,joinArrays:!1,ns:u}):j[M]=this.translate(k,{...o,joinArrays:!1,ns:u}),j[M]===k&&(j[M]=$[M])}g=j}}else if(S&&isString(E)&&Array.isArray(g))g=g.join(E),g&&(g=this.extendTranslation(g,t,o,s));else{let K=!1,j=!1;!this.isValidLookup(g)&&C&&(K=!0,g=L),this.isValidLookup(g)||(j=!0,g=c);const M=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:g,k=C&&L!==g&&this.options.updateMissing;if(j||K||k){if(this.logger.log(k?"updateKey":"missingKey",h,f,c,k?L:g),l){const N=this.resolve(c,{...o,keySeparator:!1});N&&N.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 T=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let N=0;N<P.length;N++)T.push(P[N]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(o.lng||this.language):T.push(o.lng||this.language);const F=(N,H,q)=>{var Q;const Y=C&&q!==g?q:M;this.options.missingKeyHandler?this.options.missingKeyHandler(N,f,H,Y,k,o):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(N,f,H,Y,k,o),this.emit("missingKey",N,f,H,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(N=>{const H=this.pluralResolver.getSuffixes(N,o);I&&o[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(q=>{F([N],c+q,o[`defaultValue${q}`]||L)})}):F(T,c,L))}g=this.extendTranslation(g,t,o,m,s),j&&g===c&&this.options.appendNamespaceToMissingKey&&(g=`${f}${d}${c}`),(j||K)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}${d}${c}`:c,K?g:void 0,o))}return a?(m.res=g,m.usedParams=this.getUsedParamsDetails(o),m):g}extendTranslation(t,i,s,o,a){var u,f;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const d=isString(t)&&(((f=s==null?void 0:s.interpolation)==null?void 0:f.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const m=t.match(this.interpolator.nestingRegexp);h=m&&m.length}let p=s.replace&&!isString(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,s.lng||this.language||o.usedLng,s),d){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;h<g&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(t=this.interpolator.nest(t,(...m)=>(a==null?void 0:a[0])===m[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${i[0]}`),null):this.translate(...m,i),s)),s.interpolation&&this.interpolator.reset()}const l=s.postProcess||this.options.postProcess,c=isString(l)?[l]:l;return t!=null&&(c!=null&&c.length)&&s.applyPostProcessor!==!1&&(t=postProcessor.handle(c,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),t}resolve(t,i={}){let s,o,a,l,c;return isString(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(s))return;const f=this.extractFromKey(u,i),d=f.key;o=d;let h=f.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=i.count!==void 0&&!isString(i.count),m=p&&!i.ordinal&&i.count===0,g=i.context!==void 0&&(isString(i.context)||typeof i.context=="number")&&i.context!=="",v=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);h.forEach(b=>{var y,E;this.isValidLookup(s)||(c=b,!checkedLoadedFor[`${v[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(c))&&(checkedLoadedFor[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" 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!!!")),v.forEach(S=>{var A;if(this.isValidLookup(s))return;l=S;const w=[d];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,S,b,i);else{let O;p&&(O=this.pluralResolver.getSuffix(S,i.count,i));const I=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(i.ordinal&&O.indexOf(L)===0&&w.push(d+O.replace(L,this.options.pluralSeparator)),w.push(d+O),m&&w.push(d+I)),g){const $=`${d}${this.options.contextSeparator||"_"}${i.context}`;w.push($),p&&(i.ordinal&&O.indexOf(L)===0&&w.push($+O.replace(L,this.options.pluralSeparator)),w.push($+O),m&&w.push($+I))}}let C;for(;C=w.pop();)this.isValidLookup(s)||(a=C,s=this.getResource(S,b,C,i))}))})}),{res:s,usedKey:o,exactUsedKey:a,usedLng:l,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,s,o={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,i,s,o):this.resourceStore.getResource(t,i,s,o)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&!isString(t.replace);let o=s?t.replace:t;if(s&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const a of i)delete o[a]}return o}static hasDefaultValue(t){const i="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&i===s.substring(0,i.length)&&t[s]!==void 0)return!0;return!1}}class LanguageUtil{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(isString(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(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 i;return t.forEach(s=>{if(i)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(i=o)}),!i&&this.options.supportedLngs&&t.forEach(s=>{if(i)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return i=o;const a=this.getLanguagePartFromCode(s);if(this.isSupportedCode(a))return i=a;i=this.options.supportedLngs.find(l=>{if(l===a)return l;if(!(l.indexOf("-")<0&&a.indexOf("-")<0)&&(l.indexOf("-")>0&&a.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===a||l.indexOf(a)===0&&a.length>1))return l})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),isString(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let s=t[i];return s||(s=t[this.getScriptPartFromCode(i)]),s||(s=t[this.formatLanguageCode(i)]),s||(s=t[this.getLanguagePartFromCode(i)]),s||(s=t.default),s||[]}toResolveHierarchy(t,i){const s=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),o=[],a=l=>{l&&(this.isSupportedCode(l)?o.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return isString(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))):isString(t)&&a(this.formatLanguageCode(t)),s.forEach(l=>{o.indexOf(l)<0&&a(this.formatLanguageCode(l))}),o}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,i){this.rules[t]=i}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const s=getCleanedCode(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:s,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let l;try{l=new Intl.PluralRules(s,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!t.match(/-|_/))return dummyRule;const u=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(u,i)}return this.pluralRulesCache[a]=l,l}needsPlural(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,i,s={}){return this.getSuffixes(t,s).map(o=>`${i}${o}`)}getSuffixes(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),s?s.resolvedOptions().pluralCategories.sort((o,a)=>suffixesOrder[o]-suffixesOrder[a]).map(o=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,i,s={}){const o=this.getRule(t,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,s))}}const deepFindWithDefaults=(e,t,i,s=".",o=!0)=>{let a=getPathWithDefaults(e,t,i);return!a&&o&&isString(i)&&(a=deepFind(e,i,s),a===void 0&&(a=deepFind(t,i,s))),a},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(t={}){var i;this.logger=baseLogger.create("interpolator"),this.options=t,this.format=((i=t==null?void 0:t.interpolation)==null?void 0:i.format)||(s=>s),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:s,useRawValueToEscape:o,prefix:a,prefixEscaped:l,suffix:c,suffixEscaped:u,formatSeparator:f,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:E}=t.interpolation;this.escape=i!==void 0?i:escape,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?regexEscape(a):l||"{{",this.suffix=c?regexEscape(c):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?regexEscape(p):m||regexEscape("$t("),this.nestingSuffix=g?regexEscape(g):v||regexEscape(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,s)=>(i==null?void 0:i.source)===s?(i.lastIndex=0,i):new RegExp(s,"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,i,s,o){var m;let a,l,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=g=>{if(g.indexOf(this.formatSeparator)<0){const E=deepFindWithDefaults(i,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,s,{...o,...i,interpolationkey:g}):E}const v=g.split(this.formatSeparator),b=v.shift().trim(),y=v.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(i,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,s,{...o,...i,interpolationkey:b})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((m=o==null?void 0:o.interpolation)==null?void 0:m.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>regexSafe(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?regexSafe(this.escape(g)):regexSafe(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(l=f(v),l===void 0)if(typeof d=="function"){const y=d(t,a,o);l=isString(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))l="";else if(h){l=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),l="";else!isString(l)&&!this.useRawValueToEscape&&(l=makeString(l));const b=g.safeValue(l);if(t=t.replace(a[0],b),h?(g.regex.lastIndex+=l.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,i,s={}){let o,a,l;const c=(u,f)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp(`${d}[ ]*{`));let p=`{${h[1]}`;u=h[0],p=this.interpolate(p,l);const m=p.match(/'/g),g=p.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{l=JSON.parse(p),f&&(l={...f,...l})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${d}${p}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];l={...s},l=l.replace&&!isString(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;const f=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(f!==-1&&(u=o[1].slice(f).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,f)),a=i(c.call(this,o[1].trim(),l),l),a&&o[0]===t&&!isString(a))return a;isString(a)||(a=makeString(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((d,h)=>this.format(d,h,s.lng,{...s,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const parseFormatStr=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);t==="currency"&&o.indexOf(":")<0?i.currency||(i.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?i.range||(i.range=o.trim()):o.split(";").forEach(l=>{if(l){const[c,...u]=l.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();i[d]||(i[d]=f),f==="false"&&(i[d]=!1),f==="true"&&(i[d]=!0),isNaN(f)||(i[d]=parseInt(f,10))}})}return{formatName:t,formatOptions:i}},createCachedFormatter=e=>{const t={};return(i,s,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const l=s+JSON.stringify(a);let c=t[l];return c||(c=e(getCleanedCode(s),o),t[l]=c),c(i)}},createNonCachedFormatter=e=>(t,i,s)=>e(getCleanedCode(i),s)(t);class Formatter{constructor(t={}){this.logger=baseLogger.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const s=i.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:s((o,a)=>{const l=new Intl.NumberFormat(o,{...a});return c=>l.format(c)}),currency:s((o,a)=>{const l=new Intl.NumberFormat(o,{...a,style:"currency"});return c=>l.format(c)}),datetime:s((o,a)=>{const l=new Intl.DateTimeFormat(o,{...a});return c=>l.format(c)}),relativetime:s((o,a)=>{const l=new Intl.RelativeTimeFormat(o,{...a});return c=>l.format(c,a.range||"day")}),list:s((o,a)=>{const l=new Intl.ListFormat(o,{...a});return c=>l.format(c)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=createCachedFormatter(i)}format(t,i,s,o={}){const a=i.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,u)=>{var h;const{formatName:f,formatOptions:d}=parseFormatStr(u);if(this.formats[f]){let p=c;try{const m=((h=o==null?void 0:o.formatParams)==null?void 0:h[o.interpolationkey])||{},g=m.locale||m.lng||o.locale||o.lng||s;p=this.formats[f](c,g,{...d,...o,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}const removePending=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Connector extends EventEmitter{constructor(t,i,s,o={}){var a,l;super(),this.backend=t,this.store=i,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=baseLogger.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=[],(l=(a=this.backend)==null?void 0:a.init)==null||l.call(a,s,o.backend,o)}queueLoad(t,i,s,o){const a={},l={},c={},u={};return t.forEach(f=>{let d=!0;i.forEach(h=>{const p=`${f}|${h}`;!s.reload&&this.store.hasResourceBundle(f,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?l[p]===void 0&&(l[p]=!0):(this.state[p]=1,d=!1,l[p]===void 0&&(l[p]=!0),a[p]===void 0&&(a[p]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(c[f]=!0)}),(Object.keys(a).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(l),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,i,s){const o=t.split("|"),a=o[0],l=o[1];i&&this.emit("failedLoading",a,l,i),!i&&s&&this.store.addResourceBundle(a,l,s,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&s&&(this.state[t]=0);const c={};this.queue.forEach(u=>{pushPath(u.loaded,[a],l),removePending(u,t),i&&u.errors.push(i),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{c[f]||(c[f]={});const d=u.loaded[f];d.length&&d.forEach(h=>{c[f][h]===void 0&&(c[f][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,i,s,o=0,a=this.retryTimeout,l){if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:s,tried:o,wait:a,callback:l});return}this.readingCalls++;const c=(f,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(f&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,i,s,o+1,a*2,l)},a);return}l(f,d)},u=this.backend[s].bind(this.backend);if(u.length===2){try{const f=u(t,i);f&&typeof f.then=="function"?f.then(d=>c(null,d)).catch(c):c(null,f)}catch(f){c(f)}return}return u(t,i,c)}prepareLoading(t,i,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();isString(t)&&(t=this.languageUtils.toResolveHierarchy(t)),isString(i)&&(i=[i]);const a=this.queueLoad(t,i,s,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(l=>{this.loadOne(l)})}load(t,i,s){this.prepareLoading(t,i,{},s)}reload(t,i,s){this.prepareLoading(t,i,{reload:!0},s)}loadOne(t,i=""){const s=t.split("|"),o=s[0],a=s[1];this.read(o,a,"read",void 0,void 0,(l,c)=>{l&&this.logger.warn(`${i}loading namespace ${a} for language ${o} failed`,l),!l&&c&&this.logger.log(`${i}loaded namespace ${a} for language ${o}`,c),this.loaded(t,l,c)})}saveMissing(t,i,s,o,a,l={},c=()=>{}){var u,f,d,h,p;if((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${s}" as the namespace "${i}" 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(!(s==null||s==="")){if((p=this.backend)!=null&&p.create){const m={...l,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,i,s,o,m):v=g(t,i,s,o),v&&typeof v.then=="function"?v.then(b=>c(null,b)).catch(c):c(null,v)}catch(v){c(v)}else g(t,i,s,o,c,m)}!t||!t[0]||this.store.addResource(t[0],i,s,o)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),isString(e[1])&&(t.defaultValue=e[1]),isString(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(s=>{t[s]=i[s]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=e=>{var t,i;return isString(e.ns)&&(e.ns=[e.ns]),isString(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((i=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class I18n extends EventEmitter{constructor(t={},i){if(super(),this.options=transformOptions(t),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(isString(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=get();this.options={...s,...this.options,...transformOptions(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(o(this.modules.logger),this.options):baseLogger.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=Formatter;const d=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const h=this.services;h.logger=baseLogger,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new PluralResolver(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(f),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Interpolator(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Connector(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(m,...g)=>{this.emit(m,...g)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(m,...g)=>{this.emit(m,...g)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,i||(i=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[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(f=>{this[f]=(...d)=>this.store[f](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...d)=>(this.store[f](...d),this)});const c=defer(),u=()=>{const f=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),i(d,h)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),c}loadResources(t,i=noop){var a,l;let s=i;const o=isString(t)?t:this.language;if(typeof t=="function"&&(s=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const c=[],u=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};o?u(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(l=(a=this.options.preload)==null?void 0:a.forEach)==null||l.call(a,f=>u(f)),this.services.backendConnector.load(c,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(f)})}else s(null)}reloadResources(t,i,s){const o=defer();return typeof t=="function"&&(s=t,t=void 0),typeof i=="function"&&(s=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),s||(s=noop),this.services.backendConnector.reload(t,i,a=>{o.resolve(),s(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"&&postProcessor.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 i=0;i<this.languages.length;i++){const s=this.languages[i];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const s=defer();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve((...f)=>this.t(...f)),i&&i(c,(...f)=>this.t(...f))},l=c=>{var d,h;!t&&!c&&this.services.languageDetector&&(c=[]);const u=isString(c)?c:c&&c[0],f=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(isString(c)?[c]:c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,f)),this.loadResources(f,p=>{a(p,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,i,s){const o=(a,l,...c)=>{let u;typeof l!="object"?u=this.options.overloadTranslationOptionHandler([a,l].concat(c)):u={...l},u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs,u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||s||o.keyPrefix);const f=this.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(a)?d=a.map(h=>(typeof h=="function"&&(h=keysFromSelector(h,{...this.options,...l})),`${u.keyPrefix}${f}${h}`)):(typeof a=="function"&&(a=keysFromSelector(a,{...this.options,...l})),d=u.keyPrefix?`${u.keyPrefix}${f}${a}`:a),this.t(d,u)};return isString(t)?o.lng=t:o.lngs=t,o.ns=i,o.keyPrefix=s,o}t(...t){var i;return(i=this.translator)==null?void 0:i.translate(...t)}exists(...t){var i;return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=i.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const l=(c,u)=>{const f=this.services.backendConnector.state[`${c}|${u}`];return f===-1||f===0||f===2};if(i.precheck){const c=i.precheck(this,l);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(s,t)&&(!o||l(a,t)))}loadNamespaces(t,i){const s=defer();return this.options.ns?(isString(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}loadLanguages(t,i){const s=defer();isString(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(l=>o.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return a.length?(this.options.preload=o.concat(a),this.loadResources(l=>{s.resolve(),i&&i(l)}),s):(i&&i(),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";try{const l=new Intl.Locale(t);if(l&&l.getTextInfo){const c=l.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const i=["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"],s=((a=this.services)==null?void 0:a.languageUtils)||new LanguageUtil(get());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){return new I18n(t,i)}cloneInstance(t={},i=noop){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new I18n(o);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},s){const c=Object.keys(this.store.data).reduce((u,f)=>(u[f]={...this.store.data[f]},u[f]=Object.keys(u[f]).reduce((d,h)=>(d[h]={...u[f][h]},d),u[f]),u),{});a.store=new ResourceStore(c,o),a.services.resourceStore=a.store}return a.translator=new Translator(a.services,o),a.translator.on("*",(c,...u)=>{a.emit(c,...u)}),a.init(o,i),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 instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const balance$4="Balance",topUp$4="Top Up",ads$4="Ads",adsOn$4="On",adsOff$4="Off",level$4="Level",toLevelUp$4="to lvl up",xpCounter$4="/ {{total}} XP",lootBox$4="Loot Box",forLevel$4="for level {{level}}",unopenedLootBox$4="Unopened Loot Box",emptyBox$4="Empty Box",openItem$4="Open Item",reward_type$4={coins:"{{count}} coin",coins_one:"{{count}} coin",coins_few:"{{count}} coins",coins_many:"{{count}} coins",usdt_no_amount:"USDT",coins_no_amount:"Coins",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Double Balance",box:"LOOT BOX",box_common:"BASIC",box_rare:"RARE",box_epic:"EPIC",box_legend:"LEGEND"},confirmIframe$4={pay:"Pay",cancel:"Cancel"},months$4={january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},box_open$4={skip:"Skip",you_ve_got:"You’ve got",button_reveal_reward:"Reveal Reward",button_open_now:"Open Now",button_save_inventory:"Save to Inventory",button_unopened_boxes:"Unopened Loot Boxes",recent_rewards:"Recent rewards",later_open_later_inventory:"You can open it later in inventory"},common$4={error:"Oops! Something went wrong. Please try again later.",continue:"Continue",ok:"OK",timeAgo:{sec_zero:"{{count}} seconds ago",sec_one:"{{count}} second ago",sec_two:"{{count}} seconds ago",sec_few:"{{count}} seconds ago",sec_many:"{{count}} seconds ago",sec_other:"{{count}} seconds ago",now:"Just now",min_zero:"{{count}} minutes ago",min_one:"{{count}} minute ago",min_two:"{{count}} minutes ago",min_few:"{{count}} minutes ago",min_many:"{{count}} minutes ago",min_other:"{{count}} minutes ago",h_zero:"{{count}} hours ago",h_one:"{{count}} hour ago",h_two:"{{count}} hours ago",h_few:"{{count}} hours ago",h_many:"{{count}} hours ago",h_other:"{{count}} hours ago",d_zero:"{{count}} days ago",d_one:"{{count}} day ago",d_two:"{{count}} days ago",d_few:"{{count}} days ago",d_many:"{{count}} days ago",d_other:"{{count}} days ago"}},snackbar$4={purchase:{blackHolePurchaseChest:"Purchase",blackHolePurchaseLevel:"Purchase",blackHolePurchaseAutoBurn:"Purchase",walletPurchaseGems:"Purchase",blackHoleBurnCoins:"Burned",error:"Failed to make a purchase"},receiving:{claimedTask:"Received"}},purchaseAdsFreeModal$4={title:"Remove Ads",disableAllInterruptions:"Disable all interruptions in games with a recurring monthly subscription. No worries, you will also have the option to turn ads on back if you want anytime!",noInterruptionsInGames:"No interruptions in games with a recurring subscription.",activeRecurring:"Active recurring payments at {{price}}",aMonth:" a month.",nextPayment:"Next payment {{date}}",activeUntil:"Active until {{date}}",subscriptionPaused:"Subscription is Paused",resumeSubscription:"Resume Subscription",cancelSubscription:"Cancel Subscription",continue:"Continue",month:"{{price}} / month",errorCancelSubscription:"Failed to cancel subscription. Please try again"},levelInfoModal$4={title:"Your Level",description:"Gain experience by playing games. For leveling up you get loot boxes, which may contain USDT, coins or better loot boxes. Compete with other players to win real USDT every week.",action:"Got It"},topUpModal$4={balance:"Balance",topUpBalance:"Top Up Gems",coins:"coins",gems:"gems",topUp:"Top Up"},inventoryModal$4={title:"Inventory",description:"It's your personal storage space for all unopened loot boxes. Tap each image to reveal reward inside!"},en={balance:balance$4,topUp:topUp$4,ads:ads$4,adsOn:adsOn$4,adsOff:adsOff$4,level:level$4,toLevelUp:toLevelUp$4,xpCounter:xpCounter$4,lootBox:lootBox$4,forLevel:forLevel$4,unopenedLootBox:unopenedLootBox$4,emptyBox:emptyBox$4,openItem:openItem$4,reward_type:reward_type$4,confirmIframe:confirmIframe$4,months:months$4,box_open:box_open$4,common:common$4,snackbar:snackbar$4,purchaseAdsFreeModal:purchaseAdsFreeModal$4,levelInfoModal:levelInfoModal$4,topUpModal:topUpModal$4,inventoryModal:inventoryModal$4},balance$3="Saldo",topUp$3="Recargar",ads$3="Anuncios",adsOn$3="On",adsOff$3="Off",level$3="Nivel",toLevelUp$3="para subir de nivel",xpCounter$3="/ {{total}} XP",lootBox$3="Caja de botín",forLevel$3="para el nivel {{level}}",unopenedLootBox$3="Caja de botín sin abrir",emptyBox$3="Caja vacía",openItem$3="Abrir objeto",reward_type$3={coins:"{{count}} moneda",coins_one:"{{count}} moneda",coins_few:"{{count}} monedas",coins_many:"{{count}} monedas",usdt_no_amount:"USDT",coins_no_amount:"Monedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Doble saldo",box:"CAJA DE BOTÍN",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LEGENDARIA"},confirmIframe$3={pay:"Pagar",cancel:"Cancelar"},months$3={january:"Ene",february:"Feb",march:"Mar",april:"Abr",may:"May",june:"Jun",july:"Jul",august:"Ago",september:"Sep",october:"Oct",november:"Nov",december:"Dic"},box_open$3={skip:"Omitir",you_ve_got:"Obtuviste",button_reveal_reward:"Revelar recompensa",button_open_now:"Abrir ahora",button_save_inventory:"Guardar en inventario",button_unopened_boxes:"Inventario",recent_rewards:"Recientes",later_open_later_inventory:"Puedes abrirla más tarde en el inventario"},common$3={error:"¡Ups! Algo salió mal. Inténtalo de nuevo más tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"hace {{count}} segundos",sec_one:"hace {{count}} segundo",sec_two:"hace {{count}} segundos",sec_few:"hace {{count}} segundos",sec_many:"hace {{count}} segundos",sec_other:"hace {{count}} segundos",now:"Justo ahora",min_zero:"hace {{count}} minutos",min_one:"hace {{count}} minuto",min_two:"hace {{count}} minutos",min_few:"hace {{count}} minutos",min_many:"hace {{count}} minutos",min_other:"hace {{count}} minutos",h_zero:"hace {{count}} horas",h_one:"hace {{count}} hora",h_two:"hace {{count}} horas",h_few:"hace {{count}} horas",h_many:"hace {{count}} horas",h_other:"hace {{count}} horas",d_zero:"hace {{count}} días",d_one:"hace {{count}} día",d_two:"hace {{count}} días",d_few:"hace {{count}} días",d_many:"hace {{count}} días",d_other:"hace {{count}} días"}},snackbar$3={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Quemado",error:"No se pudo realizar la compra"},receiving:{claimedTask:"Recibido"}},purchaseAdsFreeModal$3={title:"Eliminar anuncios",disableAllInterruptions:"Desactiva todas las interrupciones en los juegos con una suscripción mensual recurrente. No te preocupes, ¡también tendrás la opción de activar los anuncios cuando quieras!",noInterruptionsInGames:"Sin interrupciones en los juegos con una suscripción recurrente.",activeRecurring:"Pagos recurrentes activos a {{price}}",aMonth:" al mes.",nextPayment:"Próximo pago {{date}}",activeUntil:"Activo hasta {{date}}",subscriptionPaused:"La suscripción está en pausa",resumeSubscription:"Reanudar suscripción",cancelSubscription:"Cancelar suscripción",continue:"Continuar",month:"{{price}} / mes",errorCancelSubscription:"No se pudo cancelar la suscripción. Inténtalo de nuevo"},levelInfoModal$3={title:"Tu nivel",description:"Gana experiencia jugando. Al subir de nivel obtienes cajas de botín, que pueden contener USDT, monedas o mejores cajas. Compite con otros jugadores para ganar USDT real cada semana.",action:"Entendido"},topUpModal$3={balance:"Saldo",topUpBalance:"Recargar gemas",coins:"monedas",gems:"gemas",topUp:"Recargar"},inventoryModal$3={title:"Inventario",description:"Es tu espacio de almacenamiento personal para todas las cajas de botín sin abrir. Toca cada imagen para revelar la recompensa dentro."},es={balance:balance$3,topUp:topUp$3,ads:ads$3,adsOn:adsOn$3,adsOff:adsOff$3,level:level$3,toLevelUp:toLevelUp$3,xpCounter:xpCounter$3,lootBox:lootBox$3,forLevel:forLevel$3,unopenedLootBox:unopenedLootBox$3,emptyBox:emptyBox$3,openItem:openItem$3,reward_type:reward_type$3,confirmIframe:confirmIframe$3,months:months$3,box_open:box_open$3,common:common$3,snackbar:snackbar$3,purchaseAdsFreeModal:purchaseAdsFreeModal$3,levelInfoModal:levelInfoModal$3,topUpModal:topUpModal$3,inventoryModal:inventoryModal$3},balance$2="बैलेंस",topUp$2="रिचार्ज",ads$2="विज्ञापन",adsOn$2="चालू",adsOff$2="बंद",level$2="स्तर",toLevelUp$2="लेवल अप तक",xpCounter$2="/ {{total}} XP",lootBox$2="लूट बॉक्स",forLevel$2="स्तर {{level}} के लिए",unopenedLootBox$2="बिना खोले गए लूट बॉक्स",emptyBox$2="खाली बॉक्स",openItem$2="आइटम खोलें",reward_type$2={coins:"{{count}} सिक्के",coins_one:"{{count}} सिक्का",coins_few:"{{count}} सिक्के",coins_many:"{{count}} सिक्के",coins_no_amount:"सिक्के",usdt_no_amount:"USDT",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"टेलीग्राम प्रीमियम",double_balance:"दोगुनी शेष राशि",box:"लूट बॉक्स",box_common:"बुनियादी",box_rare:"दुर्लभ",box_epic:"महाकाव्य",box_legend:"दंतकथा"},confirmIframe$2={pay:"भुगतान करें",cancel:"रद्द करें"},months$2={january:"जन",february:"फ़र",march:"मार्च",april:"अप्रै",may:"मई",june:"जून",july:"जुला",august:"अग",september:"सितं",october:"अक्टू",november:"नवं",december:"दिसं"},box_open$2={skip:"छोड़ें",you_ve_got:"आपको मिला",button_reveal_reward:"पुरस्कार प्रकट करें",button_open_now:"अभी खोलें",button_save_inventory:"इन्वेंटरी में सहेजें",button_unopened_boxes:"अनपेट लूट बॉक्स",recent_rewards:"हाल के पुरस्कार",later_open_later_inventory:"आप इसे बाद में इन्वेंटरी में खोल सकते हैं"},common$2={error:"उफ़! कुछ गलत हो गया। कृपया बाद में फिर प्रयास करें।",continue:"जारी रखें",ok:"ठीक है",timeAgo:{sec_zero:"{{count}} सेकंड पहले",sec_one:"{{count}} सेकंड पहले",sec_two:"{{count}} सेकंड पहले",sec_few:"{{count}} सेकंड पहले",sec_many:"{{count}} सेकंड पहले",sec_other:"{{count}} सेकंड पहले",now:"अभी",min_zero:"{{count}} मिनट पहले",min_one:"{{count}} मिनट पहले",min_two:"{{count}} मिनट पहले",min_few:"{{count}} मिनट पहले",min_many:"{{count}} मिनट पहले",min_other:"{{count}} मिनट पहले",h_zero:"{{count}} घंटे पहले",h_one:"{{count}} घंटा पहले",h_two:"{{count}} घंटे पहले",h_few:"{{count}} घंटे पहले",h_many:"{{count}} घंटे पहले",h_other:"{{count}} घंटे पहले",d_zero:"{{count}} दिन पहले",d_one:"{{count}} दिन पहले",d_two:"{{count}} दिन पहले",d_few:"{{count}} दिन पहले",d_many:"{{count}} दिन पहले",d_other:"{{count}} दिन पहले"}},snackbar$2={purchase:{blackHolePurchaseChest:"खरीद",blackHolePurchaseLevel:"खरीद",blackHolePurchaseAutoBurn:"खरीद",walletPurchaseGems:"खरीद",blackHoleBurnCoins:"जलाया गया",error:"खरीदारी विफल रही"},receiving:{claimedTask:"प्राप्त"}},purchaseAdsFreeModal$2={title:"विज्ञापन हटाएँ",disableAllInterruptions:"मासिक आवर्ती सदस्यता के साथ खेलों में सभी बाधाएँ बंद करें। चिंता न करें, आप चाहें तो किसी भी समय विज्ञापन फिर से चालू कर सकते हैं!",noInterruptionsInGames:"आवर्ती सदस्यता के साथ खेलों में कोई व्यवधान नहीं।",activeRecurring:"सक्रिय आवर्ती भुगतान {{price}} पर",aMonth:" प्रति माह.",nextPayment:"अगला भुगतान {{date}}",activeUntil:"{{date}} तक सक्रिय",subscriptionPaused:"सदस्यता रोकी गई है",resumeSubscription:"सदस्यता फिर शुरू करें",cancelSubscription:"सदस्यता रद्द करें",continue:"जारी रखें",month:"{{price}} / माह",errorCancelSubscription:"सदस्यता रद्द नहीं हो सकी। कृपया पुनः प्रयास करें"},levelInfoModal$2={title:"आपका स्तर",description:"गेम खेलकर अनुभव अर्जित करें। लेवल बढ़ाने पर आपको लूट बॉक्स मिलते हैं जिनमें USDT, कॉइन्स या बेहतर लूट बॉक्स हो सकते हैं। हर सप्ताह वास्तविक USDT जीतने के लिए अन्य खिलाड़ियों से प्रतिस्पर्धा करें।",action:"समझ गया"},topUpModal$2={balance:"बैलेंस",topUpBalance:"जेम्स रिचार्ज करें",coins:"कॉइन्स",gems:"जेम्स",topUp:"रिचार्ज"},inventoryModal$2={title:"इन्वेंटरी",description:"यह आपके सभी बिना खुले लूट बॉक्स के लिए आपका व्यक्तिगत स्टोरेज स्पेस है। अंदर का इनाम प्रकट करने के लिए हर छवि पर टैप करें!"},hi={balance:balance$2,topUp:topUp$2,ads:ads$2,adsOn:adsOn$2,adsOff:adsOff$2,level:level$2,toLevelUp:toLevelUp$2,xpCounter:xpCounter$2,lootBox:lootBox$2,forLevel:forLevel$2,unopenedLootBox:unopenedLootBox$2,emptyBox:emptyBox$2,openItem:openItem$2,reward_type:reward_type$2,confirmIframe:confirmIframe$2,months:months$2,box_open:box_open$2,common:common$2,snackbar:snackbar$2,purchaseAdsFreeModal:purchaseAdsFreeModal$2,levelInfoModal:levelInfoModal$2,topUpModal:topUpModal$2,inventoryModal:inventoryModal$2},balance$1="Saldo",topUp$1="Recarregar",ads$1="Anúncios",adsOn$1="On",adsOff$1="Off",level$1="Nível",toLevelUp$1="para subir de nível",xpCounter$1="/ {{total}} XP",lootBox$1="Caixa de loot",forLevel$1="para o nível {{level}}",unopenedLootBox$1="Caixa de Loot Não Aberta",emptyBox$1="Caixa vazia",openItem$1="Abrir item",reward_type$1={coins:"{{count}} moeda",coins_one:"{{count}} moeda",coins_few:"{{count}} moedas",coins_many:"{{count}} moedas",usdt_no_amount:"USDT",coins_no_amount:"Moedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Saldo Duplo",box:"CAIXA DE LOOT",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LENDÁRIA"},confirmIframe$1={pay:"Pagar",cancel:"Cancelar"},months$1={january:"Jan",february:"Fev",march:"Mar",april:"Abr",may:"Mai",june:"Jun",july:"Jul",august:"Ago",september:"Set",october:"Out",november:"Nov",december:"Dez"},box_open$1={skip:"Pular",you_ve_got:"Você recebeu",button_reveal_reward:"Revelar Recompensa",button_open_now:"Abrir Agora",button_save_inventory:"Salvar no Inventário",button_unopened_boxes:"Inventário",recent_rewards:"Recentes",later_open_later_inventory:"Você pode abrir mais tarde no inventário"},common$1={error:"Ops! Algo deu errado. Tente novamente mais tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"há {{count}} segundos",sec_one:"há {{count}} segundo",sec_two:"há {{count}} segundos",sec_few:"há {{count}} segundos",sec_many:"há {{count}} segundos",sec_other:"há {{count}} segundos",now:"Agora mesmo",min_zero:"há {{count}} minutos",min_one:"há {{count}} minuto",min_two:"há {{count}} minutos",min_few:"há {{count}} minutos",min_many:"há {{count}} minutos",min_other:"há {{count}} minutos",h_zero:"há {{count}} horas",h_one:"há {{count}} hora",h_two:"há {{count}} horas",h_few:"há {{count}} horas",h_many:"há {{count}} horas",h_other:"há {{count}} horas",d_zero:"há {{count}} dias",d_one:"há {{count}} dia",d_two:"há {{count}} dias",d_few:"há {{count}} dias",d_many:"há {{count}} dias",d_other:"há {{count}} dias"}},snackbar$1={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Queimado",error:"Falha ao realizar a compra"},receiving:{claimedTask:"Recebido"}},purchaseAdsFreeModal$1={title:"Remover anúncios",disableAllInterruptions:"Desative todas as interrupções nos jogos com uma assinatura mensal recorrente. Sem preocupações, você também poderá ligar os anúncios quando quiser!",noInterruptionsInGames:"Sem interrupções nos jogos com uma assinatura recorrente.",activeRecurring:"Pagamentos recorrentes ativos em {{price}}",aMonth:" por mês.",nextPayment:"Próximo pagamento {{date}}",activeUntil:"Ativo até {{date}}",subscriptionPaused:"A assinatura está em pausa",resumeSubscription:"Retomar assinatura",cancelSubscription:"Cancelar assinatura",continue:"Continuar",month:"{{price}} / mês",errorCancelSubscription:"Falha ao cancelar a assinatura. Tente novamente"},levelInfoModal$1={title:"Seu nível",description:"Ganhe experiência jogando. Ao subir de nível você recebe caixas de loot, que podem conter USDT, moedas ou caixas melhores. Compita com outros jogadores para ganhar USDT real toda semana.",action:"Entendi"},topUpModal$1={balance:"Saldo",topUpBalance:"Recarregar gemas",coins:"moedas",gems:"gemas",topUp:"Recarregar"},inventoryModal$1={title:"Inventário",description:"É o seu espaço pessoal de armazenamento para todas as caixas de loot não abertas. Toque em cada imagem para revelar a recompensa dentro!"},pt={balance:balance$1,topUp:topUp$1,ads:ads$1,adsOn:adsOn$1,adsOff:adsOff$1,level:level$1,toLevelUp:toLevelUp$1,xpCounter:xpCounter$1,lootBox:lootBox$1,forLevel:forLevel$1,unopenedLootBox:unopenedLootBox$1,emptyBox:emptyBox$1,openItem:openItem$1,reward_type:reward_type$1,confirmIframe:confirmIframe$1,months:months$1,box_open:box_open$1,common:common$1,snackbar:snackbar$1,purchaseAdsFreeModal:purchaseAdsFreeModal$1,levelInfoModal:levelInfoModal$1,topUpModal:topUpModal$1,inventoryModal:inventoryModal$1},balance="Баланс",topUp="Пополнить",ads="Реклама",adsOn="Вкл.",adsOff="Выкл.",level="Уровень",toLevelUp="до повышения уровня",xpCounter="/ {{total}} XP",lootBox="Лутбокс",forLevel="для уровня {{level}}",unopenedLootBox="Неоткрытый лутбокс",emptyBox="Пустой бокс",openItem="Открыть предмет",reward_type={coins:"{{count}} монета",coins_one:"{{count}} монета",coins_few:"{{count}} монеты",coins_many:"{{count}} монет",usdt_no_amount:"USDT",coins_no_amount:"Монеты",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Телеграм Премиум",double_balance:"Двойной баланс",box:"ЛУТ БОКС",box_common:"ОБЫЧНЫЙ",box_rare:"РЕДКИЙ",box_epic:"ЭПИК",box_legend:"ЛЕГЕНДАРНЫЙ"},confirmIframe={pay:"Оплатить",cancel:"Отменить"},months={january:"янв",february:"фев",march:"мар",april:"апр",may:"май",june:"июн",july:"июл",august:"авг",september:"сен",october:"окт",november:"ноя",december:"дек"},box_open={skip:"Пропустить",you_ve_got:"Получено",button_reveal_reward:"Узнать награду",button_open_now:"Открыть",button_save_inventory:"Оставить в инвентаре",button_unopened_boxes:"Неоткрытые лутбоксы",recent_rewards:"Недавние",later_open_later_inventory:"Можно открыть его позже в инвентаре"},common={error:"Упс! Что-то пошло не так. Попробуй позже.",continue:"Продолжить",ok:"OK",timeAgo:{sec_zero:"{{count}} секунд назад",sec_one:"{{count}} секунду назад",sec_two:"{{count}} секунды назад",sec_few:"{{count}} секунды назад",sec_many:"{{count}} секунд назад",sec_other:"{{count}} секунд назад",now:"Только что",min_zero:"{{count}} минут назад",min_one:"{{count}} минуту назад",min_two:"{{count}} минуты назад",min_few:"{{count}} минуты назад",min_many:"{{count}} минут назад",min_other:"{{count}} минут назад",h_zero:"{{count}} часов назад",h_one:"{{count}} час назад",h_two:"{{count}} часа назад",h_few:"{{count}} часа назад",h_many:"{{count}} часов назад",h_other:"{{count}} часов назад",d_zero:"{{count}} дней назад",d_one:"{{count}} день назад",d_two:"{{count}} дня назад",d_few:"{{count}} дня назад",d_many:"{{count}} дней назад",d_other:"{{count}} дней назад"}},snackbar={purchase:{blackHolePurchaseChest:"Покупка",blackHolePurchaseLevel:"Покупка",blackHolePurchaseAutoBurn:"Покупка",walletPurchaseGems:"Покупка",blackHoleBurnCoins:"Сожжено",error:"Не удалось совершить покупку"},receiving:{claimedTask:"Получено"}},purchaseAdsFreeModal={title:"Удалить рекламу",disableAllInterruptions:"Отключите все прерывания в играх с ежемесячной подпиской. Не волнуйтесь, при желании вы всегда сможете снова включить рекламу!",noInterruptionsInGames:"Без прерываний в играх при оформленной подписке.",activeRecurring:"Активные регулярные платежи по цене {{price}}",aMonth:" в месяц.",nextPayment:"Следующий платеж {{date}}",activeUntil:"Активна до {{date}}",subscriptionPaused:"Подписка приостановлена",resumeSubscription:"Возобновить подписку",cancelSubscription:"Отменить подписку",continue:"Продолжить",month:"{{price}} / месяц",errorCancelSubscription:"Не удалось отменить подписку. Пожалуйста, попробуйте еще раз"},levelInfoModal={title:"Ваш уровень",description:"Получайте опыт, играя в игры. За повышение уровня вы получаете лутбоксы, в которых могут быть USDT, монеты или более ценные лутбоксы. Соревнуйтесь с другими игроками, чтобы выигрывать реальные USDT каждую неделю.",action:"Понял"},topUpModal={balance:"Баланс",topUpBalance:"Пополнить баланс",coins:"монет",gems:"алмазов",topUp:"Пополнить"},inventoryModal={title:"Инвентарь",description:"Это твоё персональное хранилище для неоткрытых лутбоксов. Нажми на каждый, чтобы узнать, какая внутри награда!"},ru={balance,topUp,ads,adsOn,adsOff,level,toLevelUp,xpCounter,lootBox,forLevel,unopenedLootBox,emptyBox,openItem,reward_type,confirmIframe,months,box_open,common,snackbar,purchaseAdsFreeModal,levelInfoModal,topUpModal,inventoryModal};var define_process_env_default$2={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const resources={en:{translation:en},ru:{translation:ru},hi:{translation:hi},es:{translation:es},pt:{translation:pt}};instance.use(initReactI18next).init({resources,fallbackLng:"en",supportedLngs:supportedLanguages,debug:define_process_env_default$2.NODE_ENV==="development",interpolation:{escapeValue:!1}});const translationsTyped=(e,t)=>instance.t(e,t),PROVIDER_COLORS={Orbit:"#3b82f6",TMA:"#22c55e",Monetag:"#f97316",Adsgram:"#a855f7",Gigapub:"#14b8a6",Banner:"#ec4899",SDK:"#6366f1"},ADS_BADGE_STYLE="background:#1e293b;color:#38bdf8;padding:2px 6px;border-radius:3px;font-weight:bold";function getProviderStyle(e){return`background:${PROVIDER_COLORS[e]||"#94a3b8"};color:#fff;padding:2px 6px;border-radius:3px;font-weight:bold`}function formatTimestamp(){return`${(performance.now()/1e3).toFixed(2)}s`}function createAdLogger(e){const t=new Map,i=getProviderStyle(e);return{info(s,o){o!==void 0?console.log(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit",o):console.log(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit")},warn(s,o){o!==void 0?console.warn(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#f59e0b;font-weight:bold",o):console.warn(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#f59e0b;font-weight:bold")},error(s,o){o!==void 0?console.error(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#ef4444;font-weight:bold",o):console.error(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#ef4444;font-weight:bold")},group(s){console.groupCollapsed(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit;font-weight:bold")},groupEnd(){console.groupEnd()},time(s){t.set(s,performance.now())},timeEnd(s){const o=t.get(s);if(o!==void 0){const a=performance.now()-o;t.delete(s),console.log(`%c ADS %c ${e} %c ${s} took ${a.toFixed(0)}ms`,ADS_BADGE_STYLE,i,"color:#38bdf8;font-style:italic")}}}}const log$5=createAdLogger("Banner");class BannerManager{constructor(t){this.containerId=(t==null?void 0:t.containerId)||"overlay-banner-bottom",this.bannerHeight=(t==null?void 0:t.height)||60,this.animationDuration=(t==null?void 0:t.animationDuration)||300}async checkBannerPermission(t){try{const i=await t();return i.ads_free?(log$5.info("Banner disabled: user has ads_free flag"),!1):Array.isArray(i==null?void 0:i.audiences)&&i.audiences.includes("banner_test")?!0:(log$5.info("Banner test flag not found in user profile audiences"),!1)}catch(i){return log$5.error("Error checking banner permission",i),!1}}async setBanner(t,i){try{if(!await this.checkBannerPermission(i))return;const o=document.getElementById(this.containerId);if(!o){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}o.classList.remove("cssdk-banner-hide"),typeof t=="string"?o.innerHTML=t:(o.innerHTML="",o.appendChild(t)),document.documentElement.style.setProperty("--banner-bottom-height",`${this.bannerHeight}px`),requestAnimationFrame(()=>{o.classList.add("cssdk-banner-show")})}catch(s){log$5.error("setBanner error",s)}}createDefaultContent(){return`
162
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(j,D){if(j){if(typeof j=="string")return S(j,D);var M=Object.prototype.toString.call(j).slice(8,-1);if(M==="Object"&&j.constructor&&(M=j.constructor.name),M==="Map"||M==="Set")return Array.from(j);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return S(j,D)}}function S(j,D){(D==null||D>j.length)&&(D=j.length);for(var M=0,k=new Array(D);M<D;M++)k[M]=j[M];return k}function w(j,D){var M=j==null?null:typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(M!=null){var k,T,P,F,N=[],H=!0,q=!1;try{if(P=(M=M.call(j)).next,D!==0)for(;!(H=(k=P.call(M)).done)&&(N.push(k.value),N.length!==D);H=!0);}catch(Y){q=!0,T=Y}finally{try{if(!H&&M.return!=null&&(F=M.return(),Object(F)!==F))return}finally{if(q)throw T}}return N}}function C(j){if(Array.isArray(j))return j}function A(j,D){if(!(j instanceof D))throw new TypeError("Cannot call a class as a function")}function O(j,D){for(var M=0;M<D.length;M++){var k=D[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(j,$(k.key),k)}}function I(j,D,M){return O(j.prototype,D),Object.defineProperty(j,"prototype",{writable:!1}),j}function L(j,D,M){return D=$(D),D in j?Object.defineProperty(j,D,{value:M,enumerable:!0,configurable:!0,writable:!0}):j[D]=M,j}function $(j){var D=V(j,"string");return f(D)==="symbol"?D:String(D)}function V(j,D){if(f(j)!=="object"||j===null)return j;var M=j[Symbol.toPrimitive];if(M!==void 0){var k=M.call(j,D||"default");if(f(k)!=="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(j)}var W=function(){function j(){var D=this;A(this,j),L(this,"reset",function(){D.isInitialized=!1,D._testMode=!1,D._currentMeasurementId,D._hasLoadedGA=!1,D._isQueuing=!1,D._queueGtag=[]}),L(this,"_gtag",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];D._testMode||D._isQueuing?D._queueGtag.push(k):t.default.apply(void 0,k)}),L(this,"_loadGA",function(M,k){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!D._hasLoadedGA){var P=document.createElement("script");P.async=!0,P.src="".concat(T,"?id=").concat(M),k&&P.setAttribute("nonce",k),document.body.appendChild(P),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},D._hasLoadedGA=!0}}),L(this,"_toGtagOptions",function(M){if(M){var k={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},T=Object.entries(M).reduce(function(P,F){var N=b(F,2),H=N[0],q=N[1];return k[H]?P[k[H]]=q:P[H]=q,P},{});return T}}),L(this,"initialize",function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!M)throw new Error("Require GA_MEASUREMENT_ID");var T=typeof M=="string"?[{trackingId:M}]:M;D._currentMeasurementId=T[0].trackingId;var P=k.gaOptions,F=k.gtagOptions,N=k.nonce,H=k.testMode,q=H===void 0?!1:H,Y=k.gtagUrl;if(D._testMode=q,q||D._loadGA(D._currentMeasurementId,N,Y),D.isInitialized||(D._gtag("js",new Date),T.forEach(function(ee){var z=v(v(v({},D._toGtagOptions(v(v({},P),ee.gaOptions))),F),ee.gtagOptions);Object.keys(z).length?D._gtag("config",ee.trackingId,z):D._gtag("config",ee.trackingId)})),D.isInitialized=!0,!q){var Q=d(D._queueGtag);for(D._queueGtag=[],D._isQueuing=!1;Q.length;){var re=Q.shift();D._gtag.apply(D,d(re)),re[0]==="get"&&(D._isQueuing=!0)}}}),L(this,"set",function(M){if(!M){console.warn("`fieldsObject` is required in .set()");return}if(f(M)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(M).length===0&&console.warn("empty `fieldsObject` given to .set()"),D._gaCommand("set",M)}),L(this,"_gaCommandSendEvent",function(M,k,T,P,F){D._gtag("event",k,v(v({event_category:M,event_label:T,value:P},F&&{non_interaction:F.nonInteraction}),D._toGtagOptions(F)))}),L(this,"_gaCommandSendEventParameters",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommandSendEvent.apply(D,d(k.slice(1)));else{var P=k[0],F=P.eventCategory,N=P.eventAction,H=P.eventLabel,q=P.eventValue;P.hitType;var Y=c(P,s);D._gaCommandSendEvent(F,N,H,q,Y)}}),L(this,"_gaCommandSendTiming",function(M,k,T,P){D._gtag("event","timing_complete",{name:k,value:T,event_category:M,event_label:P})}),L(this,"_gaCommandSendPageview",function(M,k){if(k&&Object.keys(k).length){var T=D._toGtagOptions(k),P=T.title,F=T.location,N=c(T,o);D._gtag("event","page_view",v(v(v(v({},M&&{page_path:M}),P&&{page_title:P}),F&&{page_location:F}),N))}else M?D._gtag("event","page_view",{page_path:M}):D._gtag("event","page_view")}),L(this,"_gaCommandSendPageviewParameters",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommandSendPageview.apply(D,d(k.slice(1)));else{var P=k[0],F=P.page;P.hitType;var N=c(P,a);D._gaCommandSendPageview(F,N)}}),L(this,"_gaCommandSend",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];var P=typeof k[0]=="string"?k[0]:k[0].hitType;switch(P){case"event":D._gaCommandSendEventParameters.apply(D,k);break;case"pageview":D._gaCommandSendPageviewParameters.apply(D,k);break;case"timing":D._gaCommandSendTiming.apply(D,d(k.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(P));break;default:console.warn("Send command doesn't exist: ".concat(P))}}),L(this,"_gaCommandSet",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];typeof k[0]=="string"&&(k[0]=L({},k[0],k[1])),D._gtag("set",D._toGtagOptions(k[0]))}),L(this,"_gaCommand",function(M){for(var k=arguments.length,T=new Array(k>1?k-1:0),P=1;P<k;P++)T[P-1]=arguments[P];switch(M){case"send":D._gaCommandSend.apply(D,T);break;case"set":D._gaCommandSet.apply(D,T);break;default:console.warn("Command doesn't exist: ".concat(M))}}),L(this,"ga",function(){for(var M=arguments.length,k=new Array(M),T=0;T<M;T++)k[T]=arguments[T];if(typeof k[0]=="string")D._gaCommand.apply(D,k);else{var P=k[0];D._gtag("get",D._currentMeasurementId,"client_id",function(F){D._isQueuing=!1;var N=D._queueGtag;for(P({get:function(Y){return Y==="clientId"?F:Y==="trackingId"?D._currentMeasurementId:Y==="apiVersion"?"1":void 0}});N.length;){var H=N.shift();D._gtag.apply(D,d(H))}}),D._isQueuing=!0}return D.ga}),L(this,"event",function(M,k){if(typeof M=="string")D._gtag("event",M,D._toGtagOptions(k));else{var T=M.action,P=M.category,F=M.label,N=M.value,H=M.nonInteraction,q=M.transport;if(!P||!T){console.warn("args.category AND args.action are required in event()");return}var Y={hitType:"event",eventCategory:(0,i.default)(P),eventAction:(0,i.default)(T)};F&&(Y.eventLabel=(0,i.default)(F)),typeof N<"u"&&(typeof N!="number"?console.warn("Expected `args.value` arg to be a Number."):Y.eventValue=N),typeof H<"u"&&(typeof H!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):Y.nonInteraction=H),typeof q<"u"&&(typeof q!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(q)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),Y.transport=q)),D._gaCommand("send",Y)}}),L(this,"send",function(M){D._gaCommand("send",M)}),this.reset()}return I(j,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),j}();e.GA4=W;var K=new W;e.default=K}(ga4)),ga4}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){function t(c){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(c)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var i=o(requireGa4());function s(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,f=new WeakMap;return(s=function(h){return h?f:u})(c)}function o(c,u){if(c&&c.__esModule)return c;if(c===null||t(c)!=="object"&&typeof c!="function")return{default:c};var f=s(u);if(f&&f.has(c))return f.get(c);var d={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(p!=="default"&&Object.prototype.hasOwnProperty.call(c,p)){var m=h?Object.getOwnPropertyDescriptor(c,p):null;m&&(m.get||m.set)?Object.defineProperty(d,p,m):d[p]=c[p]}return d.default=c,f&&f.set(c,d),d}var a=i.GA4;e.ReactGAImplementation=a;var l=i.default;e.default=l}(dist)),dist}var distExports=requireDist();const ReactGA=getDefaultExportFromCjs$3(distExports),isString=e=>typeof e=="string",defer=()=>{let e,t;const i=new Promise((s,o)=>{e=s,t=o});return i.resolve=e,i.reject=t,i},makeString=e=>e==null?"":""+e,copy=(e,t,i)=>{e.forEach(s=>{t[s]&&(i[s]=t[s])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString(e),getLastOfPath=(e,t,i)=>{const s=isString(t)?t.split("."):t;let o=0;for(;o<s.length-1;){if(canNotTraverseDeeper(e))return{};const a=cleanKey(s[o]);!e[a]&&i&&(e[a]=new i),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return canNotTraverseDeeper(e)?{}:{obj:e,k:cleanKey(s[o])}},setPath=(e,t,i)=>{const{obj:s,k:o}=getLastOfPath(e,t,Object);if(s!==void 0||t.length===1){s[o]=i;return}let a=t[t.length-1],l=t.slice(0,t.length-1),c=getLastOfPath(e,l,Object);for(;c.obj===void 0&&l.length;)a=`${l[l.length-1]}.${a}`,l=l.slice(0,l.length-1),c=getLastOfPath(e,l,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=i},pushPath=(e,t,i,s)=>{const{obj:o,k:a}=getLastOfPath(e,t,Object);o[a]=o[a]||[],o[a].push(i)},getPath=(e,t)=>{const{obj:i,k:s}=getLastOfPath(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},getPathWithDefaults=(e,t,i)=>{const s=getPath(e,i);return s!==void 0?s:getPath(t,i)},deepExtend=(e,t,i)=>{for(const s in t)s!=="__proto__"&&s!=="constructor"&&(s in e?isString(e[s])||e[s]instanceof String||isString(t[s])||t[s]instanceof String?i&&(e[s]=t[s]):deepExtend(e[s],t[s],i):e[s]=t[s]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const escape=e=>isString(e)?e.replace(/[&<>"'\/]/g,t=>_entityMap[t]):e;class RegExpCache{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,t,i)=>{t=t||"",i=i||"";const s=chars.filter(l=>t.indexOf(l)<0&&i.indexOf(l)<0);if(s.length===0)return!0;const o=looksLikeObjectPathRegExpCache.getRegExp(`(${s.map(l=>l==="?"?"\\?":l).join("|")})`);let a=!o.test(e);if(!a){const l=e.indexOf(i);l>0&&!o.test(e.substring(0,l))&&(a=!0)}return a},deepFind=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const s=t.split(i);let o=e;for(let a=0;a<s.length;){if(!o||typeof o!="object")return;let l,c="";for(let u=a;u<s.length;++u)if(u!==a&&(c+=i),c+=s[u],l=o[c],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&u<s.length-1)continue;a+=u-a+1;break}o=l}return o},getCleanedCode=e=>e==null?void 0:e.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,s;(s=(i=console==null?void 0:console[e])==null?void 0:i.apply)==null||s.call(i,console,t)}};class Logger{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||consoleLogger,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,s,o){return o&&!this.debug?null:(isString(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new Logger(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Logger(this.logger,t)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(i)||0;this.observers[s].set(i,o+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,a])=>{for(let l=0;l<a;l++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let l=0;l<a;l++)o.apply(o,[t,...i])})}}class ResourceStore extends EventEmitter{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,s,o={}){var f,d;const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,i],s&&(Array.isArray(s)?c.push(...s):isString(s)&&a?c.push(...s.split(a)):c.push(s)));const u=getPath(this.data,c);return!u&&!i&&!s&&t.indexOf(".")>-1&&(t=c[0],i=c[1],s=c.slice(2).join(".")),u||!l||!isString(s)?u:deepFind((d=(f=this.data)==null?void 0:f[t])==null?void 0:d[i],s,a)}addResource(t,i,s,o,a={silent:!1}){const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,i];s&&(c=c.concat(l?s.split(l):s)),t.indexOf(".")>-1&&(c=t.split("."),o=i,i=c[1]),this.addNamespaces(i),setPath(this.data,c,o),a.silent||this.emit("added",t,i,s,o)}addResources(t,i,s,o={silent:!1}){for(const a in s)(isString(s[a])||Array.isArray(s[a]))&&this.addResource(t,i,a,s[a],{silent:!0});o.silent||this.emit("added",t,i,s)}addResourceBundle(t,i,s,o,a,l={silent:!1,skipCopy:!1}){let c=[t,i];t.indexOf(".")>-1&&(c=t.split("."),o=s,s=i,i=c[1]),this.addNamespaces(i);let u=getPath(this.data,c)||{};l.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?deepExtend(u,s,a):u={...u,...s},setPath(this.data,c,u),l.silent||this.emit("added",t,i,s)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(o=>i[o]&&Object.keys(i[o]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,o){return e.forEach(a=>{var l;t=((l=this.processors[a])==null?void 0:l.process(t,i,s,o))??t}),t}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const e=[],t=Object.create(null);let i;return t.get=(s,o)=>{var a;return(a=i==null?void 0:i.revoke)==null||a.call(i),o===PATH_KEY?e:(e.push(o),i=Proxy.revocable(s,t),i.proxy)},Proxy.revocable(Object.create(null),t).proxy}function keysFromSelector(e,t){const{[PATH_KEY]:i}=e(createProxy());return i.join((t==null?void 0:t.keySeparator)??".")}const checkedLoadedFor={},shouldHandleAsObject=e=>!isString(e)&&typeof e!="boolean"&&typeof e!="number";class Translator extends EventEmitter{constructor(t,i={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const s={...i};if(t==null)return!1;const o=this.resolve(t,s);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,i){let s=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=i.ns||this.options.defaultNS||[];const l=s&&t.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!looksLikeObjectPath(t,s,o);if(l&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:isString(a)?[a]:a};const f=t.split(s);(s!==o||s===o&&this.options.ns.indexOf(f[0])>-1)&&(a=f.shift()),t=f.join(o)}return{key:t,namespaces:isString(a)?[a]:a}}translate(t,i,s){let o=typeof i=="object"?{...i}:i;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=keysFromSelector(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]);const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:c,namespaces:u}=this.extractFromKey(t[t.length-1],o),f=u[u.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return p?a?{res:`${f}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(o)}:`${f}${d}${c}`:a?{res:c,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(o)}:c;const m=this.resolve(t,o);let g=m==null?void 0:m.res;const v=(m==null?void 0:m.usedKey)||c,b=(m==null?void 0:m.exactUsedKey)||c,y=["[object Number]","[object Function]","[object RegExp]"],E=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w=o.count!==void 0&&!isString(o.count),C=Translator.hasDefaultValue(o),A=w?this.pluralResolver.getSuffix(h,o.count,o):"",O=o.ordinal&&w?this.pluralResolver.getSuffix(h,o.count,{ordinal:!1}):"",I=w&&!o.ordinal&&o.count===0,L=I&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${A}`]||o[`defaultValue${O}`]||o.defaultValue;let $=g;S&&!g&&C&&($=L);const V=shouldHandleAsObject($),W=Object.prototype.toString.apply($);if(S&&$&&V&&y.indexOf(W)<0&&!(isString(E)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,$,{...o,ns:u}):`key '${c} (${this.language})' returned an object instead of string.`;return a?(m.res=K,m.usedParams=this.getUsedParamsDetails(o),m):K}if(l){const K=Array.isArray($),j=K?[]:{},D=K?b:v;for(const M in $)if(Object.prototype.hasOwnProperty.call($,M)){const k=`${D}${l}${M}`;C&&!g?j[M]=this.translate(k,{...o,defaultValue:shouldHandleAsObject(L)?L[M]:void 0,joinArrays:!1,ns:u}):j[M]=this.translate(k,{...o,joinArrays:!1,ns:u}),j[M]===k&&(j[M]=$[M])}g=j}}else if(S&&isString(E)&&Array.isArray(g))g=g.join(E),g&&(g=this.extendTranslation(g,t,o,s));else{let K=!1,j=!1;!this.isValidLookup(g)&&C&&(K=!0,g=L),this.isValidLookup(g)||(j=!0,g=c);const M=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:g,k=C&&L!==g&&this.options.updateMissing;if(j||K||k){if(this.logger.log(k?"updateKey":"missingKey",h,f,c,k?L:g),l){const N=this.resolve(c,{...o,keySeparator:!1});N&&N.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 T=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let N=0;N<P.length;N++)T.push(P[N]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(o.lng||this.language):T.push(o.lng||this.language);const F=(N,H,q)=>{var Q;const Y=C&&q!==g?q:M;this.options.missingKeyHandler?this.options.missingKeyHandler(N,f,H,Y,k,o):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(N,f,H,Y,k,o),this.emit("missingKey",N,f,H,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(N=>{const H=this.pluralResolver.getSuffixes(N,o);I&&o[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(q=>{F([N],c+q,o[`defaultValue${q}`]||L)})}):F(T,c,L))}g=this.extendTranslation(g,t,o,m,s),j&&g===c&&this.options.appendNamespaceToMissingKey&&(g=`${f}${d}${c}`),(j||K)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}${d}${c}`:c,K?g:void 0,o))}return a?(m.res=g,m.usedParams=this.getUsedParamsDetails(o),m):g}extendTranslation(t,i,s,o,a){var u,f;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const d=isString(t)&&(((f=s==null?void 0:s.interpolation)==null?void 0:f.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const m=t.match(this.interpolator.nestingRegexp);h=m&&m.length}let p=s.replace&&!isString(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,s.lng||this.language||o.usedLng,s),d){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;h<g&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(t=this.interpolator.nest(t,(...m)=>(a==null?void 0:a[0])===m[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${i[0]}`),null):this.translate(...m,i),s)),s.interpolation&&this.interpolator.reset()}const l=s.postProcess||this.options.postProcess,c=isString(l)?[l]:l;return t!=null&&(c!=null&&c.length)&&s.applyPostProcessor!==!1&&(t=postProcessor.handle(c,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),t}resolve(t,i={}){let s,o,a,l,c;return isString(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(s))return;const f=this.extractFromKey(u,i),d=f.key;o=d;let h=f.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=i.count!==void 0&&!isString(i.count),m=p&&!i.ordinal&&i.count===0,g=i.context!==void 0&&(isString(i.context)||typeof i.context=="number")&&i.context!=="",v=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);h.forEach(b=>{var y,E;this.isValidLookup(s)||(c=b,!checkedLoadedFor[`${v[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(c))&&(checkedLoadedFor[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" 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!!!")),v.forEach(S=>{var A;if(this.isValidLookup(s))return;l=S;const w=[d];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,S,b,i);else{let O;p&&(O=this.pluralResolver.getSuffix(S,i.count,i));const I=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(i.ordinal&&O.indexOf(L)===0&&w.push(d+O.replace(L,this.options.pluralSeparator)),w.push(d+O),m&&w.push(d+I)),g){const $=`${d}${this.options.contextSeparator||"_"}${i.context}`;w.push($),p&&(i.ordinal&&O.indexOf(L)===0&&w.push($+O.replace(L,this.options.pluralSeparator)),w.push($+O),m&&w.push($+I))}}let C;for(;C=w.pop();)this.isValidLookup(s)||(a=C,s=this.getResource(S,b,C,i))}))})}),{res:s,usedKey:o,exactUsedKey:a,usedLng:l,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,s,o={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,i,s,o):this.resourceStore.getResource(t,i,s,o)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&!isString(t.replace);let o=s?t.replace:t;if(s&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const a of i)delete o[a]}return o}static hasDefaultValue(t){const i="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&i===s.substring(0,i.length)&&t[s]!==void 0)return!0;return!1}}class LanguageUtil{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=getCleanedCode(t),!t||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(isString(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(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 i;return t.forEach(s=>{if(i)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(i=o)}),!i&&this.options.supportedLngs&&t.forEach(s=>{if(i)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return i=o;const a=this.getLanguagePartFromCode(s);if(this.isSupportedCode(a))return i=a;i=this.options.supportedLngs.find(l=>{if(l===a)return l;if(!(l.indexOf("-")<0&&a.indexOf("-")<0)&&(l.indexOf("-")>0&&a.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===a||l.indexOf(a)===0&&a.length>1))return l})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),isString(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let s=t[i];return s||(s=t[this.getScriptPartFromCode(i)]),s||(s=t[this.formatLanguageCode(i)]),s||(s=t[this.getLanguagePartFromCode(i)]),s||(s=t.default),s||[]}toResolveHierarchy(t,i){const s=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),o=[],a=l=>{l&&(this.isSupportedCode(l)?o.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return isString(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))):isString(t)&&a(this.formatLanguageCode(t)),s.forEach(l=>{o.indexOf(l)<0&&a(this.formatLanguageCode(l))}),o}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,i){this.rules[t]=i}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const s=getCleanedCode(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:s,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let l;try{l=new Intl.PluralRules(s,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!t.match(/-|_/))return dummyRule;const u=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(u,i)}return this.pluralRulesCache[a]=l,l}needsPlural(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,i,s={}){return this.getSuffixes(t,s).map(o=>`${i}${o}`)}getSuffixes(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),s?s.resolvedOptions().pluralCategories.sort((o,a)=>suffixesOrder[o]-suffixesOrder[a]).map(o=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,i,s={}){const o=this.getRule(t,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,s))}}const deepFindWithDefaults=(e,t,i,s=".",o=!0)=>{let a=getPathWithDefaults(e,t,i);return!a&&o&&isString(i)&&(a=deepFind(e,i,s),a===void 0&&(a=deepFind(t,i,s))),a},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(t={}){var i;this.logger=baseLogger.create("interpolator"),this.options=t,this.format=((i=t==null?void 0:t.interpolation)==null?void 0:i.format)||(s=>s),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:s,useRawValueToEscape:o,prefix:a,prefixEscaped:l,suffix:c,suffixEscaped:u,formatSeparator:f,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:E}=t.interpolation;this.escape=i!==void 0?i:escape,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?regexEscape(a):l||"{{",this.suffix=c?regexEscape(c):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?regexEscape(p):m||regexEscape("$t("),this.nestingSuffix=g?regexEscape(g):v||regexEscape(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,s)=>(i==null?void 0:i.source)===s?(i.lastIndex=0,i):new RegExp(s,"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,i,s,o){var m;let a,l,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=g=>{if(g.indexOf(this.formatSeparator)<0){const E=deepFindWithDefaults(i,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,s,{...o,...i,interpolationkey:g}):E}const v=g.split(this.formatSeparator),b=v.shift().trim(),y=v.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(i,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,s,{...o,...i,interpolationkey:b})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((m=o==null?void 0:o.interpolation)==null?void 0:m.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>regexSafe(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?regexSafe(this.escape(g)):regexSafe(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(l=f(v),l===void 0)if(typeof d=="function"){const y=d(t,a,o);l=isString(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))l="";else if(h){l=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),l="";else!isString(l)&&!this.useRawValueToEscape&&(l=makeString(l));const b=g.safeValue(l);if(t=t.replace(a[0],b),h?(g.regex.lastIndex+=l.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,i,s={}){let o,a,l;const c=(u,f)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp(`${d}[ ]*{`));let p=`{${h[1]}`;u=h[0],p=this.interpolate(p,l);const m=p.match(/'/g),g=p.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{l=JSON.parse(p),f&&(l={...f,...l})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${d}${p}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];l={...s},l=l.replace&&!isString(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;const f=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(f!==-1&&(u=o[1].slice(f).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,f)),a=i(c.call(this,o[1].trim(),l),l),a&&o[0]===t&&!isString(a))return a;isString(a)||(a=makeString(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((d,h)=>this.format(d,h,s.lng,{...s,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const parseFormatStr=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);t==="currency"&&o.indexOf(":")<0?i.currency||(i.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?i.range||(i.range=o.trim()):o.split(";").forEach(l=>{if(l){const[c,...u]=l.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();i[d]||(i[d]=f),f==="false"&&(i[d]=!1),f==="true"&&(i[d]=!0),isNaN(f)||(i[d]=parseInt(f,10))}})}return{formatName:t,formatOptions:i}},createCachedFormatter=e=>{const t={};return(i,s,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const l=s+JSON.stringify(a);let c=t[l];return c||(c=e(getCleanedCode(s),o),t[l]=c),c(i)}},createNonCachedFormatter=e=>(t,i,s)=>e(getCleanedCode(i),s)(t);class Formatter{constructor(t={}){this.logger=baseLogger.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const s=i.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:s((o,a)=>{const l=new Intl.NumberFormat(o,{...a});return c=>l.format(c)}),currency:s((o,a)=>{const l=new Intl.NumberFormat(o,{...a,style:"currency"});return c=>l.format(c)}),datetime:s((o,a)=>{const l=new Intl.DateTimeFormat(o,{...a});return c=>l.format(c)}),relativetime:s((o,a)=>{const l=new Intl.RelativeTimeFormat(o,{...a});return c=>l.format(c,a.range||"day")}),list:s((o,a)=>{const l=new Intl.ListFormat(o,{...a});return c=>l.format(c)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=createCachedFormatter(i)}format(t,i,s,o={}){const a=i.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,u)=>{var h;const{formatName:f,formatOptions:d}=parseFormatStr(u);if(this.formats[f]){let p=c;try{const m=((h=o==null?void 0:o.formatParams)==null?void 0:h[o.interpolationkey])||{},g=m.locale||m.lng||o.locale||o.lng||s;p=this.formats[f](c,g,{...d,...o,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}const removePending=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Connector extends EventEmitter{constructor(t,i,s,o={}){var a,l;super(),this.backend=t,this.store=i,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=baseLogger.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=[],(l=(a=this.backend)==null?void 0:a.init)==null||l.call(a,s,o.backend,o)}queueLoad(t,i,s,o){const a={},l={},c={},u={};return t.forEach(f=>{let d=!0;i.forEach(h=>{const p=`${f}|${h}`;!s.reload&&this.store.hasResourceBundle(f,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?l[p]===void 0&&(l[p]=!0):(this.state[p]=1,d=!1,l[p]===void 0&&(l[p]=!0),a[p]===void 0&&(a[p]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(c[f]=!0)}),(Object.keys(a).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(l),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,i,s){const o=t.split("|"),a=o[0],l=o[1];i&&this.emit("failedLoading",a,l,i),!i&&s&&this.store.addResourceBundle(a,l,s,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&s&&(this.state[t]=0);const c={};this.queue.forEach(u=>{pushPath(u.loaded,[a],l),removePending(u,t),i&&u.errors.push(i),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{c[f]||(c[f]={});const d=u.loaded[f];d.length&&d.forEach(h=>{c[f][h]===void 0&&(c[f][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,i,s,o=0,a=this.retryTimeout,l){if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:s,tried:o,wait:a,callback:l});return}this.readingCalls++;const c=(f,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(f&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,i,s,o+1,a*2,l)},a);return}l(f,d)},u=this.backend[s].bind(this.backend);if(u.length===2){try{const f=u(t,i);f&&typeof f.then=="function"?f.then(d=>c(null,d)).catch(c):c(null,f)}catch(f){c(f)}return}return u(t,i,c)}prepareLoading(t,i,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();isString(t)&&(t=this.languageUtils.toResolveHierarchy(t)),isString(i)&&(i=[i]);const a=this.queueLoad(t,i,s,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(l=>{this.loadOne(l)})}load(t,i,s){this.prepareLoading(t,i,{},s)}reload(t,i,s){this.prepareLoading(t,i,{reload:!0},s)}loadOne(t,i=""){const s=t.split("|"),o=s[0],a=s[1];this.read(o,a,"read",void 0,void 0,(l,c)=>{l&&this.logger.warn(`${i}loading namespace ${a} for language ${o} failed`,l),!l&&c&&this.logger.log(`${i}loaded namespace ${a} for language ${o}`,c),this.loaded(t,l,c)})}saveMissing(t,i,s,o,a,l={},c=()=>{}){var u,f,d,h,p;if((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${s}" as the namespace "${i}" 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(!(s==null||s==="")){if((p=this.backend)!=null&&p.create){const m={...l,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,i,s,o,m):v=g(t,i,s,o),v&&typeof v.then=="function"?v.then(b=>c(null,b)).catch(c):c(null,v)}catch(v){c(v)}else g(t,i,s,o,c,m)}!t||!t[0]||this.store.addResource(t[0],i,s,o)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),isString(e[1])&&(t.defaultValue=e[1]),isString(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(s=>{t[s]=i[s]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=e=>{var t,i;return isString(e.ns)&&(e.ns=[e.ns]),isString(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((i=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class I18n extends EventEmitter{constructor(t={},i){if(super(),this.options=transformOptions(t),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(isString(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=get();this.options={...s,...this.options,...transformOptions(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(o(this.modules.logger),this.options):baseLogger.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=Formatter;const d=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const h=this.services;h.logger=baseLogger,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new PluralResolver(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(f),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Interpolator(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Connector(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(m,...g)=>{this.emit(m,...g)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(m,...g)=>{this.emit(m,...g)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,i||(i=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[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(f=>{this[f]=(...d)=>this.store[f](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...d)=>(this.store[f](...d),this)});const c=defer(),u=()=>{const f=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),i(d,h)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),c}loadResources(t,i=noop){var a,l;let s=i;const o=isString(t)?t:this.language;if(typeof t=="function"&&(s=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const c=[],u=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};o?u(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(l=(a=this.options.preload)==null?void 0:a.forEach)==null||l.call(a,f=>u(f)),this.services.backendConnector.load(c,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(f)})}else s(null)}reloadResources(t,i,s){const o=defer();return typeof t=="function"&&(s=t,t=void 0),typeof i=="function"&&(s=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),s||(s=noop),this.services.backendConnector.reload(t,i,a=>{o.resolve(),s(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"&&postProcessor.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 i=0;i<this.languages.length;i++){const s=this.languages[i];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const s=defer();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve((...f)=>this.t(...f)),i&&i(c,(...f)=>this.t(...f))},l=c=>{var d,h;!t&&!c&&this.services.languageDetector&&(c=[]);const u=isString(c)?c:c&&c[0],f=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(isString(c)?[c]:c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,f)),this.loadResources(f,p=>{a(p,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,i,s){const o=(a,l,...c)=>{let u;typeof l!="object"?u=this.options.overloadTranslationOptionHandler([a,l].concat(c)):u={...l},u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs,u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||s||o.keyPrefix);const f=this.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(a)?d=a.map(h=>(typeof h=="function"&&(h=keysFromSelector(h,{...this.options,...l})),`${u.keyPrefix}${f}${h}`)):(typeof a=="function"&&(a=keysFromSelector(a,{...this.options,...l})),d=u.keyPrefix?`${u.keyPrefix}${f}${a}`:a),this.t(d,u)};return isString(t)?o.lng=t:o.lngs=t,o.ns=i,o.keyPrefix=s,o}t(...t){var i;return(i=this.translator)==null?void 0:i.translate(...t)}exists(...t){var i;return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=i.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const l=(c,u)=>{const f=this.services.backendConnector.state[`${c}|${u}`];return f===-1||f===0||f===2};if(i.precheck){const c=i.precheck(this,l);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(s,t)&&(!o||l(a,t)))}loadNamespaces(t,i){const s=defer();return this.options.ns?(isString(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}loadLanguages(t,i){const s=defer();isString(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(l=>o.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return a.length?(this.options.preload=o.concat(a),this.loadResources(l=>{s.resolve(),i&&i(l)}),s):(i&&i(),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";try{const l=new Intl.Locale(t);if(l&&l.getTextInfo){const c=l.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const i=["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"],s=((a=this.services)==null?void 0:a.languageUtils)||new LanguageUtil(get());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){return new I18n(t,i)}cloneInstance(t={},i=noop){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new I18n(o);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},s){const c=Object.keys(this.store.data).reduce((u,f)=>(u[f]={...this.store.data[f]},u[f]=Object.keys(u[f]).reduce((d,h)=>(d[h]={...u[f][h]},d),u[f]),u),{});a.store=new ResourceStore(c,o),a.services.resourceStore=a.store}return a.translator=new Translator(a.services,o),a.translator.on("*",(c,...u)=>{a.emit(c,...u)}),a.init(o,i),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 instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const balance$4="Balance",topUp$4="Top Up",ads$4="Ads",adsOn$4="On",adsOff$4="Off",level$4="Level",toLevelUp$4="to lvl up",xpCounter$4="/ {{total}} XP",lootBox$4="Loot Box",forLevel$4="for level {{level}}",unopenedLootBox$4="Unopened Loot Box",emptyBox$4="Empty Box",openItem$4="Open Item",reward_type$4={coins:"{{count}} coin",coins_one:"{{count}} coin",coins_few:"{{count}} coins",coins_many:"{{count}} coins",usdt_no_amount:"USDT",coins_no_amount:"Coins",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Double Balance",box:"LOOT BOX",box_common:"BASIC",box_rare:"RARE",box_epic:"EPIC",box_legend:"LEGEND"},confirmIframe$4={pay:"Pay",cancel:"Cancel"},months$4={january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},box_open$4={skip:"Skip",you_ve_got:"You’ve got",button_reveal_reward:"Reveal Reward",button_open_now:"Open Now",button_save_inventory:"Save to Inventory",button_unopened_boxes:"Unopened Loot Boxes",recent_rewards:"Recent rewards",later_open_later_inventory:"You can open it later in inventory"},common$4={error:"Oops! Something went wrong. Please try again later.",continue:"Continue",ok:"OK",timeAgo:{sec_zero:"{{count}} seconds ago",sec_one:"{{count}} second ago",sec_two:"{{count}} seconds ago",sec_few:"{{count}} seconds ago",sec_many:"{{count}} seconds ago",sec_other:"{{count}} seconds ago",now:"Just now",min_zero:"{{count}} minutes ago",min_one:"{{count}} minute ago",min_two:"{{count}} minutes ago",min_few:"{{count}} minutes ago",min_many:"{{count}} minutes ago",min_other:"{{count}} minutes ago",h_zero:"{{count}} hours ago",h_one:"{{count}} hour ago",h_two:"{{count}} hours ago",h_few:"{{count}} hours ago",h_many:"{{count}} hours ago",h_other:"{{count}} hours ago",d_zero:"{{count}} days ago",d_one:"{{count}} day ago",d_two:"{{count}} days ago",d_few:"{{count}} days ago",d_many:"{{count}} days ago",d_other:"{{count}} days ago"}},snackbar$4={purchase:{blackHolePurchaseChest:"Purchase",blackHolePurchaseLevel:"Purchase",blackHolePurchaseAutoBurn:"Purchase",walletPurchaseGems:"Purchase",blackHoleBurnCoins:"Burned",error:"Failed to make a purchase"},receiving:{claimedTask:"Received"}},purchaseAdsFreeModal$4={title:"Remove Ads",disableAllInterruptions:"Disable all interruptions in games with a recurring monthly subscription. No worries, you will also have the option to turn ads on back if you want anytime!",noInterruptionsInGames:"No interruptions in games with a recurring subscription.",activeRecurring:"Active recurring payments at {{price}}",aMonth:" a month.",nextPayment:"Next payment {{date}}",activeUntil:"Active until {{date}}",subscriptionPaused:"Subscription is Paused",resumeSubscription:"Resume Subscription",cancelSubscription:"Cancel Subscription",continue:"Continue",month:"{{price}} / month",errorCancelSubscription:"Failed to cancel subscription. Please try again"},levelInfoModal$4={title:"Your Level",description:"Gain experience by playing games. For leveling up you get loot boxes, which may contain USDT, coins or better loot boxes. Compete with other players to win real USDT every week.",action:"Got It"},topUpModal$4={balance:"Balance",topUpBalance:"Top Up Gems",coins:"coins",gems:"gems",topUp:"Top Up"},inventoryModal$4={title:"Inventory",description:"It's your personal storage space for all unopened loot boxes. Tap each image to reveal reward inside!"},en={balance:balance$4,topUp:topUp$4,ads:ads$4,adsOn:adsOn$4,adsOff:adsOff$4,level:level$4,toLevelUp:toLevelUp$4,xpCounter:xpCounter$4,lootBox:lootBox$4,forLevel:forLevel$4,unopenedLootBox:unopenedLootBox$4,emptyBox:emptyBox$4,openItem:openItem$4,reward_type:reward_type$4,confirmIframe:confirmIframe$4,months:months$4,box_open:box_open$4,common:common$4,snackbar:snackbar$4,purchaseAdsFreeModal:purchaseAdsFreeModal$4,levelInfoModal:levelInfoModal$4,topUpModal:topUpModal$4,inventoryModal:inventoryModal$4},balance$3="Saldo",topUp$3="Recargar",ads$3="Anuncios",adsOn$3="On",adsOff$3="Off",level$3="Nivel",toLevelUp$3="para subir de nivel",xpCounter$3="/ {{total}} XP",lootBox$3="Caja de botín",forLevel$3="para el nivel {{level}}",unopenedLootBox$3="Caja de botín sin abrir",emptyBox$3="Caja vacía",openItem$3="Abrir objeto",reward_type$3={coins:"{{count}} moneda",coins_one:"{{count}} moneda",coins_few:"{{count}} monedas",coins_many:"{{count}} monedas",usdt_no_amount:"USDT",coins_no_amount:"Monedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Doble saldo",box:"CAJA DE BOTÍN",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LEGENDARIA"},confirmIframe$3={pay:"Pagar",cancel:"Cancelar"},months$3={january:"Ene",february:"Feb",march:"Mar",april:"Abr",may:"May",june:"Jun",july:"Jul",august:"Ago",september:"Sep",october:"Oct",november:"Nov",december:"Dic"},box_open$3={skip:"Omitir",you_ve_got:"Obtuviste",button_reveal_reward:"Revelar recompensa",button_open_now:"Abrir ahora",button_save_inventory:"Guardar en inventario",button_unopened_boxes:"Inventario",recent_rewards:"Recientes",later_open_later_inventory:"Puedes abrirla más tarde en el inventario"},common$3={error:"¡Ups! Algo salió mal. Inténtalo de nuevo más tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"hace {{count}} segundos",sec_one:"hace {{count}} segundo",sec_two:"hace {{count}} segundos",sec_few:"hace {{count}} segundos",sec_many:"hace {{count}} segundos",sec_other:"hace {{count}} segundos",now:"Justo ahora",min_zero:"hace {{count}} minutos",min_one:"hace {{count}} minuto",min_two:"hace {{count}} minutos",min_few:"hace {{count}} minutos",min_many:"hace {{count}} minutos",min_other:"hace {{count}} minutos",h_zero:"hace {{count}} horas",h_one:"hace {{count}} hora",h_two:"hace {{count}} horas",h_few:"hace {{count}} horas",h_many:"hace {{count}} horas",h_other:"hace {{count}} horas",d_zero:"hace {{count}} días",d_one:"hace {{count}} día",d_two:"hace {{count}} días",d_few:"hace {{count}} días",d_many:"hace {{count}} días",d_other:"hace {{count}} días"}},snackbar$3={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Quemado",error:"No se pudo realizar la compra"},receiving:{claimedTask:"Recibido"}},purchaseAdsFreeModal$3={title:"Eliminar anuncios",disableAllInterruptions:"Desactiva todas las interrupciones en los juegos con una suscripción mensual recurrente. No te preocupes, ¡también tendrás la opción de activar los anuncios cuando quieras!",noInterruptionsInGames:"Sin interrupciones en los juegos con una suscripción recurrente.",activeRecurring:"Pagos recurrentes activos a {{price}}",aMonth:" al mes.",nextPayment:"Próximo pago {{date}}",activeUntil:"Activo hasta {{date}}",subscriptionPaused:"La suscripción está en pausa",resumeSubscription:"Reanudar suscripción",cancelSubscription:"Cancelar suscripción",continue:"Continuar",month:"{{price}} / mes",errorCancelSubscription:"No se pudo cancelar la suscripción. Inténtalo de nuevo"},levelInfoModal$3={title:"Tu nivel",description:"Gana experiencia jugando. Al subir de nivel obtienes cajas de botín, que pueden contener USDT, monedas o mejores cajas. Compite con otros jugadores para ganar USDT real cada semana.",action:"Entendido"},topUpModal$3={balance:"Saldo",topUpBalance:"Recargar gemas",coins:"monedas",gems:"gemas",topUp:"Recargar"},inventoryModal$3={title:"Inventario",description:"Es tu espacio de almacenamiento personal para todas las cajas de botín sin abrir. Toca cada imagen para revelar la recompensa dentro."},es={balance:balance$3,topUp:topUp$3,ads:ads$3,adsOn:adsOn$3,adsOff:adsOff$3,level:level$3,toLevelUp:toLevelUp$3,xpCounter:xpCounter$3,lootBox:lootBox$3,forLevel:forLevel$3,unopenedLootBox:unopenedLootBox$3,emptyBox:emptyBox$3,openItem:openItem$3,reward_type:reward_type$3,confirmIframe:confirmIframe$3,months:months$3,box_open:box_open$3,common:common$3,snackbar:snackbar$3,purchaseAdsFreeModal:purchaseAdsFreeModal$3,levelInfoModal:levelInfoModal$3,topUpModal:topUpModal$3,inventoryModal:inventoryModal$3},balance$2="बैलेंस",topUp$2="रिचार्ज",ads$2="विज्ञापन",adsOn$2="चालू",adsOff$2="बंद",level$2="स्तर",toLevelUp$2="लेवल अप तक",xpCounter$2="/ {{total}} XP",lootBox$2="लूट बॉक्स",forLevel$2="स्तर {{level}} के लिए",unopenedLootBox$2="बिना खोले गए लूट बॉक्स",emptyBox$2="खाली बॉक्स",openItem$2="आइटम खोलें",reward_type$2={coins:"{{count}} सिक्के",coins_one:"{{count}} सिक्का",coins_few:"{{count}} सिक्के",coins_many:"{{count}} सिक्के",coins_no_amount:"सिक्के",usdt_no_amount:"USDT",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"टेलीग्राम प्रीमियम",double_balance:"दोगुनी शेष राशि",box:"लूट बॉक्स",box_common:"बुनियादी",box_rare:"दुर्लभ",box_epic:"महाकाव्य",box_legend:"दंतकथा"},confirmIframe$2={pay:"भुगतान करें",cancel:"रद्द करें"},months$2={january:"जन",february:"फ़र",march:"मार्च",april:"अप्रै",may:"मई",june:"जून",july:"जुला",august:"अग",september:"सितं",october:"अक्टू",november:"नवं",december:"दिसं"},box_open$2={skip:"छोड़ें",you_ve_got:"आपको मिला",button_reveal_reward:"पुरस्कार प्रकट करें",button_open_now:"अभी खोलें",button_save_inventory:"इन्वेंटरी में सहेजें",button_unopened_boxes:"अनपेट लूट बॉक्स",recent_rewards:"हाल के पुरस्कार",later_open_later_inventory:"आप इसे बाद में इन्वेंटरी में खोल सकते हैं"},common$2={error:"उफ़! कुछ गलत हो गया। कृपया बाद में फिर प्रयास करें।",continue:"जारी रखें",ok:"ठीक है",timeAgo:{sec_zero:"{{count}} सेकंड पहले",sec_one:"{{count}} सेकंड पहले",sec_two:"{{count}} सेकंड पहले",sec_few:"{{count}} सेकंड पहले",sec_many:"{{count}} सेकंड पहले",sec_other:"{{count}} सेकंड पहले",now:"अभी",min_zero:"{{count}} मिनट पहले",min_one:"{{count}} मिनट पहले",min_two:"{{count}} मिनट पहले",min_few:"{{count}} मिनट पहले",min_many:"{{count}} मिनट पहले",min_other:"{{count}} मिनट पहले",h_zero:"{{count}} घंटे पहले",h_one:"{{count}} घंटा पहले",h_two:"{{count}} घंटे पहले",h_few:"{{count}} घंटे पहले",h_many:"{{count}} घंटे पहले",h_other:"{{count}} घंटे पहले",d_zero:"{{count}} दिन पहले",d_one:"{{count}} दिन पहले",d_two:"{{count}} दिन पहले",d_few:"{{count}} दिन पहले",d_many:"{{count}} दिन पहले",d_other:"{{count}} दिन पहले"}},snackbar$2={purchase:{blackHolePurchaseChest:"खरीद",blackHolePurchaseLevel:"खरीद",blackHolePurchaseAutoBurn:"खरीद",walletPurchaseGems:"खरीद",blackHoleBurnCoins:"जलाया गया",error:"खरीदारी विफल रही"},receiving:{claimedTask:"प्राप्त"}},purchaseAdsFreeModal$2={title:"विज्ञापन हटाएँ",disableAllInterruptions:"मासिक आवर्ती सदस्यता के साथ खेलों में सभी बाधाएँ बंद करें। चिंता न करें, आप चाहें तो किसी भी समय विज्ञापन फिर से चालू कर सकते हैं!",noInterruptionsInGames:"आवर्ती सदस्यता के साथ खेलों में कोई व्यवधान नहीं।",activeRecurring:"सक्रिय आवर्ती भुगतान {{price}} पर",aMonth:" प्रति माह.",nextPayment:"अगला भुगतान {{date}}",activeUntil:"{{date}} तक सक्रिय",subscriptionPaused:"सदस्यता रोकी गई है",resumeSubscription:"सदस्यता फिर शुरू करें",cancelSubscription:"सदस्यता रद्द करें",continue:"जारी रखें",month:"{{price}} / माह",errorCancelSubscription:"सदस्यता रद्द नहीं हो सकी। कृपया पुनः प्रयास करें"},levelInfoModal$2={title:"आपका स्तर",description:"गेम खेलकर अनुभव अर्जित करें। लेवल बढ़ाने पर आपको लूट बॉक्स मिलते हैं जिनमें USDT, कॉइन्स या बेहतर लूट बॉक्स हो सकते हैं। हर सप्ताह वास्तविक USDT जीतने के लिए अन्य खिलाड़ियों से प्रतिस्पर्धा करें।",action:"समझ गया"},topUpModal$2={balance:"बैलेंस",topUpBalance:"जेम्स रिचार्ज करें",coins:"कॉइन्स",gems:"जेम्स",topUp:"रिचार्ज"},inventoryModal$2={title:"इन्वेंटरी",description:"यह आपके सभी बिना खुले लूट बॉक्स के लिए आपका व्यक्तिगत स्टोरेज स्पेस है। अंदर का इनाम प्रकट करने के लिए हर छवि पर टैप करें!"},hi={balance:balance$2,topUp:topUp$2,ads:ads$2,adsOn:adsOn$2,adsOff:adsOff$2,level:level$2,toLevelUp:toLevelUp$2,xpCounter:xpCounter$2,lootBox:lootBox$2,forLevel:forLevel$2,unopenedLootBox:unopenedLootBox$2,emptyBox:emptyBox$2,openItem:openItem$2,reward_type:reward_type$2,confirmIframe:confirmIframe$2,months:months$2,box_open:box_open$2,common:common$2,snackbar:snackbar$2,purchaseAdsFreeModal:purchaseAdsFreeModal$2,levelInfoModal:levelInfoModal$2,topUpModal:topUpModal$2,inventoryModal:inventoryModal$2},balance$1="Saldo",topUp$1="Recarregar",ads$1="Anúncios",adsOn$1="On",adsOff$1="Off",level$1="Nível",toLevelUp$1="para subir de nível",xpCounter$1="/ {{total}} XP",lootBox$1="Caixa de loot",forLevel$1="para o nível {{level}}",unopenedLootBox$1="Caixa de Loot Não Aberta",emptyBox$1="Caixa vazia",openItem$1="Abrir item",reward_type$1={coins:"{{count}} moeda",coins_one:"{{count}} moeda",coins_few:"{{count}} moedas",coins_many:"{{count}} moedas",usdt_no_amount:"USDT",coins_no_amount:"Moedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Saldo Duplo",box:"CAIXA DE LOOT",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LENDÁRIA"},confirmIframe$1={pay:"Pagar",cancel:"Cancelar"},months$1={january:"Jan",february:"Fev",march:"Mar",april:"Abr",may:"Mai",june:"Jun",july:"Jul",august:"Ago",september:"Set",october:"Out",november:"Nov",december:"Dez"},box_open$1={skip:"Pular",you_ve_got:"Você recebeu",button_reveal_reward:"Revelar Recompensa",button_open_now:"Abrir Agora",button_save_inventory:"Salvar no Inventário",button_unopened_boxes:"Inventário",recent_rewards:"Recentes",later_open_later_inventory:"Você pode abrir mais tarde no inventário"},common$1={error:"Ops! Algo deu errado. Tente novamente mais tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"há {{count}} segundos",sec_one:"há {{count}} segundo",sec_two:"há {{count}} segundos",sec_few:"há {{count}} segundos",sec_many:"há {{count}} segundos",sec_other:"há {{count}} segundos",now:"Agora mesmo",min_zero:"há {{count}} minutos",min_one:"há {{count}} minuto",min_two:"há {{count}} minutos",min_few:"há {{count}} minutos",min_many:"há {{count}} minutos",min_other:"há {{count}} minutos",h_zero:"há {{count}} horas",h_one:"há {{count}} hora",h_two:"há {{count}} horas",h_few:"há {{count}} horas",h_many:"há {{count}} horas",h_other:"há {{count}} horas",d_zero:"há {{count}} dias",d_one:"há {{count}} dia",d_two:"há {{count}} dias",d_few:"há {{count}} dias",d_many:"há {{count}} dias",d_other:"há {{count}} dias"}},snackbar$1={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Queimado",error:"Falha ao realizar a compra"},receiving:{claimedTask:"Recebido"}},purchaseAdsFreeModal$1={title:"Remover anúncios",disableAllInterruptions:"Desative todas as interrupções nos jogos com uma assinatura mensal recorrente. Sem preocupações, você também poderá ligar os anúncios quando quiser!",noInterruptionsInGames:"Sem interrupções nos jogos com uma assinatura recorrente.",activeRecurring:"Pagamentos recorrentes ativos em {{price}}",aMonth:" por mês.",nextPayment:"Próximo pagamento {{date}}",activeUntil:"Ativo até {{date}}",subscriptionPaused:"A assinatura está em pausa",resumeSubscription:"Retomar assinatura",cancelSubscription:"Cancelar assinatura",continue:"Continuar",month:"{{price}} / mês",errorCancelSubscription:"Falha ao cancelar a assinatura. Tente novamente"},levelInfoModal$1={title:"Seu nível",description:"Ganhe experiência jogando. Ao subir de nível você recebe caixas de loot, que podem conter USDT, moedas ou caixas melhores. Compita com outros jogadores para ganhar USDT real toda semana.",action:"Entendi"},topUpModal$1={balance:"Saldo",topUpBalance:"Recarregar gemas",coins:"moedas",gems:"gemas",topUp:"Recarregar"},inventoryModal$1={title:"Inventário",description:"É o seu espaço pessoal de armazenamento para todas as caixas de loot não abertas. Toque em cada imagem para revelar a recompensa dentro!"},pt={balance:balance$1,topUp:topUp$1,ads:ads$1,adsOn:adsOn$1,adsOff:adsOff$1,level:level$1,toLevelUp:toLevelUp$1,xpCounter:xpCounter$1,lootBox:lootBox$1,forLevel:forLevel$1,unopenedLootBox:unopenedLootBox$1,emptyBox:emptyBox$1,openItem:openItem$1,reward_type:reward_type$1,confirmIframe:confirmIframe$1,months:months$1,box_open:box_open$1,common:common$1,snackbar:snackbar$1,purchaseAdsFreeModal:purchaseAdsFreeModal$1,levelInfoModal:levelInfoModal$1,topUpModal:topUpModal$1,inventoryModal:inventoryModal$1},balance="Баланс",topUp="Пополнить",ads="Реклама",adsOn="Вкл.",adsOff="Выкл.",level="Уровень",toLevelUp="до повышения уровня",xpCounter="/ {{total}} XP",lootBox="Лутбокс",forLevel="для уровня {{level}}",unopenedLootBox="Неоткрытый лутбокс",emptyBox="Пустой бокс",openItem="Открыть предмет",reward_type={coins:"{{count}} монета",coins_one:"{{count}} монета",coins_few:"{{count}} монеты",coins_many:"{{count}} монет",usdt_no_amount:"USDT",coins_no_amount:"Монеты",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Телеграм Премиум",double_balance:"Двойной баланс",box:"ЛУТ БОКС",box_common:"ОБЫЧНЫЙ",box_rare:"РЕДКИЙ",box_epic:"ЭПИК",box_legend:"ЛЕГЕНДАРНЫЙ"},confirmIframe={pay:"Оплатить",cancel:"Отменить"},months={january:"янв",february:"фев",march:"мар",april:"апр",may:"май",june:"июн",july:"июл",august:"авг",september:"сен",october:"окт",november:"ноя",december:"дек"},box_open={skip:"Пропустить",you_ve_got:"Получено",button_reveal_reward:"Узнать награду",button_open_now:"Открыть",button_save_inventory:"Оставить в инвентаре",button_unopened_boxes:"Неоткрытые лутбоксы",recent_rewards:"Недавние",later_open_later_inventory:"Можно открыть его позже в инвентаре"},common={error:"Упс! Что-то пошло не так. Попробуй позже.",continue:"Продолжить",ok:"OK",timeAgo:{sec_zero:"{{count}} секунд назад",sec_one:"{{count}} секунду назад",sec_two:"{{count}} секунды назад",sec_few:"{{count}} секунды назад",sec_many:"{{count}} секунд назад",sec_other:"{{count}} секунд назад",now:"Только что",min_zero:"{{count}} минут назад",min_one:"{{count}} минуту назад",min_two:"{{count}} минуты назад",min_few:"{{count}} минуты назад",min_many:"{{count}} минут назад",min_other:"{{count}} минут назад",h_zero:"{{count}} часов назад",h_one:"{{count}} час назад",h_two:"{{count}} часа назад",h_few:"{{count}} часа назад",h_many:"{{count}} часов назад",h_other:"{{count}} часов назад",d_zero:"{{count}} дней назад",d_one:"{{count}} день назад",d_two:"{{count}} дня назад",d_few:"{{count}} дня назад",d_many:"{{count}} дней назад",d_other:"{{count}} дней назад"}},snackbar={purchase:{blackHolePurchaseChest:"Покупка",blackHolePurchaseLevel:"Покупка",blackHolePurchaseAutoBurn:"Покупка",walletPurchaseGems:"Покупка",blackHoleBurnCoins:"Сожжено",error:"Не удалось совершить покупку"},receiving:{claimedTask:"Получено"}},purchaseAdsFreeModal={title:"Удалить рекламу",disableAllInterruptions:"Отключите все прерывания в играх с ежемесячной подпиской. Не волнуйтесь, при желании вы всегда сможете снова включить рекламу!",noInterruptionsInGames:"Без прерываний в играх при оформленной подписке.",activeRecurring:"Активные регулярные платежи по цене {{price}}",aMonth:" в месяц.",nextPayment:"Следующий платеж {{date}}",activeUntil:"Активна до {{date}}",subscriptionPaused:"Подписка приостановлена",resumeSubscription:"Возобновить подписку",cancelSubscription:"Отменить подписку",continue:"Продолжить",month:"{{price}} / месяц",errorCancelSubscription:"Не удалось отменить подписку. Пожалуйста, попробуйте еще раз"},levelInfoModal={title:"Ваш уровень",description:"Получайте опыт, играя в игры. За повышение уровня вы получаете лутбоксы, в которых могут быть USDT, монеты или более ценные лутбоксы. Соревнуйтесь с другими игроками, чтобы выигрывать реальные USDT каждую неделю.",action:"Понял"},topUpModal={balance:"Баланс",topUpBalance:"Пополнить баланс",coins:"монет",gems:"алмазов",topUp:"Пополнить"},inventoryModal={title:"Инвентарь",description:"Это твоё персональное хранилище для неоткрытых лутбоксов. Нажми на каждый, чтобы узнать, какая внутри награда!"},ru={balance,topUp,ads,adsOn,adsOff,level,toLevelUp,xpCounter,lootBox,forLevel,unopenedLootBox,emptyBox,openItem,reward_type,confirmIframe,months,box_open,common,snackbar,purchaseAdsFreeModal,levelInfoModal,topUpModal,inventoryModal};var define_process_env_default$2={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const resources={en:{translation:en},ru:{translation:ru},hi:{translation:hi},es:{translation:es},pt:{translation:pt}};instance.use(initReactI18next).init({resources,fallbackLng:"en",supportedLngs:supportedLanguages,debug:define_process_env_default$2.NODE_ENV==="development",interpolation:{escapeValue:!1}});const translationsTyped=(e,t)=>instance.t(e,t),PROVIDER_COLORS={Orbit:"#3b82f6",TMA:"#22c55e",Monetag:"#f97316",Adsgram:"#a855f7",Gigapub:"#14b8a6",Banner:"#ec4899",SDK:"#6366f1"},ADS_BADGE_STYLE="background:#1e293b;color:#38bdf8;padding:2px 6px;border-radius:3px;font-weight:bold";function getProviderStyle(e){return`background:${PROVIDER_COLORS[e]||"#94a3b8"};color:#fff;padding:2px 6px;border-radius:3px;font-weight:bold`}function formatTimestamp(){return`${(performance.now()/1e3).toFixed(2)}s`}function createAdLogger(e){const t=new Map,i=getProviderStyle(e);return{info(s,o){o!==void 0?console.log(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit",o):console.log(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit")},warn(s,o){o!==void 0?console.warn(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#f59e0b;font-weight:bold",o):console.warn(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#f59e0b;font-weight:bold")},error(s,o){o!==void 0?console.error(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#ef4444;font-weight:bold",o):console.error(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:#ef4444;font-weight:bold")},group(s){console.groupCollapsed(`%c ADS %c ${e} %c ${s} [${formatTimestamp()}]`,ADS_BADGE_STYLE,i,"color:inherit;font-weight:bold")},groupEnd(){console.groupEnd()},time(s){t.set(s,performance.now())},timeEnd(s){const o=t.get(s);if(o!==void 0){const a=performance.now()-o;t.delete(s),console.log(`%c ADS %c ${e} %c ${s} took ${a.toFixed(0)}ms`,ADS_BADGE_STYLE,i,"color:#38bdf8;font-style:italic")}}}}const log$5=createAdLogger("Banner");class BannerManager{constructor(t){this.containerId=(t==null?void 0:t.containerId)||"overlay-banner-bottom",this.bannerHeight=(t==null?void 0:t.height)||60,this.animationDuration=(t==null?void 0:t.animationDuration)||300}async checkBannerPermission(t){try{const i=await t();return i.ads_free?(log$5.info("Banner disabled: user has ads_free flag"),!1):Array.isArray(i==null?void 0:i.audiences)&&i.audiences.includes("banner_test")?!0:(log$5.info("Banner test flag not found in user profile audiences"),!1)}catch(i){return log$5.error("Error checking banner permission",i),!1}}async setBanner(t,i){try{if(!await this.checkBannerPermission(i))return;const o=document.getElementById(this.containerId);if(!o){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}o.classList.remove("cssdk-banner-hide"),typeof t=="string"?o.innerHTML=t:(o.innerHTML="",o.appendChild(t)),document.documentElement.style.setProperty("--banner-bottom-height",`${this.bannerHeight}px`),requestAnimationFrame(()=>{o.classList.add("cssdk-banner-show")})}catch(s){log$5.error("setBanner error",s)}}createDefaultContent(){return`
163
163
  <div style="
164
164
  display: flex;
165
165
  align-items: center;
@@ -179,37 +179,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
179
179
  <div>Реклама</div>
180
180
  </div>
181
181
  </div>
182
- `}clearBanner(){const t=document.getElementById(this.containerId);if(!t){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}t.classList.add("cssdk-banner-hide"),t.classList.remove("cssdk-banner-show"),setTimeout(()=>{t.innerHTML="",document.documentElement.style.setProperty("--banner-bottom-height","0px")},this.animationDuration)}getHeight(){return this.bannerHeight}isVisible(){const t=document.getElementById(this.containerId);return(t==null?void 0:t.classList.contains("cssdk-banner-show"))||!1}}const TELEGRAM_SCRIPT_URL="https://telegram.org/js/telegram-web-app.js?59";function ensureTelegramWebApp(){var e;return(e=window.Telegram)!=null&&e.WebApp?Promise.resolve(window.Telegram.WebApp):new Promise((t,i)=>{const s=document.querySelector('script[src*="telegram-web-app.js"]');if(s){s.addEventListener("load",()=>{var a;(a=window.Telegram)!=null&&a.WebApp?t(window.Telegram.WebApp):i(new Error("Telegram WebApp not available after script load"))}),s.addEventListener("error",()=>i(new Error("Failed to load Telegram WebApp script")));return}const o=document.createElement("script");o.src=TELEGRAM_SCRIPT_URL,o.async=!1,o.onload=()=>{var a;(a=window.Telegram)!=null&&a.WebApp?t(window.Telegram.WebApp):i(new Error("Telegram WebApp not available after script load"))},o.onerror=()=>i(new Error("Failed to load Telegram WebApp script")),document.head.appendChild(o)})}function getTelegramWebApp(){var t;const e=(t=window.Telegram)==null?void 0:t.WebApp;if(!e)throw new Error("Telegram WebApp is not available. Ensure ensureTelegramWebApp() was awaited before calling this.");return e}const DEFAULT_CONFIG={inactivityTimeout:15e3,activityScoreThreshold:10,motionThreshold:.05,gyroscopeThreshold:.05,checkInterval:1e3,maxActivityScore:15,scoreDecayRate:.95,autoclickerDetection:{enabled:!0,maxIdenticalIntervals:5,minTimingVariation:10,maxIdenticalPositions:3,requiredMotionThreshold:.5}};class ActivityDetector{constructor(t={}){this.listeners=new Set,this.checkInterval=null,this.domEventListeners=[],this.lastMotionData=null,this.lastGyroscopeData=null,this.config={...DEFAULT_CONFIG,...t};try{this.isTelegramAvailable=!!getTelegramWebApp().platform}catch{this.isTelegramAvailable=!1}this.state=this.initializeState(),this.setupActivityDetection()}initializeState(){const t=this.detectPlatform(),i=this.checkMotionSupport(),s=this.checkGyroscopeSupport();return{isActive:!0,lastActivityTime:Date.now(),activityScore:100,platform:t,hasMotionSupport:i,hasGyroscopeSupport:s,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}detectPlatform(){if(this.isTelegramAvailable){const i=getTelegramWebApp().platform;return i==="android"||i==="ios"?"mobile":"desktop"}const t=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipad|phone/i.test(t)?"mobile":"desktop"}checkMotionSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}checkGyroscopeSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}setupActivityDetection(){this.setupDOMEvents(),this.setupTelegramSensors(),this.startPeriodicCheck()}setupDOMEvents(){["mousedown","mousemove","click","touchstart","touchmove","touchend","keydown","keyup","scroll","wheel","focus","blur"].forEach(i=>{const s=this.createActivityListener();document.addEventListener(i,s,{passive:!0}),this.domEventListeners.push({event:i,listener:s})})}createActivityListener(){return t=>{if(this.config.autoclickerDetection.enabled&&this.detectAutoclicker(t)){this.state={...this.state,autoclickerDetected:!0};return}this.updateActivity(5)}}detectAutoclicker(t){const i=Date.now(),s=this.getEventPosition(t),o=i-this.state.clickPattern.lastClickTime,a=[...this.state.clickPattern.timingHistory,o],l=this.countIdenticalIntervals(a),c=this.countIdenticalPositions(s),u=this.state.motionData&&Math.abs(this.state.motionData.x)+Math.abs(this.state.motionData.y)+Math.abs(this.state.motionData.z)>this.config.autoclickerDetection.requiredMotionThreshold,f=l>this.config.autoclickerDetection.maxIdenticalIntervals||c>this.config.autoclickerDetection.maxIdenticalPositions||this.state.platform==="mobile"&&!u;return this.state.clickPattern={lastClickTime:i,lastClickPosition:s,timingHistory:a.slice(-10),positionHistory:[...this.state.clickPattern.positionHistory,{...s,time:i}].slice(-10)},f}countIdenticalIntervals(t){if(t.length<2)return 0;let i=0;for(let s=1;s<t.length;s++)if(Math.abs(t[s]-t[s-1])<this.config.autoclickerDetection.minTimingVariation?i++:i=0,i>=this.config.autoclickerDetection.maxIdenticalIntervals)return i;return i}countIdenticalPositions(t){const i=this.state.clickPattern.positionHistory;if(i.length===0)return 0;let s=0;for(let o=i.length-1;o>=0;o--){const a=i[o];if(Math.abs(t.x-a.x)<2&&Math.abs(t.y-a.y)<2)s++;else break;if(s>=this.config.autoclickerDetection.maxIdenticalPositions)return s}return s}getEventPosition(t){if(t.type.includes("touch")){const i=t;if(i.touches.length>0)return{x:i.touches[0].clientX,y:i.touches[0].clientY}}else if(t.type.includes("mouse")){const i=t;return{x:i.clientX,y:i.clientY}}return{x:0,y:0}}setupTelegramSensors(){if(!this.isTelegramAvailable){console.warn("Activity Detection: Telegram WebApp not available. Motion and gyroscope sensors will not work.");return}const t=getTelegramWebApp();this.state.hasMotionSupport&&t.Accelerometer&&t.Accelerometer.start({refresh_rate:1e3},i=>{i&&t.onEvent("accelerometerChanged",()=>{const s=t.Accelerometer;s&&s.isStarted&&this.handleMotionData(s.x,s.y,s.z)})}),this.state.hasGyroscopeSupport&&t.DeviceOrientation&&t.DeviceOrientation.start({refresh_rate:1e3,need_absolute:!1},i=>{i&&t.onEvent("deviceOrientationChanged",()=>{const s=t.DeviceOrientation;s&&s.isStarted&&this.handleGyroscopeData(s.alpha,s.beta,s.gamma)})})}handleMotionData(t,i,s){if(this.lastMotionData){const o=Math.abs(t-this.lastMotionData.x),a=Math.abs(i-this.lastMotionData.y),l=Math.abs(s-this.lastMotionData.z),c=o+a+l;if(c>this.config.motionThreshold){const u=Math.min(this.config.maxActivityScore,c*10);this.updateActivity(u)}}this.lastMotionData={x:t,y:i,z:s},this.state={...this.state,motionData:{x:t,y:i,z:s}},this.state.autoclickerDetected&&this.config.autoclickerDetection.enabled&&Math.abs(t)+Math.abs(i)+Math.abs(s)>this.config.autoclickerDetection.requiredMotionThreshold&&(this.state={...this.state,autoclickerDetected:!1})}handleGyroscopeData(t,i,s){if(this.lastGyroscopeData){const o=Math.abs(t-this.lastGyroscopeData.alpha),a=Math.abs(i-this.lastGyroscopeData.beta),l=Math.abs(s-this.lastGyroscopeData.gamma),c=o+a+l;if(c>this.config.gyroscopeThreshold){const u=Math.min(this.config.maxActivityScore,c*5);this.updateActivity(u)}}this.lastGyroscopeData={alpha:t,beta:i,gamma:s},this.state={...this.state,gyroscopeData:{alpha:t,beta:i,gamma:s}}}updateActivity(t){const i=Date.now(),s=i-this.state.lastActivityTime,o=Math.max(0,1-s/this.config.inactivityTimeout),a=this.state.activityScore*o,l=Math.min(100,a+t);this.state={...this.state,isActive:l>=this.config.activityScoreThreshold,lastActivityTime:i,activityScore:l},this.notifyListeners()}startPeriodicCheck(){this.checkInterval=setInterval(()=>{const i=Date.now()-this.state.lastActivityTime,s=Math.max(0,1-i/this.config.inactivityTimeout),o=this.state.activityScore*s*this.config.scoreDecayRate,a=o>=this.config.activityScoreThreshold;(this.state.isActive!==a||Math.abs(this.state.activityScore-o)>1)&&(this.state={...this.state,isActive:a,activityScore:Math.max(0,o)},this.notifyListeners())},this.config.checkInterval)}notifyListeners(){this.listeners.forEach(t=>{try{t(this.state)}catch(i){console.error("Error in activity listener:",i)}})}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getState(){return{...this.state}}resetAutoclickerDetection(){this.state={...this.state,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}updateConfig(t){this.config={...this.config,...t}}destroy(){if(this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null),this.domEventListeners.forEach(({event:t,listener:i})=>{document.removeEventListener(t,i)}),this.domEventListeners=[],this.isTelegramAvailable){const t=getTelegramWebApp();t.Accelerometer&&t.Accelerometer.isStarted&&t.Accelerometer.stop(),t.DeviceOrientation&&t.DeviceOrientation.isStarted&&t.DeviceOrientation.stop()}this.listeners.clear()}}let activityDetectorInstance=null;function getActivityDetector(e){return activityDetectorInstance||(activityDetectorInstance=new ActivityDetector(e)),activityDetectorInstance}function getBaseAnalyticsParams(){return{game_id:window.game_id,game_title:window.game_title,game_url:window.location.origin+window.location.pathname}}const log$4=createAdLogger("Adsgram");async function showAdsgramAdWithTimeout(e){if(!e)return log$4.error("Ad controller not available"),mixpanel.track("ad_show_error",{message:"Adsgram Ad Controller not available",error_type:"controller_unavailable",...getBaseAnalyticsParams(),ad_type:"adsgram"}),!1;const t=e;return log$4.group("Showing Ad"),log$4.time("show"),new Promise(i=>{const s=setTimeout(()=>{log$4.timeEnd("show"),log$4.error("Ad request timed out after 5s"),log$4.groupEnd(),mixpanel.track("ad_show_error",{message:"Adsgram ad request timed out after 5 seconds",error_type:"timeout",timeout_duration:5e3,...getBaseAnalyticsParams(),ad_type:"adsgram"}),i(!1)},5e3);mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.info("Starting ad display..."),t.show().then(o=>{clearTimeout(s),log$4.timeEnd("show"),o.done?(log$4.info("Ad finished successfully",{state:o.state,description:o.description}),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.groupEnd(),i(!0)):(log$4.warn("Ad was not completed",{state:o.state,description:o.description}),mixpanel.track("ad_show_error",{message:"Adsgram ad was not completed.",error_type:"not_completed",result:o,...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.groupEnd(),i(!1))}).catch(o=>{clearTimeout(s),log$4.timeEnd("show"),log$4.error("Ad error",{error:o==null?void 0:o.error,state:o==null?void 0:o.state,description:o==null?void 0:o.description}),log$4.groupEnd(),mixpanel.track("ad_show_error",{message:"Adsgram ad threw an error",error_type:"exception",error:(o==null?void 0:o.error)||String(o),...getBaseAnalyticsParams(),ad_type:"adsgram"}),i(!1)})})}const log$3=createAdLogger("Gigapub");function parseProjectId(e){const t=document.createElement("div");t.innerHTML=e;const i=t.querySelector("script");if(!i)throw new Error("Gigapub: no script tag found in gigapub configuration.");const o=(i.getAttribute("src")||"").match(/[?&]id=([^&]+)/);if(o)return o[1];const a=i.getAttribute("data-project-id");if(a)return a;throw new Error("Gigapub: could not parse project id from script.")}async function initGigapubAds(e){log$3.group("Initialization"),log$3.time("init");const t=parseProjectId(e);log$3.info("Parsed project ID",{projectId:t});const i=document.createElement("script");return i.setAttribute("data-project-id",t),i.text="!function(){var s=document.currentScript,p=s.getAttribute('data-project-id')||'default';var d=['https://ad.gigapub.tech','https://ru-ad.gigapub.tech'],i=0,t,sc;function l(){sc=document.createElement('script');sc.async=true;sc.src=d[i]+'/script?id='+p;clearTimeout(t);t=setTimeout(function(){sc.onload=sc.onerror=null;sc.src='';if(++i<d.length)l()},15000);sc.onload=function(){clearTimeout(t)};sc.onerror=function(){clearTimeout(t);if(++i<d.length)l()};document.head.appendChild(sc)}l()}()",new Promise((s,o)=>{document.head.appendChild(i),log$3.info("Multi-CDN script appended to head");const a=Date.now(),l=setInterval(()=>{if(window.showGiga&&typeof window.showGiga=="function")clearInterval(l),log$3.timeEnd("init"),log$3.info("Initialized successfully (showGiga found)"),log$3.groupEnd(),s();else if(Date.now()-a>35e3){clearInterval(l);const c=new Error("Gigapub: showGiga function did not appear on window object within timeout.");log$3.timeEnd("init"),log$3.error("Init timeout — showGiga not found after 35s"),log$3.groupEnd(),o(c)}},100)})}async function showGigapubAd(e,t){const i=crypto.randomUUID();return!window.showGiga||typeof window.showGiga!="function"?e?(log$3.warn("showGiga not available, using fallback",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Gigapub showGiga function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),await e()):(mixpanel.track("ad_show_error",{message:"Gigapub showGiga function not available",error_type:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),!1):(log$3.group("Showing Ad"),log$3.time("show"),log$3.info("Starting ad display",{transactionId:i,placementId:t}),new Promise(s=>{mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),window.showGiga({transactionId:i,showTag:t}).then(()=>{log$3.timeEnd("show"),log$3.info("Ad finished successfully",{transactionId:i,placementId:t}),log$3.groupEnd(),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),s(!0)}).catch(o=>{log$3.timeEnd("show"),log$3.error("Ad error",{error:o,transactionId:i,placementId:t}),log$3.groupEnd(),mixpanel.track("ad_show_error",{message:"Gigapub ad failed or was skipped",error_type:"exception",error:o==null?void 0:o.toString(),error_message:(o==null?void 0:o.message)||"Unknown error",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),s(!1)})}))}const log$2=createAdLogger("Monetag");async function initMonetagAds(e){log$2.group("Initialization"),log$2.time("init");try{const t=document.createElement("div");t.innerHTML=e;const i=t.firstElementChild;if(i){const s=i.dataset.sdk||null,o=document.createElement("script");for(let a=0;a<i.attributes.length;a++){const l=i.attributes[a];o.setAttribute(l.name,l.value)}return i.text&&(o.text=i.text),await new Promise((a,l)=>{if(!s){const u=new Error("Monetag: ad function name not found in script tag");return log$2.error("Ad function name not found in script tag"),log$2.timeEnd("init"),log$2.groupEnd(),l(u)}const c=s;log$2.info("Ad function name found",{fnName:c}),o.onload=()=>{log$2.info("Script loaded, waiting for function on window...");const u=Date.now(),f=setInterval(()=>{if(typeof window[c]=="function")clearInterval(f),log$2.timeEnd("init"),log$2.info("Initialized successfully",{fnName:c}),log$2.groupEnd(),a();else if(Date.now()-u>5e3){clearInterval(f);const d=new Error(`Monetag: function ${c} did not appear on window object within 5 seconds.`);log$2.timeEnd("init"),log$2.error("Init timeout — function not found after 5s",{fnName:c}),log$2.groupEnd(),l(d)}},100)},o.onerror=u=>{log$2.timeEnd("init"),log$2.error("Script failed to load",u),log$2.groupEnd(),l(new Error("Monetag: script failed to load."))},document.head.appendChild(o),log$2.info("Script appended to head")}),s}return log$2.error("No script tag found in monetag configuration"),log$2.timeEnd("init"),log$2.groupEnd(),null}catch(t){return log$2.error("Failed to initialize",t),log$2.timeEnd("init"),log$2.groupEnd(),null}}function createMonetagFallbackFunction(e,t){return async()=>{const i=window.game_id?String(window.game_id):"0";return await showMonetagAdWithTimeout(e,i,t)}}async function showMonetagAdWithTimeout(e,t,i){return log$2.group("Showing Ad"),log$2.time("show"),log$2.info("Starting ad display",{fnName:e,ymid:t,placementId:i}),e?typeof window[e]!="function"?(log$2.error("Ad function not found on window",{fnName:e}),log$2.timeEnd("show"),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad function not found on window object",error_type:"function_unavailable",function_name:e,...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),!1):new Promise(o=>{const a=document.createElement("iframe");a.style.display="none",document.body.appendChild(a);const l=()=>{document.body.contains(a)&&document.body.removeChild(a),window.removeEventListener("message",u),clearTimeout(c)},c=setTimeout(()=>{l(),log$2.timeEnd("show"),log$2.error("Ad request timed out after 5s",{placementId:i}),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad request timed out after 5 seconds",error_type:"timeout",timeout_duration:5e3,...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),o(!1)},5e3),u=d=>{d.source===a.contentWindow&&(d.data.type==="monetag_ad_success"?(l(),log$2.timeEnd("show"),log$2.info("Ad watched successfully",{placementId:i}),log$2.groupEnd(),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),o(!0)):d.data.type==="monetag_ad_error"?(l(),log$2.timeEnd("show"),log$2.error("Ad failed or was skipped",{error:d.data.error,placementId:i}),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad failed or was skipped",error_type:"ad_failed",error:d.data.error,...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),o(!1)):d.data.type==="monetag_ad_started"&&(clearTimeout(c),log$2.info("Ad started, timeout cleared",{placementId:i}),mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i})))};window.addEventListener("message",u);const f=`
183
- <script>
184
- function safePostMessage(msg) {
185
- if (window.parent && typeof window.parent.postMessage === 'function') {
186
- window.parent.postMessage(msg, '*');
187
- }
188
- }
189
- try {
190
- // Отправляем сообщение что реклама начала показываться
191
- safePostMessage({ type: 'monetag_ad_started' });
192
-
193
- setTimeout(() => {
194
- // Проверяем наличие третьего элемента и его структуры в родительском окне
195
- if (!window.parent?.document?.documentElement?.children?.[2]) {
196
- safePostMessage({
197
- type: 'monetag_ad_error',
198
- error: 'Third element does not have the expected structure with 3 children in parent window'
199
- });
200
- return;
201
- }
202
- }, 5000);
203
-
204
- window.parent['${e}']({ ymid: '${t}', requestVar: '${i?`orbit-${i}`:"orbit"}' })
205
- .then(() => {
206
- safePostMessage({ type: 'monetag_ad_success' });
207
- })
208
- .catch((e) => {
209
- safePostMessage({ type: 'monetag_ad_error', error: e.toString() });
210
- });
211
- } catch (e) {
212
- safePostMessage({ type: 'monetag_ad_error', error: e.toString() });
213
- }
214
- <\/script>
215
- `;a.contentWindow?(a.contentWindow.document.open(),a.contentWindow.document.write(f),a.contentWindow.document.close()):(l(),log$2.timeEnd("show"),log$2.error("Iframe contentWindow not available"),log$2.groupEnd(),o(!1))}):(log$2.error("Ad function name not found"),log$2.timeEnd("show"),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad function name not found",error_type:"function_name_missing",...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),!1)}var define_process_env_default$1={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const log$1=createAdLogger("Orbit");async function initOrbitAds(){log$1.group("Initialization"),log$1.time("init"),log$1.info("Loading script...");const e=define_process_env_default$1.ADS_SCRIPT_URL,t=document.createElement("script");return t.src=e,t.async=!0,new Promise((i,s)=>{t.onload=()=>{log$1.info("Script loaded, waiting for showOrbitAds function...");const o=Date.now(),a=setInterval(()=>{if(window.showOrbitAds&&typeof window.showOrbitAds=="function")clearInterval(a),log$1.timeEnd("init"),log$1.info("Initialized successfully"),log$1.groupEnd(),i();else if(Date.now()-o>5e3){clearInterval(a);const l=new Error("Orbit: showOrbitAds function did not appear on window object within 5 seconds.");log$1.timeEnd("init"),log$1.error("Init timeout — showOrbitAds not found after 5s",l),log$1.groupEnd(),s(l)}},100)},t.onerror=o=>{log$1.timeEnd("init"),log$1.error("Script failed to load",o),log$1.groupEnd(),s(new Error("Orbit: script failed to load."))},document.head.appendChild(t),log$1.info("Script appended to head")})}async function showOrbitAd(e,t){const i=crypto.randomUUID();if(!window.showOrbitAds||typeof window.showOrbitAds!="function")return e?(log$1.warn("showOrbitAds not available, using fallback",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit showOrbitAds function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),await e()):(mixpanel.track("ad_show_error",{message:"Orbit showOrbitAds function not available",error_type:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),!1);mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),log$1.group("Showing Ad"),log$1.time("show"),log$1.info("Starting ad display",{transactionId:i,...t});try{const s=await window.showOrbitAds(t);if(log$1.timeEnd("show"),log$1.info("showOrbitAds resolved",{response:s,transactionId:i}),s.should_show_internal_ad)return mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),log$1.info("Ad shown successfully (internal ad)"),log$1.groupEnd(),!0;if(log$1.warn("should_show_internal_ad=false, falling back to provider",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit has no ad available, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),e){const o=await e();return log$1.info("Fallback result",{result:o,transactionId:i}),log$1.groupEnd(),o}return log$1.groupEnd(),!1}catch(s){if(log$1.timeEnd("show"),log$1.error("Ad error",{error:s,transactionId:i}),mixpanel.track("ad_show_error",{message:"Orbit ad failed or was skipped",error_type:"exception",error:s instanceof Error?s.toString():String(s),error_message:s instanceof Error?s.message:"Unknown error",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),e){log$1.warn("Error occurred, using fallback provider",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit ad errored, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i});const o=await e();return log$1.info("Fallback result after error",{result:o,transactionId:i}),log$1.groupEnd(),o}return log$1.groupEnd(),!1}}const log=createAdLogger("TMA");async function checkAdStatus(e){try{log.info("Checking ad status",{adId:e});const t=await fetch(`https://sp.tmanetwork.tech/bid_info?id=${e}`);if(t.status===204)return log.info("Ad status: NOT_SHOWED (204)",{adId:e}),mixpanel.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"NOT_SHOWED";if(!t.ok)throw new Error(`Failed to check ad status: ${t.status}`);const i=await t.json();return i.click_created?(log.info("Ad status: CLICKED",{adId:e}),mixpanel.track("ad_status_clicked",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"CLICKED"):i.imp_created?(log.info("Ad status: SHOWED",{adId:e}),mixpanel.track("ad_status_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"SHOWED"):(log.info("Ad status: NOT_SHOWED (no imp/click)",{adId:e}),mixpanel.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"NOT_SHOWED")}catch(t){throw log.error("Error checking ad status",{adId:e,error:t}),mixpanel.track("ad_status_error",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),t}}async function showAd(e={}){if(!window.TMANetwork){const t=new Error("TMANetwork is not available");throw log.error("TMANetwork not available on window"),mixpanel.track("ad_show_error",{message:"TMANetwork is not available",error_type:"sdk_unavailable",...getBaseAnalyticsParams(),ad_type:"tma"}),t}if(window.TMANetwork.hasInterstitialAd()){log.info("Ad already loaded, showing immediately"),e.onStart&&e.onStart();try{mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma"});const t=await window.TMANetwork.showInterstitialAd();return log.info("Ad shown successfully",{adId:t.id}),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"tma",ad_id:t.id}),window.TMANetwork.reloadAd(),t}catch(t){throw log.error("Error showing preloaded ad",t),mixpanel.track("ad_show_error",{message:t instanceof Error?t.message:"Unknown error showing TMA ad",error_type:"exception",error:t instanceof Error?t.toString():String(t),...getBaseAnalyticsParams(),ad_type:"tma"}),t}}return log.info("Waiting for ad to load (10s timeout)..."),new Promise((t,i)=>{let s=!1;const o=async()=>{if(!s){s=!0;try{log.info("onAdLoaded event received"),mixpanel.track("ad_load_event_received",{...getBaseAnalyticsParams(),ad_type:"tma"}),e.onStart&&e.onStart(),mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma"});const a=await window.TMANetwork.showInterstitialAd();log.info("Ad shown successfully after load",{adId:a.id}),mixpanel.track("ad_load_success",{...getBaseAnalyticsParams(),ad_type:"tma",ad_id:a.id}),window.TMANetwork.reloadAd(),t(a)}catch(a){log.error("Error showing ad after load event",a),mixpanel.track("ad_load_error",{message:a instanceof Error?a.message:"Unknown error loading TMA ad",error_type:"load_exception",error:a instanceof Error?a.toString():String(a),...getBaseAnalyticsParams(),ad_type:"tma"}),i(a)}}};setTimeout(()=>{if(!s){s=!0;const a=new Error("Ad load timeout");log.error("Ad load timeout after 10s"),mixpanel.track("ad_load_timeout",{message:"Ad load timeout after 10 seconds",error_type:"timeout",timeout_duration:1e4,...getBaseAnalyticsParams(),ad_type:"tma"}),i(a)}},1e4),window.TMANetwork.addEventListener("onAdLoaded",o)})}function loadTMANetworkScript(){return new Promise((e,t)=>{if(log.group("Script Load"),log.time("scriptLoad"),mixpanel.track("tma_script_load_requested",getBaseAnalyticsParams()),document.querySelector('script[src="https://files.tmanetwork.tech/tmanetwork.min.js"]')){log.info("Script already loaded (skipping)"),log.timeEnd("scriptLoad"),log.groupEnd(),e();return}const i=document.createElement("script");i.src="https://files.tmanetwork.tech/tmanetwork.min.js",i.async=!0,i.onload=()=>{log.timeEnd("scriptLoad"),log.info("Script loaded successfully"),log.groupEnd(),mixpanel.track("tma_script_load_success",getBaseAnalyticsParams()),e()},i.onerror=s=>{log.timeEnd("scriptLoad"),log.error("Failed to load script",s),log.groupEnd(),mixpanel.track("tma_script_load_error",{message:"Failed to load TMANetwork script",error_type:"script_load_failed",error:String(s),...getBaseAnalyticsParams()}),captureException(s),t(new Error("Failed to load TMANetwork script"))},document.head.appendChild(i)})}function initSentry(){init({dsn:"https://b52384170118e5a8b1f43ca653975198@o4509677809172480.ingest.de.sentry.io/4509677817364560",sendDefaultPii:!0,integrations:[dedupeIntegration()],maxBreadcrumbs:50,beforeBreadcrumb(e){return e.category==="console"&&e.level!=="error"?null:e}})}function validateCloudStorageValue(e){if(e==null)return{isValid:!1,error:"Value cannot be null or undefined"};const t=e.length;let i;try{i=new TextEncoder().encode(e)}catch{return{isValid:!1,error:"Value cannot be encoded as UTF-8",characterCount:t}}const s=i.length;if(s>4096)return{isValid:!1,error:`Value exceeds maximum size: ${s} bytes (limit: 4096 bytes)`,byteSize:s,characterCount:t};if(e.includes("\0"))return{isValid:!1,error:"Value contains null bytes (\\0) which are not allowed",byteSize:s,characterCount:t};if(/[\x01-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/.test(e))return{isValid:!1,error:"Value contains invalid control characters",byteSize:s,characterCount:t};try{if(new TextDecoder("utf-8",{fatal:!0}).decode(i)!==e)return{isValid:!1,error:"Value encoding/decoding mismatch",byteSize:s,characterCount:t}}catch{return{isValid:!1,error:"Value contains invalid UTF-8 sequences",byteSize:s,characterCount:t}}return{isValid:!0,byteSize:s,characterCount:t}}function ensureViewportMetaTag(){if(typeof document>"u")return;const e=document.head||document.getElementsByTagName("head")[0];if(!e)return;const t=document.querySelector('meta[name="viewport"]'),i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);if(!t&&i){const s=document.createElement("meta");s.name="viewport",s.content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no",e.appendChild(s)}}const getGlobalObj=()=>{if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;throw new Error("No global object found")};function throttleLeading(e,t){let i=0;return function(...s){const o=Date.now();return o-i>=t?(i=o,e.apply(this,s)):(console.log(`Function is throttled. Next call available in ${t-(o-i)}ms`),Promise.resolve(!1))}}var define_process_env_default={NODE_ENV:"production",version:"1.92.0",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};ensureViewportMetaTag(),initSentry();const adLog=createAdLogger("SDK"),CloudStorageGetItem=e=>new Promise((t,i)=>{getTelegramWebApp().CloudStorage.getItem(e,(s,o)=>{s?i(new Error(s)):t(o??null)})}),CloudStorageSetItem=(e,t)=>new Promise((i,s)=>{getTelegramWebApp().CloudStorage.setItem(e,t,(o,a)=>{o?s(new Error(o)):i(a??null)})}),CloudStorageRemoveItem=e=>new Promise((t,i)=>{getTelegramWebApp().CloudStorage.removeItem(e,(s,o)=>{s?i(new Error(s)):t(o??null)})}),BASE_URL=define_process_env_default.BASE_URL,G_MEASUREMENT_ID="G-4RMXVE2K75",BANNER_HEIGHT=60,bannerManager=new BannerManager({height:BANNER_HEIGHT});let timer=null;const pending={};let state={};const CLOUD_STORAGE_PREFIX="sdk_pending_",LOCAL_STORAGE_PREFIX="portal_sdk_pending_";function setValueSync(e,t){let i;if(typeof t=="object"&&t!==null)try{i=JSON.stringify(t)}catch(a){console.error(`Failed to serialize value for ${e}:`,a),i=String(t)}else i=String(t);state[e]=pending[e]=i;try{localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${e}`,i)}catch(a){console.error(`Failed to save ${e} to localStorage:`,a)}const{isValid:s,error:o}=validateCloudStorageValue(i);if(!s){console.warn(`Value for ${e} cannot be saved to CloudStorage:`,o);return}CloudStorageSetItem(`${CLOUD_STORAGE_PREFIX}${e}`,i).catch(a=>{console.error(`Failed to save ${e} to CloudStorage:`,a)})}function removeValueSync(e){delete state[e],delete pending[e];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${e}`)}catch(t){console.error(`Failed to remove ${e} from localStorage:`,t)}CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${e}`).catch(console.error),makeRequest(`storage/${e}`,"DELETE").catch(console.error)}function getValueSync(e){return state[e]}async function loadAll(){const e={};try{for(let a=0;a<localStorage.length;a++){const l=localStorage.key(a);if(l&&l.startsWith(LOCAL_STORAGE_PREFIX)){const c=localStorage.getItem(l);if(c){const u=l.replace(LOCAL_STORAGE_PREFIX,"");e[u]=c,console.log(`Loaded from localStorage: ${u}`)}}}}catch(a){console.error("Failed to load from localStorage:",a)}const t={};try{const a=await new Promise((l,c)=>{getTelegramWebApp().CloudStorage.getKeys((u,f)=>{u?c(new Error(u)):l(f??[])})});for(const l of a)if(l.startsWith(CLOUD_STORAGE_PREFIX))try{const c=await CloudStorageGetItem(l);if(c){const u=l.replace(CLOUD_STORAGE_PREFIX,"");t[u]=c,console.log(`Loaded from CloudStorage: ${u}`)}}catch(c){console.error(`Failed to load ${l} from CloudStorage:`,c)}}catch(a){console.error("Failed to load keys from CloudStorage:",a)}const i={...t,...e},s=[500,500,1e3];let o=0;for(;;)try{const a=await makeRequest("storage/","GET");state={...a.data,...i};for(const l of Object.keys(i))pending[l]=i[l];console.log(`Loaded state from backend (${Object.keys(a.data).length} keys), localStorage (${Object.keys(e).length} keys) and CloudStorage (${Object.keys(t).length} keys)`);return}catch(a){if(o>=s.length){console.error("Failed to load all storage values:",a),state=i;for(const l of Object.keys(i))pending[l]=i[l];return}await delay(s[o]),o+=1}}function startSaveTick(){timer&&clearInterval(timer),loadAll(),timer=setInterval(async()=>{await savePendingChanges()},5*1e3)}async function savePendingChanges(){const e={...pending};console.log("save pending changes "+Object.keys(e).length),console.log(pending);for(const t of Object.keys(e)){const i=e[t],s=[500,500,1e3];let o=0,a=!1;for(;!a;)try{if(await makeRequest(`storage/${t}`,"PUT",{value:i}),pending[t]===i){delete pending[t];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${t}`),console.log(`Removed ${t} from localStorage after successful sync`)}catch(l){console.error(`Failed to remove ${t} from localStorage:`,l)}try{await CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${t}`),console.log(`Removed ${t} from CloudStorage after successful sync`)}catch(l){console.error(`Failed to remove ${t} from CloudStorage:`,l)}}else console.log(`Value for ${t} changed during save, keeping in pending and local storages`);a=!0}catch(l){if(o>=s.length){console.error(`Failed to save key ${t}:`,l);break}await delay(s[o]),o+=1}}}let configCache=null;const CACHE_DURATION_MS=5*60*1e3;let adType=null,orbitInitialized=!1,monetagShowAdFnName=null,adsgramAdController=null,countRequestAd=1,externalBotId=null,externalAuthData=null,isPortal=!1,launchResponseCache=null;const telegramReady=ensureTelegramWebApp(),makeRequest=createMakeRequest({baseUrl:BASE_URL,getAuthData:()=>externalAuthData,getBotId:()=>externalBotId,getInitData:()=>{var e,t;return((t=(e=window.Telegram)==null?void 0:e.WebApp)==null?void 0:t.initData)??""},waitUntilReady:()=>telegramReady});function getStartupConfig(){return window==null?void 0:window.startupConfig}let intervalId;const trackTimeEveryS=20;function startGameTimeTrack(){intervalId&&clearInterval(intervalId),CryptoSteamSDK.trackGameTimeTick(),intervalId=setInterval(()=>{CryptoSteamSDK.trackGameTimeTick()},trackTimeEveryS*1e3)}try{const e=(Lr=(kr=(Or=(Mr=window.Telegram)==null?void 0:Mr.WebApp)==null?void 0:Or.initDataUnsafe)==null?void 0:kr.user)==null?void 0:Lr.id;mixpanel.init("b0d7c97039e244366388b9a210c0b15a",{debug:!0,track_pageview:!0,persistence:"localStorage"}),e&&mixpanel.identify(String(e)),mixpanel.track("sdk_initialized",getBaseAnalyticsParams())}catch(e){console.error(e)}const CryptoSteamSDK={version:define_process_env_default.version,onAdStart:null,onAdEnd:null,initialize:async(e,t)=>{var s,o;const i=await ensureTelegramWebApp();isPortal=(t==null?void 0:t.mode)==="portal";try{t!=null&&t.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),console.log("options.authData",t.authData),externalAuthData=t.authData),e&&(externalBotId=e,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]})),isPortal||startSaveTick();const a=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();libExports.isMobile&&l.supported_screen_formats.includes("fullscreen")||!libExports.isMobile&&l.supported_screen_formats.includes("fullscreen-desktop")?(i==null||i.setHeaderColor("#000"),i==null||i.setBackgroundColor("#000"),i==null||i.requestFullscreen()):i==null||i.exitFullscreen(),adLog.group("SDK & Ads Initialization"),adLog.time("fullInit"),adLog.info("Starting initialization",{version:define_process_env_default.version});const c=await makeRequest("launch","POST");launchResponseCache=c,await new Promise(f=>{document.readyState==="complete"?f():window.addEventListener("load",()=>f())});const{ads:u}=c;try{await initOrbitAds(),orbitInitialized=!0}catch(f){adLog.error("Orbit failed to initialize",f)}if((u==null?void 0:u.type)==="tma"&&u.tmaAdsKey)if(adType="tma",await loadTMANetworkScript(),window.TMANetwork)await window.TMANetwork.init(c.tma_ads_key),adLog.info("TMANetwork initialized successfully");else throw new Error("TMANetwork object not found.");else if((u==null?void 0:u.type)==="monetag"&&u.monetag)adType="monetag",monetagShowAdFnName=await initMonetagAds(u.monetag);else if((u==null?void 0:u.type)==="adsgram"&&u.adsgram){adType="adsgram",adLog.info("Adsgram: initialization started");try{const f=document.createElement("script");f.src="https://sad.adsgram.ai/js/sad.min.js",f.async=!0,await new Promise((d,h)=>{f.onload=()=>{adLog.info("Adsgram: script loaded, waiting for window.Adsgram...");const p=Date.now(),m=setInterval(()=>{if(window.Adsgram&&typeof window.Adsgram.init=="function")if(clearInterval(m),adLog.info("Adsgram: window.Adsgram found, initializing..."),adsgramAdController=window.Adsgram.init({blockId:u.adsgram}),adsgramAdController)adLog.info("Adsgram: initialized successfully"),d();else{const g=new Error("Adsgram: init returned null or undefined.");adLog.error("Adsgram: init returned null",g),h(g)}else if(Date.now()-p>5e3){clearInterval(m);const g=new Error("Adsgram: window.Adsgram did not appear within 5 seconds.");adLog.error("Adsgram: init timeout after 5s",g),h(g)}},100)},f.onerror=p=>{adLog.error("Adsgram: script failed to load",p),h(new Error("Adsgram: script failed to load."))},document.head.appendChild(f),adLog.info("Adsgram: script appended to head")})}catch(f){adLog.error("Adsgram: failed to initialize",f)}}else if((u==null?void 0:u.type)==="gigapub"&&u.gigapub){adType="gigapub";try{await initGigapubAds(u.gigapub)}catch(f){adLog.error("Gigapub: failed to initialize",f)}if(u.monetag)try{monetagShowAdFnName=await initMonetagAds(u.monetag),adLog.info("Monetag fallback initialized for Gigapub")}catch(f){adLog.error("Monetag fallback: failed to initialize",f)}}adLog.timeEnd("fullInit"),adLog.info("Ads network fully initialized",{provider:adType,orbitInitialized}),adLog.groupEnd(),(s=a==null?void 0:a.audiences)!=null&&s[0]&&mixpanel.track("$experiment_started",{"Experiment name":"start_page_ab","Variant name":(o=a==null?void 0:a.audiences)==null?void 0:o[0]})}catch(a){adLog.timeEnd("fullInit"),adLog.error("Error during ads initialization",a),adLog.groupEnd()}try{const a=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();if(t!=null&&t.authData&&console.log("externalAuthData",externalAuthData),!a){console.error("Profile not found");return}if(!l){console.error("Config not found");return}mixpanel.identify(String(a.id)),window.game_id=a.game_id,window.game_title=l.title,ReactGA.initialize(G_MEASUREMENT_ID,{gaOptions:{userId:a.id,gameId:a.game_id}}),ReactGA.event("init",{gameId:a.game_id}),mixpanel.track("game_initialized",{game_id:a.game_id,game_title:l.title}),!isPortal&&!(t!=null&&t.disable_startup_ads)&&CryptoSteamSDK.requestAd().catch(c=>{adLog.error("Error requesting initial ad",c)})}catch(a){console.error("Error during GA initialization:",a)}},getLaunchResponse:()=>launchResponseCache,isLaunchedFromPortal:()=>{var e,t,i;return((i=(t=(e=window==null?void 0:window.Telegram)==null?void 0:e.WebApp)==null?void 0:t.initDataUnsafe)==null?void 0:i.start_param)==="orbit_launcher"},getConfig:async()=>{const e=Date.now();if(configCache&&configCache.expiresAt>e)return configCache.config;const t=await makeRequest("config","GET");return configCache={config:t,expiresAt:e+CACHE_DURATION_MS},t},isAdEnabled:async()=>(await makeRequest("ads/status","GET")).enabled,requestAd:async(e={})=>{var t,i,s,o,a;adLog.group("requestAd"),adLog.time("requestAd"),(t=CryptoSteamSDK.onAdStart)==null||t.call(CryptoSteamSDK);try{const l=await CryptoSteamSDK.getProfile(),c=CryptoSteamSDK.getLaunchResponse();if(countRequestAd===1&&!isPortal&&(adLog.info("First request — checking launch rules",{is_ad_cooldown:c==null?void 0:c.is_ad_cooldown}),c&&c.is_ad_cooldown))return countRequestAd++,adLog.warn("Skipped: ad is in cooldown",{is_ad_cooldown:c.is_ad_cooldown}),(i=CryptoSteamSDK.onAdEnd)==null||i.call(CryptoSteamSDK,!1),adLog.timeEnd("requestAd"),adLog.groupEnd(),!1;if(l.ads_free&&!isPortal)return adLog.warn("Skipped: profile has ads_free flag"),(s=CryptoSteamSDK.onAdEnd)==null||s.call(CryptoSteamSDK,!1),adLog.timeEnd("requestAd"),adLog.groupEnd(),!1;mixpanel.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,placement_id:e.placementId});const f=async()=>{if(adType==="tma")try{return await showAd(e),!0}catch(h){return adLog.error("Error showing TMA ad",h),!1}if(adType==="monetag"){const p=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAdWithTimeout(monetagShowAdFnName,p,e.placementId)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(adType==="gigapub"){const h=createMonetagFallbackFunction(monetagShowAdFnName,e.placementId);return await showGigapubAd(h,e.placementId)}return adLog.error("Ad network not initialized or not supported",{adType}),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,error_type:"unsupported_network",placement_id:e.placementId}),!1};countRequestAd=++countRequestAd;let d;if(adLog.info("Dispatching ad request",{orbitInitialized,adType,placementId:e.placementId}),orbitInitialized){const h=l.game_id?Number(l.game_id):void 0;d=await showOrbitAd(f,{zoneId:h,placementId:e.placementId})}else d=await f();return adLog.timeEnd("requestAd"),adLog.info("Ad request completed",{result:d}),adLog.groupEnd(),(o=CryptoSteamSDK.onAdEnd)==null||o.call(CryptoSteamSDK,d),d}catch(l){return adLog.timeEnd("requestAd"),adLog.error("Error in requestAd",l),adLog.groupEnd(),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:l instanceof Error?l.message:"Unknown error in requestAd",error_type:"sdk_exception",ad_type:adType,error:l instanceof Error?l.toString():String(l),placement_id:e.placementId}),(a=CryptoSteamSDK.onAdEnd)==null||a.call(CryptoSteamSDK,!1),!1}},requestRewardAd:async(e={})=>{var t,i,s;adLog.group("requestRewardAd"),adLog.time("requestRewardAd"),(t=CryptoSteamSDK.onAdStart)==null||t.call(CryptoSteamSDK);try{mixpanel.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,placement_id:e.placementId});const o=async()=>{if(adType==="tma")try{const l=await showAd(e);await delay(1e3);const c=await checkAdStatus(l.id);return c==="SHOWED"||c==="CLICKED"}catch(l){return adLog.error("Error showing TMA reward ad",l),!1}if(adType==="monetag"){const c=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAdWithTimeout(monetagShowAdFnName,c,e.placementId)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(adType==="gigapub"){const l=createMonetagFallbackFunction(monetagShowAdFnName,e.placementId),c=await showGigapubAd(l,e.placementId);return await delay(2e3),c}return adLog.error("Ad network not initialized or not supported",{adType}),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,error_type:"unsupported_network",placement_id:e.placementId}),!1};let a;if(adLog.info("Dispatching reward ad request",{orbitInitialized,adType,placementId:e.placementId}),orbitInitialized){const l=window.game_id?Number(window.game_id):void 0;a=await showOrbitAd(o,{zoneId:l,placementId:e.placementId})}else a=await o();return adLog.timeEnd("requestRewardAd"),adLog.info("Reward ad request completed",{result:a}),adLog.groupEnd(),(i=CryptoSteamSDK.onAdEnd)==null||i.call(CryptoSteamSDK,a),a}catch(o){return adLog.timeEnd("requestRewardAd"),adLog.error("Error in requestRewardAd",o),adLog.groupEnd(),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:o instanceof Error?o.message:"Unknown error in requestRewardAd",error_type:"sdk_exception",ad_type:adType,error:o instanceof Error?o.toString():String(o),placement_id:e.placementId}),(s=CryptoSteamSDK.onAdEnd)==null||s.call(CryptoSteamSDK,!1),!1}},getProfile:async()=>await makeRequest("profile","GET"),getBalance:async()=>await makeRequest("balance","GET"),trackGameTimeTick:()=>{getActivityDetector().getState().isActive&&makeRequest("ping","POST")},getVersion:()=>version,initializeOverlay:async e=>{await telegramReady,e!=null&&e.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),externalAuthData=e.authData),startGameTimeTrack(),e!=null&&e.botId&&(externalBotId=e.botId,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]}));const t=getStartupConfig(),i={...e,initialPosition:(e==null?void 0:e.initialPosition)??(t==null?void 0:t.overlayPosition)??"topLeft"};if(document.getElementById("overlay-root")){console.log("Overlay root already exists");return}if(createOverlay(i),!((e==null?void 0:e.visible)!==!1)){const a=document.getElementById("overlay-root");a&&a.classList.add("cssdk-overlay-hidden")}window.runGame&&window.runGame()},getShopItems:async()=>(await makeRequest("shop/items","GET")).items,getPurchasedShopItem:async e=>await makeRequest(`shop/purchases/${e}`,"GET"),getPurchasedShopItems:async()=>await makeRequest("shop/purchases","GET"),buyShopItem:async e=>{const t=await CryptoSteamSDK.getBalance(),s=(await CryptoSteamSDK.getShopItems()).find(o=>o.id===e);if(s||console.warn(`Not found shop item with id ${e}`),s&&t.balance_gems>=s.price)return await makeRequest(`shop/items/${e}/buy`,"POST");useTopUpModalStore.getState().setIsOpen(!0)},openPurchaseConfirmModal:async(e,t)=>{const i=await ensureTelegramWebApp(),s=await CryptoSteamSDK.getBalance();return new Promise((o,a)=>{if(s.balance_gems<e.price){useTopUpModalStore.getState().setIsOpen(!0),a(new Error("insufficient funds"));return}const l=document.createElement("div");l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.backgroundColor="transparent",l.style.zIndex="9999";const c=document.createElement("iframe");if(c.style.position="fixed",t){let v=t.x+(t.width-210)/2,b=t.y-108-20;b<8&&(b=t.y+t.height+20),v+210>window.innerWidth-8&&(v=window.innerWidth-8-210),v<8&&(v=8),(b+108>window.innerHeight-8||b<8)&&(b=(window.innerHeight-108)/2,v=(window.innerWidth-210)/2),c.style.left=`${v}px`,c.style.top=`${b}px`}else c.style.left="50%",c.style.top="50%",c.style.transform="translate(-50%, -50%)";c.style.boxShadow="0px 0px 2px 1px rgba(0, 0, 0, 0.22), 0px 32px 64px rgba(0, 0, 0, 0.34)",c.style.borderRadius="24px",c.style.border="none",c.style.zIndex="10000",c.referrerPolicy="origin",c.style.width="210px",c.style.height="108px",c.style.backgroundColor="white";const u=new URLSearchParams;u.set("itemId",e.id.toString()),u.set("price",e.price.toString()),u.set("__tg_x_auth",i==null?void 0:i.initData);const f={confirm:{pay:translationsTyped("confirmIframe.pay"),cancel:translationsTyped("confirmIframe.cancel")}};u.set("translations",JSON.stringify(f)),c.src=`${BASE_URL}/shop/payment_iframe?${u.toString()}`;const d=h=>{h.data.type==="confirm"?(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"success"})):h.data.type==="cancel"?(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"error"})):h.data.type==="error"&&(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),a(new Error(h.data.message)))};window.addEventListener("message",d),l.onclick=()=>{window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"error"})},document.body.appendChild(l),document.body.appendChild(c)})},createInvoice:async(e,t,i,s)=>await makeRequest("invoices","POST",{title:e,description:t,to_user_id:i,amount:s}),getAllKeyValues:async()=>{const e=await CryptoSteamSDK.getProfile();return Array.isArray(e==null?void 0:e.audiences)&&e.audiences.includes("banner_test")?(console.log("getAllKeyValuesSync"),Promise.resolve(state)):(await makeRequest("storage/","GET")).data},getValue:async e=>{const t=await CryptoSteamSDK.getProfile();return Array.isArray(t==null?void 0:t.audiences)&&t.audiences.includes("banner_test")?(console.log("getValueSync",e),Promise.resolve(getValueSync(e))):(await makeRequest(`storage/${e}`,"GET")).value},setValue:async(e,t)=>{const i=await CryptoSteamSDK.getProfile();if(Array.isArray(i==null?void 0:i.audiences)&&i.audiences.includes("banner_test"))return console.log("setValueSync",e,t),setValueSync(e,t),Promise.resolve();await makeRequest(`storage/${e}`,"PUT",{value:t})},removeValue:async e=>{const t=await CryptoSteamSDK.getProfile();if(Array.isArray(t==null?void 0:t.audiences)&&t.audiences.includes("banner_test"))return console.log("removeValueSync",e),removeValueSync(e),Promise.resolve();await makeRequest(`storage/${e}`,"DELETE")},getData:async e=>(console.warn("[DEPRECATED] Use PortalSDK.getValue instead"),(await makeRequest(`storage/${e}`,"GET")).value),setData:async(e,t)=>{console.warn("[DEPRECATED] Use PortalSDK.setValue instead"),await makeRequest(`storage/${e}`,"PUT",{value:t})},getLocale:()=>{var e,t;return((t=(e=window.Telegram.WebApp)==null?void 0:e.initDataUnsafe.user)==null?void 0:t.language_code)||"en"},showSharing:(e,t)=>{var s;const i=`https://t.me/share/url?text=${encodeURIComponent(t||"")}&url=${encodeURIComponent(e)}`;(s=window.Telegram.WebApp)==null||s.openTelegramLink(i)},telegramCloudStorage:{getValue:async e=>CloudStorageGetItem(e),setValue:async(e,t)=>CloudStorageSetItem(e,t),removeValue:async e=>CloudStorageRemoveItem(e)},gameReady:async()=>{console.log("CryptoSteamSDK: gameReady received");const e=await CryptoSteamSDK.getProfile(),t=await CryptoSteamSDK.getConfig();if(!e){console.error("Profile not found");return}if(!t){console.error("Config not found");return}mixpanel.track("game_ready",{game_id:e.game_id,game_title:t.title}),ReactGA.event("game_loaded",{gameId:e.game_id})},getWages:async()=>await makeRequest("v1/wages","GET"),claimWage:async e=>await makeRequest(`v1/wages/${e}/claim`,"POST"),startWage:async e=>await makeRequest(`v1/wages/${e}/start`,"POST"),setValueWage:async({wageId:e,value:t})=>await makeRequest(`v1/wages/${e}`,"PUT",{value:t}),getAdsgramController:()=>adsgramAdController,setBottomBanner:async()=>{const e=bannerManager.createDefaultContent();await bannerManager.setBanner(e,CryptoSteamSDK.getProfile)},clearBottomBanner:()=>{bannerManager.clearBanner()},showOverlay:()=>{const e=document.getElementById("overlay-root");e&&e.classList.remove("cssdk-overlay-hidden")},hideOverlay:()=>{const e=document.getElementById("overlay-root");e&&e.classList.add("cssdk-overlay-hidden")},isOverlayVisible:()=>{const e=document.getElementById("overlay-root");return e?!e.classList.contains("cssdk-overlay-hidden"):!1}};CryptoSteamSDK.requestAd=throttleLeading(CryptoSteamSDK.requestAd.bind(CryptoSteamSDK),1e4);const globalObj=getGlobalObj();globalObj.CryptoSteamSDK=CryptoSteamSDK,globalObj.PortalSDK=CryptoSteamSDK;const PortalEmuSDK={isAdRunning:()=>!1,getValueSync:e=>getValueSync(e),setValueSync:(e,t)=>{setValueSync(e,t)},removeValueSync:async e=>{removeValueSync(e)},reloadAd:()=>{},getStartParam:()=>{var t;const e=(t=window.Telegram.WebApp)==null?void 0:t.initDataUnsafe.start_param;return e||""},requestAd:async()=>{await CryptoSteamSDK.requestAd()}};globalObj.PortalEmuSDK=PortalEmuSDK,exports.BASE_URL=BASE_URL,exports.PortalSDK=CryptoSteamSDK,exports.default=CryptoSteamSDK,exports.makeRequest=makeRequest,exports.startGameTimeTrack=startGameTimeTrack,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
182
+ `}clearBanner(){const t=document.getElementById(this.containerId);if(!t){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}t.classList.add("cssdk-banner-hide"),t.classList.remove("cssdk-banner-show"),setTimeout(()=>{t.innerHTML="",document.documentElement.style.setProperty("--banner-bottom-height","0px")},this.animationDuration)}getHeight(){return this.bannerHeight}isVisible(){const t=document.getElementById(this.containerId);return(t==null?void 0:t.classList.contains("cssdk-banner-show"))||!1}}const TELEGRAM_SCRIPT_URL="https://telegram.org/js/telegram-web-app.js?59";function ensureTelegramWebApp(){var e;return(e=window.Telegram)!=null&&e.WebApp?Promise.resolve(window.Telegram.WebApp):new Promise((t,i)=>{const s=document.querySelector('script[src*="telegram-web-app.js"]');if(s){s.addEventListener("load",()=>{var a;(a=window.Telegram)!=null&&a.WebApp?t(window.Telegram.WebApp):i(new Error("Telegram WebApp not available after script load"))}),s.addEventListener("error",()=>i(new Error("Failed to load Telegram WebApp script")));return}const o=document.createElement("script");o.src=TELEGRAM_SCRIPT_URL,o.async=!1,o.onload=()=>{var a;(a=window.Telegram)!=null&&a.WebApp?t(window.Telegram.WebApp):i(new Error("Telegram WebApp not available after script load"))},o.onerror=()=>i(new Error("Failed to load Telegram WebApp script")),document.head.appendChild(o)})}function getTelegramWebApp(){var t;const e=(t=window.Telegram)==null?void 0:t.WebApp;if(!e)throw new Error("Telegram WebApp is not available. Ensure ensureTelegramWebApp() was awaited before calling this.");return e}const DEFAULT_CONFIG={inactivityTimeout:15e3,activityScoreThreshold:10,motionThreshold:.05,gyroscopeThreshold:.05,checkInterval:1e3,maxActivityScore:15,scoreDecayRate:.95,autoclickerDetection:{enabled:!0,maxIdenticalIntervals:5,minTimingVariation:10,maxIdenticalPositions:3,requiredMotionThreshold:.5}};class ActivityDetector{constructor(t={}){this.listeners=new Set,this.checkInterval=null,this.domEventListeners=[],this.lastMotionData=null,this.lastGyroscopeData=null,this.config={...DEFAULT_CONFIG,...t};try{this.isTelegramAvailable=!!getTelegramWebApp().platform}catch{this.isTelegramAvailable=!1}this.state=this.initializeState(),this.setupActivityDetection()}initializeState(){const t=this.detectPlatform(),i=this.checkMotionSupport(),s=this.checkGyroscopeSupport();return{isActive:!0,lastActivityTime:Date.now(),activityScore:100,platform:t,hasMotionSupport:i,hasGyroscopeSupport:s,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}detectPlatform(){if(this.isTelegramAvailable){const i=getTelegramWebApp().platform;return i==="android"||i==="ios"?"mobile":"desktop"}const t=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipad|phone/i.test(t)?"mobile":"desktop"}checkMotionSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}checkGyroscopeSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}setupActivityDetection(){this.setupDOMEvents(),this.setupTelegramSensors(),this.startPeriodicCheck()}setupDOMEvents(){["mousedown","mousemove","click","touchstart","touchmove","touchend","keydown","keyup","scroll","wheel","focus","blur"].forEach(i=>{const s=this.createActivityListener();document.addEventListener(i,s,{passive:!0}),this.domEventListeners.push({event:i,listener:s})})}createActivityListener(){return t=>{if(this.config.autoclickerDetection.enabled&&this.detectAutoclicker(t)){this.state={...this.state,autoclickerDetected:!0};return}this.updateActivity(5)}}detectAutoclicker(t){const i=Date.now(),s=this.getEventPosition(t),o=i-this.state.clickPattern.lastClickTime,a=[...this.state.clickPattern.timingHistory,o],l=this.countIdenticalIntervals(a),c=this.countIdenticalPositions(s),u=this.state.motionData&&Math.abs(this.state.motionData.x)+Math.abs(this.state.motionData.y)+Math.abs(this.state.motionData.z)>this.config.autoclickerDetection.requiredMotionThreshold,f=l>this.config.autoclickerDetection.maxIdenticalIntervals||c>this.config.autoclickerDetection.maxIdenticalPositions||this.state.platform==="mobile"&&!u;return this.state.clickPattern={lastClickTime:i,lastClickPosition:s,timingHistory:a.slice(-10),positionHistory:[...this.state.clickPattern.positionHistory,{...s,time:i}].slice(-10)},f}countIdenticalIntervals(t){if(t.length<2)return 0;let i=0;for(let s=1;s<t.length;s++)if(Math.abs(t[s]-t[s-1])<this.config.autoclickerDetection.minTimingVariation?i++:i=0,i>=this.config.autoclickerDetection.maxIdenticalIntervals)return i;return i}countIdenticalPositions(t){const i=this.state.clickPattern.positionHistory;if(i.length===0)return 0;let s=0;for(let o=i.length-1;o>=0;o--){const a=i[o];if(Math.abs(t.x-a.x)<2&&Math.abs(t.y-a.y)<2)s++;else break;if(s>=this.config.autoclickerDetection.maxIdenticalPositions)return s}return s}getEventPosition(t){if(t.type.includes("touch")){const i=t;if(i.touches.length>0)return{x:i.touches[0].clientX,y:i.touches[0].clientY}}else if(t.type.includes("mouse")){const i=t;return{x:i.clientX,y:i.clientY}}return{x:0,y:0}}setupTelegramSensors(){if(!this.isTelegramAvailable){console.warn("Activity Detection: Telegram WebApp not available. Motion and gyroscope sensors will not work.");return}const t=getTelegramWebApp();this.state.hasMotionSupport&&t.Accelerometer&&t.Accelerometer.start({refresh_rate:1e3},i=>{i&&t.onEvent("accelerometerChanged",()=>{const s=t.Accelerometer;s&&s.isStarted&&this.handleMotionData(s.x,s.y,s.z)})}),this.state.hasGyroscopeSupport&&t.DeviceOrientation&&t.DeviceOrientation.start({refresh_rate:1e3,need_absolute:!1},i=>{i&&t.onEvent("deviceOrientationChanged",()=>{const s=t.DeviceOrientation;s&&s.isStarted&&this.handleGyroscopeData(s.alpha,s.beta,s.gamma)})})}handleMotionData(t,i,s){if(this.lastMotionData){const o=Math.abs(t-this.lastMotionData.x),a=Math.abs(i-this.lastMotionData.y),l=Math.abs(s-this.lastMotionData.z),c=o+a+l;if(c>this.config.motionThreshold){const u=Math.min(this.config.maxActivityScore,c*10);this.updateActivity(u)}}this.lastMotionData={x:t,y:i,z:s},this.state={...this.state,motionData:{x:t,y:i,z:s}},this.state.autoclickerDetected&&this.config.autoclickerDetection.enabled&&Math.abs(t)+Math.abs(i)+Math.abs(s)>this.config.autoclickerDetection.requiredMotionThreshold&&(this.state={...this.state,autoclickerDetected:!1})}handleGyroscopeData(t,i,s){if(this.lastGyroscopeData){const o=Math.abs(t-this.lastGyroscopeData.alpha),a=Math.abs(i-this.lastGyroscopeData.beta),l=Math.abs(s-this.lastGyroscopeData.gamma),c=o+a+l;if(c>this.config.gyroscopeThreshold){const u=Math.min(this.config.maxActivityScore,c*5);this.updateActivity(u)}}this.lastGyroscopeData={alpha:t,beta:i,gamma:s},this.state={...this.state,gyroscopeData:{alpha:t,beta:i,gamma:s}}}updateActivity(t){const i=Date.now(),s=i-this.state.lastActivityTime,o=Math.max(0,1-s/this.config.inactivityTimeout),a=this.state.activityScore*o,l=Math.min(100,a+t);this.state={...this.state,isActive:l>=this.config.activityScoreThreshold,lastActivityTime:i,activityScore:l},this.notifyListeners()}startPeriodicCheck(){this.checkInterval=setInterval(()=>{const i=Date.now()-this.state.lastActivityTime,s=Math.max(0,1-i/this.config.inactivityTimeout),o=this.state.activityScore*s*this.config.scoreDecayRate,a=o>=this.config.activityScoreThreshold;(this.state.isActive!==a||Math.abs(this.state.activityScore-o)>1)&&(this.state={...this.state,isActive:a,activityScore:Math.max(0,o)},this.notifyListeners())},this.config.checkInterval)}notifyListeners(){this.listeners.forEach(t=>{try{t(this.state)}catch(i){console.error("Error in activity listener:",i)}})}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getState(){return{...this.state}}resetAutoclickerDetection(){this.state={...this.state,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}updateConfig(t){this.config={...this.config,...t}}destroy(){if(this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null),this.domEventListeners.forEach(({event:t,listener:i})=>{document.removeEventListener(t,i)}),this.domEventListeners=[],this.isTelegramAvailable){const t=getTelegramWebApp();t.Accelerometer&&t.Accelerometer.isStarted&&t.Accelerometer.stop(),t.DeviceOrientation&&t.DeviceOrientation.isStarted&&t.DeviceOrientation.stop()}this.listeners.clear()}}let activityDetectorInstance=null;function getActivityDetector(e){return activityDetectorInstance||(activityDetectorInstance=new ActivityDetector(e)),activityDetectorInstance}function getBaseAnalyticsParams(){return{game_id:window.game_id,game_title:window.game_title,game_url:window.location.origin+window.location.pathname}}const log$4=createAdLogger("Adsgram");async function showAdsgramAdWithTimeout(e){if(!e)return log$4.error("Ad controller not available"),mixpanel.track("ad_show_error",{message:"Adsgram Ad Controller not available",error_type:"controller_unavailable",...getBaseAnalyticsParams(),ad_type:"adsgram"}),!1;const t=e;return log$4.group("Showing Ad"),log$4.time("show"),new Promise(i=>{const s=setTimeout(()=>{log$4.timeEnd("show"),log$4.error("Ad request timed out after 5s"),log$4.groupEnd(),mixpanel.track("ad_show_error",{message:"Adsgram ad request timed out after 5 seconds",error_type:"timeout",timeout_duration:5e3,...getBaseAnalyticsParams(),ad_type:"adsgram"}),i(!1)},5e3);mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.info("Starting ad display..."),t.show().then(o=>{clearTimeout(s),log$4.timeEnd("show"),o.done?(log$4.info("Ad finished successfully",{state:o.state,description:o.description}),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.groupEnd(),i(!0)):(log$4.warn("Ad was not completed",{state:o.state,description:o.description}),mixpanel.track("ad_show_error",{message:"Adsgram ad was not completed.",error_type:"not_completed",result:o,...getBaseAnalyticsParams(),ad_type:"adsgram"}),log$4.groupEnd(),i(!1))}).catch(o=>{clearTimeout(s),log$4.timeEnd("show"),log$4.error("Ad error",{error:o==null?void 0:o.error,state:o==null?void 0:o.state,description:o==null?void 0:o.description}),log$4.groupEnd(),mixpanel.track("ad_show_error",{message:"Adsgram ad threw an error",error_type:"exception",error:(o==null?void 0:o.error)||String(o),...getBaseAnalyticsParams(),ad_type:"adsgram"}),i(!1)})})}const log$3=createAdLogger("Gigapub");function parseProjectId(e){const t=document.createElement("div");t.innerHTML=e;const i=t.querySelector("script");if(!i)throw new Error("Gigapub: no script tag found in gigapub configuration.");const o=(i.getAttribute("src")||"").match(/[?&]id=([^&]+)/);if(o)return o[1];const a=i.getAttribute("data-project-id");if(a)return a;throw new Error("Gigapub: could not parse project id from script.")}async function initGigapubAds(e){log$3.group("Initialization"),log$3.time("init");const t=parseProjectId(e);log$3.info("Parsed project ID",{projectId:t});const i=document.createElement("script");return i.setAttribute("data-project-id",t),i.text="!function(){var s=document.currentScript,p=s.getAttribute('data-project-id')||'default';var d=['https://ad.gigapub.tech','https://ru-ad.gigapub.tech'],i=0,t,sc;function l(){sc=document.createElement('script');sc.async=true;sc.src=d[i]+'/script?id='+p;clearTimeout(t);t=setTimeout(function(){sc.onload=sc.onerror=null;sc.src='';if(++i<d.length)l()},15000);sc.onload=function(){clearTimeout(t)};sc.onerror=function(){clearTimeout(t);if(++i<d.length)l()};document.head.appendChild(sc)}l()}()",new Promise((s,o)=>{document.head.appendChild(i),log$3.info("Multi-CDN script appended to head");const a=Date.now(),l=setInterval(()=>{if(window.showGiga&&typeof window.showGiga=="function")clearInterval(l),log$3.timeEnd("init"),log$3.info("Initialized successfully (showGiga found)"),log$3.groupEnd(),s();else if(Date.now()-a>35e3){clearInterval(l);const c=new Error("Gigapub: showGiga function did not appear on window object within timeout.");log$3.timeEnd("init"),log$3.error("Init timeout — showGiga not found after 35s"),log$3.groupEnd(),o(c)}},100)})}async function showGigapubAd(e,t){const i=crypto.randomUUID();return!window.showGiga||typeof window.showGiga!="function"?e?(log$3.warn("showGiga not available, using fallback",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Gigapub showGiga function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),await e()):(mixpanel.track("ad_show_error",{message:"Gigapub showGiga function not available",error_type:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),!1):(log$3.group("Showing Ad"),log$3.time("show"),log$3.info("Starting ad display",{transactionId:i,placementId:t}),new Promise(s=>{mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),window.showGiga({transactionId:i,showTag:t}).then(()=>{log$3.timeEnd("show"),log$3.info("Ad finished successfully",{transactionId:i,placementId:t}),log$3.groupEnd(),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),s(!0)}).catch(o=>{log$3.timeEnd("show"),log$3.error("Ad error",{error:o,transactionId:i,placementId:t}),log$3.groupEnd(),mixpanel.track("ad_show_error",{message:"Gigapub ad failed or was skipped",error_type:"exception",error:o==null?void 0:o.toString(),error_message:(o==null?void 0:o.message)||"Unknown error",...getBaseAnalyticsParams(),ad_type:"gigapub",transaction_id:i,placement_id:t}),s(!1)})}))}const log$2=createAdLogger("Monetag");async function initMonetagAds(e){log$2.group("Initialization"),log$2.time("init");try{const t=document.createElement("div");t.innerHTML=e;const i=t.firstElementChild;if(i){const s=i.dataset.sdk||null,o=document.createElement("script");for(let a=0;a<i.attributes.length;a++){const l=i.attributes[a];o.setAttribute(l.name,l.value)}return i.text&&(o.text=i.text),await new Promise((a,l)=>{if(!s){const u=new Error("Monetag: ad function name not found in script tag");return log$2.error("Ad function name not found in script tag"),log$2.timeEnd("init"),log$2.groupEnd(),l(u)}const c=s;log$2.info("Ad function name found",{fnName:c}),o.onload=()=>{log$2.info("Script loaded, waiting for function on window...");const u=Date.now(),f=setInterval(()=>{if(typeof window[c]=="function")clearInterval(f),log$2.timeEnd("init"),log$2.info("Initialized successfully",{fnName:c}),log$2.groupEnd(),a();else if(Date.now()-u>5e3){clearInterval(f);const d=new Error(`Monetag: function ${c} did not appear on window object within 5 seconds.`);log$2.timeEnd("init"),log$2.error("Init timeout — function not found after 5s",{fnName:c}),log$2.groupEnd(),l(d)}},100)},o.onerror=u=>{log$2.timeEnd("init"),log$2.error("Script failed to load",u),log$2.groupEnd(),l(new Error("Monetag: script failed to load."))},document.head.appendChild(o),log$2.info("Script appended to head")}),s}return log$2.error("No script tag found in monetag configuration"),log$2.timeEnd("init"),log$2.groupEnd(),null}catch(t){return log$2.error("Failed to initialize",t),log$2.timeEnd("init"),log$2.groupEnd(),null}}function createMonetagFallbackFunction(e,t){return async()=>{const i=window.game_id?String(window.game_id):"0";return await showMonetagAd(e,i,t)}}async function showMonetagAd(e,t,i){if(log$2.group("Showing Ad"),log$2.time("show"),log$2.info("Starting ad display",{fnName:e,ymid:t,placementId:i}),!e)return log$2.error("Ad function name not found"),log$2.timeEnd("show"),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad function name not found",error_type:"function_name_missing",...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),!1;const s=window[e];if(typeof s!="function")return log$2.error("Ad function not found on window",{fnName:e}),log$2.timeEnd("show"),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad function not found on window object",error_type:"function_unavailable",function_name:e,...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),!1;const o=i?`orbit-${i}`:"orbit";return new Promise(a=>{mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),s({ymid:t,requestVar:o}).then(()=>{log$2.timeEnd("show"),log$2.info("Ad watched successfully",{placementId:i}),log$2.groupEnd(),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),a(!0)}).catch(l=>{log$2.timeEnd("show"),log$2.error("Ad failed or was skipped",{error:l,placementId:i}),log$2.groupEnd(),mixpanel.track("ad_show_error",{message:"Monetag ad failed or was skipped",error_type:"ad_failed",error:String(l),...getBaseAnalyticsParams(),ad_type:"monetag",placement_id:i}),a(!1)})})}var define_process_env_default$1={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const log$1=createAdLogger("Orbit");async function initOrbitAds(){log$1.group("Initialization"),log$1.time("init"),log$1.info("Loading script...");const e=define_process_env_default$1.ADS_SCRIPT_URL,t=document.createElement("script");return t.src=e,t.async=!0,new Promise((i,s)=>{t.onload=()=>{log$1.info("Script loaded, waiting for showOrbitAds function...");const o=Date.now(),a=setInterval(()=>{if(window.showOrbitAds&&typeof window.showOrbitAds=="function")clearInterval(a),log$1.timeEnd("init"),log$1.info("Initialized successfully"),log$1.groupEnd(),i();else if(Date.now()-o>5e3){clearInterval(a);const l=new Error("Orbit: showOrbitAds function did not appear on window object within 5 seconds.");log$1.timeEnd("init"),log$1.error("Init timeout — showOrbitAds not found after 5s",l),log$1.groupEnd(),s(l)}},100)},t.onerror=o=>{log$1.timeEnd("init"),log$1.error("Script failed to load",o),log$1.groupEnd(),s(new Error("Orbit: script failed to load."))},document.head.appendChild(t),log$1.info("Script appended to head")})}async function showOrbitAd(e,t){const i=crypto.randomUUID();if(!window.showOrbitAds||typeof window.showOrbitAds!="function")return e?(log$1.warn("showOrbitAds not available, using fallback",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit showOrbitAds function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),await e()):(mixpanel.track("ad_show_error",{message:"Orbit showOrbitAds function not available",error_type:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),!1);mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),log$1.group("Showing Ad"),log$1.time("show"),log$1.info("Starting ad display",{transactionId:i,...t});try{const s=await window.showOrbitAds(t);if(log$1.timeEnd("show"),log$1.info("showOrbitAds resolved",{response:s,transactionId:i}),s.is_direct_sales)return mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),log$1.info("Ad shown successfully (internal ad)"),log$1.groupEnd(),!0;if(log$1.warn("is_direct_sales=false, falling back to provider",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit has no ad available, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),e){const o=await e();return log$1.info("Fallback result",{result:o,transactionId:i}),log$1.groupEnd(),o}return log$1.groupEnd(),!1}catch(s){if(log$1.timeEnd("show"),log$1.error("Ad error",{error:s,transactionId:i}),mixpanel.track("ad_show_error",{message:"Orbit ad failed or was skipped",error_type:"exception",error:s instanceof Error?s.toString():String(s),error_message:s instanceof Error?s.message:"Unknown error",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i}),e){log$1.warn("Error occurred, using fallback provider",{transactionId:i}),mixpanel.track("ad_show_fallback",{message:"Orbit ad errored, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",transaction_id:i});const o=await e();return log$1.info("Fallback result after error",{result:o,transactionId:i}),log$1.groupEnd(),o}return log$1.groupEnd(),!1}}const log=createAdLogger("TMA");async function checkAdStatus(e){try{log.info("Checking ad status",{adId:e});const t=await fetch(`https://sp.tmanetwork.tech/bid_info?id=${e}`);if(t.status===204)return log.info("Ad status: NOT_SHOWED (204)",{adId:e}),mixpanel.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"NOT_SHOWED";if(!t.ok)throw new Error(`Failed to check ad status: ${t.status}`);const i=await t.json();return i.click_created?(log.info("Ad status: CLICKED",{adId:e}),mixpanel.track("ad_status_clicked",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"CLICKED"):i.imp_created?(log.info("Ad status: SHOWED",{adId:e}),mixpanel.track("ad_status_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"SHOWED"):(log.info("Ad status: NOT_SHOWED (no imp/click)",{adId:e}),mixpanel.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),"NOT_SHOWED")}catch(t){throw log.error("Error checking ad status",{adId:e,error:t}),mixpanel.track("ad_status_error",{...getBaseAnalyticsParams(),ad_id:e,ad_type:"tma"}),t}}async function showAd(e={}){if(!window.TMANetwork){const t=new Error("TMANetwork is not available");throw log.error("TMANetwork not available on window"),mixpanel.track("ad_show_error",{message:"TMANetwork is not available",error_type:"sdk_unavailable",...getBaseAnalyticsParams(),ad_type:"tma"}),t}if(window.TMANetwork.hasInterstitialAd()){log.info("Ad already loaded, showing immediately"),e.onStart&&e.onStart();try{mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma"});const t=await window.TMANetwork.showInterstitialAd();return log.info("Ad shown successfully",{adId:t.id}),mixpanel.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"tma",ad_id:t.id}),window.TMANetwork.reloadAd(),t}catch(t){throw log.error("Error showing preloaded ad",t),mixpanel.track("ad_show_error",{message:t instanceof Error?t.message:"Unknown error showing TMA ad",error_type:"exception",error:t instanceof Error?t.toString():String(t),...getBaseAnalyticsParams(),ad_type:"tma"}),t}}return log.info("Waiting for ad to load (10s timeout)..."),new Promise((t,i)=>{let s=!1;const o=async()=>{if(!s){s=!0;try{log.info("onAdLoaded event received"),mixpanel.track("ad_load_event_received",{...getBaseAnalyticsParams(),ad_type:"tma"}),e.onStart&&e.onStart(),mixpanel.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma"});const a=await window.TMANetwork.showInterstitialAd();log.info("Ad shown successfully after load",{adId:a.id}),mixpanel.track("ad_load_success",{...getBaseAnalyticsParams(),ad_type:"tma",ad_id:a.id}),window.TMANetwork.reloadAd(),t(a)}catch(a){log.error("Error showing ad after load event",a),mixpanel.track("ad_load_error",{message:a instanceof Error?a.message:"Unknown error loading TMA ad",error_type:"load_exception",error:a instanceof Error?a.toString():String(a),...getBaseAnalyticsParams(),ad_type:"tma"}),i(a)}}};setTimeout(()=>{if(!s){s=!0;const a=new Error("Ad load timeout");log.error("Ad load timeout after 10s"),mixpanel.track("ad_load_timeout",{message:"Ad load timeout after 10 seconds",error_type:"timeout",timeout_duration:1e4,...getBaseAnalyticsParams(),ad_type:"tma"}),i(a)}},1e4),window.TMANetwork.addEventListener("onAdLoaded",o)})}function loadTMANetworkScript(){return new Promise((e,t)=>{if(log.group("Script Load"),log.time("scriptLoad"),mixpanel.track("tma_script_load_requested",getBaseAnalyticsParams()),document.querySelector('script[src="https://files.tmanetwork.tech/tmanetwork.min.js"]')){log.info("Script already loaded (skipping)"),log.timeEnd("scriptLoad"),log.groupEnd(),e();return}const i=document.createElement("script");i.src="https://files.tmanetwork.tech/tmanetwork.min.js",i.async=!0,i.onload=()=>{log.timeEnd("scriptLoad"),log.info("Script loaded successfully"),log.groupEnd(),mixpanel.track("tma_script_load_success",getBaseAnalyticsParams()),e()},i.onerror=s=>{log.timeEnd("scriptLoad"),log.error("Failed to load script",s),log.groupEnd(),mixpanel.track("tma_script_load_error",{message:"Failed to load TMANetwork script",error_type:"script_load_failed",error:String(s),...getBaseAnalyticsParams()}),captureException(s),t(new Error("Failed to load TMANetwork script"))},document.head.appendChild(i)})}function initSentry(){init({dsn:"https://b52384170118e5a8b1f43ca653975198@o4509677809172480.ingest.de.sentry.io/4509677817364560",sendDefaultPii:!0,integrations:[dedupeIntegration()],maxBreadcrumbs:50,beforeBreadcrumb(e){return e.category==="console"&&e.level!=="error"?null:e}})}function validateCloudStorageValue(e){if(e==null)return{isValid:!1,error:"Value cannot be null or undefined"};const t=e.length;let i;try{i=new TextEncoder().encode(e)}catch{return{isValid:!1,error:"Value cannot be encoded as UTF-8",characterCount:t}}const s=i.length;if(s>4096)return{isValid:!1,error:`Value exceeds maximum size: ${s} bytes (limit: 4096 bytes)`,byteSize:s,characterCount:t};if(e.includes("\0"))return{isValid:!1,error:"Value contains null bytes (\\0) which are not allowed",byteSize:s,characterCount:t};if(/[\x01-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/.test(e))return{isValid:!1,error:"Value contains invalid control characters",byteSize:s,characterCount:t};try{if(new TextDecoder("utf-8",{fatal:!0}).decode(i)!==e)return{isValid:!1,error:"Value encoding/decoding mismatch",byteSize:s,characterCount:t}}catch{return{isValid:!1,error:"Value contains invalid UTF-8 sequences",byteSize:s,characterCount:t}}return{isValid:!0,byteSize:s,characterCount:t}}function ensureViewportMetaTag(){if(typeof document>"u")return;const e=document.head||document.getElementsByTagName("head")[0];if(!e)return;const t=document.querySelector('meta[name="viewport"]'),i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);if(!t&&i){const s=document.createElement("meta");s.name="viewport",s.content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no",e.appendChild(s)}}const getGlobalObj=()=>{if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;throw new Error("No global object found")};function throttleLeading(e,t){let i=0;return function(...s){const o=Date.now();return o-i>=t?(i=o,e.apply(this,s)):(console.log(`Function is throttled. Next call available in ${t-(o-i)}ms`),Promise.resolve(!1))}}var define_process_env_default={NODE_ENV:"production",version:"1.92.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};ensureViewportMetaTag(),initSentry();const adLog=createAdLogger("SDK"),CloudStorageGetItem=e=>new Promise((t,i)=>{getTelegramWebApp().CloudStorage.getItem(e,(s,o)=>{s?i(new Error(s)):t(o??null)})}),CloudStorageSetItem=(e,t)=>new Promise((i,s)=>{getTelegramWebApp().CloudStorage.setItem(e,t,(o,a)=>{o?s(new Error(o)):i(a??null)})}),CloudStorageRemoveItem=e=>new Promise((t,i)=>{getTelegramWebApp().CloudStorage.removeItem(e,(s,o)=>{s?i(new Error(s)):t(o??null)})}),BASE_URL=define_process_env_default.BASE_URL,G_MEASUREMENT_ID="G-4RMXVE2K75",BANNER_HEIGHT=60,bannerManager=new BannerManager({height:BANNER_HEIGHT});let timer=null;const pending={};let state={};const CLOUD_STORAGE_PREFIX="sdk_pending_",LOCAL_STORAGE_PREFIX="portal_sdk_pending_";function setValueSync(e,t){let i;if(typeof t=="object"&&t!==null)try{i=JSON.stringify(t)}catch(a){console.error(`Failed to serialize value for ${e}:`,a),i=String(t)}else i=String(t);state[e]=pending[e]=i;try{localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${e}`,i)}catch(a){console.error(`Failed to save ${e} to localStorage:`,a)}const{isValid:s,error:o}=validateCloudStorageValue(i);if(!s){console.warn(`Value for ${e} cannot be saved to CloudStorage:`,o);return}CloudStorageSetItem(`${CLOUD_STORAGE_PREFIX}${e}`,i).catch(a=>{console.error(`Failed to save ${e} to CloudStorage:`,a)})}function removeValueSync(e){delete state[e],delete pending[e];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${e}`)}catch(t){console.error(`Failed to remove ${e} from localStorage:`,t)}CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${e}`).catch(console.error),makeRequest(`storage/${e}`,"DELETE").catch(console.error)}function getValueSync(e){return state[e]}async function loadAll(){const e={};try{for(let a=0;a<localStorage.length;a++){const l=localStorage.key(a);if(l&&l.startsWith(LOCAL_STORAGE_PREFIX)){const c=localStorage.getItem(l);if(c){const u=l.replace(LOCAL_STORAGE_PREFIX,"");e[u]=c,console.log(`Loaded from localStorage: ${u}`)}}}}catch(a){console.error("Failed to load from localStorage:",a)}const t={};try{const a=await new Promise((l,c)=>{getTelegramWebApp().CloudStorage.getKeys((u,f)=>{u?c(new Error(u)):l(f??[])})});for(const l of a)if(l.startsWith(CLOUD_STORAGE_PREFIX))try{const c=await CloudStorageGetItem(l);if(c){const u=l.replace(CLOUD_STORAGE_PREFIX,"");t[u]=c,console.log(`Loaded from CloudStorage: ${u}`)}}catch(c){console.error(`Failed to load ${l} from CloudStorage:`,c)}}catch(a){console.error("Failed to load keys from CloudStorage:",a)}const i={...t,...e},s=[500,500,1e3];let o=0;for(;;)try{const a=await makeRequest("storage/","GET");state={...a.data,...i};for(const l of Object.keys(i))pending[l]=i[l];console.log(`Loaded state from backend (${Object.keys(a.data).length} keys), localStorage (${Object.keys(e).length} keys) and CloudStorage (${Object.keys(t).length} keys)`);return}catch(a){if(o>=s.length){console.error("Failed to load all storage values:",a),state=i;for(const l of Object.keys(i))pending[l]=i[l];return}await delay(s[o]),o+=1}}function startSaveTick(){timer&&clearInterval(timer),loadAll(),timer=setInterval(async()=>{await savePendingChanges()},5*1e3)}async function savePendingChanges(){const e={...pending};console.log("save pending changes "+Object.keys(e).length),console.log(pending);for(const t of Object.keys(e)){const i=e[t],s=[500,500,1e3];let o=0,a=!1;for(;!a;)try{if(await makeRequest(`storage/${t}`,"PUT",{value:i}),pending[t]===i){delete pending[t];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${t}`),console.log(`Removed ${t} from localStorage after successful sync`)}catch(l){console.error(`Failed to remove ${t} from localStorage:`,l)}try{await CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${t}`),console.log(`Removed ${t} from CloudStorage after successful sync`)}catch(l){console.error(`Failed to remove ${t} from CloudStorage:`,l)}}else console.log(`Value for ${t} changed during save, keeping in pending and local storages`);a=!0}catch(l){if(o>=s.length){console.error(`Failed to save key ${t}:`,l);break}await delay(s[o]),o+=1}}}let configCache=null;const CACHE_DURATION_MS=5*60*1e3;let adType=null,orbitInitialized=!1,monetagShowAdFnName=null,adsgramAdController=null,countRequestAd=1,externalBotId=null,externalAuthData=null,isPortal=!1,launchResponseCache=null;const telegramReady=ensureTelegramWebApp(),makeRequest=createMakeRequest({baseUrl:BASE_URL,getAuthData:()=>externalAuthData,getBotId:()=>externalBotId,getInitData:()=>{var e,t;return((t=(e=window.Telegram)==null?void 0:e.WebApp)==null?void 0:t.initData)??""},waitUntilReady:()=>telegramReady});function getStartupConfig(){return window==null?void 0:window.startupConfig}let intervalId;const trackTimeEveryS=20;function startGameTimeTrack(){intervalId&&clearInterval(intervalId),CryptoSteamSDK.trackGameTimeTick(),intervalId=setInterval(()=>{CryptoSteamSDK.trackGameTimeTick()},trackTimeEveryS*1e3)}try{const e=(Lr=(kr=(Or=(Mr=window.Telegram)==null?void 0:Mr.WebApp)==null?void 0:Or.initDataUnsafe)==null?void 0:kr.user)==null?void 0:Lr.id;mixpanel.init("b0d7c97039e244366388b9a210c0b15a",{debug:!0,track_pageview:!0,persistence:"localStorage"}),e&&mixpanel.identify(String(e)),mixpanel.track("sdk_initialized",getBaseAnalyticsParams())}catch(e){console.error(e)}const CryptoSteamSDK={version:define_process_env_default.version,onAdStart:null,onAdEnd:null,initialize:async(e,t)=>{var s,o;const i=await ensureTelegramWebApp();isPortal=(t==null?void 0:t.mode)==="portal";try{t!=null&&t.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),console.log("options.authData",t.authData),externalAuthData=t.authData),e&&(externalBotId=e,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]})),isPortal||startSaveTick();const a=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();libExports.isMobile&&l.supported_screen_formats.includes("fullscreen")||!libExports.isMobile&&l.supported_screen_formats.includes("fullscreen-desktop")?(i==null||i.setHeaderColor("#000"),i==null||i.setBackgroundColor("#000"),i==null||i.requestFullscreen()):i==null||i.exitFullscreen(),adLog.group("SDK & Ads Initialization"),adLog.time("fullInit"),adLog.info("Starting initialization",{version:define_process_env_default.version});const c=await makeRequest("launch","POST");launchResponseCache=c,await new Promise(f=>{document.readyState==="complete"?f():window.addEventListener("load",()=>f())});const{ads:u}=c;try{await initOrbitAds(),orbitInitialized=!0}catch(f){adLog.error("Orbit failed to initialize",f)}if((u==null?void 0:u.type)==="tma"&&u.tmaAdsKey)if(adType="tma",await loadTMANetworkScript(),window.TMANetwork)await window.TMANetwork.init(c.tma_ads_key),adLog.info("TMANetwork initialized successfully");else throw new Error("TMANetwork object not found.");else if((u==null?void 0:u.type)==="monetag"&&u.monetag)adType="monetag",monetagShowAdFnName=await initMonetagAds(u.monetag);else if((u==null?void 0:u.type)==="adsgram"&&u.adsgram){adType="adsgram",adLog.info("Adsgram: initialization started");try{const f=document.createElement("script");f.src="https://sad.adsgram.ai/js/sad.min.js",f.async=!0,await new Promise((d,h)=>{f.onload=()=>{adLog.info("Adsgram: script loaded, waiting for window.Adsgram...");const p=Date.now(),m=setInterval(()=>{if(window.Adsgram&&typeof window.Adsgram.init=="function")if(clearInterval(m),adLog.info("Adsgram: window.Adsgram found, initializing..."),adsgramAdController=window.Adsgram.init({blockId:u.adsgram}),adsgramAdController)adLog.info("Adsgram: initialized successfully"),d();else{const g=new Error("Adsgram: init returned null or undefined.");adLog.error("Adsgram: init returned null",g),h(g)}else if(Date.now()-p>5e3){clearInterval(m);const g=new Error("Adsgram: window.Adsgram did not appear within 5 seconds.");adLog.error("Adsgram: init timeout after 5s",g),h(g)}},100)},f.onerror=p=>{adLog.error("Adsgram: script failed to load",p),h(new Error("Adsgram: script failed to load."))},document.head.appendChild(f),adLog.info("Adsgram: script appended to head")})}catch(f){adLog.error("Adsgram: failed to initialize",f)}}else if((u==null?void 0:u.type)==="gigapub"&&u.gigapub){adType="gigapub";try{await initGigapubAds(u.gigapub)}catch(f){adLog.error("Gigapub: failed to initialize",f)}if(u.monetag)try{monetagShowAdFnName=await initMonetagAds(u.monetag),adLog.info("Monetag fallback initialized for Gigapub")}catch(f){adLog.error("Monetag fallback: failed to initialize",f)}}adLog.timeEnd("fullInit"),adLog.info("Ads network fully initialized",{provider:adType,orbitInitialized}),adLog.groupEnd(),(s=a==null?void 0:a.audiences)!=null&&s[0]&&mixpanel.track("$experiment_started",{"Experiment name":"start_page_ab","Variant name":(o=a==null?void 0:a.audiences)==null?void 0:o[0]})}catch(a){adLog.timeEnd("fullInit"),adLog.error("Error during ads initialization",a),adLog.groupEnd()}try{const a=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();if(t!=null&&t.authData&&console.log("externalAuthData",externalAuthData),!a){console.error("Profile not found");return}if(!l){console.error("Config not found");return}mixpanel.identify(String(a.id)),window.game_id=a.game_id,window.game_title=l.title,ReactGA.initialize(G_MEASUREMENT_ID,{gaOptions:{userId:a.id,gameId:a.game_id}}),ReactGA.event("init",{gameId:a.game_id}),mixpanel.track("game_initialized",{game_id:a.game_id,game_title:l.title}),!isPortal&&!(t!=null&&t.disable_startup_ads)&&CryptoSteamSDK.requestAd().catch(c=>{adLog.error("Error requesting initial ad",c)})}catch(a){console.error("Error during GA initialization:",a)}},getLaunchResponse:()=>launchResponseCache,isLaunchedFromPortal:()=>{var e,t,i;return((i=(t=(e=window==null?void 0:window.Telegram)==null?void 0:e.WebApp)==null?void 0:t.initDataUnsafe)==null?void 0:i.start_param)==="orbit_launcher"},getConfig:async()=>{const e=Date.now();if(configCache&&configCache.expiresAt>e)return configCache.config;const t=await makeRequest("config","GET");return configCache={config:t,expiresAt:e+CACHE_DURATION_MS},t},isAdEnabled:async()=>(await makeRequest("ads/status","GET")).enabled,requestAd:async(e={})=>{var t,i,s,o,a;adLog.group("requestAd"),adLog.time("requestAd"),(t=CryptoSteamSDK.onAdStart)==null||t.call(CryptoSteamSDK);try{const l=await CryptoSteamSDK.getProfile(),c=CryptoSteamSDK.getLaunchResponse();if(countRequestAd===1&&!isPortal&&(adLog.info("First request — checking launch rules",{is_ad_cooldown:c==null?void 0:c.is_ad_cooldown}),c&&c.is_ad_cooldown))return countRequestAd++,adLog.warn("Skipped: ad is in cooldown",{is_ad_cooldown:c.is_ad_cooldown}),(i=CryptoSteamSDK.onAdEnd)==null||i.call(CryptoSteamSDK,!1),adLog.timeEnd("requestAd"),adLog.groupEnd(),!1;if(l.ads_free&&!isPortal)return adLog.warn("Skipped: profile has ads_free flag"),(s=CryptoSteamSDK.onAdEnd)==null||s.call(CryptoSteamSDK,!1),adLog.timeEnd("requestAd"),adLog.groupEnd(),!1;mixpanel.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,placement_id:e.placementId});const f=async()=>{if(adType==="tma")try{return await showAd(e),!0}catch(h){return adLog.error("Error showing TMA ad",h),!1}if(adType==="monetag"){const p=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,p,e.placementId)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(adType==="gigapub"){const h=createMonetagFallbackFunction(monetagShowAdFnName,e.placementId);return await showGigapubAd(h,e.placementId)}return adLog.error("Ad network not initialized or not supported",{adType}),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,error_type:"unsupported_network",placement_id:e.placementId}),!1};countRequestAd=++countRequestAd;let d;if(adLog.info("Dispatching ad request",{orbitInitialized,adType,placementId:e.placementId}),orbitInitialized){const h=l.game_id?Number(l.game_id):void 0;d=await showOrbitAd(f,{zoneId:h,placementId:e.placementId})}else d=await f();return adLog.timeEnd("requestAd"),adLog.info("Ad request completed",{result:d}),adLog.groupEnd(),(o=CryptoSteamSDK.onAdEnd)==null||o.call(CryptoSteamSDK,d),d}catch(l){return adLog.timeEnd("requestAd"),adLog.error("Error in requestAd",l),adLog.groupEnd(),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:l instanceof Error?l.message:"Unknown error in requestAd",error_type:"sdk_exception",ad_type:adType,error:l instanceof Error?l.toString():String(l),placement_id:e.placementId}),(a=CryptoSteamSDK.onAdEnd)==null||a.call(CryptoSteamSDK,!1),!1}},requestRewardAd:async(e={})=>{var t,i,s;adLog.group("requestRewardAd"),adLog.time("requestRewardAd"),(t=CryptoSteamSDK.onAdStart)==null||t.call(CryptoSteamSDK);try{mixpanel.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,placement_id:e.placementId});const o=async()=>{if(adType==="tma")try{const l=await showAd(e);await delay(1e3);const c=await checkAdStatus(l.id);return c==="SHOWED"||c==="CLICKED"}catch(l){return adLog.error("Error showing TMA reward ad",l),!1}if(adType==="monetag"){const c=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,c,e.placementId)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(adType==="gigapub"){const l=createMonetagFallbackFunction(monetagShowAdFnName,e.placementId),c=await showGigapubAd(l,e.placementId);return await delay(2e3),c}return adLog.error("Ad network not initialized or not supported",{adType}),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,error_type:"unsupported_network",placement_id:e.placementId}),!1};let a;if(adLog.info("Dispatching reward ad request",{orbitInitialized,adType,placementId:e.placementId}),orbitInitialized){const l=window.game_id?Number(window.game_id):void 0;a=await showOrbitAd(o,{zoneId:l,placementId:e.placementId})}else a=await o();return adLog.timeEnd("requestRewardAd"),adLog.info("Reward ad request completed",{result:a}),adLog.groupEnd(),(i=CryptoSteamSDK.onAdEnd)==null||i.call(CryptoSteamSDK,a),a}catch(o){return adLog.timeEnd("requestRewardAd"),adLog.error("Error in requestRewardAd",o),adLog.groupEnd(),mixpanel.track("ad_show_error",{...getBaseAnalyticsParams(),message:o instanceof Error?o.message:"Unknown error in requestRewardAd",error_type:"sdk_exception",ad_type:adType,error:o instanceof Error?o.toString():String(o),placement_id:e.placementId}),(s=CryptoSteamSDK.onAdEnd)==null||s.call(CryptoSteamSDK,!1),!1}},getProfile:async()=>await makeRequest("profile","GET"),getBalance:async()=>await makeRequest("balance","GET"),trackGameTimeTick:()=>{getActivityDetector().getState().isActive&&makeRequest("ping","POST")},getVersion:()=>version,initializeOverlay:async e=>{await telegramReady,e!=null&&e.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),externalAuthData=e.authData),startGameTimeTrack(),e!=null&&e.botId&&(externalBotId=e.botId,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]}));const t=getStartupConfig(),i={...e,initialPosition:(e==null?void 0:e.initialPosition)??(t==null?void 0:t.overlayPosition)??"topLeft"};if(document.getElementById("overlay-root")){console.log("Overlay root already exists");return}if(createOverlay(i),!((e==null?void 0:e.visible)!==!1)){const a=document.getElementById("overlay-root");a&&a.classList.add("cssdk-overlay-hidden")}window.runGame&&window.runGame()},getShopItems:async()=>(await makeRequest("shop/items","GET")).items,getPurchasedShopItem:async e=>await makeRequest(`shop/purchases/${e}`,"GET"),getPurchasedShopItems:async()=>await makeRequest("shop/purchases","GET"),buyShopItem:async e=>{const t=await CryptoSteamSDK.getBalance(),s=(await CryptoSteamSDK.getShopItems()).find(o=>o.id===e);if(s||console.warn(`Not found shop item with id ${e}`),s&&t.balance_gems>=s.price)return await makeRequest(`shop/items/${e}/buy`,"POST");useTopUpModalStore.getState().setIsOpen(!0)},openPurchaseConfirmModal:async(e,t)=>{const i=await ensureTelegramWebApp(),s=await CryptoSteamSDK.getBalance();return new Promise((o,a)=>{if(s.balance_gems<e.price){useTopUpModalStore.getState().setIsOpen(!0),a(new Error("insufficient funds"));return}const l=document.createElement("div");l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.backgroundColor="transparent",l.style.zIndex="9999";const c=document.createElement("iframe");if(c.style.position="fixed",t){let v=t.x+(t.width-210)/2,b=t.y-108-20;b<8&&(b=t.y+t.height+20),v+210>window.innerWidth-8&&(v=window.innerWidth-8-210),v<8&&(v=8),(b+108>window.innerHeight-8||b<8)&&(b=(window.innerHeight-108)/2,v=(window.innerWidth-210)/2),c.style.left=`${v}px`,c.style.top=`${b}px`}else c.style.left="50%",c.style.top="50%",c.style.transform="translate(-50%, -50%)";c.style.boxShadow="0px 0px 2px 1px rgba(0, 0, 0, 0.22), 0px 32px 64px rgba(0, 0, 0, 0.34)",c.style.borderRadius="24px",c.style.border="none",c.style.zIndex="10000",c.referrerPolicy="origin",c.style.width="210px",c.style.height="108px",c.style.backgroundColor="white";const u=new URLSearchParams;u.set("itemId",e.id.toString()),u.set("price",e.price.toString()),u.set("__tg_x_auth",i==null?void 0:i.initData);const f={confirm:{pay:translationsTyped("confirmIframe.pay"),cancel:translationsTyped("confirmIframe.cancel")}};u.set("translations",JSON.stringify(f)),c.src=`${BASE_URL}/shop/payment_iframe?${u.toString()}`;const d=h=>{h.data.type==="confirm"?(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"success"})):h.data.type==="cancel"?(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"error"})):h.data.type==="error"&&(window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),a(new Error(h.data.message)))};window.addEventListener("message",d),l.onclick=()=>{window.removeEventListener("message",d),document.body.removeChild(l),document.body.removeChild(c),o({status:"error"})},document.body.appendChild(l),document.body.appendChild(c)})},createInvoice:async(e,t,i,s)=>await makeRequest("invoices","POST",{title:e,description:t,to_user_id:i,amount:s}),getAllKeyValues:async()=>{const e=await CryptoSteamSDK.getProfile();return Array.isArray(e==null?void 0:e.audiences)&&e.audiences.includes("banner_test")?(console.log("getAllKeyValuesSync"),Promise.resolve(state)):(await makeRequest("storage/","GET")).data},getValue:async e=>{const t=await CryptoSteamSDK.getProfile();return Array.isArray(t==null?void 0:t.audiences)&&t.audiences.includes("banner_test")?(console.log("getValueSync",e),Promise.resolve(getValueSync(e))):(await makeRequest(`storage/${e}`,"GET")).value},setValue:async(e,t)=>{const i=await CryptoSteamSDK.getProfile();if(Array.isArray(i==null?void 0:i.audiences)&&i.audiences.includes("banner_test"))return console.log("setValueSync",e,t),setValueSync(e,t),Promise.resolve();await makeRequest(`storage/${e}`,"PUT",{value:t})},removeValue:async e=>{const t=await CryptoSteamSDK.getProfile();if(Array.isArray(t==null?void 0:t.audiences)&&t.audiences.includes("banner_test"))return console.log("removeValueSync",e),removeValueSync(e),Promise.resolve();await makeRequest(`storage/${e}`,"DELETE")},getData:async e=>(console.warn("[DEPRECATED] Use PortalSDK.getValue instead"),(await makeRequest(`storage/${e}`,"GET")).value),setData:async(e,t)=>{console.warn("[DEPRECATED] Use PortalSDK.setValue instead"),await makeRequest(`storage/${e}`,"PUT",{value:t})},getLocale:()=>{var e,t;return((t=(e=window.Telegram.WebApp)==null?void 0:e.initDataUnsafe.user)==null?void 0:t.language_code)||"en"},showSharing:(e,t)=>{var s;const i=`https://t.me/share/url?text=${encodeURIComponent(t||"")}&url=${encodeURIComponent(e)}`;(s=window.Telegram.WebApp)==null||s.openTelegramLink(i)},telegramCloudStorage:{getValue:async e=>CloudStorageGetItem(e),setValue:async(e,t)=>CloudStorageSetItem(e,t),removeValue:async e=>CloudStorageRemoveItem(e)},gameReady:async()=>{console.log("CryptoSteamSDK: gameReady received");const e=await CryptoSteamSDK.getProfile(),t=await CryptoSteamSDK.getConfig();if(!e){console.error("Profile not found");return}if(!t){console.error("Config not found");return}mixpanel.track("game_ready",{game_id:e.game_id,game_title:t.title}),ReactGA.event("game_loaded",{gameId:e.game_id})},getWages:async()=>await makeRequest("v1/wages","GET"),claimWage:async e=>await makeRequest(`v1/wages/${e}/claim`,"POST"),startWage:async e=>await makeRequest(`v1/wages/${e}/start`,"POST"),setValueWage:async({wageId:e,value:t})=>await makeRequest(`v1/wages/${e}`,"PUT",{value:t}),getAdsgramController:()=>adsgramAdController,setBottomBanner:async()=>{const e=bannerManager.createDefaultContent();await bannerManager.setBanner(e,CryptoSteamSDK.getProfile)},clearBottomBanner:()=>{bannerManager.clearBanner()},showOverlay:()=>{const e=document.getElementById("overlay-root");e&&e.classList.remove("cssdk-overlay-hidden")},hideOverlay:()=>{const e=document.getElementById("overlay-root");e&&e.classList.add("cssdk-overlay-hidden")},isOverlayVisible:()=>{const e=document.getElementById("overlay-root");return e?!e.classList.contains("cssdk-overlay-hidden"):!1}};CryptoSteamSDK.requestAd=throttleLeading(CryptoSteamSDK.requestAd.bind(CryptoSteamSDK),1e4);const globalObj=getGlobalObj();globalObj.CryptoSteamSDK=CryptoSteamSDK,globalObj.PortalSDK=CryptoSteamSDK;const PortalEmuSDK={isAdRunning:()=>!1,getValueSync:e=>getValueSync(e),setValueSync:(e,t)=>{setValueSync(e,t)},removeValueSync:async e=>{removeValueSync(e)},reloadAd:()=>{},getStartParam:()=>{var t;const e=(t=window.Telegram.WebApp)==null?void 0:t.initDataUnsafe.start_param;return e||""},requestAd:async()=>{await CryptoSteamSDK.requestAd()}};globalObj.PortalEmuSDK=PortalEmuSDK,exports.BASE_URL=BASE_URL,exports.PortalSDK=CryptoSteamSDK,exports.default=CryptoSteamSDK,exports.makeRequest=makeRequest,exports.startGameTimeTrack=startGameTimeTrack,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});