<html lang="en">
<head></head>
<body>

<form id="mainForm" method="post" action="https://stackblitz.com/run" target="_self">
<input type="hidden" name="project[files][CHANGELOG.md]" value="# @forgerock/journey-app

## 1.3.0

### Patch Changes

- Updated dependencies [[`beb349a`](https://github.com/ForgeRock/ping-javascript-sdk/commit/beb349a9a13e7bb8fbad35bf9bda9e340545cffa), [`c48d9c8`](https://github.com/ForgeRock/ping-javascript-sdk/commit/c48d9c8ba58b59d2c29b954d34b1a3606ef4d6a1), [`dc4d4bd`](https://github.com/ForgeRock/ping-javascript-sdk/commit/dc4d4bdb5aa781660de631f45b22620e400d9f4a), [`bdbbbd2`](https://github.com/ForgeRock/ping-javascript-sdk/commit/bdbbbd28af3f56393d12feb63d0c353ba7c89fa1), [`b0f4368`](https://github.com/ForgeRock/ping-javascript-sdk/commit/b0f4368637a788c5472587f5232678312a7eabfe), [`5fe1f95`](https://github.com/ForgeRock/ping-javascript-sdk/commit/5fe1f95667761a6a35b69e0b278e086e7cbc7e98), [`b0f4368`](https://github.com/ForgeRock/ping-javascript-sdk/commit/b0f4368637a788c5472587f5232678312a7eabfe), [`6c06e70`](https://github.com/ForgeRock/ping-javascript-sdk/commit/6c06e709a7aa503cda2e4f2b923cace1abcebd3c), [`93595d2`](https://github.com/ForgeRock/ping-javascript-sdk/commit/93595d265234cd149ff76dbac20e3e1031c3ef5f), [`4d0ee71`](https://github.com/ForgeRock/ping-javascript-sdk/commit/4d0ee71ad7570d63a2d7dba965e1469ffb4cff08), [`7cb0519`](https://github.com/ForgeRock/ping-javascript-sdk/commit/7cb0519b833ec8094a57cc20c4183fc4e521e132), [`ef4ab6f`](https://github.com/ForgeRock/ping-javascript-sdk/commit/ef4ab6ffb8ba3179d9fc11442986d38448a5d0f2), [`b0f4368`](https://github.com/ForgeRock/ping-javascript-sdk/commit/b0f4368637a788c5472587f5232678312a7eabfe)]:
  - @forgerock/oidc-client@1.3.0
  - @forgerock/journey-client@1.3.0
  - @forgerock/sdk-logger@1.3.0
">
<input type="hidden" name="project[files][callback-map.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */

import type {
  AttributeInputCallback,
  BaseCallback,
  ChoiceCallback,
  ConfirmationCallback,
  DeviceProfileCallback,
  HiddenValueCallback,
  KbaCreateCallback,
  MetadataCallback,
  NameCallback,
  PasswordCallback,
  PingOneProtectEvaluationCallback,
  PingOneProtectInitializeCallback,
  PollingWaitCallback,
  ReCaptchaCallback,
  ReCaptchaEnterpriseCallback,
  RedirectCallback,
  SelectIdPCallback,
  SuspendedTextOutputCallback,
  TermsAndConditionsCallback,
  TextInputCallback,
  TextOutputCallback,
  ValidatedCreatePasswordCallback,
  ValidatedCreateUsernameCallback,
} from &#39;@forgerock/journey-client/types&#39;;

import {
  attributeInputComponent,
  choiceComponent,
  confirmationComponent,
  deviceProfileComponent,
  hiddenValueComponent,
  kbaCreateComponent,
  metadataComponent,
  passwordComponent,
  pingProtectEvaluationComponent,
  pingProtectInitializeComponent,
  pollingWaitComponent,
  recaptchaComponent,
  recaptchaEnterpriseComponent,
  redirectComponent,
  selectIdpComponent,
  suspendedTextOutputComponent,
  termsAndConditionsComponent,
  textInputComponent,
  textOutputComponent,
  validatedPasswordComponent,
  validatedUsernameComponent,
} from &#39;./components/index.js&#39;;

/**
 * Renders a callback component based on its type
 * @param journeyEl - The container element to append the component to
 * @param callback - The callback instance
 * @param idx - Index for generating unique IDs
 * @param onSubmit - Optional callback to trigger form submission
 */
export function renderCallback(
  journeyEl: HTMLDivElement,
  callback: BaseCallback,
  idx: number,
  onSubmit?: () =&gt; void,
): void {
  switch (callback.getType()) {
    case &#39;BooleanAttributeInputCallback&#39;:
    case &#39;NumberAttributeInputCallback&#39;:
    case &#39;StringAttributeInputCallback&#39;:
      attributeInputComponent(
        journeyEl,
        callback as AttributeInputCallback&lt;string | number | boolean&gt;,
        idx,
      );
      break;
    case &#39;ChoiceCallback&#39;:
      choiceComponent(journeyEl, callback as ChoiceCallback, idx);
      break;
    case &#39;ConfirmationCallback&#39;:
      confirmationComponent(journeyEl, callback as ConfirmationCallback, idx);
      break;
    case &#39;DeviceProfileCallback&#39;:
      deviceProfileComponent(journeyEl, callback as DeviceProfileCallback, idx, onSubmit);
      break;
    case &#39;HiddenValueCallback&#39;:
      hiddenValueComponent(journeyEl, callback as HiddenValueCallback, idx);
      break;
    case &#39;KbaCreateCallback&#39;:
      kbaCreateComponent(journeyEl, callback as KbaCreateCallback, idx);
      break;
    case &#39;MetadataCallback&#39;:
      metadataComponent(journeyEl, callback as MetadataCallback, idx);
      break;
    case &#39;NameCallback&#39;:
      textInputComponent(journeyEl, callback as NameCallback, idx);
      break;
    case &#39;PasswordCallback&#39;:
      passwordComponent(journeyEl, callback as PasswordCallback, idx);
      break;
    case &#39;PingOneProtectEvaluationCallback&#39;:
      pingProtectEvaluationComponent(
        journeyEl,
        callback as PingOneProtectEvaluationCallback,
        idx,
        onSubmit,
      );
      break;
    case &#39;PingOneProtectInitializeCallback&#39;:
      pingProtectInitializeComponent(
        journeyEl,
        callback as PingOneProtectInitializeCallback,
        idx,
        onSubmit,
      );
      break;
    case &#39;PollingWaitCallback&#39;:
      pollingWaitComponent(journeyEl, callback as PollingWaitCallback, idx);
      break;
    case &#39;ReCaptchaCallback&#39;:
      recaptchaComponent(journeyEl, callback as ReCaptchaCallback, idx);
      break;
    case &#39;ReCaptchaEnterpriseCallback&#39;:
      recaptchaEnterpriseComponent(journeyEl, callback as ReCaptchaEnterpriseCallback, idx);
      break;
    case &#39;RedirectCallback&#39;:
      redirectComponent(journeyEl, callback as RedirectCallback, idx);
      break;
    case &#39;SelectIdPCallback&#39;:
      selectIdpComponent(journeyEl, callback as SelectIdPCallback, idx);
      break;
    case &#39;SuspendedTextOutputCallback&#39;:
      suspendedTextOutputComponent(journeyEl, callback as SuspendedTextOutputCallback, idx);
      break;
    case &#39;TermsAndConditionsCallback&#39;:
      termsAndConditionsComponent(journeyEl, callback as TermsAndConditionsCallback, idx);
      break;
    case &#39;TextInputCallback&#39;:
      textInputComponent(journeyEl, callback as TextInputCallback, idx);
      break;
    case &#39;TextOutputCallback&#39;:
      textOutputComponent(journeyEl, callback as TextOutputCallback, idx);
      break;
    case &#39;ValidatedCreatePasswordCallback&#39;:
      validatedPasswordComponent(journeyEl, callback as ValidatedCreatePasswordCallback, idx);
      break;
    case &#39;ValidatedCreateUsernameCallback&#39;:
      validatedUsernameComponent(journeyEl, callback as ValidatedCreateUsernameCallback, idx);
      break;
    default:
      console.warn(`Unknown callback type: ${callback.getType()}`);
      break;
  }
}

/**
 * Renders all callbacks in a step
 * @param journeyEl - The container element to append components to
 * @param callbacks - Array of callback instances
 * @param onSubmit - Optional callback to trigger form submission
 */
export function renderCallbacks(
  journeyEl: HTMLDivElement,
  callbacks: BaseCallback[],
  onSubmit?: () =&gt; void,
): void {
  callbacks.forEach((callback, idx) =&gt; {
    renderCallback(journeyEl, callback, idx, onSubmit);
  });
}
">
<input type="hidden" name="project[files][eslint.config.mjs]" value="import baseConfig from &#39;../../eslint.config.mjs&#39;;

export default [
  {
    ignores: [
      &#39;node_modules&#39;,
      &#39;*.md&#39;,
      &#39;LICENSE&#39;,
      &#39;.babelrc&#39;,
      &#39;.env*&#39;,
      &#39;.bin&#39;,
      &#39;dist&#39;,
      &#39;.eslintignore&#39;,
      &#39;*.html&#39;,
      &#39;*.svg&#39;,
      &#39;*.css&#39;,
      &#39;public&#39;,
      &#39;*.json&#39;,
      &#39;*.d.ts&#39;,
    ],
  },
  ...baseConfig,
  {
    files: [&#39;*.ts&#39;, &#39;*.tsx&#39;, &#39;*.js&#39;, &#39;*.jsx&#39;],
    rules: {},
  },
  {
    files: [&#39;*.ts&#39;, &#39;*.tsx&#39;],
    rules: {},
  },
  {
    files: [&#39;*.js&#39;, &#39;*.jsx&#39;],
    rules: {},
  },
];
">
<input type="hidden" name="project[files][helper.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
export function dotToCamelCase(str: string) {
  return str
    .split(&#39;.&#39;)
    .map((part: string, index: number) =&gt;
      index === 0 ? part.toLowerCase() : part.charAt(0).toUpperCase() + part.slice(1).toLowerCase(),
    )
    .join(&#39;&#39;);
}
">
<input type="hidden" name="project[files][index.html]" value="&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot; /&gt;
    &lt;link rel=&quot;icon&quot; type=&quot;image/svg+xml&quot; href=&quot;/vite.svg&quot; /&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;
    &lt;title&gt;Vite + TS&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id=&quot;app&quot;&gt;
      &lt;div id=&quot;section&quot;&gt;
        &lt;a href=&quot;https://vitejs.dev&quot; target=&quot;_blank&quot;&gt;
          &lt;img src=&quot;./public/vite.svg&quot; class=&quot;logo&quot; alt=&quot;Vite logo&quot; /&gt;
        &lt;/a&gt;
        &lt;a href=&quot;https://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;
          &lt;img src=&quot;./public/typescript.svg&quot; class=&quot;logo vanilla&quot; alt=&quot;TypeScript logo&quot; /&gt;
        &lt;/a&gt;
        &lt;form id=&quot;form&quot;&gt;
          &lt;div id=&quot;error&quot;&gt;&lt;/div&gt;
          &lt;div id=&quot;journey&quot;&gt;&lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;script type=&quot;module&quot; src=&quot;main.ts&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
">
<input type="hidden" name="project[files][main.ts]" value="/*
 * Copyright (c) 2025-2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import &#39;./style.css&#39;;

import { journey } from &#39;@forgerock/journey-client&#39;;

import type { JourneyClient, RequestMiddleware } from &#39;@forgerock/journey-client/types&#39;;

import { renderCallbacks } from &#39;./callback-map.js&#39;;
import { renderDeleteDevicesSection } from &#39;./components/delete-device.js&#39;;
import { renderQRCodeStep } from &#39;./components/qr-code.js&#39;;
import { renderRecoveryCodesStep } from &#39;./components/recovery-codes.js&#39;;
import { deleteWebAuthnDevice } from &#39;./services/delete-webauthn-device.js&#39;;
import { handleWebAuthnStep } from &#39;./components/webauthn-step.js&#39;;
import { serverConfigs } from &#39;./server-configs.js&#39;;

const qs = window.location.search;
const searchParams = new URLSearchParams(qs);

const config = serverConfigs[searchParams.get(&#39;clientId&#39;) || &#39;basic&#39;];

const journeyName = searchParams.get(&#39;journey&#39;) ?? &#39;UsernamePassword&#39;;
let requestMiddleware: RequestMiddleware&lt;&#39;JOURNEY_START&#39; | &#39;JOURNEY_NEXT&#39; | &#39;JOURNEY_TERMINATE&#39;&gt;[] =
  [];

if (searchParams.get(&#39;middleware&#39;) === &#39;true&#39;) {
  requestMiddleware = [
    (req, action, next) =&gt; {
      switch (action.type) {
        case &#39;JOURNEY_START&#39;:
          req.url.searchParams.set(&#39;start-authenticate-middleware&#39;, &#39;start-authentication&#39;);
          req.headers.append(&#39;x-start-authenticate-middleware&#39;, &#39;start-authentication&#39;);
          req.headers?.set(&#39;Accept-Language&#39;, &#39;xx-XX&#39;);
          break;
        case &#39;JOURNEY_NEXT&#39;:
          req.url.searchParams.set(&#39;authenticate-middleware&#39;, &#39;authentication&#39;);
          req.headers.append(&#39;x-authenticate-middleware&#39;, &#39;authentication&#39;);
          req.headers?.set(&#39;Accept-Language&#39;, &#39;yy-YY&#39;);
          break;
      }
      next();
    },
    (req, action, next) =&gt; {
      switch (action.type) {
        case &#39;JOURNEY_TERMINATE&#39;:
          req.url.searchParams.set(&#39;end-session-middleware&#39;, &#39;end-session&#39;);
          req.headers.append(&#39;x-end-session-middleware&#39;, &#39;end-session&#39;);
          req.headers?.set(&#39;Accept-Language&#39;, &#39;zz-ZZ&#39;);
          break;
      }
      next();
    },
  ];
}

(async () =&gt; {
  const errorEl = document.getElementById(&#39;error&#39;) as HTMLDivElement;
  const formEl = document.getElementById(&#39;form&#39;) as HTMLFormElement;
  const journeyEl = document.getElementById(&#39;journey&#39;) as HTMLDivElement;

  let journeyClient: JourneyClient;
  try {
    journeyClient = await journey({ config: config, requestMiddleware });
  } catch (error) {
    const message = error instanceof Error ? error.message : &#39;Unknown error&#39;;
    console.error(&#39;Failed to initialize journey client:&#39;, message);
    errorEl.textContent = message;
    return;
  }
  let step = await journeyClient.start({ journey: journeyName });

  function renderError() {
    if (step?.type !== &#39;LoginFailure&#39;) {
      throw new Error(&#39;Expected step to be defined and of type LoginFailure&#39;);
    }

    const error = step.payload.message;

    console.error(`Error: ${error}`);

    if (errorEl) {
      errorEl.innerHTML = `
        &lt;pre id=&quot;errorMessage&quot;&gt;${error}&lt;/pre&gt;
        `;
    }
  }

  // Represents the main render function for app
  async function renderForm() {
    journeyEl.innerHTML = &#39;&#39;;
    errorEl.textContent = &#39;&#39;;

    if (step?.type !== &#39;Step&#39;) {
      throw new Error(&#39;Expected step to be defined and of type Step&#39;);
    }

    const formName = step.getHeader();

    const header = document.createElement(&#39;h2&#39;);
    header.innerText = formName || &#39;&#39;;
    journeyEl.appendChild(header);

    const submitForm = () =&gt; formEl.requestSubmit();

    const { callbacksRendered, didSubmit } = await handleWebAuthnStep(
      journeyEl,
      step,
      step.callbacks,
      submitForm,
      (message) =&gt; {
        errorEl.textContent = message;
      },
    );

    if (didSubmit) {
      return;
    }

    const stepRendered =
      renderQRCodeStep(journeyEl, step) || renderRecoveryCodesStep(journeyEl, step);

    if (!stepRendered &amp;&amp; !callbacksRendered) {
      const callbacks = step.callbacks;
      renderCallbacks(journeyEl, callbacks, submitForm);
    }

    const submitBtn = document.createElement(&#39;button&#39;);
    submitBtn.type = &#39;submit&#39;;
    submitBtn.id = &#39;submitButton&#39;;
    submitBtn.innerText = &#39;Submit&#39;;
    journeyEl.appendChild(submitBtn);
  }

  function renderComplete() {
    if (step?.type !== &#39;LoginSuccess&#39;) {
      throw new Error(&#39;Expected step to be defined and of type LoginSuccess&#39;);
    }

    const session = step.getSessionToken();

    console.log(`Session Token: ${session || &#39;none&#39;}`);

    journeyEl.replaceChildren();

    const completeHeader = document.createElement(&#39;h2&#39;);
    completeHeader.id = &#39;completeHeader&#39;;
    completeHeader.innerText = &#39;Complete&#39;;
    journeyEl.appendChild(completeHeader);

    renderDeleteDevicesSection(journeyEl, () =&gt; deleteWebAuthnDevice(config));

    const sessionLabelEl = document.createElement(&#39;span&#39;);
    sessionLabelEl.id = &#39;sessionLabel&#39;;
    sessionLabelEl.innerText = &#39;Session:&#39;;

    const sessionTokenEl = document.createElement(&#39;pre&#39;);
    sessionTokenEl.id = &#39;sessionToken&#39;;
    sessionTokenEl.textContent = session || &#39;none&#39;;

    const logoutBtn = document.createElement(&#39;button&#39;);
    logoutBtn.type = &#39;button&#39;;
    logoutBtn.id = &#39;logoutButton&#39;;
    logoutBtn.innerText = &#39;Logout&#39;;

    journeyEl.appendChild(sessionLabelEl);
    journeyEl.appendChild(sessionTokenEl);
    journeyEl.appendChild(logoutBtn);

    logoutBtn.addEventListener(&#39;click&#39;, async () =&gt; {
      await journeyClient.terminate();

      console.log(&#39;Logout successful&#39;);

      step = await journeyClient.start({ journey: journeyName });

      renderForm();
    });
  }

  formEl.addEventListener(&#39;submit&#39;, async (event) =&gt; {
    event.preventDefault();

    if (step?.type !== &#39;Step&#39;) {
      throw new Error(&#39;Expected step to be defined and of type Step&#39;);
    }

    /**
     * We can just call `next` here and not worry about passing any arguments
     */
    step = await journeyClient.next(step, {
      query: { noSession: searchParams.get(&#39;no-session&#39;) || &#39;false&#39; },
    });

    /**
     * Recursively render the form with the new state
     */
    if (step?.type === &#39;Step&#39;) {
      console.log(&#39;Continuing journey to next step&#39;);
      renderForm();
    } else if (step?.type === &#39;LoginSuccess&#39;) {
      console.log(&#39;Journey completed successfully&#39;);
      renderComplete();
    } else if (step?.type === &#39;LoginFailure&#39;) {
      console.error(&#39;Journey failed&#39;);
      renderForm();
      renderError();
    } else {
      console.error(&#39;Unknown node status&#39;, step);
    }
  });

  if (step?.type !== &#39;LoginSuccess&#39;) {
    renderForm();
  } else {
    renderComplete();
  }
})();
">
<input type="hidden" name="project[files][package.json]" value="{&quot;name&quot;:&quot;@forgerock/journey-app&quot;,&quot;version&quot;:&quot;1.3.0&quot;,&quot;private&quot;:true,&quot;description&quot;:&quot;Ping Journey Client Test App&quot;,&quot;type&quot;:&quot;module&quot;,&quot;scripts&quot;:{&quot;build&quot;:&quot;pnpm nx nxBuild&quot;,&quot;lint&quot;:&quot;pnpm nx nxLint&quot;,&quot;preview&quot;:&quot;pnpm nx nxPreview&quot;,&quot;serve&quot;:&quot;pnpm nx nxServe&quot;},&quot;dependencies&quot;:{&quot;@forgerock/journey-client&quot;:&quot;https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/journey-client@33d5a85&quot;,&quot;@forgerock/oidc-client&quot;:&quot;https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/oidc-client@33d5a85&quot;,&quot;@forgerock/protect&quot;:&quot;https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/protect@33d5a85&quot;,&quot;@forgerock/sdk-logger&quot;:&quot;https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-logger@33d5a85&quot;,&quot;@forgerock/device-client&quot;:&quot;https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/device-client@33d5a85&quot;},&quot;nx&quot;:{&quot;tags&quot;:[&quot;scope:e2e&quot;]}}">
<input type="hidden" name="project[files][server-configs.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { JourneyClientConfig } from &#39;@forgerock/journey-client/types&#39;;

/**
 * Server configurations for E2E tests.
 *
 * All configuration (baseUrl, authenticate/sessions paths) is automatically
 * derived from the well-known response via `convertWellknown()`.
 */
export const serverConfigs: Record&lt;string, JourneyClientConfig&gt; = {
  basic: {
    serverConfig: {
      wellknown: &#39;http://localhost:9443/am/oauth2/realms/root/.well-known/openid-configuration&#39;,
    },
  },
  tenant: {
    serverConfig: {
      wellknown:
        &#39;https://openam-sdks.forgeblocks.com/am/oauth2/realms/root/realms/alpha/.well-known/openid-configuration&#39;,
    },
  },
};
">
<input type="hidden" name="project[files][style.css]" value=":root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  box-sizing: border-box;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  max-width: 100%;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

label,
input,
button {
  display: block;
  margin: 0.5em 0;
  width: 100%;
  box-sizing: border-box;
}
input {
  height: 2.5em;
}
pre {
  text-align: left;
  margin: 1em 0;
  padding: 1em;
  background-color: #1a1a1a;
  color: #f3f4f6;
  border-radius: 8px;
  overflow-x: auto;
}

#app {
  max-width: 80%;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

#section {
  text-align: left;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}
.flow-link {
  background-color: transparent;
  text-decoration: underline;
}

.checkbox-wrapper input,
.checkbox-wrapper label {
  display: inline-block;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5em;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
">
<input type="hidden" name="project[files][tsconfig.app.json]" value="{
  &quot;extends&quot;: &quot;./tsconfig.json&quot;,
  &quot;compilerOptions&quot;: {
    &quot;outDir&quot;: &quot;../../dist/out-tsc&quot;,
    &quot;moduleResolution&quot;: &quot;Bundler&quot;
  },
  &quot;exclude&quot;: [&quot;**/*.spec.ts&quot;, &quot;**/*.test.ts&quot;],
  &quot;include&quot;: [
    &quot;./main.ts&quot;,
    &quot;./helper.ts&quot;,
    &quot;./server-configs.ts&quot;,
    &quot;./callback-map.ts&quot;,
    &quot;components/**/*.ts&quot;,
    &quot;services/**/*.ts&quot;
  ],
  &quot;references&quot;: [
    {
      &quot;path&quot;: &quot;../../packages/sdk-effects/logger/tsconfig.lib.json&quot;
    },
    {
      &quot;path&quot;: &quot;../../packages/device-client/tsconfig.lib.json&quot;
    },
    {
      &quot;path&quot;: &quot;../../packages/oidc-client/tsconfig.lib.json&quot;
    },
    {
      &quot;path&quot;: &quot;../../packages/protect/tsconfig.lib.json&quot;
    },
    {
      &quot;path&quot;: &quot;../../packages/journey-client/tsconfig.lib.json&quot;
    }
  ]
}
">
<input type="hidden" name="project[files][tsconfig.json]" value="{
  &quot;extends&quot;: &quot;../../tsconfig.base.json&quot;,
  &quot;files&quot;: [],
  &quot;compilerOptions&quot;: {
    &quot;target&quot;: &quot;ESNext&quot;,
    &quot;useDefineForClassFields&quot;: true,
    &quot;lib&quot;: [&quot;ESNext&quot;, &quot;DOM&quot;],
    &quot;strict&quot;: true,
    &quot;isolatedModules&quot;: true,
    &quot;esModuleInterop&quot;: true,
    &quot;noUnusedLocals&quot;: true,
    &quot;noUnusedParameters&quot;: false,
    &quot;noImplicitReturns&quot;: true,
    &quot;skipLibCheck&quot;: true
  },
  &quot;references&quot;: [
    {
      &quot;path&quot;: &quot;./tsconfig.app.json&quot;
    },
    {
      &quot;path&quot;: &quot;./tsconfig.spec.json&quot;
    }
  ]
}
">
<input type="hidden" name="project[files][tsconfig.spec.json]" value="{
  &quot;extends&quot;: &quot;./tsconfig.json&quot;,
  &quot;compilerOptions&quot;: {
    &quot;module&quot;: &quot;ES2022&quot;,
    &quot;moduleResolution&quot;: &quot;Bundler&quot;,
    &quot;outDir&quot;: &quot;../../dist/out-tsc&quot;,
    &quot;types&quot;: [&quot;vitest/globals&quot;, &quot;vitest/importMeta&quot;, &quot;vite/client&quot;, &quot;node&quot;]
  },
  &quot;include&quot;: [
    &quot;vite.config.ts&quot;,
    &quot;src/**/*.test.ts&quot;,
    &quot;src/**/*.spec.ts&quot;,
    &quot;src/**/*.test.tsx&quot;,
    &quot;src/**/*.spec.tsx&quot;,
    &quot;src/**/*.test.js&quot;,
    &quot;src/**/*.spec.js&quot;,
    &quot;src/**/*.test.jsx&quot;,
    &quot;src/**/*.spec.jsx&quot;,
    &quot;src/**/*.d.ts&quot;
  ]
}
">
<input type="hidden" name="project[files][vite-env.d.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/// &lt;reference types=&quot;vite/client&quot; /&gt;
">
<input type="hidden" name="project[files][vite.config.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import * as path from &#39;path&#39;;
import { defineConfig } from &#39;vite&#39;;

export default defineConfig({
  root: __dirname,
  build: {
    outDir: &#39;./dist&#39;,
    reportCompressedSize: true,
    target: &#39;esnext&#39;,
    minify: false,
    rollupOptions: {
      input: {
        main: path.resolve(__dirname, &#39;index.html&#39;),
      },
      output: {
        entryFileNames: &#39;main.js&#39;,
      },
    },
  },
  preview: {
    port: 5829,
  },
  server: {
    port: 5829,
    headers: {
      &#39;Service-Worker-Allowed&#39;: &#39;/&#39;,
      &#39;Service-Worker&#39;: &#39;script&#39;,
    },
    strictPort: true,
  },
});
">
<input type="hidden" name="project[files][dist/callback.html]" value="&lt;p&gt;OK&lt;/p&gt;
">
<input type="hidden" name="project[files][dist/index.html]" value="&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot; /&gt;
    &lt;link rel=&quot;icon&quot; type=&quot;image/svg+xml&quot; href=&quot;/vite.svg&quot; /&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;
    &lt;title&gt;Vite + TS&lt;/title&gt;
    &lt;script type=&quot;module&quot; crossorigin src=&quot;/main.js&quot;&gt;&lt;/script&gt;
    &lt;link rel=&quot;stylesheet&quot; crossorigin href=&quot;/assets/main-5ERcvfSa.css&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id=&quot;app&quot;&gt;
      &lt;div id=&quot;section&quot;&gt;
        &lt;a href=&quot;https://vitejs.dev&quot; target=&quot;_blank&quot;&gt;
          &lt;img src=&quot;data:image/svg+xml,%3csvg%20xmlns=&#39;http://www.w3.org/2000/svg&#39;%20xmlns:xlink=&#39;http://www.w3.org/1999/xlink&#39;%20aria-hidden=&#39;true&#39;%20role=&#39;img&#39;%20class=&#39;iconify%20iconify--logos&#39;%20width=&#39;31.88&#39;%20height=&#39;32&#39;%20preserveAspectRatio=&#39;xMidYMid%20meet&#39;%20viewBox=&#39;0%200%20256%20257&#39;%3e%3cdefs%3e%3clinearGradient%20id=&#39;IconifyId1813088fe1fbc01fb466&#39;%20x1=&#39;-.828%25&#39;%20x2=&#39;57.636%25&#39;%20y1=&#39;7.652%25&#39;%20y2=&#39;78.411%25&#39;%3e%3cstop%20offset=&#39;0%25&#39;%20stop-color=&#39;%2341D1FF&#39;%3e%3c/stop%3e%3cstop%20offset=&#39;100%25&#39;%20stop-color=&#39;%23BD34FE&#39;%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20id=&#39;IconifyId1813088fe1fbc01fb467&#39;%20x1=&#39;43.376%25&#39;%20x2=&#39;50.316%25&#39;%20y1=&#39;2.242%25&#39;%20y2=&#39;89.03%25&#39;%3e%3cstop%20offset=&#39;0%25&#39;%20stop-color=&#39;%23FFEA83&#39;%3e%3c/stop%3e%3cstop%20offset=&#39;8.333%25&#39;%20stop-color=&#39;%23FFDD35&#39;%3e%3c/stop%3e%3cstop%20offset=&#39;100%25&#39;%20stop-color=&#39;%23FFA800&#39;%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill=&#39;url(%23IconifyId1813088fe1fbc01fb466)&#39;%20d=&#39;M255.153%2037.938L134.897%20252.976c-2.483%204.44-8.862%204.466-11.382.048L.875%2037.958c-2.746-4.814%201.371-10.646%206.827-9.67l120.385%2021.517a6.537%206.537%200%200%200%202.322-.004l117.867-21.483c5.438-.991%209.574%204.796%206.877%209.62Z&#39;%3e%3c/path%3e%3cpath%20fill=&#39;url(%23IconifyId1813088fe1fbc01fb467)&#39;%20d=&#39;M185.432.063L96.44%2017.501a3.268%203.268%200%200%200-2.634%203.014l-5.474%2092.456a3.268%203.268%200%200%200%203.997%203.378l24.777-5.718c2.318-.535%204.413%201.507%203.936%203.838l-7.361%2036.047c-.495%202.426%201.782%204.5%204.151%203.78l15.304-4.649c2.372-.72%204.652%201.36%204.15%203.788l-11.698%2056.621c-.732%203.542%203.979%205.473%205.943%202.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505%204.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z&#39;%3e%3c/path%3e%3c/svg%3e&quot; class=&quot;logo&quot; alt=&quot;Vite logo&quot; /&gt;
        &lt;/a&gt;
        &lt;a href=&quot;https://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;
          &lt;img src=&quot;data:image/svg+xml,%3csvg%20xmlns=&#39;http://www.w3.org/2000/svg&#39;%20xmlns:xlink=&#39;http://www.w3.org/1999/xlink&#39;%20aria-hidden=&#39;true&#39;%20role=&#39;img&#39;%20class=&#39;iconify%20iconify--logos&#39;%20width=&#39;32&#39;%20height=&#39;32&#39;%20preserveAspectRatio=&#39;xMidYMid%20meet&#39;%20viewBox=&#39;0%200%20256%20256&#39;%3e%3cpath%20fill=&#39;%23007ACC&#39;%20d=&#39;M0%20128v128h256V0H0z&#39;%3e%3c/path%3e%3cpath%20fill=&#39;%23FFF&#39;%20d=&#39;m56.612%20128.85l-.081%2010.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121%2010.443Zm149.955-10.742c6.501%201.625%2011.459%204.51%2016.01%209.224c2.357%202.52%205.851%207.111%206.136%208.208c.08.325-11.053%207.802-17.798%2011.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759%203.535-12.718%2010.321c0%201.992.284%203.17%201.097%204.795c1.707%203.536%204.876%205.649%2014.832%209.956c18.326%207.883%2026.168%2013.084%2031.045%2020.48c5.445%208.249%206.664%2021.415%202.966%2031.208c-4.063%2010.646-14.14%2017.879-28.323%2020.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163%201.178-.813%202.356-1.504c1.138-.65%205.446-3.129%209.509-5.485l7.355-4.267l1.544%202.276c2.154%203.29%206.867%207.801%209.712%209.305c8.167%204.307%2019.383%203.698%2024.909-1.26c2.357-2.153%203.332-4.388%203.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76%2012.353-21.659%2026.25-24.3c4.51-.853%2014.994-.528%2019.424.569Z&#39;%3e%3c/path%3e%3c/svg%3e&quot; class=&quot;logo vanilla&quot; alt=&quot;TypeScript logo&quot; /&gt;
        &lt;/a&gt;
        &lt;form id=&quot;form&quot;&gt;
          &lt;div id=&quot;error&quot;&gt;&lt;/div&gt;
          &lt;div id=&quot;journey&quot;&gt;&lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
">
<input type="hidden" name="project[files][dist/main.js]" value="true              &amp;&amp;(function polyfill() {
	const relList = document.createElement(&quot;link&quot;).relList;
	if (relList &amp;&amp; relList.supports &amp;&amp; relList.supports(&quot;modulepreload&quot;)) return;
	for (const link of document.querySelectorAll(&quot;link[rel=\&quot;modulepreload\&quot;]&quot;)) processPreload(link);
	new MutationObserver((mutations) =&gt; {
		for (const mutation of mutations) {
			if (mutation.type !== &quot;childList&quot;) continue;
			for (const node of mutation.addedNodes) if (node.tagName === &quot;LINK&quot; &amp;&amp; node.rel === &quot;modulepreload&quot;) processPreload(node);
		}
	}).observe(document, {
		childList: true,
		subtree: true
	});
	function getFetchOpts(link) {
		const fetchOpts = {};
		if (link.integrity) fetchOpts.integrity = link.integrity;
		if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
		if (link.crossOrigin === &quot;use-credentials&quot;) fetchOpts.credentials = &quot;include&quot;;
		else if (link.crossOrigin === &quot;anonymous&quot;) fetchOpts.credentials = &quot;omit&quot;;
		else fetchOpts.credentials = &quot;same-origin&quot;;
		return fetchOpts;
	}
	function processPreload(link) {
		if (link.ep) return;
		link.ep = true;
		const fetchOpts = getFetchOpts(link);
		fetch(link.href, fetchOpts);
	}
}());

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function logger(config) {
    let logLevel = config.level || &#39;info&#39;;
    const custom = config.custom;
    // Implement log functions
    const logFunctions = {
        error: (...args) =&gt; custom?.error ? custom.error(...args) : console.error(...args),
        warn: (...args) =&gt; (custom?.warn ? custom.warn(...args) : console.warn(...args)),
        info: (...args) =&gt; (custom?.info ? custom.info(...args) : console.info(...args)),
        debug: (...args) =&gt; custom?.debug ? custom.debug(...args) : console.debug(...args),
    };
    // Implement level inclusion
    const shouldLog = (level, currentLevel) =&gt; {
        const levelMap = {
            error: 0,
            warn: 1,
            info: 2,
            debug: 3,
            none: -1,
        };
        return levelMap[level] &lt;= levelMap[currentLevel] &amp;&amp; levelMap[currentLevel] !== -1;
    };
    // Compose logger module
    return {
        changeLevel: (level) =&gt; {
            logLevel = level;
        },
        error: (...args) =&gt; {
            if (shouldLog(&#39;error&#39;, logLevel)) {
                logFunctions.error(...args);
            }
        },
        warn: (...args) =&gt; {
            if (shouldLog(&#39;warn&#39;, logLevel)) {
                logFunctions.warn(...args);
            }
        },
        info: (...args) =&gt; {
            if (shouldLog(&#39;info&#39;, logLevel)) {
                logFunctions.info(...args);
            }
        },
        debug: (...args) =&gt; {
            if (shouldLog(&#39;debug&#39;, logLevel)) {
                logFunctions.debug(...args);
            }
        },
    };
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const callbackType = {
    BooleanAttributeInputCallback: &#39;BooleanAttributeInputCallback&#39;,
    ChoiceCallback: &#39;ChoiceCallback&#39;,
    ConfirmationCallback: &#39;ConfirmationCallback&#39;,
    DeviceProfileCallback: &#39;DeviceProfileCallback&#39;,
    HiddenValueCallback: &#39;HiddenValueCallback&#39;,
    KbaCreateCallback: &#39;KbaCreateCallback&#39;,
    MetadataCallback: &#39;MetadataCallback&#39;,
    NameCallback: &#39;NameCallback&#39;,
    NumberAttributeInputCallback: &#39;NumberAttributeInputCallback&#39;,
    PasswordCallback: &#39;PasswordCallback&#39;,
    PingOneProtectEvaluationCallback: &#39;PingOneProtectEvaluationCallback&#39;,
    PingOneProtectInitializeCallback: &#39;PingOneProtectInitializeCallback&#39;,
    PollingWaitCallback: &#39;PollingWaitCallback&#39;,
    ReCaptchaCallback: &#39;ReCaptchaCallback&#39;,
    ReCaptchaEnterpriseCallback: &#39;ReCaptchaEnterpriseCallback&#39;,
    RedirectCallback: &#39;RedirectCallback&#39;,
    SelectIdPCallback: &#39;SelectIdPCallback&#39;,
    StringAttributeInputCallback: &#39;StringAttributeInputCallback&#39;,
    SuspendedTextOutputCallback: &#39;SuspendedTextOutputCallback&#39;,
    TermsAndConditionsCallback: &#39;TermsAndConditionsCallback&#39;,
    TextInputCallback: &#39;TextInputCallback&#39;,
    TextOutputCallback: &#39;TextOutputCallback&#39;,
    ValidatedCreatePasswordCallback: &#39;ValidatedCreatePasswordCallback&#39;,
    ValidatedCreateUsernameCallback: &#39;ValidatedCreateUsernameCallback&#39;,
};

/*
 * @forgerock/ping-javascript-sdk
 *
 * enums.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Types of steps returned by the authentication tree.
 */
var StepType;
(function (StepType) {
    StepType[&quot;LoginFailure&quot;] = &quot;LoginFailure&quot;;
    StepType[&quot;LoginSuccess&quot;] = &quot;LoginSuccess&quot;;
    StepType[&quot;Step&quot;] = &quot;Step&quot;;
})(StepType || (StepType = {}));

/*
 * @forgerock/ping-javascript-sdk
 *
 * policy.types.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
var PolicyKey;
(function (PolicyKey) {
    PolicyKey[&quot;CannotContainCharacters&quot;] = &quot;CANNOT_CONTAIN_CHARACTERS&quot;;
    PolicyKey[&quot;CannotContainDuplicates&quot;] = &quot;CANNOT_CONTAIN_DUPLICATES&quot;;
    PolicyKey[&quot;CannotContainOthers&quot;] = &quot;CANNOT_CONTAIN_OTHERS&quot;;
    PolicyKey[&quot;LeastCapitalLetters&quot;] = &quot;AT_LEAST_X_CAPITAL_LETTERS&quot;;
    PolicyKey[&quot;LeastNumbers&quot;] = &quot;AT_LEAST_X_NUMBERS&quot;;
    PolicyKey[&quot;MatchRegexp&quot;] = &quot;MATCH_REGEXP&quot;;
    PolicyKey[&quot;MaximumLength&quot;] = &quot;MAX_LENGTH&quot;;
    PolicyKey[&quot;MaximumNumber&quot;] = &quot;MAXIMUM_NUMBER_VALUE&quot;;
    PolicyKey[&quot;MinimumLength&quot;] = &quot;MIN_LENGTH&quot;;
    PolicyKey[&quot;MinimumNumber&quot;] = &quot;MINIMUM_NUMBER_VALUE&quot;;
    PolicyKey[&quot;Required&quot;] = &quot;REQUIRED&quot;;
    PolicyKey[&quot;Unique&quot;] = &quot;UNIQUE&quot;;
    PolicyKey[&quot;UnknownPolicy&quot;] = &quot;UNKNOWN_POLICY&quot;;
    PolicyKey[&quot;ValidArrayItems&quot;] = &quot;VALID_ARRAY_ITEMS&quot;;
    PolicyKey[&quot;ValidDate&quot;] = &quot;VALID_DATE&quot;;
    PolicyKey[&quot;ValidEmailAddress&quot;] = &quot;VALID_EMAIL_ADDRESS_FORMAT&quot;;
    PolicyKey[&quot;ValidNameFormat&quot;] = &quot;VALID_NAME_FORMAT&quot;;
    PolicyKey[&quot;ValidNumber&quot;] = &quot;VALID_NUMBER&quot;;
    PolicyKey[&quot;ValidPhoneFormat&quot;] = &quot;VALID_PHONE_FORMAT&quot;;
    PolicyKey[&quot;ValidQueryFilter&quot;] = &quot;VALID_QUERY_FILTER&quot;;
    PolicyKey[&quot;ValidType&quot;] = &quot;VALID_TYPE&quot;;
})(PolicyKey || (PolicyKey = {}));

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Type guard to check if a value is a GenericError.
 *
 * @param value - The value to check
 * @returns True if the value is a GenericError, false otherwise
 */
function isGenericError$1(value) {
    return (typeof value === &#39;object&#39; &amp;&amp;
        value !== null &amp;&amp;
        &#39;error&#39; in value &amp;&amp;
        typeof value.error === &#39;string&#39; &amp;&amp;
        &#39;type&#39; in value &amp;&amp;
        typeof value.type === &#39;string&#39;);
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * strings.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @module
 * @ignore
 * These are private utility functions
 */
function plural(n, singularText, pluralText) {
    if (n === 1) {
        return singularText;
    }
    return pluralText !== undefined ? pluralText : singularText + &#39;s&#39;;
}

/*
 *
 * Copyright © 2025 Ping Identity Corporation. All right reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 *
 */
/** ****************************************************************
 * @function getRealmUrlPath - Get the realm URL path
 * @param {string} realmPath - The realm path
 * @returns {string} - The realm URL path
 */
function getRealmUrlPath(realmPath) {
    // Split the path and scrub segments
    const names = (realmPath || &#39;&#39;)
        .split(&#39;/&#39;)
        .map((x) =&gt; x.trim())
        .filter((x) =&gt; x !== &#39;&#39;);
    // Ensure &#39;root&#39; is the first realm
    if (names[0] !== &#39;root&#39;) {
        names.unshift(&#39;root&#39;);
    }
    // Concatenate into a URL path
    const urlPath = names.map((x) =&gt; `realms/${x}`).join(&#39;/&#39;);
    return urlPath;
}
/** ****************************************************************
 * @function getEndpointPath - Get the endpoint path
 * @param {GetEndpointPathParams} - The endpoint, realm path, and custom paths params
 * @returns {string} - The endpoint path
 */
function getEndpointPath({ endpoint, realmPath, customPaths, }) {
    const realmUrlPath = getRealmUrlPath(realmPath);
    const defaultPaths = {
        authenticate: `json/${realmUrlPath}/authenticate`,
        authorize: `oauth2/${realmUrlPath}/authorize`,
        accessToken: `oauth2/${realmUrlPath}/access_token`,
        endSession: `oauth2/${realmUrlPath}/connect/endSession`,
        userInfo: `oauth2/${realmUrlPath}/userinfo`,
        revoke: `oauth2/${realmUrlPath}/token/revoke`,
        sessions: `json/${realmUrlPath}/sessions/`,
    };
    if (customPaths &amp;&amp; customPaths[endpoint]) {
        return customPaths[endpoint];
    }
    else {
        return defaultPaths[endpoint];
    }
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * url.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Returns the base URL including protocol, hostname and any non-standard port.
 * The returned URL does not include a trailing slash.
 */
function getBaseUrl(url) {
    const isNonStandardPort = (url.protocol === &#39;http:&#39; &amp;&amp; [&#39;&#39;, &#39;80&#39;].indexOf(url.port) === -1) ||
        (url.protocol === &#39;https:&#39; &amp;&amp; [&#39;&#39;, &#39;443&#39;].indexOf(url.port) === -1);
    const port = isNonStandardPort ? `:${url.port}` : &#39;&#39;;
    let hostname = url.hostname;
    // Detect IPv6 hostnames and wrap them in square brackets
    if (hostname.includes(&#39;:&#39;) &amp;&amp; !hostname.startsWith(&#39;[&#39;) &amp;&amp; !hostname.endsWith(&#39;]&#39;)) {
        hostname = `[${hostname}]`;
    }
    const baseUrl = `${url.protocol}//${hostname}${port}`;
    return baseUrl;
}
function resolve(baseUrl, path) {
    const url = new URL(baseUrl);
    if (path.startsWith(&#39;/&#39;)) {
        return `${getBaseUrl(url)}${path}`;
    }
    const basePath = url.pathname.split(&#39;/&#39;);
    const destPath = path.split(&#39;/&#39;).filter((x) =&gt; !!x);
    const newPath = [...basePath.slice(0, -1), ...destPath].join(&#39;/&#39;);
    return `${getBaseUrl(url)}${newPath}`;
}
function stringify(data) {
    const pairs = [];
    for (const k in data) {
        if (data[k]) {
            pairs.push(k + &#39;=&#39; + encodeURIComponent(data[k]));
        }
    }
    return pairs.join(&#39;&amp;&#39;);
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Extracts a message string from an unknown error value.
 */
function extractMessage(error) {
    if (typeof error === &#39;object&#39; &amp;&amp; error !== null) {
        if (&#39;message&#39; in error &amp;&amp; typeof error.message === &#39;string&#39;) {
            return error.message;
        }
        // FetchBaseQueryError string-status variant (e.g. FETCH_ERROR, CUSTOM_ERROR)
        if (&#39;error&#39; in error &amp;&amp; typeof error.error === &#39;string&#39;) {
            return error.error;
        }
        // FetchBaseQueryError numeric-status variant stores details in .data
        if (&#39;data&#39; in error &amp;&amp; typeof error.data === &#39;object&#39; &amp;&amp; error.data !== null) {
            const data = error.data;
            if (typeof data.message === &#39;string&#39;)
                return data.message;
            if (typeof data.error === &#39;string&#39;)
                return data.error;
            if (typeof data.error_description === &#39;string&#39;)
                return data.error_description;
        }
        if (&#39;status&#39; in error &amp;&amp;
            (typeof error.status === &#39;number&#39; || typeof error.status === &#39;string&#39;)) {
            return `HTTP error ${String(error.status)}`;
        }
    }
    return &#39;An unknown error occurred&#39;;
}
/** The required path suffix for OpenID Connect Discovery endpoints. */
const WELLKNOWN_PATH_SUFFIX = &#39;/.well-known/openid-configuration&#39;;
/**
 * Validates that a well-known URL is properly formatted.
 *
 * Checks that the URL:
 * 1. Is a valid URL
 * 2. Uses HTTPS (or HTTP for localhost development)
 * 3. Ends with `/.well-known/openid-configuration` (per OpenID Connect Discovery 1.0)
 *
 * @param wellknownUrl - The URL to validate
 * @returns True if the URL is valid, secure, and has the correct path suffix
 *
 * @example
 * ```typescript
 * isValidWellknownUrl(&#39;https://am.example.com/.well-known/openid-configuration&#39;)
 * // Returns: true
 *
 * isValidWellknownUrl(&#39;http://localhost:8080/.well-known/openid-configuration&#39;)
 * // Returns: true (localhost allows HTTP)
 *
 * isValidWellknownUrl(&#39;https://am.example.com/am/oauth2/alpha&#39;)
 * // Returns: false (missing /.well-known/openid-configuration path)
 *
 * isValidWellknownUrl(&#39;not-a-url&#39;)
 * // Returns: false
 * ```
 */
function isValidWellknownUrl(wellknownUrl) {
    try {
        const url = new URL(wellknownUrl);
        // Allow HTTP only for localhost (development)
        // Note: We intentionally do not check for IPv6 localhost (::1) as it is rarely used
        // in local development and adds complexity. Most dev servers bind to localhost or 127.0.0.1.
        const isLocalhost = url.hostname === &#39;localhost&#39; || url.hostname === &#39;127.0.0.1&#39;;
        const isSecure = url.protocol === &#39;https:&#39;;
        const isHttpLocalhost = url.protocol === &#39;http:&#39; &amp;&amp; isLocalhost;
        if (!isSecure &amp;&amp; !isHttpLocalhost)
            return false;
        return url.pathname.endsWith(WELLKNOWN_PATH_SUFFIX);
    }
    catch {
        return false;
    }
}
/**
 * Type guard to check if an error is already a GenericError.
 */
function isGenericError(error) {
    return (typeof error === &#39;object&#39; &amp;&amp;
        error !== null &amp;&amp;
        &#39;type&#39; in error &amp;&amp;
        &#39;message&#39; in error &amp;&amp;
        &#39;error&#39; in error);
}
/**
 * Creates a GenericError from an RTK Query error for well-known fetch failures.
 *
 * Handles both GenericError (from custom baseQuery error responses) and
 * SerializedError (from unexpected JS errors during the fetch).
 *
 * @param error - The error from RTK Query dispatch result, or undefined if no response
 * @returns The original GenericError if already one, or a new GenericError with type &#39;wellknown_error&#39;
 */
function createWellknownError(error) {
    if (!error) {
        return {
            error: &#39;Well-known configuration fetch failed&#39;,
            message: &#39;No response received from well-known endpoint&#39;,
            type: &#39;wellknown_error&#39;,
            status: &#39;unknown&#39;,
        };
    }
    if (isGenericError(error)) {
        return error;
    }
    return {
        error: &#39;Well-known configuration fetch failed&#39;,
        message: extractMessage(error),
        type: &#39;wellknown_error&#39;,
        status: &#39;unknown&#39;,
    };
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * object.utils.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function getProp(obj, prop, defaultValue) {
    if (!obj || obj[prop] === undefined) {
        return defaultValue;
    }
    return obj[prop];
}
/**
 * @method reduceToObject - goes one to two levels into source to collect attribute
 * @param props - array of strings; can use dot notation for two level lookup
 * @param src - source of attributes to check
 */
function reduceToObject(props, src) {
    return props.reduce((prev, curr) =&gt; {
        if (curr.includes(&#39;.&#39;)) {
            const propArr = curr.split(&#39;.&#39;);
            const prop1 = propArr[0];
            const prop2 = propArr[1];
            const prop = src[prop1]?.[prop2];
            prev[prop2] = prop != undefined ? prop : &#39;&#39;;
        }
        else {
            prev[curr] = src[curr] != undefined ? src[curr] : null;
        }
        return prev;
    }, {});
}
/**
 * @method reduceToString - goes one level into source to collect attribute
 * @param props - array of strings
 * @param src - source of attributes to check
 */
function reduceToString(props, src) {
    return props.reduce((prev, curr) =&gt; {
        prev = `${prev}${src[curr].filename};`;
        return prev;
    }, &#39;&#39;);
}

const REQUESTED_WITH = &#39;forgerock-sdk&#39;;

function formatProdErrorMessage$1(code) {
  return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
}
var $$observable = /* @__PURE__ */ (() =&gt; typeof Symbol === &quot;function&quot; &amp;&amp; Symbol.observable || &quot;@@observable&quot;)();
var symbol_observable_default = $$observable;
var randomString = () =&gt; Math.random().toString(36).substring(7).split(&quot;&quot;).join(&quot;.&quot;);
var ActionTypes = {
  INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
  REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
  PROBE_UNKNOWN_ACTION: () =&gt; `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
};
var actionTypes_default = ActionTypes;
function isPlainObject$1(obj) {
  if (typeof obj !== &quot;object&quot; || obj === null)
    return false;
  let proto = obj;
  while (Object.getPrototypeOf(proto) !== null) {
    proto = Object.getPrototypeOf(proto);
  }
  return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
}
function createStore(reducer, preloadedState, enhancer) {
  if (typeof reducer !== &quot;function&quot;) {
    throw new Error(formatProdErrorMessage$1(2) );
  }
  if (typeof preloadedState === &quot;function&quot; &amp;&amp; typeof enhancer === &quot;function&quot; || typeof enhancer === &quot;function&quot; &amp;&amp; typeof arguments[3] === &quot;function&quot;) {
    throw new Error(formatProdErrorMessage$1(0) );
  }
  if (typeof preloadedState === &quot;function&quot; &amp;&amp; typeof enhancer === &quot;undefined&quot;) {
    enhancer = preloadedState;
    preloadedState = void 0;
  }
  if (typeof enhancer !== &quot;undefined&quot;) {
    if (typeof enhancer !== &quot;function&quot;) {
      throw new Error(formatProdErrorMessage$1(1) );
    }
    return enhancer(createStore)(reducer, preloadedState);
  }
  let currentReducer = reducer;
  let currentState = preloadedState;
  let currentListeners = /* @__PURE__ */ new Map();
  let nextListeners = currentListeners;
  let listenerIdCounter = 0;
  let isDispatching = false;
  function ensureCanMutateNextListeners() {
    if (nextListeners === currentListeners) {
      nextListeners = /* @__PURE__ */ new Map();
      currentListeners.forEach((listener, key) =&gt; {
        nextListeners.set(key, listener);
      });
    }
  }
  function getState() {
    if (isDispatching) {
      throw new Error(formatProdErrorMessage$1(3) );
    }
    return currentState;
  }
  function subscribe(listener) {
    if (typeof listener !== &quot;function&quot;) {
      throw new Error(formatProdErrorMessage$1(4) );
    }
    if (isDispatching) {
      throw new Error(formatProdErrorMessage$1(5) );
    }
    let isSubscribed = true;
    ensureCanMutateNextListeners();
    const listenerId = listenerIdCounter++;
    nextListeners.set(listenerId, listener);
    return function unsubscribe() {
      if (!isSubscribed) {
        return;
      }
      if (isDispatching) {
        throw new Error(formatProdErrorMessage$1(6) );
      }
      isSubscribed = false;
      ensureCanMutateNextListeners();
      nextListeners.delete(listenerId);
      currentListeners = null;
    };
  }
  function dispatch(action) {
    if (!isPlainObject$1(action)) {
      throw new Error(formatProdErrorMessage$1(7) );
    }
    if (typeof action.type === &quot;undefined&quot;) {
      throw new Error(formatProdErrorMessage$1(8) );
    }
    if (typeof action.type !== &quot;string&quot;) {
      throw new Error(formatProdErrorMessage$1(17) );
    }
    if (isDispatching) {
      throw new Error(formatProdErrorMessage$1(9) );
    }
    try {
      isDispatching = true;
      currentState = currentReducer(currentState, action);
    } finally {
      isDispatching = false;
    }
    const listeners = currentListeners = nextListeners;
    listeners.forEach((listener) =&gt; {
      listener();
    });
    return action;
  }
  function replaceReducer(nextReducer) {
    if (typeof nextReducer !== &quot;function&quot;) {
      throw new Error(formatProdErrorMessage$1(10) );
    }
    currentReducer = nextReducer;
    dispatch({
      type: actionTypes_default.REPLACE
    });
  }
  function observable() {
    const outerSubscribe = subscribe;
    return {
      /**
       * The minimal observable subscription method.
       * @param observer Any object that can be used as an observer.
       * The observer object should have a `next` method.
       * @returns An object with an `unsubscribe` method that can
       * be used to unsubscribe the observable from the store, and prevent further
       * emission of values from the observable.
       */
      subscribe(observer) {
        if (typeof observer !== &quot;object&quot; || observer === null) {
          throw new Error(formatProdErrorMessage$1(11) );
        }
        function observeState() {
          const observerAsObserver = observer;
          if (observerAsObserver.next) {
            observerAsObserver.next(getState());
          }
        }
        observeState();
        const unsubscribe = outerSubscribe(observeState);
        return {
          unsubscribe
        };
      },
      [symbol_observable_default]() {
        return this;
      }
    };
  }
  dispatch({
    type: actionTypes_default.INIT
  });
  const store = {
    dispatch,
    subscribe,
    getState,
    replaceReducer,
    [symbol_observable_default]: observable
  };
  return store;
}
function assertReducerShape(reducers) {
  Object.keys(reducers).forEach((key) =&gt; {
    const reducer = reducers[key];
    const initialState = reducer(void 0, {
      type: actionTypes_default.INIT
    });
    if (typeof initialState === &quot;undefined&quot;) {
      throw new Error(formatProdErrorMessage$1(12) );
    }
    if (typeof reducer(void 0, {
      type: actionTypes_default.PROBE_UNKNOWN_ACTION()
    }) === &quot;undefined&quot;) {
      throw new Error(formatProdErrorMessage$1(13) );
    }
  });
}
function combineReducers(reducers) {
  const reducerKeys = Object.keys(reducers);
  const finalReducers = {};
  for (let i = 0; i &lt; reducerKeys.length; i++) {
    const key = reducerKeys[i];
    if (typeof reducers[key] === &quot;function&quot;) {
      finalReducers[key] = reducers[key];
    }
  }
  const finalReducerKeys = Object.keys(finalReducers);
  let shapeAssertionError;
  try {
    assertReducerShape(finalReducers);
  } catch (e) {
    shapeAssertionError = e;
  }
  return function combination(state = {}, action) {
    if (shapeAssertionError) {
      throw shapeAssertionError;
    }
    let hasChanged = false;
    const nextState = {};
    for (let i = 0; i &lt; finalReducerKeys.length; i++) {
      const key = finalReducerKeys[i];
      const reducer = finalReducers[key];
      const previousStateForKey = state[key];
      const nextStateForKey = reducer(previousStateForKey, action);
      if (typeof nextStateForKey === &quot;undefined&quot;) {
        action &amp;&amp; action.type;
        throw new Error(formatProdErrorMessage$1(14) );
      }
      nextState[key] = nextStateForKey;
      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
    }
    hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
    return hasChanged ? nextState : state;
  };
}
function compose(...funcs) {
  if (funcs.length === 0) {
    return (arg) =&gt; arg;
  }
  if (funcs.length === 1) {
    return funcs[0];
  }
  return funcs.reduce((a, b) =&gt; (...args) =&gt; a(b(...args)));
}
function applyMiddleware(...middlewares) {
  return (createStore2) =&gt; (reducer, preloadedState) =&gt; {
    const store = createStore2(reducer, preloadedState);
    let dispatch = () =&gt; {
      throw new Error(formatProdErrorMessage$1(15) );
    };
    const middlewareAPI = {
      getState: store.getState,
      dispatch: (action, ...args) =&gt; dispatch(action, ...args)
    };
    const chain = middlewares.map((middleware) =&gt; middleware(middlewareAPI));
    dispatch = compose(...chain)(store.dispatch);
    return {
      ...store,
      dispatch
    };
  };
}
function isAction(action) {
  return isPlainObject$1(action) &amp;&amp; &quot;type&quot; in action &amp;&amp; typeof action.type === &quot;string&quot;;
}

var NOTHING = /* @__PURE__ */ Symbol.for(&quot;immer-nothing&quot;);
var DRAFTABLE = /* @__PURE__ */ Symbol.for(&quot;immer-draftable&quot;);
var DRAFT_STATE = /* @__PURE__ */ Symbol.for(&quot;immer-state&quot;);
function die(error, ...args) {
  throw new Error(
    `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`
  );
}
var getPrototypeOf = Object.getPrototypeOf;
function isDraft(value) {
  return !!value &amp;&amp; !!value[DRAFT_STATE];
}
function isDraftable(value) {
  if (!value)
    return false;
  return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);
}
var objectCtorString = Object.prototype.constructor.toString();
var cachedCtorStrings = /* @__PURE__ */ new WeakMap();
function isPlainObject(value) {
  if (!value || typeof value !== &quot;object&quot;)
    return false;
  const proto = Object.getPrototypeOf(value);
  if (proto === null || proto === Object.prototype)
    return true;
  const Ctor = Object.hasOwnProperty.call(proto, &quot;constructor&quot;) &amp;&amp; proto.constructor;
  if (Ctor === Object)
    return true;
  if (typeof Ctor !== &quot;function&quot;)
    return false;
  let ctorString = cachedCtorStrings.get(Ctor);
  if (ctorString === void 0) {
    ctorString = Function.toString.call(Ctor);
    cachedCtorStrings.set(Ctor, ctorString);
  }
  return ctorString === objectCtorString;
}
function original(value) {
  if (!isDraft(value))
    die(15, value);
  return value[DRAFT_STATE].base_;
}
function each(obj, iter, strict = true) {
  if (getArchtype(obj) === 0) {
    const keys = strict ? Reflect.ownKeys(obj) : Object.keys(obj);
    keys.forEach((key) =&gt; {
      iter(key, obj[key], obj);
    });
  } else {
    obj.forEach((entry, index) =&gt; iter(index, entry, obj));
  }
}
function getArchtype(thing) {
  const state = thing[DRAFT_STATE];
  return state ? state.type_ : Array.isArray(thing) ? 1 : isMap(thing) ? 2 : isSet(thing) ? 3 : 0;
}
function has(thing, prop) {
  return getArchtype(thing) === 2 ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
}
function get(thing, prop) {
  return getArchtype(thing) === 2 ? thing.get(prop) : thing[prop];
}
function set(thing, propOrOldValue, value) {
  const t = getArchtype(thing);
  if (t === 2)
    thing.set(propOrOldValue, value);
  else if (t === 3) {
    thing.add(value);
  } else
    thing[propOrOldValue] = value;
}
function is(x, y) {
  if (x === y) {
    return x !== 0 || 1 / x === 1 / y;
  } else {
    return x !== x &amp;&amp; y !== y;
  }
}
function isMap(target) {
  return target instanceof Map;
}
function isSet(target) {
  return target instanceof Set;
}
function latest(state) {
  return state.copy_ || state.base_;
}
function shallowCopy(base, strict) {
  if (isMap(base)) {
    return new Map(base);
  }
  if (isSet(base)) {
    return new Set(base);
  }
  if (Array.isArray(base))
    return Array.prototype.slice.call(base);
  const isPlain = isPlainObject(base);
  if (strict === true || strict === &quot;class_only&quot; &amp;&amp; !isPlain) {
    const descriptors = Object.getOwnPropertyDescriptors(base);
    delete descriptors[DRAFT_STATE];
    let keys = Reflect.ownKeys(descriptors);
    for (let i = 0; i &lt; keys.length; i++) {
      const key = keys[i];
      const desc = descriptors[key];
      if (desc.writable === false) {
        desc.writable = true;
        desc.configurable = true;
      }
      if (desc.get || desc.set)
        descriptors[key] = {
          configurable: true,
          writable: true,
          // could live with !!desc.set as well here...
          enumerable: desc.enumerable,
          value: base[key]
        };
    }
    return Object.create(getPrototypeOf(base), descriptors);
  } else {
    const proto = getPrototypeOf(base);
    if (proto !== null &amp;&amp; isPlain) {
      return { ...base };
    }
    const obj = Object.create(proto);
    return Object.assign(obj, base);
  }
}
function freeze(obj, deep = false) {
  if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))
    return obj;
  if (getArchtype(obj) &gt; 1) {
    Object.defineProperties(obj, {
      set: dontMutateMethodOverride,
      add: dontMutateMethodOverride,
      clear: dontMutateMethodOverride,
      delete: dontMutateMethodOverride
    });
  }
  Object.freeze(obj);
  if (deep)
    Object.values(obj).forEach((value) =&gt; freeze(value, true));
  return obj;
}
function dontMutateFrozenCollections() {
  die(2);
}
var dontMutateMethodOverride = {
  value: dontMutateFrozenCollections
};
function isFrozen(obj) {
  if (obj === null || typeof obj !== &quot;object&quot;)
    return true;
  return Object.isFrozen(obj);
}
var plugins = {};
function getPlugin(pluginKey) {
  const plugin = plugins[pluginKey];
  if (!plugin) {
    die(0, pluginKey);
  }
  return plugin;
}
function loadPlugin(pluginKey, implementation) {
  if (!plugins[pluginKey])
    plugins[pluginKey] = implementation;
}
var currentScope;
function getCurrentScope() {
  return currentScope;
}
function createScope(parent_, immer_) {
  return {
    drafts_: [],
    parent_,
    immer_,
    // Whenever the modified draft contains a draft from another scope, we
    // need to prevent auto-freezing so the unowned draft can be finalized.
    canAutoFreeze_: true,
    unfinalizedDrafts_: 0
  };
}
function usePatchesInScope(scope, patchListener) {
  if (patchListener) {
    getPlugin(&quot;Patches&quot;);
    scope.patches_ = [];
    scope.inversePatches_ = [];
    scope.patchListener_ = patchListener;
  }
}
function revokeScope(scope) {
  leaveScope(scope);
  scope.drafts_.forEach(revokeDraft);
  scope.drafts_ = null;
}
function leaveScope(scope) {
  if (scope === currentScope) {
    currentScope = scope.parent_;
  }
}
function enterScope(immer2) {
  return currentScope = createScope(currentScope, immer2);
}
function revokeDraft(draft) {
  const state = draft[DRAFT_STATE];
  if (state.type_ === 0 || state.type_ === 1)
    state.revoke_();
  else
    state.revoked_ = true;
}
function processResult(result, scope) {
  scope.unfinalizedDrafts_ = scope.drafts_.length;
  const baseDraft = scope.drafts_[0];
  const isReplaced = result !== void 0 &amp;&amp; result !== baseDraft;
  if (isReplaced) {
    if (baseDraft[DRAFT_STATE].modified_) {
      revokeScope(scope);
      die(4);
    }
    if (isDraftable(result)) {
      result = finalize(scope, result);
      if (!scope.parent_)
        maybeFreeze(scope, result);
    }
    if (scope.patches_) {
      getPlugin(&quot;Patches&quot;).generateReplacementPatches_(
        baseDraft[DRAFT_STATE].base_,
        result,
        scope.patches_,
        scope.inversePatches_
      );
    }
  } else {
    result = finalize(scope, baseDraft, []);
  }
  revokeScope(scope);
  if (scope.patches_) {
    scope.patchListener_(scope.patches_, scope.inversePatches_);
  }
  return result !== NOTHING ? result : void 0;
}
function finalize(rootScope, value, path) {
  if (isFrozen(value))
    return value;
  const useStrictIteration = rootScope.immer_.shouldUseStrictIteration();
  const state = value[DRAFT_STATE];
  if (!state) {
    each(
      value,
      (key, childValue) =&gt; finalizeProperty(rootScope, state, value, key, childValue, path),
      useStrictIteration
    );
    return value;
  }
  if (state.scope_ !== rootScope)
    return value;
  if (!state.modified_) {
    maybeFreeze(rootScope, state.base_, true);
    return state.base_;
  }
  if (!state.finalized_) {
    state.finalized_ = true;
    state.scope_.unfinalizedDrafts_--;
    const result = state.copy_;
    let resultEach = result;
    let isSet2 = false;
    if (state.type_ === 3) {
      resultEach = new Set(result);
      result.clear();
      isSet2 = true;
    }
    each(
      resultEach,
      (key, childValue) =&gt; finalizeProperty(
        rootScope,
        state,
        result,
        key,
        childValue,
        path,
        isSet2
      ),
      useStrictIteration
    );
    maybeFreeze(rootScope, result, false);
    if (path &amp;&amp; rootScope.patches_) {
      getPlugin(&quot;Patches&quot;).generatePatches_(
        state,
        path,
        rootScope.patches_,
        rootScope.inversePatches_
      );
    }
  }
  return state.copy_;
}
function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
  if (childValue == null) {
    return;
  }
  if (typeof childValue !== &quot;object&quot; &amp;&amp; !targetIsSet) {
    return;
  }
  const childIsFrozen = isFrozen(childValue);
  if (childIsFrozen &amp;&amp; !targetIsSet) {
    return;
  }
  if (isDraft(childValue)) {
    const path = rootPath &amp;&amp; parentState &amp;&amp; parentState.type_ !== 3 &amp;&amp; // Set objects are atomic since they have no keys.
    !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
    const res = finalize(rootScope, childValue, path);
    set(targetObject, prop, res);
    if (isDraft(res)) {
      rootScope.canAutoFreeze_ = false;
    } else
      return;
  } else if (targetIsSet) {
    targetObject.add(childValue);
  }
  if (isDraftable(childValue) &amp;&amp; !childIsFrozen) {
    if (!rootScope.immer_.autoFreeze_ &amp;&amp; rootScope.unfinalizedDrafts_ &lt; 1) {
      return;
    }
    if (parentState &amp;&amp; parentState.base_ &amp;&amp; parentState.base_[prop] === childValue &amp;&amp; childIsFrozen) {
      return;
    }
    finalize(rootScope, childValue);
    if ((!parentState || !parentState.scope_.parent_) &amp;&amp; typeof prop !== &quot;symbol&quot; &amp;&amp; (isMap(targetObject) ? targetObject.has(prop) : Object.prototype.propertyIsEnumerable.call(targetObject, prop)))
      maybeFreeze(rootScope, childValue);
  }
}
function maybeFreeze(scope, value, deep = false) {
  if (!scope.parent_ &amp;&amp; scope.immer_.autoFreeze_ &amp;&amp; scope.canAutoFreeze_) {
    freeze(value, deep);
  }
}
function createProxyProxy(base, parent) {
  const isArray = Array.isArray(base);
  const state = {
    type_: isArray ? 1 : 0,
    // Track which produce call this is associated with.
    scope_: parent ? parent.scope_ : getCurrentScope(),
    // True for both shallow and deep changes.
    modified_: false,
    // Used during finalization.
    finalized_: false,
    // Track which properties have been assigned (true) or deleted (false).
    assigned_: {},
    // The parent draft state.
    parent_: parent,
    // The base state.
    base_: base,
    // The base proxy.
    draft_: null,
    // set below
    // The base copy with any updated values.
    copy_: null,
    // Called by the `produce` function.
    revoke_: null,
    isManual_: false
  };
  let target = state;
  let traps = objectTraps;
  if (isArray) {
    target = [state];
    traps = arrayTraps;
  }
  const { revoke, proxy } = Proxy.revocable(target, traps);
  state.draft_ = proxy;
  state.revoke_ = revoke;
  return proxy;
}
var objectTraps = {
  get(state, prop) {
    if (prop === DRAFT_STATE)
      return state;
    const source = latest(state);
    if (!has(source, prop)) {
      return readPropFromProto(state, source, prop);
    }
    const value = source[prop];
    if (state.finalized_ || !isDraftable(value)) {
      return value;
    }
    if (value === peek(state.base_, prop)) {
      prepareCopy(state);
      return state.copy_[prop] = createProxy(value, state);
    }
    return value;
  },
  has(state, prop) {
    return prop in latest(state);
  },
  ownKeys(state) {
    return Reflect.ownKeys(latest(state));
  },
  set(state, prop, value) {
    const desc = getDescriptorFromProto(latest(state), prop);
    if (desc?.set) {
      desc.set.call(state.draft_, value);
      return true;
    }
    if (!state.modified_) {
      const current2 = peek(latest(state), prop);
      const currentState = current2?.[DRAFT_STATE];
      if (currentState &amp;&amp; currentState.base_ === value) {
        state.copy_[prop] = value;
        state.assigned_[prop] = false;
        return true;
      }
      if (is(value, current2) &amp;&amp; (value !== void 0 || has(state.base_, prop)))
        return true;
      prepareCopy(state);
      markChanged(state);
    }
    if (state.copy_[prop] === value &amp;&amp; // special case: handle new props with value &#39;undefined&#39;
    (value !== void 0 || prop in state.copy_) || // special case: NaN
    Number.isNaN(value) &amp;&amp; Number.isNaN(state.copy_[prop]))
      return true;
    state.copy_[prop] = value;
    state.assigned_[prop] = true;
    return true;
  },
  deleteProperty(state, prop) {
    if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
      state.assigned_[prop] = false;
      prepareCopy(state);
      markChanged(state);
    } else {
      delete state.assigned_[prop];
    }
    if (state.copy_) {
      delete state.copy_[prop];
    }
    return true;
  },
  // Note: We never coerce `desc.value` into an Immer draft, because we can&#39;t make
  // the same guarantee in ES5 mode.
  getOwnPropertyDescriptor(state, prop) {
    const owner = latest(state);
    const desc = Reflect.getOwnPropertyDescriptor(owner, prop);
    if (!desc)
      return desc;
    return {
      writable: true,
      configurable: state.type_ !== 1 || prop !== &quot;length&quot;,
      enumerable: desc.enumerable,
      value: owner[prop]
    };
  },
  defineProperty() {
    die(11);
  },
  getPrototypeOf(state) {
    return getPrototypeOf(state.base_);
  },
  setPrototypeOf() {
    die(12);
  }
};
var arrayTraps = {};
each(objectTraps, (key, fn) =&gt; {
  arrayTraps[key] = function() {
    arguments[0] = arguments[0][0];
    return fn.apply(this, arguments);
  };
});
arrayTraps.deleteProperty = function(state, prop) {
  return arrayTraps.set.call(this, state, prop, void 0);
};
arrayTraps.set = function(state, prop, value) {
  return objectTraps.set.call(this, state[0], prop, value, state[0]);
};
function peek(draft, prop) {
  const state = draft[DRAFT_STATE];
  const source = state ? latest(state) : draft;
  return source[prop];
}
function readPropFromProto(state, source, prop) {
  const desc = getDescriptorFromProto(source, prop);
  return desc ? `value` in desc ? desc.value : (
    // This is a very special case, if the prop is a getter defined by the
    // prototype, we should invoke it with the draft as context!
    desc.get?.call(state.draft_)
  ) : void 0;
}
function getDescriptorFromProto(source, prop) {
  if (!(prop in source))
    return void 0;
  let proto = getPrototypeOf(source);
  while (proto) {
    const desc = Object.getOwnPropertyDescriptor(proto, prop);
    if (desc)
      return desc;
    proto = getPrototypeOf(proto);
  }
  return void 0;
}
function markChanged(state) {
  if (!state.modified_) {
    state.modified_ = true;
    if (state.parent_) {
      markChanged(state.parent_);
    }
  }
}
function prepareCopy(state) {
  if (!state.copy_) {
    state.copy_ = shallowCopy(
      state.base_,
      state.scope_.immer_.useStrictShallowCopy_
    );
  }
}
var Immer2 = class {
  constructor(config) {
    this.autoFreeze_ = true;
    this.useStrictShallowCopy_ = false;
    this.useStrictIteration_ = true;
    this.produce = (base, recipe, patchListener) =&gt; {
      if (typeof base === &quot;function&quot; &amp;&amp; typeof recipe !== &quot;function&quot;) {
        const defaultBase = recipe;
        recipe = base;
        const self = this;
        return function curriedProduce(base2 = defaultBase, ...args) {
          return self.produce(base2, (draft) =&gt; recipe.call(this, draft, ...args));
        };
      }
      if (typeof recipe !== &quot;function&quot;)
        die(6);
      if (patchListener !== void 0 &amp;&amp; typeof patchListener !== &quot;function&quot;)
        die(7);
      let result;
      if (isDraftable(base)) {
        const scope = enterScope(this);
        const proxy = createProxy(base, void 0);
        let hasError = true;
        try {
          result = recipe(proxy);
          hasError = false;
        } finally {
          if (hasError)
            revokeScope(scope);
          else
            leaveScope(scope);
        }
        usePatchesInScope(scope, patchListener);
        return processResult(result, scope);
      } else if (!base || typeof base !== &quot;object&quot;) {
        result = recipe(base);
        if (result === void 0)
          result = base;
        if (result === NOTHING)
          result = void 0;
        if (this.autoFreeze_)
          freeze(result, true);
        if (patchListener) {
          const p = [];
          const ip = [];
          getPlugin(&quot;Patches&quot;).generateReplacementPatches_(base, result, p, ip);
          patchListener(p, ip);
        }
        return result;
      } else
        die(1, base);
    };
    this.produceWithPatches = (base, recipe) =&gt; {
      if (typeof base === &quot;function&quot;) {
        return (state, ...args) =&gt; this.produceWithPatches(state, (draft) =&gt; base(draft, ...args));
      }
      let patches, inversePatches;
      const result = this.produce(base, recipe, (p, ip) =&gt; {
        patches = p;
        inversePatches = ip;
      });
      return [result, patches, inversePatches];
    };
    if (typeof config?.autoFreeze === &quot;boolean&quot;)
      this.setAutoFreeze(config.autoFreeze);
    if (typeof config?.useStrictShallowCopy === &quot;boolean&quot;)
      this.setUseStrictShallowCopy(config.useStrictShallowCopy);
    if (typeof config?.useStrictIteration === &quot;boolean&quot;)
      this.setUseStrictIteration(config.useStrictIteration);
  }
  createDraft(base) {
    if (!isDraftable(base))
      die(8);
    if (isDraft(base))
      base = current(base);
    const scope = enterScope(this);
    const proxy = createProxy(base, void 0);
    proxy[DRAFT_STATE].isManual_ = true;
    leaveScope(scope);
    return proxy;
  }
  finishDraft(draft, patchListener) {
    const state = draft &amp;&amp; draft[DRAFT_STATE];
    if (!state || !state.isManual_)
      die(9);
    const { scope_: scope } = state;
    usePatchesInScope(scope, patchListener);
    return processResult(void 0, scope);
  }
  /**
   * Pass true to automatically freeze all copies created by Immer.
   *
   * By default, auto-freezing is enabled.
   */
  setAutoFreeze(value) {
    this.autoFreeze_ = value;
  }
  /**
   * Pass true to enable strict shallow copy.
   *
   * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
   */
  setUseStrictShallowCopy(value) {
    this.useStrictShallowCopy_ = value;
  }
  /**
   * Pass false to use faster iteration that skips non-enumerable properties
   * but still handles symbols for compatibility.
   *
   * By default, strict iteration is enabled (includes all own properties).
   */
  setUseStrictIteration(value) {
    this.useStrictIteration_ = value;
  }
  shouldUseStrictIteration() {
    return this.useStrictIteration_;
  }
  applyPatches(base, patches) {
    let i;
    for (i = patches.length - 1; i &gt;= 0; i--) {
      const patch = patches[i];
      if (patch.path.length === 0 &amp;&amp; patch.op === &quot;replace&quot;) {
        base = patch.value;
        break;
      }
    }
    if (i &gt; -1) {
      patches = patches.slice(i + 1);
    }
    const applyPatchesImpl = getPlugin(&quot;Patches&quot;).applyPatches_;
    if (isDraft(base)) {
      return applyPatchesImpl(base, patches);
    }
    return this.produce(
      base,
      (draft) =&gt; applyPatchesImpl(draft, patches)
    );
  }
};
function createProxy(value, parent) {
  const draft = isMap(value) ? getPlugin(&quot;MapSet&quot;).proxyMap_(value, parent) : isSet(value) ? getPlugin(&quot;MapSet&quot;).proxySet_(value, parent) : createProxyProxy(value, parent);
  const scope = parent ? parent.scope_ : getCurrentScope();
  scope.drafts_.push(draft);
  return draft;
}
function current(value) {
  if (!isDraft(value))
    die(10, value);
  return currentImpl(value);
}
function currentImpl(value) {
  if (!isDraftable(value) || isFrozen(value))
    return value;
  const state = value[DRAFT_STATE];
  let copy;
  let strict = true;
  if (state) {
    if (!state.modified_)
      return state.base_;
    state.finalized_ = true;
    copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
    strict = state.scope_.immer_.shouldUseStrictIteration();
  } else {
    copy = shallowCopy(value, true);
  }
  each(
    copy,
    (key, childValue) =&gt; {
      set(copy, key, currentImpl(childValue));
    },
    strict
  );
  if (state) {
    state.finalized_ = false;
  }
  return copy;
}
function enablePatches() {
  const errorOffset = 16;
  const REPLACE = &quot;replace&quot;;
  const ADD = &quot;add&quot;;
  const REMOVE = &quot;remove&quot;;
  function generatePatches_(state, basePath, patches, inversePatches) {
    switch (state.type_) {
      case 0:
      case 2:
        return generatePatchesFromAssigned(
          state,
          basePath,
          patches,
          inversePatches
        );
      case 1:
        return generateArrayPatches(state, basePath, patches, inversePatches);
      case 3:
        return generateSetPatches(
          state,
          basePath,
          patches,
          inversePatches
        );
    }
  }
  function generateArrayPatches(state, basePath, patches, inversePatches) {
    let { base_, assigned_ } = state;
    let copy_ = state.copy_;
    if (copy_.length &lt; base_.length) {
      [base_, copy_] = [copy_, base_];
      [patches, inversePatches] = [inversePatches, patches];
    }
    for (let i = 0; i &lt; base_.length; i++) {
      if (assigned_[i] &amp;&amp; copy_[i] !== base_[i]) {
        const path = basePath.concat([i]);
        patches.push({
          op: REPLACE,
          path,
          // Need to maybe clone it, as it can in fact be the original value
          // due to the base/copy inversion at the start of this function
          value: clonePatchValueIfNeeded(copy_[i])
        });
        inversePatches.push({
          op: REPLACE,
          path,
          value: clonePatchValueIfNeeded(base_[i])
        });
      }
    }
    for (let i = base_.length; i &lt; copy_.length; i++) {
      const path = basePath.concat([i]);
      patches.push({
        op: ADD,
        path,
        // Need to maybe clone it, as it can in fact be the original value
        // due to the base/copy inversion at the start of this function
        value: clonePatchValueIfNeeded(copy_[i])
      });
    }
    for (let i = copy_.length - 1; base_.length &lt;= i; --i) {
      const path = basePath.concat([i]);
      inversePatches.push({
        op: REMOVE,
        path
      });
    }
  }
  function generatePatchesFromAssigned(state, basePath, patches, inversePatches) {
    const { base_, copy_ } = state;
    each(state.assigned_, (key, assignedValue) =&gt; {
      const origValue = get(base_, key);
      const value = get(copy_, key);
      const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD;
      if (origValue === value &amp;&amp; op === REPLACE)
        return;
      const path = basePath.concat(key);
      patches.push(op === REMOVE ? { op, path } : { op, path, value });
      inversePatches.push(
        op === ADD ? { op: REMOVE, path } : op === REMOVE ? { op: ADD, path, value: clonePatchValueIfNeeded(origValue) } : { op: REPLACE, path, value: clonePatchValueIfNeeded(origValue) }
      );
    });
  }
  function generateSetPatches(state, basePath, patches, inversePatches) {
    let { base_, copy_ } = state;
    let i = 0;
    base_.forEach((value) =&gt; {
      if (!copy_.has(value)) {
        const path = basePath.concat([i]);
        patches.push({
          op: REMOVE,
          path,
          value
        });
        inversePatches.unshift({
          op: ADD,
          path,
          value
        });
      }
      i++;
    });
    i = 0;
    copy_.forEach((value) =&gt; {
      if (!base_.has(value)) {
        const path = basePath.concat([i]);
        patches.push({
          op: ADD,
          path,
          value
        });
        inversePatches.unshift({
          op: REMOVE,
          path,
          value
        });
      }
      i++;
    });
  }
  function generateReplacementPatches_(baseValue, replacement, patches, inversePatches) {
    patches.push({
      op: REPLACE,
      path: [],
      value: replacement === NOTHING ? void 0 : replacement
    });
    inversePatches.push({
      op: REPLACE,
      path: [],
      value: baseValue
    });
  }
  function applyPatches_(draft, patches) {
    patches.forEach((patch) =&gt; {
      const { path, op } = patch;
      let base = draft;
      for (let i = 0; i &lt; path.length - 1; i++) {
        const parentType = getArchtype(base);
        let p = path[i];
        if (typeof p !== &quot;string&quot; &amp;&amp; typeof p !== &quot;number&quot;) {
          p = &quot;&quot; + p;
        }
        if ((parentType === 0 || parentType === 1) &amp;&amp; (p === &quot;__proto__&quot; || p === &quot;constructor&quot;))
          die(errorOffset + 3);
        if (typeof base === &quot;function&quot; &amp;&amp; p === &quot;prototype&quot;)
          die(errorOffset + 3);
        base = get(base, p);
        if (typeof base !== &quot;object&quot;)
          die(errorOffset + 2, path.join(&quot;/&quot;));
      }
      const type = getArchtype(base);
      const value = deepClonePatchValue(patch.value);
      const key = path[path.length - 1];
      switch (op) {
        case REPLACE:
          switch (type) {
            case 2:
              return base.set(key, value);
            case 3:
              die(errorOffset);
            default:
              return base[key] = value;
          }
        case ADD:
          switch (type) {
            case 1:
              return key === &quot;-&quot; ? base.push(value) : base.splice(key, 0, value);
            case 2:
              return base.set(key, value);
            case 3:
              return base.add(value);
            default:
              return base[key] = value;
          }
        case REMOVE:
          switch (type) {
            case 1:
              return base.splice(key, 1);
            case 2:
              return base.delete(key);
            case 3:
              return base.delete(patch.value);
            default:
              return delete base[key];
          }
        default:
          die(errorOffset + 1, op);
      }
    });
    return draft;
  }
  function deepClonePatchValue(obj) {
    if (!isDraftable(obj))
      return obj;
    if (Array.isArray(obj))
      return obj.map(deepClonePatchValue);
    if (isMap(obj))
      return new Map(
        Array.from(obj.entries()).map(([k, v]) =&gt; [k, deepClonePatchValue(v)])
      );
    if (isSet(obj))
      return new Set(Array.from(obj).map(deepClonePatchValue));
    const cloned = Object.create(getPrototypeOf(obj));
    for (const key in obj)
      cloned[key] = deepClonePatchValue(obj[key]);
    if (has(obj, DRAFTABLE))
      cloned[DRAFTABLE] = obj[DRAFTABLE];
    return cloned;
  }
  function clonePatchValueIfNeeded(obj) {
    if (isDraft(obj)) {
      return deepClonePatchValue(obj);
    } else
      return obj;
  }
  loadPlugin(&quot;Patches&quot;, {
    applyPatches_,
    generatePatches_,
    generateReplacementPatches_
  });
}
var immer = new Immer2();
var produce = immer.produce;
var produceWithPatches = /* @__PURE__ */ immer.produceWithPatches.bind(
  immer
);
var setUseStrictIteration = /* @__PURE__ */ immer.setUseStrictIteration.bind(
  immer
);
var applyPatches = /* @__PURE__ */ immer.applyPatches.bind(immer);

function assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {
  if (typeof func !== &quot;function&quot;) {
    throw new TypeError(errorMessage);
  }
}
function assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {
  if (typeof object !== &quot;object&quot;) {
    throw new TypeError(errorMessage);
  }
}
function assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {
  if (!array.every((item) =&gt; typeof item === &quot;function&quot;)) {
    const itemTypes = array.map(
      (item) =&gt; typeof item === &quot;function&quot; ? `function ${item.name || &quot;unnamed&quot;}()` : typeof item
    ).join(&quot;, &quot;);
    throw new TypeError(`${errorMessage}[${itemTypes}]`);
  }
}
var ensureIsArray = (item) =&gt; {
  return Array.isArray(item) ? item : [item];
};
function getDependencies(createSelectorArgs) {
  const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;
  assertIsArrayOfFunctions(
    dependencies,
    `createSelector expects all input-selectors to be functions, but received the following types: `
  );
  return dependencies;
}
function collectInputSelectorResults(dependencies, inputSelectorArgs) {
  const inputSelectorResults = [];
  const { length } = dependencies;
  for (let i = 0; i &lt; length; i++) {
    inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));
  }
  return inputSelectorResults;
}
var StrongRef = class {
  constructor(value) {
    this.value = value;
  }
  deref() {
    return this.value;
  }
};
var Ref = typeof WeakRef !== &quot;undefined&quot; ? WeakRef : StrongRef;
var UNTERMINATED = 0;
var TERMINATED = 1;
function createCacheNode() {
  return {
    s: UNTERMINATED,
    v: void 0,
    o: null,
    p: null
  };
}
function weakMapMemoize(func, options = {}) {
  let fnNode = createCacheNode();
  const { resultEqualityCheck } = options;
  let lastResult;
  let resultsCount = 0;
  function memoized() {
    let cacheNode = fnNode;
    const { length } = arguments;
    for (let i = 0, l = length; i &lt; l; i++) {
      const arg = arguments[i];
      if (typeof arg === &quot;function&quot; || typeof arg === &quot;object&quot; &amp;&amp; arg !== null) {
        let objectCache = cacheNode.o;
        if (objectCache === null) {
          cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();
        }
        const objectNode = objectCache.get(arg);
        if (objectNode === void 0) {
          cacheNode = createCacheNode();
          objectCache.set(arg, cacheNode);
        } else {
          cacheNode = objectNode;
        }
      } else {
        let primitiveCache = cacheNode.p;
        if (primitiveCache === null) {
          cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();
        }
        const primitiveNode = primitiveCache.get(arg);
        if (primitiveNode === void 0) {
          cacheNode = createCacheNode();
          primitiveCache.set(arg, cacheNode);
        } else {
          cacheNode = primitiveNode;
        }
      }
    }
    const terminatedNode = cacheNode;
    let result;
    if (cacheNode.s === TERMINATED) {
      result = cacheNode.v;
    } else {
      result = func.apply(null, arguments);
      resultsCount++;
      if (resultEqualityCheck) {
        const lastResultValue = lastResult?.deref?.() ?? lastResult;
        if (lastResultValue != null &amp;&amp; resultEqualityCheck(lastResultValue, result)) {
          result = lastResultValue;
          resultsCount !== 0 &amp;&amp; resultsCount--;
        }
        const needsWeakRef = typeof result === &quot;object&quot; &amp;&amp; result !== null || typeof result === &quot;function&quot;;
        lastResult = needsWeakRef ? new Ref(result) : result;
      }
    }
    terminatedNode.s = TERMINATED;
    terminatedNode.v = result;
    return result;
  }
  memoized.clearCache = () =&gt; {
    fnNode = createCacheNode();
    memoized.resetResultsCount();
  };
  memoized.resultsCount = () =&gt; resultsCount;
  memoized.resetResultsCount = () =&gt; {
    resultsCount = 0;
  };
  return memoized;
}
function createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {
  const createSelectorCreatorOptions = typeof memoizeOrOptions === &quot;function&quot; ? {
    memoize: memoizeOrOptions,
    memoizeOptions: memoizeOptionsFromArgs
  } : memoizeOrOptions;
  const createSelector2 = (...createSelectorArgs) =&gt; {
    let recomputations = 0;
    let dependencyRecomputations = 0;
    let lastResult;
    let directlyPassedOptions = {};
    let resultFunc = createSelectorArgs.pop();
    if (typeof resultFunc === &quot;object&quot;) {
      directlyPassedOptions = resultFunc;
      resultFunc = createSelectorArgs.pop();
    }
    assertIsFunction(
      resultFunc,
      `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`
    );
    const combinedOptions = {
      ...createSelectorCreatorOptions,
      ...directlyPassedOptions
    };
    const {
      memoize,
      memoizeOptions = [],
      argsMemoize = weakMapMemoize,
      argsMemoizeOptions = []} = combinedOptions;
    const finalMemoizeOptions = ensureIsArray(memoizeOptions);
    const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);
    const dependencies = getDependencies(createSelectorArgs);
    const memoizedResultFunc = memoize(function recomputationWrapper() {
      recomputations++;
      return resultFunc.apply(
        null,
        arguments
      );
    }, ...finalMemoizeOptions);
    const selector = argsMemoize(function dependenciesChecker() {
      dependencyRecomputations++;
      const inputSelectorResults = collectInputSelectorResults(
        dependencies,
        arguments
      );
      lastResult = memoizedResultFunc.apply(null, inputSelectorResults);
      return lastResult;
    }, ...finalArgsMemoizeOptions);
    return Object.assign(selector, {
      resultFunc,
      memoizedResultFunc,
      dependencies,
      dependencyRecomputations: () =&gt; dependencyRecomputations,
      resetDependencyRecomputations: () =&gt; {
        dependencyRecomputations = 0;
      },
      lastResult: () =&gt; lastResult,
      recomputations: () =&gt; recomputations,
      resetRecomputations: () =&gt; {
        recomputations = 0;
      },
      memoize,
      argsMemoize
    });
  };
  Object.assign(createSelector2, {
    withTypes: () =&gt; createSelector2
  });
  return createSelector2;
}
var createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);
var createStructuredSelector = Object.assign(
  (inputSelectorsObject, selectorCreator = createSelector) =&gt; {
    assertIsObject(
      inputSelectorsObject,
      `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`
    );
    const inputSelectorKeys = Object.keys(inputSelectorsObject);
    const dependencies = inputSelectorKeys.map(
      (key) =&gt; inputSelectorsObject[key]
    );
    const structuredSelector = selectorCreator(
      dependencies,
      (...inputSelectorResults) =&gt; {
        return inputSelectorResults.reduce((composition, value, index) =&gt; {
          composition[inputSelectorKeys[index]] = value;
          return composition;
        }, {});
      }
    );
    return structuredSelector;
  },
  { withTypes: () =&gt; createStructuredSelector }
);

// src/index.ts
function createThunkMiddleware(extraArgument) {
  const middleware = ({ dispatch, getState }) =&gt; (next) =&gt; (action) =&gt; {
    if (typeof action === &quot;function&quot;) {
      return action(dispatch, getState, extraArgument);
    }
    return next(action);
  };
  return middleware;
}
var thunk = createThunkMiddleware();
var withExtraArgument = createThunkMiddleware;

var composeWithDevTools = typeof window !== &quot;undefined&quot; &amp;&amp; window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
  if (arguments.length === 0) return void 0;
  if (typeof arguments[0] === &quot;object&quot;) return compose;
  return compose.apply(null, arguments);
};
var hasMatchFunction = (v) =&gt; {
  return v &amp;&amp; typeof v.match === &quot;function&quot;;
};
function createAction(type, prepareAction) {
  function actionCreator(...args) {
    if (prepareAction) {
      let prepared = prepareAction(...args);
      if (!prepared) {
        throw new Error(formatProdErrorMessage(0) );
      }
      return {
        type,
        payload: prepared.payload,
        ...&quot;meta&quot; in prepared &amp;&amp; {
          meta: prepared.meta
        },
        ...&quot;error&quot; in prepared &amp;&amp; {
          error: prepared.error
        }
      };
    }
    return {
      type,
      payload: args[0]
    };
  }
  actionCreator.toString = () =&gt; `${type}`;
  actionCreator.type = type;
  actionCreator.match = (action) =&gt; isAction(action) &amp;&amp; action.type === type;
  return actionCreator;
}
var Tuple = class _Tuple extends Array {
  constructor(...items) {
    super(...items);
    Object.setPrototypeOf(this, _Tuple.prototype);
  }
  static get [Symbol.species]() {
    return _Tuple;
  }
  concat(...arr) {
    return super.concat.apply(this, arr);
  }
  prepend(...arr) {
    if (arr.length === 1 &amp;&amp; Array.isArray(arr[0])) {
      return new _Tuple(...arr[0].concat(this));
    }
    return new _Tuple(...arr.concat(this));
  }
};
function freezeDraftable(val) {
  return isDraftable(val) ? produce(val, () =&gt; {
  }) : val;
}
function getOrInsertComputed$1(map, key, compute) {
  if (map.has(key)) return map.get(key);
  return map.set(key, compute(key)).get(key);
}
function isBoolean(x) {
  return typeof x === &quot;boolean&quot;;
}
var buildGetDefaultMiddleware = () =&gt; function getDefaultMiddleware(options) {
  const {
    thunk: thunk$1 = true,
    immutableCheck = true,
    serializableCheck = true,
    actionCreatorCheck = true
  } = options ?? {};
  let middlewareArray = new Tuple();
  if (thunk$1) {
    if (isBoolean(thunk$1)) {
      middlewareArray.push(thunk);
    } else {
      middlewareArray.push(withExtraArgument(thunk$1.extraArgument));
    }
  }
  return middlewareArray;
};
var SHOULD_AUTOBATCH = &quot;RTK_autoBatch&quot;;
var prepareAutoBatched = () =&gt; (payload) =&gt; ({
  payload,
  meta: {
    [SHOULD_AUTOBATCH]: true
  }
});
var createQueueWithTimer = (timeout) =&gt; {
  return (notify) =&gt; {
    setTimeout(notify, timeout);
  };
};
var autoBatchEnhancer = (options = {
  type: &quot;raf&quot;
}) =&gt; (next) =&gt; (...args) =&gt; {
  const store = next(...args);
  let notifying = true;
  let shouldNotifyAtEndOfTick = false;
  let notificationQueued = false;
  const listeners = /* @__PURE__ */ new Set();
  const queueCallback = options.type === &quot;tick&quot; ? queueMicrotask : options.type === &quot;raf&quot; ? (
    // requestAnimationFrame won&#39;t exist in SSR environments. Fall back to a vague approximation just to keep from erroring.
    typeof window !== &quot;undefined&quot; &amp;&amp; window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10)
  ) : options.type === &quot;callback&quot; ? options.queueNotification : createQueueWithTimer(options.timeout);
  const notifyListeners = () =&gt; {
    notificationQueued = false;
    if (shouldNotifyAtEndOfTick) {
      shouldNotifyAtEndOfTick = false;
      listeners.forEach((l) =&gt; l());
    }
  };
  return Object.assign({}, store, {
    // Override the base `store.subscribe` method to keep original listeners
    // from running if we&#39;re delaying notifications
    subscribe(listener2) {
      const wrappedListener = () =&gt; notifying &amp;&amp; listener2();
      const unsubscribe = store.subscribe(wrappedListener);
      listeners.add(listener2);
      return () =&gt; {
        unsubscribe();
        listeners.delete(listener2);
      };
    },
    // Override the base `store.dispatch` method so that we can check actions
    // for the `shouldAutoBatch` flag and determine if batching is active
    dispatch(action) {
      try {
        notifying = !action?.meta?.[SHOULD_AUTOBATCH];
        shouldNotifyAtEndOfTick = !notifying;
        if (shouldNotifyAtEndOfTick) {
          if (!notificationQueued) {
            notificationQueued = true;
            queueCallback(notifyListeners);
          }
        }
        return store.dispatch(action);
      } finally {
        notifying = true;
      }
    }
  });
};
var buildGetDefaultEnhancers = (middlewareEnhancer) =&gt; function getDefaultEnhancers(options) {
  const {
    autoBatch = true
  } = options ?? {};
  let enhancerArray = new Tuple(middlewareEnhancer);
  if (autoBatch) {
    enhancerArray.push(autoBatchEnhancer(typeof autoBatch === &quot;object&quot; ? autoBatch : void 0));
  }
  return enhancerArray;
};
function configureStore(options) {
  const getDefaultMiddleware = buildGetDefaultMiddleware();
  const {
    reducer = void 0,
    middleware,
    devTools = true,
    duplicateMiddlewareCheck = true,
    preloadedState = void 0,
    enhancers = void 0
  } = options || {};
  let rootReducer;
  if (typeof reducer === &quot;function&quot;) {
    rootReducer = reducer;
  } else if (isPlainObject$1(reducer)) {
    rootReducer = combineReducers(reducer);
  } else {
    throw new Error(formatProdErrorMessage(1) );
  }
  let finalMiddleware;
  if (typeof middleware === &quot;function&quot;) {
    finalMiddleware = middleware(getDefaultMiddleware);
  } else {
    finalMiddleware = getDefaultMiddleware();
  }
  let finalCompose = compose;
  if (devTools) {
    finalCompose = composeWithDevTools({
      // Enable capture of stack traces for dispatched Redux actions
      trace: false,
      ...typeof devTools === &quot;object&quot; &amp;&amp; devTools
    });
  }
  const middlewareEnhancer = applyMiddleware(...finalMiddleware);
  const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);
  let storeEnhancers = typeof enhancers === &quot;function&quot; ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();
  const composedEnhancer = finalCompose(...storeEnhancers);
  return createStore(rootReducer, preloadedState, composedEnhancer);
}
function executeReducerBuilderCallback(builderCallback) {
  const actionsMap = {};
  const actionMatchers = [];
  let defaultCaseReducer;
  const builder = {
    addCase(typeOrActionCreator, reducer) {
      const type = typeof typeOrActionCreator === &quot;string&quot; ? typeOrActionCreator : typeOrActionCreator.type;
      if (!type) {
        throw new Error(formatProdErrorMessage(28) );
      }
      if (type in actionsMap) {
        throw new Error(formatProdErrorMessage(29) );
      }
      actionsMap[type] = reducer;
      return builder;
    },
    addAsyncThunk(asyncThunk, reducers) {
      if (reducers.pending) actionsMap[asyncThunk.pending.type] = reducers.pending;
      if (reducers.rejected) actionsMap[asyncThunk.rejected.type] = reducers.rejected;
      if (reducers.fulfilled) actionsMap[asyncThunk.fulfilled.type] = reducers.fulfilled;
      if (reducers.settled) actionMatchers.push({
        matcher: asyncThunk.settled,
        reducer: reducers.settled
      });
      return builder;
    },
    addMatcher(matcher, reducer) {
      actionMatchers.push({
        matcher,
        reducer
      });
      return builder;
    },
    addDefaultCase(reducer) {
      defaultCaseReducer = reducer;
      return builder;
    }
  };
  builderCallback(builder);
  return [actionsMap, actionMatchers, defaultCaseReducer];
}
setUseStrictIteration(false);
function isStateFunction(x) {
  return typeof x === &quot;function&quot;;
}
function createReducer(initialState, mapOrBuilderCallback) {
  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
  let getInitialState;
  if (isStateFunction(initialState)) {
    getInitialState = () =&gt; freezeDraftable(initialState());
  } else {
    const frozenInitialState = freezeDraftable(initialState);
    getInitialState = () =&gt; frozenInitialState;
  }
  function reducer(state = getInitialState(), action) {
    let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({
      matcher
    }) =&gt; matcher(action)).map(({
      reducer: reducer2
    }) =&gt; reducer2)];
    if (caseReducers.filter((cr) =&gt; !!cr).length === 0) {
      caseReducers = [finalDefaultCaseReducer];
    }
    return caseReducers.reduce((previousState, caseReducer) =&gt; {
      if (caseReducer) {
        if (isDraft(previousState)) {
          const draft = previousState;
          const result = caseReducer(draft, action);
          if (result === void 0) {
            return previousState;
          }
          return result;
        } else if (!isDraftable(previousState)) {
          const result = caseReducer(previousState, action);
          if (result === void 0) {
            if (previousState === null) {
              return previousState;
            }
            throw Error(&quot;A case reducer on a non-draftable value must not return undefined&quot;);
          }
          return result;
        } else {
          return produce(previousState, (draft) =&gt; {
            return caseReducer(draft, action);
          });
        }
      }
      return previousState;
    }, state);
  }
  reducer.getInitialState = getInitialState;
  return reducer;
}
var matches = (matcher, action) =&gt; {
  if (hasMatchFunction(matcher)) {
    return matcher.match(action);
  } else {
    return matcher(action);
  }
};
function isAnyOf(...matchers) {
  return (action) =&gt; {
    return matchers.some((matcher) =&gt; matches(matcher, action));
  };
}
function isAllOf(...matchers) {
  return (action) =&gt; {
    return matchers.every((matcher) =&gt; matches(matcher, action));
  };
}
function hasExpectedRequestMetadata(action, validStatus) {
  if (!action || !action.meta) return false;
  const hasValidRequestId = typeof action.meta.requestId === &quot;string&quot;;
  const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) &gt; -1;
  return hasValidRequestId &amp;&amp; hasValidRequestStatus;
}
function isAsyncThunkArray(a) {
  return typeof a[0] === &quot;function&quot; &amp;&amp; &quot;pending&quot; in a[0] &amp;&amp; &quot;fulfilled&quot; in a[0] &amp;&amp; &quot;rejected&quot; in a[0];
}
function isPending(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) =&gt; hasExpectedRequestMetadata(action, [&quot;pending&quot;]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isPending()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) =&gt; asyncThunk.pending));
}
function isRejected(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) =&gt; hasExpectedRequestMetadata(action, [&quot;rejected&quot;]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isRejected()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) =&gt; asyncThunk.rejected));
}
function isRejectedWithValue(...asyncThunks) {
  const hasFlag = (action) =&gt; {
    return action &amp;&amp; action.meta &amp;&amp; action.meta.rejectedWithValue;
  };
  if (asyncThunks.length === 0) {
    return isAllOf(isRejected(...asyncThunks), hasFlag);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isRejectedWithValue()(asyncThunks[0]);
  }
  return isAllOf(isRejected(...asyncThunks), hasFlag);
}
function isFulfilled(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) =&gt; hasExpectedRequestMetadata(action, [&quot;fulfilled&quot;]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isFulfilled()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.map((asyncThunk) =&gt; asyncThunk.fulfilled));
}
function isAsyncThunkAction(...asyncThunks) {
  if (asyncThunks.length === 0) {
    return (action) =&gt; hasExpectedRequestMetadata(action, [&quot;pending&quot;, &quot;fulfilled&quot;, &quot;rejected&quot;]);
  }
  if (!isAsyncThunkArray(asyncThunks)) {
    return isAsyncThunkAction()(asyncThunks[0]);
  }
  return isAnyOf(...asyncThunks.flatMap((asyncThunk) =&gt; [asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled]));
}
var urlAlphabet = &quot;ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW&quot;;
var nanoid = (size = 21) =&gt; {
  let id = &quot;&quot;;
  let i = size;
  while (i--) {
    id += urlAlphabet[Math.random() * 64 | 0];
  }
  return id;
};
var commonProperties = [&quot;name&quot;, &quot;message&quot;, &quot;stack&quot;, &quot;code&quot;];
var RejectWithValue = class {
  constructor(payload, meta) {
    this.payload = payload;
    this.meta = meta;
  }
  /*
  type-only property to distinguish between RejectWithValue and FulfillWithMeta
  does not exist at runtime
  */
  _type;
};
var FulfillWithMeta = class {
  constructor(payload, meta) {
    this.payload = payload;
    this.meta = meta;
  }
  /*
  type-only property to distinguish between RejectWithValue and FulfillWithMeta
  does not exist at runtime
  */
  _type;
};
var miniSerializeError = (value) =&gt; {
  if (typeof value === &quot;object&quot; &amp;&amp; value !== null) {
    const simpleError = {};
    for (const property of commonProperties) {
      if (typeof value[property] === &quot;string&quot;) {
        simpleError[property] = value[property];
      }
    }
    return simpleError;
  }
  return {
    message: String(value)
  };
};
var externalAbortMessage = &quot;External signal was aborted&quot;;
var createAsyncThunk = /* @__PURE__ */ (() =&gt; {
  function createAsyncThunk2(typePrefix, payloadCreator, options) {
    const fulfilled = createAction(typePrefix + &quot;/fulfilled&quot;, (payload, requestId, arg, meta) =&gt; ({
      payload,
      meta: {
        ...meta || {},
        arg,
        requestId,
        requestStatus: &quot;fulfilled&quot;
      }
    }));
    const pending = createAction(typePrefix + &quot;/pending&quot;, (requestId, arg, meta) =&gt; ({
      payload: void 0,
      meta: {
        ...meta || {},
        arg,
        requestId,
        requestStatus: &quot;pending&quot;
      }
    }));
    const rejected = createAction(typePrefix + &quot;/rejected&quot;, (error, requestId, arg, payload, meta) =&gt; ({
      payload,
      error: (options &amp;&amp; options.serializeError || miniSerializeError)(error || &quot;Rejected&quot;),
      meta: {
        ...meta || {},
        arg,
        requestId,
        rejectedWithValue: !!payload,
        requestStatus: &quot;rejected&quot;,
        aborted: error?.name === &quot;AbortError&quot;,
        condition: error?.name === &quot;ConditionError&quot;
      }
    }));
    function actionCreator(arg, {
      signal
    } = {}) {
      return (dispatch, getState, extra) =&gt; {
        const requestId = options?.idGenerator ? options.idGenerator(arg) : nanoid();
        const abortController = new AbortController();
        let abortHandler;
        let abortReason;
        function abort(reason) {
          abortReason = reason;
          abortController.abort();
        }
        if (signal) {
          if (signal.aborted) {
            abort(externalAbortMessage);
          } else {
            signal.addEventListener(&quot;abort&quot;, () =&gt; abort(externalAbortMessage), {
              once: true
            });
          }
        }
        const promise = (async function() {
          let finalAction;
          try {
            let conditionResult = options?.condition?.(arg, {
              getState,
              extra
            });
            if (isThenable(conditionResult)) {
              conditionResult = await conditionResult;
            }
            if (conditionResult === false || abortController.signal.aborted) {
              throw {
                name: &quot;ConditionError&quot;,
                message: &quot;Aborted due to condition callback returning false.&quot;
              };
            }
            const abortedPromise = new Promise((_, reject) =&gt; {
              abortHandler = () =&gt; {
                reject({
                  name: &quot;AbortError&quot;,
                  message: abortReason || &quot;Aborted&quot;
                });
              };
              abortController.signal.addEventListener(&quot;abort&quot;, abortHandler);
            });
            dispatch(pending(requestId, arg, options?.getPendingMeta?.({
              requestId,
              arg
            }, {
              getState,
              extra
            })));
            finalAction = await Promise.race([abortedPromise, Promise.resolve(payloadCreator(arg, {
              dispatch,
              getState,
              extra,
              requestId,
              signal: abortController.signal,
              abort,
              rejectWithValue: (value, meta) =&gt; {
                return new RejectWithValue(value, meta);
              },
              fulfillWithValue: (value, meta) =&gt; {
                return new FulfillWithMeta(value, meta);
              }
            })).then((result) =&gt; {
              if (result instanceof RejectWithValue) {
                throw result;
              }
              if (result instanceof FulfillWithMeta) {
                return fulfilled(result.payload, requestId, arg, result.meta);
              }
              return fulfilled(result, requestId, arg);
            })]);
          } catch (err) {
            finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);
          } finally {
            if (abortHandler) {
              abortController.signal.removeEventListener(&quot;abort&quot;, abortHandler);
            }
          }
          const skipDispatch = options &amp;&amp; !options.dispatchConditionRejection &amp;&amp; rejected.match(finalAction) &amp;&amp; finalAction.meta.condition;
          if (!skipDispatch) {
            dispatch(finalAction);
          }
          return finalAction;
        })();
        return Object.assign(promise, {
          abort,
          requestId,
          arg,
          unwrap() {
            return promise.then(unwrapResult);
          }
        });
      };
    }
    return Object.assign(actionCreator, {
      pending,
      rejected,
      fulfilled,
      settled: isAnyOf(rejected, fulfilled),
      typePrefix
    });
  }
  createAsyncThunk2.withTypes = () =&gt; createAsyncThunk2;
  return createAsyncThunk2;
})();
function unwrapResult(action) {
  if (action.meta &amp;&amp; action.meta.rejectedWithValue) {
    throw action.payload;
  }
  if (action.error) {
    throw action.error;
  }
  return action.payload;
}
function isThenable(value) {
  return value !== null &amp;&amp; typeof value === &quot;object&quot; &amp;&amp; typeof value.then === &quot;function&quot;;
}
var asyncThunkSymbol = /* @__PURE__ */ Symbol.for(&quot;rtk-slice-createasyncthunk&quot;);
function getType(slice, actionKey) {
  return `${slice}/${actionKey}`;
}
function buildCreateSlice({
  creators
} = {}) {
  const cAT = creators?.asyncThunk?.[asyncThunkSymbol];
  return function createSlice2(options) {
    const {
      name,
      reducerPath = name
    } = options;
    if (!name) {
      throw new Error(formatProdErrorMessage(11) );
    }
    const reducers = (typeof options.reducers === &quot;function&quot; ? options.reducers(buildReducerCreators()) : options.reducers) || {};
    const reducerNames = Object.keys(reducers);
    const context = {
      sliceCaseReducersByName: {},
      sliceCaseReducersByType: {},
      actionCreators: {},
      sliceMatchers: []
    };
    const contextMethods = {
      addCase(typeOrActionCreator, reducer2) {
        const type = typeof typeOrActionCreator === &quot;string&quot; ? typeOrActionCreator : typeOrActionCreator.type;
        if (!type) {
          throw new Error(formatProdErrorMessage(12) );
        }
        if (type in context.sliceCaseReducersByType) {
          throw new Error(formatProdErrorMessage(13) );
        }
        context.sliceCaseReducersByType[type] = reducer2;
        return contextMethods;
      },
      addMatcher(matcher, reducer2) {
        context.sliceMatchers.push({
          matcher,
          reducer: reducer2
        });
        return contextMethods;
      },
      exposeAction(name2, actionCreator) {
        context.actionCreators[name2] = actionCreator;
        return contextMethods;
      },
      exposeCaseReducer(name2, reducer2) {
        context.sliceCaseReducersByName[name2] = reducer2;
        return contextMethods;
      }
    };
    reducerNames.forEach((reducerName) =&gt; {
      const reducerDefinition = reducers[reducerName];
      const reducerDetails = {
        reducerName,
        type: getType(name, reducerName),
        createNotation: typeof options.reducers === &quot;function&quot;
      };
      if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {
        handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);
      } else {
        handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);
      }
    });
    function buildReducer() {
      const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === &quot;function&quot; ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
      const finalCaseReducers = {
        ...extraReducers,
        ...context.sliceCaseReducersByType
      };
      return createReducer(options.initialState, (builder) =&gt; {
        for (let key in finalCaseReducers) {
          builder.addCase(key, finalCaseReducers[key]);
        }
        for (let sM of context.sliceMatchers) {
          builder.addMatcher(sM.matcher, sM.reducer);
        }
        for (let m of actionMatchers) {
          builder.addMatcher(m.matcher, m.reducer);
        }
        if (defaultCaseReducer) {
          builder.addDefaultCase(defaultCaseReducer);
        }
      });
    }
    const selectSelf = (state) =&gt; state;
    const injectedSelectorCache = /* @__PURE__ */ new Map();
    const injectedStateCache = /* @__PURE__ */ new WeakMap();
    let _reducer;
    function reducer(state, action) {
      if (!_reducer) _reducer = buildReducer();
      return _reducer(state, action);
    }
    function getInitialState() {
      if (!_reducer) _reducer = buildReducer();
      return _reducer.getInitialState();
    }
    function makeSelectorProps(reducerPath2, injected = false) {
      function selectSlice(state) {
        let sliceState = state[reducerPath2];
        if (typeof sliceState === &quot;undefined&quot;) {
          if (injected) {
            sliceState = getOrInsertComputed$1(injectedStateCache, selectSlice, getInitialState);
          }
        }
        return sliceState;
      }
      function getSelectors(selectState = selectSelf) {
        const selectorCache = getOrInsertComputed$1(injectedSelectorCache, injected, () =&gt; /* @__PURE__ */ new WeakMap());
        return getOrInsertComputed$1(selectorCache, selectState, () =&gt; {
          const map = {};
          for (const [name2, selector] of Object.entries(options.selectors ?? {})) {
            map[name2] = wrapSelector(selector, selectState, () =&gt; getOrInsertComputed$1(injectedStateCache, selectState, getInitialState), injected);
          }
          return map;
        });
      }
      return {
        reducerPath: reducerPath2,
        getSelectors,
        get selectors() {
          return getSelectors(selectSlice);
        },
        selectSlice
      };
    }
    const slice = {
      name,
      reducer,
      actions: context.actionCreators,
      caseReducers: context.sliceCaseReducersByName,
      getInitialState,
      ...makeSelectorProps(reducerPath),
      injectInto(injectable, {
        reducerPath: pathOpt,
        ...config
      } = {}) {
        const newReducerPath = pathOpt ?? reducerPath;
        injectable.inject({
          reducerPath: newReducerPath,
          reducer
        }, config);
        return {
          ...slice,
          ...makeSelectorProps(newReducerPath, true)
        };
      }
    };
    return slice;
  };
}
function wrapSelector(selector, selectState, getInitialState, injected) {
  function wrapper(rootState, ...args) {
    let sliceState = selectState(rootState);
    if (typeof sliceState === &quot;undefined&quot;) {
      if (injected) {
        sliceState = getInitialState();
      }
    }
    return selector(sliceState, ...args);
  }
  wrapper.unwrapped = selector;
  return wrapper;
}
var createSlice = /* @__PURE__ */ buildCreateSlice();
function buildReducerCreators() {
  function asyncThunk(payloadCreator, config) {
    return {
      _reducerDefinitionType: &quot;asyncThunk&quot;,
      payloadCreator,
      ...config
    };
  }
  asyncThunk.withTypes = () =&gt; asyncThunk;
  return {
    reducer(caseReducer) {
      return Object.assign({
        // hack so the wrapping function has the same name as the original
        // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
        [caseReducer.name](...args) {
          return caseReducer(...args);
        }
      }[caseReducer.name], {
        _reducerDefinitionType: &quot;reducer&quot;
        /* reducer */
      });
    },
    preparedReducer(prepare, reducer) {
      return {
        _reducerDefinitionType: &quot;reducerWithPrepare&quot;,
        prepare,
        reducer
      };
    },
    asyncThunk
  };
}
function handleNormalReducerDefinition({
  type,
  reducerName,
  createNotation
}, maybeReducerWithPrepare, context) {
  let caseReducer;
  let prepareCallback;
  if (&quot;reducer&quot; in maybeReducerWithPrepare) {
    if (createNotation &amp;&amp; !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
      throw new Error(formatProdErrorMessage(17) );
    }
    caseReducer = maybeReducerWithPrepare.reducer;
    prepareCallback = maybeReducerWithPrepare.prepare;
  } else {
    caseReducer = maybeReducerWithPrepare;
  }
  context.addCase(type, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type, prepareCallback) : createAction(type));
}
function isAsyncThunkSliceReducerDefinition(reducerDefinition) {
  return reducerDefinition._reducerDefinitionType === &quot;asyncThunk&quot;;
}
function isCaseReducerWithPrepareDefinition(reducerDefinition) {
  return reducerDefinition._reducerDefinitionType === &quot;reducerWithPrepare&quot;;
}
function handleThunkCaseReducerDefinition({
  type,
  reducerName
}, reducerDefinition, context, cAT) {
  if (!cAT) {
    throw new Error(formatProdErrorMessage(18) );
  }
  const {
    payloadCreator,
    fulfilled,
    pending,
    rejected,
    settled,
    options
  } = reducerDefinition;
  const thunk = cAT(type, payloadCreator, options);
  context.exposeAction(reducerName, thunk);
  if (fulfilled) {
    context.addCase(thunk.fulfilled, fulfilled);
  }
  if (pending) {
    context.addCase(thunk.pending, pending);
  }
  if (rejected) {
    context.addCase(thunk.rejected, rejected);
  }
  if (settled) {
    context.addMatcher(thunk.settled, settled);
  }
  context.exposeCaseReducer(reducerName, {
    fulfilled: fulfilled || noop,
    pending: pending || noop,
    rejected: rejected || noop,
    settled: settled || noop
  });
}
function noop() {
}
function formatProdErrorMessage(code) {
  return `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Derives the internal server configuration from an OIDC well-known response.
 *
 * ForgeRock AM uses a consistent URL pattern where the `issuer` contains
 * `/oauth2/` and the corresponding JSON API endpoints use `/json/` in the
 * same position. This function exploits that convention:
 *
 * - `baseUrl`: extracted from the `authorization_endpoint` origin
 * - `authenticate` path: issuer path with `oauth2` replaced by `json`, plus `/authenticate`
 * - `sessions` path: issuer path with `oauth2` replaced by `json`, plus `/sessions/`
 *
 * @param data - The well-known response from the OIDC discovery endpoint
 * @returns The resolved server configuration, or a GenericError if conversion fails
 *
 * @example
 * ```typescript
 * const config = convertWellknown({
 *   issuer: &#39;https://am.example.com/am/oauth2/alpha&#39;,
 *   authorization_endpoint: &#39;https://am.example.com/am/oauth2/alpha/authorize&#39;,
 *   token_endpoint: &#39;https://am.example.com/am/oauth2/alpha/access_token&#39;,
 *   // ...
 * });
 * // Returns:
 * // {
 * //   baseUrl: &#39;https://am.example.com&#39;,
 * //   paths: {
 * //     authenticate: &#39;/am/json/alpha/authenticate&#39;,
 * //     sessions: &#39;/am/json/alpha/sessions/&#39;,
 * //   },
 * // }
 * ```
 */
function convertWellknown(data) {
    if (!data.authorization_endpoint) {
        return {
            error: &#39;Well-known configuration conversion failed&#39;,
            message: &#39;Well-known response is missing authorization_endpoint&#39;,
            type: &#39;wellknown_error&#39;,
        };
    }
    const authEndpoint = new URL(data.authorization_endpoint);
    const baseUrl = authEndpoint.origin;
    const issuerUrl = new URL(data.issuer);
    const issuerPath = issuerUrl.pathname;
    if (!issuerPath.includes(&#39;/oauth2&#39;)) {
        return {
            error: &#39;Well-known configuration conversion failed&#39;,
            message: &#39;Journey-client requires a ForgeRock AM issuer containing &quot;/oauth2&quot; in the path. &#39; +
                `Received issuer: ${data.issuer}. ` +
                &#39;For PingOne or other OIDC providers, use davinci-client or oidc-client instead.&#39;,
            type: &#39;wellknown_error&#39;,
        };
    }
    const jsonPath = issuerPath.replace(&#39;/oauth2&#39;, &#39;/json&#39;);
    const authenticate = `${jsonPath}/authenticate`;
    const sessions = `${jsonPath}/sessions/`;
    return {
        baseUrl,
        paths: { authenticate, sessions },
    };
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const initialState$1 = {
    serverConfig: { baseUrl: &#39;&#39;, paths: { authenticate: &#39;&#39;, sessions: &#39;&#39; } },
};
/**
 * Redux slice for journey client configuration.
 *
 * Separated from the journey auth state slice (which holds authId, step, error)
 * so that configuration concerns don&#39;t mix with authentication flow state.
 * The `set` action converts the raw well-known response via `convertWellknown()`
 * and stores the resulting `ResolvedServerConfig`.
 */
const configSlice = createSlice({
    name: &#39;config&#39;,
    initialState: initialState$1,
    reducers: {
        set(state, action) {
            const wellknown = convertWellknown(action.payload.wellknownResponse);
            if (&#39;error&#39; in wellknown) {
                state.error = wellknown;
            }
            else {
                state.serverConfig = wellknown;
                state.error = undefined;
            }
        },
    },
});

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const actionTypes = {
    // Journey
    begin: &#39;JOURNEY_START&#39;,
    continue: &#39;JOURNEY_NEXT&#39;,
    terminate: &#39;JOURNEY_TERMINATE&#39;,
    // DaVinci
    start: &#39;DAVINCI_START&#39;,
    next: &#39;DAVINCI_NEXT&#39;,
    flow: &#39;DAVINCI_FLOW&#39;,
    success: &#39;DAVINCI_SUCCESS&#39;,
    error: &#39;DAVINCI_ERROR&#39;,
    failure: &#39;DAVINCI_FAILURE&#39;,
    resume: &#39;DAVINCI_RESUME&#39;,
    poll: &#39;DAVINCI_POLL&#39;,
    // OIDC
    authorize: &#39;AUTHORIZE&#39;,
    tokenExchange: &#39;TOKEN_EXCHANGE&#39;,
    revoke: &#39;REVOKE&#39;,
    userInfo: &#39;USER_INFO&#39;,
    endSession: &#39;END_SESSION&#39;,
};

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @function middlewareWrapper - A &quot;Node&quot; and &quot;Redux&quot; style middleware that is called just before
 * the request is made from the SDK. This allows you access to the request for modification.
 * @param request - A request object container of the URL and the Request Init object
 * @param action - The action object that is passed into the middleware communicating intent
 * @param action.type - A &quot;Redux&quot; style type that contains the serialized action
 * @param action.payload - The payload of the action that can contain metadata
 * @returns {function} - Function that takes middleware parameter &amp; runs middleware against request
 */
function middlewareWrapper(request, 
// eslint-disable-next-line
{ type, payload }) {
    // no mutation and no reassignment
    const actionCopy = Object.freeze({ type, payload });
    return (middleware) =&gt; {
        if (!Array.isArray(middleware)) {
            return request;
        }
        // Copy middleware so the `shift` below doesn&#39;t mutate source
        const mwareCopy = middleware.map((fn) =&gt; fn);
        function iterator() {
            const nextMiddlewareToBeCalled = mwareCopy.shift();
            if (nextMiddlewareToBeCalled)
                nextMiddlewareToBeCalled(request, actionCopy, iterator);
            return request;
        }
        return iterator();
    };
}
/**
 * @function initQuery - Initializes a query object with the provided request object
 * @param {FetchArgs} fetchArgs - The request object to initialize the query with
 * @param {string} endpoint - The endpoint to be used for the query
 * @returns
 */
function initQuery(fetchArgs, endpoint, payload) {
    let modifiedRequest = {
        ...fetchArgs,
        url: new URL(fetchArgs.url),
        headers: new Headers(fetchArgs.headers),
    };
    const queryApi = {
        applyMiddleware(middleware) {
            // Iterates and executes provided middleware functions
            // Allow middleware to mutate `request` argument
            const runMiddleware = middlewareWrapper(modifiedRequest, {
                type: actionTypes[endpoint],
                payload: payload || {},
            });
            modifiedRequest = runMiddleware(middleware);
            return queryApi;
        },
        async applyQuery(callback) {
            return await callback({ ...modifiedRequest, url: modifiedRequest.url.toString() });
        },
    };
    return queryApi;
}

// src/getDotPath/getDotPath.ts

// src/SchemaError/SchemaError.ts
var SchemaError = class extends Error {
  /**
   * The schema issues.
   */
  issues;
  /**
   * Creates a schema error with useful information.
   *
   * @param issues The schema issues.
   */
  constructor(issues) {
    super(issues[0].message);
    this.name = &quot;SchemaError&quot;;
    this.issues = issues;
  }
};

var STATUS_UNINITIALIZED = &quot;uninitialized&quot;;
var STATUS_PENDING = &quot;pending&quot;;
var STATUS_FULFILLED = &quot;fulfilled&quot;;
var STATUS_REJECTED = &quot;rejected&quot;;
function getRequestStatusFlags(status) {
  return {
    status,
    isUninitialized: status === STATUS_UNINITIALIZED,
    isLoading: status === STATUS_PENDING,
    isSuccess: status === STATUS_FULFILLED,
    isError: status === STATUS_REJECTED
  };
}
var isPlainObject2 = isPlainObject$1;
function copyWithStructuralSharing(oldObj, newObj) {
  if (oldObj === newObj || !(isPlainObject2(oldObj) &amp;&amp; isPlainObject2(newObj) || Array.isArray(oldObj) &amp;&amp; Array.isArray(newObj))) {
    return newObj;
  }
  const newKeys = Object.keys(newObj);
  const oldKeys = Object.keys(oldObj);
  let isSameObject = newKeys.length === oldKeys.length;
  const mergeObj = Array.isArray(newObj) ? [] : {};
  for (const key of newKeys) {
    mergeObj[key] = copyWithStructuralSharing(oldObj[key], newObj[key]);
    if (isSameObject) isSameObject = oldObj[key] === mergeObj[key];
  }
  return isSameObject ? oldObj : mergeObj;
}
function filterMap(array, predicate, mapper) {
  return array.reduce((acc, item, i) =&gt; {
    if (predicate(item, i)) {
      acc.push(mapper(item, i));
    }
    return acc;
  }, []).flat();
}
function isAbsoluteUrl(url) {
  return new RegExp(`(^|:)//`).test(url);
}
function isDocumentVisible() {
  if (typeof document === &quot;undefined&quot;) {
    return true;
  }
  return document.visibilityState !== &quot;hidden&quot;;
}
function isNotNullish(v) {
  return v != null;
}
function filterNullishValues(map) {
  return [...map?.values() ?? []].filter(isNotNullish);
}
function isOnline() {
  return typeof navigator === &quot;undefined&quot; ? true : navigator.onLine === void 0 ? true : navigator.onLine;
}
var withoutTrailingSlash = (url) =&gt; url.replace(/\/$/, &quot;&quot;);
var withoutLeadingSlash = (url) =&gt; url.replace(/^\//, &quot;&quot;);
function joinUrls(base, url) {
  if (!base) {
    return url;
  }
  if (!url) {
    return base;
  }
  if (isAbsoluteUrl(url)) {
    return url;
  }
  const delimiter = base.endsWith(&quot;/&quot;) || !url.startsWith(&quot;?&quot;) ? &quot;/&quot; : &quot;&quot;;
  base = withoutTrailingSlash(base);
  url = withoutLeadingSlash(url);
  return `${base}${delimiter}${url}`;
}
function getOrInsertComputed(map, key, compute) {
  if (map.has(key)) return map.get(key);
  return map.set(key, compute(key)).get(key);
}
var createNewMap = () =&gt; /* @__PURE__ */ new Map();
var defaultFetchFn = (...args) =&gt; fetch(...args);
var defaultValidateStatus = (response) =&gt; response.status &gt;= 200 &amp;&amp; response.status &lt;= 299;
var defaultIsJsonContentType = (headers) =&gt; (
  /*applicat*/
  /ion\/(vnd\.api\+)?json/.test(headers.get(&quot;content-type&quot;) || &quot;&quot;)
);
function stripUndefined(obj) {
  if (!isPlainObject$1(obj)) {
    return obj;
  }
  const copy = {
    ...obj
  };
  for (const [k, v] of Object.entries(copy)) {
    if (v === void 0) delete copy[k];
  }
  return copy;
}
var isJsonifiable = (body) =&gt; typeof body === &quot;object&quot; &amp;&amp; (isPlainObject$1(body) || Array.isArray(body) || typeof body.toJSON === &quot;function&quot;);
function fetchBaseQuery({
  baseUrl,
  prepareHeaders = (x) =&gt; x,
  fetchFn = defaultFetchFn,
  paramsSerializer,
  isJsonContentType = defaultIsJsonContentType,
  jsonContentType = &quot;application/json&quot;,
  jsonReplacer,
  timeout: defaultTimeout,
  responseHandler: globalResponseHandler,
  validateStatus: globalValidateStatus,
  ...baseFetchOptions
} = {}) {
  if (typeof fetch === &quot;undefined&quot; &amp;&amp; fetchFn === defaultFetchFn) {
    console.warn(&quot;Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.&quot;);
  }
  return async (arg, api, extraOptions) =&gt; {
    const {
      getState,
      extra,
      endpoint,
      forced,
      type
    } = api;
    let meta;
    let {
      url,
      headers = new Headers(baseFetchOptions.headers),
      params = void 0,
      responseHandler = globalResponseHandler ?? &quot;json&quot;,
      validateStatus = globalValidateStatus ?? defaultValidateStatus,
      timeout = defaultTimeout,
      ...rest
    } = typeof arg == &quot;string&quot; ? {
      url: arg
    } : arg;
    let abortController, signal = api.signal;
    if (timeout) {
      abortController = new AbortController();
      api.signal.addEventListener(&quot;abort&quot;, abortController.abort);
      signal = abortController.signal;
    }
    let config = {
      ...baseFetchOptions,
      signal,
      ...rest
    };
    headers = new Headers(stripUndefined(headers));
    config.headers = await prepareHeaders(headers, {
      getState,
      arg,
      extra,
      endpoint,
      forced,
      type,
      extraOptions
    }) || headers;
    const bodyIsJsonifiable = isJsonifiable(config.body);
    if (config.body != null &amp;&amp; !bodyIsJsonifiable &amp;&amp; typeof config.body !== &quot;string&quot;) {
      config.headers.delete(&quot;content-type&quot;);
    }
    if (!config.headers.has(&quot;content-type&quot;) &amp;&amp; bodyIsJsonifiable) {
      config.headers.set(&quot;content-type&quot;, jsonContentType);
    }
    if (bodyIsJsonifiable &amp;&amp; isJsonContentType(config.headers)) {
      config.body = JSON.stringify(config.body, jsonReplacer);
    }
    if (!config.headers.has(&quot;accept&quot;)) {
      if (responseHandler === &quot;json&quot;) {
        config.headers.set(&quot;accept&quot;, &quot;application/json&quot;);
      } else if (responseHandler === &quot;text&quot;) {
        config.headers.set(&quot;accept&quot;, &quot;text/plain, text/html, */*&quot;);
      }
    }
    if (params) {
      const divider = ~url.indexOf(&quot;?&quot;) ? &quot;&amp;&quot; : &quot;?&quot;;
      const query = paramsSerializer ? paramsSerializer(params) : new URLSearchParams(stripUndefined(params));
      url += divider + query;
    }
    url = joinUrls(baseUrl, url);
    const request = new Request(url, config);
    const requestClone = new Request(url, config);
    meta = {
      request: requestClone
    };
    let response, timedOut = false, timeoutId = abortController &amp;&amp; setTimeout(() =&gt; {
      timedOut = true;
      abortController.abort();
    }, timeout);
    try {
      response = await fetchFn(request);
    } catch (e) {
      return {
        error: {
          status: timedOut ? &quot;TIMEOUT_ERROR&quot; : &quot;FETCH_ERROR&quot;,
          error: String(e)
        },
        meta
      };
    } finally {
      if (timeoutId) clearTimeout(timeoutId);
      abortController?.signal.removeEventListener(&quot;abort&quot;, abortController.abort);
    }
    const responseClone = response.clone();
    meta.response = responseClone;
    let resultData;
    let responseText = &quot;&quot;;
    try {
      let handleResponseError;
      await Promise.all([
        handleResponse(response, responseHandler).then((r) =&gt; resultData = r, (e) =&gt; handleResponseError = e),
        // see https://github.com/node-fetch/node-fetch/issues/665#issuecomment-538995182
        // we *have* to &quot;use up&quot; both streams at the same time or they will stop running in node-fetch scenarios
        responseClone.text().then((r) =&gt; responseText = r, () =&gt; {
        })
      ]);
      if (handleResponseError) throw handleResponseError;
    } catch (e) {
      return {
        error: {
          status: &quot;PARSING_ERROR&quot;,
          originalStatus: response.status,
          data: responseText,
          error: String(e)
        },
        meta
      };
    }
    return validateStatus(response, resultData) ? {
      data: resultData,
      meta
    } : {
      error: {
        status: response.status,
        data: resultData
      },
      meta
    };
  };
  async function handleResponse(response, responseHandler) {
    if (typeof responseHandler === &quot;function&quot;) {
      return responseHandler(response);
    }
    if (responseHandler === &quot;content-type&quot;) {
      responseHandler = isJsonContentType(response.headers) ? &quot;json&quot; : &quot;text&quot;;
    }
    if (responseHandler === &quot;json&quot;) {
      const text = await response.text();
      return text.length ? JSON.parse(text) : null;
    }
    return response.text();
  }
}
var HandledError = class {
  constructor(value, meta = void 0) {
    this.value = value;
    this.meta = meta;
  }
};
var INTERNAL_PREFIX = &quot;__rtkq/&quot;;
var ONLINE = &quot;online&quot;;
var OFFLINE = &quot;offline&quot;;
var FOCUSED = &quot;focused&quot;;
var onFocus = /* @__PURE__ */ createAction(`${INTERNAL_PREFIX}${FOCUSED}`);
var onFocusLost = /* @__PURE__ */ createAction(`${INTERNAL_PREFIX}un${FOCUSED}`);
var onOnline = /* @__PURE__ */ createAction(`${INTERNAL_PREFIX}${ONLINE}`);
var onOffline = /* @__PURE__ */ createAction(`${INTERNAL_PREFIX}${OFFLINE}`);
var ENDPOINT_QUERY = &quot;query&quot;;
var ENDPOINT_MUTATION = &quot;mutation&quot;;
var ENDPOINT_INFINITEQUERY = &quot;infinitequery&quot;;
function isQueryDefinition(e) {
  return e.type === ENDPOINT_QUERY;
}
function isMutationDefinition(e) {
  return e.type === ENDPOINT_MUTATION;
}
function isInfiniteQueryDefinition(e) {
  return e.type === ENDPOINT_INFINITEQUERY;
}
function isAnyQueryDefinition(e) {
  return isQueryDefinition(e) || isInfiniteQueryDefinition(e);
}
function calculateProvidedBy(description, result, error, queryArg, meta, assertTagTypes) {
  const finalDescription = isFunction(description) ? description(result, error, queryArg, meta) : description;
  if (finalDescription) {
    return filterMap(finalDescription, isNotNullish, (tag) =&gt; assertTagTypes(expandTagDescription(tag)));
  }
  return [];
}
function isFunction(t) {
  return typeof t === &quot;function&quot;;
}
function expandTagDescription(description) {
  return typeof description === &quot;string&quot; ? {
    type: description
  } : description;
}
function asSafePromise(promise, fallback) {
  return promise.catch(fallback);
}
var getEndpointDefinition = (context, endpointName) =&gt; context.endpointDefinitions[endpointName];
var forceQueryFnSymbol = /* @__PURE__ */ Symbol(&quot;forceQueryFn&quot;);
var isUpsertQuery = (arg) =&gt; typeof arg[forceQueryFnSymbol] === &quot;function&quot;;
function buildInitiate({
  serializeQueryArgs,
  queryThunk,
  infiniteQueryThunk,
  mutationThunk,
  api,
  context,
  getInternalState
}) {
  const getRunningQueries = (dispatch) =&gt; getInternalState(dispatch)?.runningQueries;
  const getRunningMutations = (dispatch) =&gt; getInternalState(dispatch)?.runningMutations;
  const {
    unsubscribeQueryResult,
    removeMutationResult,
    updateSubscriptionOptions
  } = api.internalActions;
  return {
    buildInitiateQuery,
    buildInitiateInfiniteQuery,
    buildInitiateMutation,
    getRunningQueryThunk,
    getRunningMutationThunk,
    getRunningQueriesThunk,
    getRunningMutationsThunk
  };
  function getRunningQueryThunk(endpointName, queryArgs) {
    return (dispatch) =&gt; {
      const endpointDefinition = getEndpointDefinition(context, endpointName);
      const queryCacheKey = serializeQueryArgs({
        queryArgs,
        endpointDefinition,
        endpointName
      });
      return getRunningQueries(dispatch)?.get(queryCacheKey);
    };
  }
  function getRunningMutationThunk(_endpointName, fixedCacheKeyOrRequestId) {
    return (dispatch) =&gt; {
      return getRunningMutations(dispatch)?.get(fixedCacheKeyOrRequestId);
    };
  }
  function getRunningQueriesThunk() {
    return (dispatch) =&gt; filterNullishValues(getRunningQueries(dispatch));
  }
  function getRunningMutationsThunk() {
    return (dispatch) =&gt; filterNullishValues(getRunningMutations(dispatch));
  }
  function buildInitiateAnyQuery(endpointName, endpointDefinition) {
    const queryAction = (arg, {
      subscribe = true,
      forceRefetch,
      subscriptionOptions,
      [forceQueryFnSymbol]: forceQueryFn,
      ...rest
    } = {}) =&gt; (dispatch, getState) =&gt; {
      const queryCacheKey = serializeQueryArgs({
        queryArgs: arg,
        endpointDefinition,
        endpointName
      });
      let thunk;
      const commonThunkArgs = {
        ...rest,
        type: ENDPOINT_QUERY,
        subscribe,
        forceRefetch,
        subscriptionOptions,
        endpointName,
        originalArgs: arg,
        queryCacheKey,
        [forceQueryFnSymbol]: forceQueryFn
      };
      if (isQueryDefinition(endpointDefinition)) {
        thunk = queryThunk(commonThunkArgs);
      } else {
        const {
          direction,
          initialPageParam
        } = rest;
        thunk = infiniteQueryThunk({
          ...commonThunkArgs,
          // Supply these even if undefined. This helps with a field existence
          // check over in `buildSlice.ts`
          direction,
          initialPageParam
        });
      }
      const selector = api.endpoints[endpointName].select(arg);
      const thunkResult = dispatch(thunk);
      const stateAfter = selector(getState());
      const {
        requestId,
        abort
      } = thunkResult;
      const skippedSynchronously = stateAfter.requestId !== requestId;
      const runningQuery = getRunningQueries(dispatch)?.get(queryCacheKey);
      const selectFromState = () =&gt; selector(getState());
      const statePromise = Object.assign(forceQueryFn ? (
        // a query has been forced (upsertQueryData)
        // -&gt; we want to resolve it once data has been written with the data that will be written
        thunkResult.then(selectFromState)
      ) : skippedSynchronously &amp;&amp; !runningQuery ? (
        // a query has been skipped due to a condition and we do not have any currently running query
        // -&gt; we want to resolve it immediately with the current data
        Promise.resolve(stateAfter)
      ) : (
        // query just started or one is already in flight
        // -&gt; wait for the running query, then resolve with data from after that
        Promise.all([runningQuery, thunkResult]).then(selectFromState)
      ), {
        arg,
        requestId,
        subscriptionOptions,
        queryCacheKey,
        abort,
        async unwrap() {
          const result = await statePromise;
          if (result.isError) {
            throw result.error;
          }
          return result.data;
        },
        refetch: () =&gt; dispatch(queryAction(arg, {
          subscribe: false,
          forceRefetch: true
        })),
        unsubscribe() {
          if (subscribe) dispatch(unsubscribeQueryResult({
            queryCacheKey,
            requestId
          }));
        },
        updateSubscriptionOptions(options) {
          statePromise.subscriptionOptions = options;
          dispatch(updateSubscriptionOptions({
            endpointName,
            requestId,
            queryCacheKey,
            options
          }));
        }
      });
      if (!runningQuery &amp;&amp; !skippedSynchronously &amp;&amp; !forceQueryFn) {
        const runningQueries = getRunningQueries(dispatch);
        runningQueries.set(queryCacheKey, statePromise);
        statePromise.then(() =&gt; {
          runningQueries.delete(queryCacheKey);
        });
      }
      return statePromise;
    };
    return queryAction;
  }
  function buildInitiateQuery(endpointName, endpointDefinition) {
    const queryAction = buildInitiateAnyQuery(endpointName, endpointDefinition);
    return queryAction;
  }
  function buildInitiateInfiniteQuery(endpointName, endpointDefinition) {
    const infiniteQueryAction = buildInitiateAnyQuery(endpointName, endpointDefinition);
    return infiniteQueryAction;
  }
  function buildInitiateMutation(endpointName) {
    return (arg, {
      track = true,
      fixedCacheKey
    } = {}) =&gt; (dispatch, getState) =&gt; {
      const thunk = mutationThunk({
        type: &quot;mutation&quot;,
        endpointName,
        originalArgs: arg,
        track,
        fixedCacheKey
      });
      const thunkResult = dispatch(thunk);
      const {
        requestId,
        abort,
        unwrap
      } = thunkResult;
      const returnValuePromise = asSafePromise(thunkResult.unwrap().then((data) =&gt; ({
        data
      })), (error) =&gt; ({
        error
      }));
      const reset = () =&gt; {
        dispatch(removeMutationResult({
          requestId,
          fixedCacheKey
        }));
      };
      const ret = Object.assign(returnValuePromise, {
        arg: thunkResult.arg,
        requestId,
        abort,
        unwrap,
        reset
      });
      const runningMutations = getRunningMutations(dispatch);
      runningMutations.set(requestId, ret);
      ret.then(() =&gt; {
        runningMutations.delete(requestId);
      });
      if (fixedCacheKey) {
        runningMutations.set(fixedCacheKey, ret);
        ret.then(() =&gt; {
          if (runningMutations.get(fixedCacheKey) === ret) {
            runningMutations.delete(fixedCacheKey);
          }
        });
      }
      return ret;
    };
  }
}
var NamedSchemaError = class extends SchemaError {
  constructor(issues, value, schemaName, _bqMeta) {
    super(issues);
    this.value = value;
    this.schemaName = schemaName;
    this._bqMeta = _bqMeta;
  }
};
var shouldSkip = (skipSchemaValidation, schemaName) =&gt; Array.isArray(skipSchemaValidation) ? skipSchemaValidation.includes(schemaName) : !!skipSchemaValidation;
async function parseWithSchema(schema, data, schemaName, bqMeta) {
  const result = await schema[&quot;~standard&quot;].validate(data);
  if (result.issues) {
    throw new NamedSchemaError(result.issues, data, schemaName, bqMeta);
  }
  return result.value;
}
function defaultTransformResponse(baseQueryReturnValue) {
  return baseQueryReturnValue;
}
var addShouldAutoBatch = (arg = {}) =&gt; {
  return {
    ...arg,
    [SHOULD_AUTOBATCH]: true
  };
};
function buildThunks({
  reducerPath,
  baseQuery,
  context: {
    endpointDefinitions
  },
  serializeQueryArgs,
  api,
  assertTagType,
  selectors,
  onSchemaFailure,
  catchSchemaFailure: globalCatchSchemaFailure,
  skipSchemaValidation: globalSkipSchemaValidation
}) {
  const patchQueryData = (endpointName, arg, patches, updateProvided) =&gt; (dispatch, getState) =&gt; {
    const endpointDefinition = endpointDefinitions[endpointName];
    const queryCacheKey = serializeQueryArgs({
      queryArgs: arg,
      endpointDefinition,
      endpointName
    });
    dispatch(api.internalActions.queryResultPatched({
      queryCacheKey,
      patches
    }));
    if (!updateProvided) {
      return;
    }
    const newValue = api.endpoints[endpointName].select(arg)(
      // Work around TS 4.1 mismatch
      getState()
    );
    const providedTags = calculateProvidedBy(endpointDefinition.providesTags, newValue.data, void 0, arg, {}, assertTagType);
    dispatch(api.internalActions.updateProvidedBy([{
      queryCacheKey,
      providedTags
    }]));
  };
  function addToStart(items, item, max = 0) {
    const newItems = [item, ...items];
    return max &amp;&amp; newItems.length &gt; max ? newItems.slice(0, -1) : newItems;
  }
  function addToEnd(items, item, max = 0) {
    const newItems = [...items, item];
    return max &amp;&amp; newItems.length &gt; max ? newItems.slice(1) : newItems;
  }
  const updateQueryData = (endpointName, arg, updateRecipe, updateProvided = true) =&gt; (dispatch, getState) =&gt; {
    const endpointDefinition = api.endpoints[endpointName];
    const currentState = endpointDefinition.select(arg)(
      // Work around TS 4.1 mismatch
      getState()
    );
    const ret = {
      patches: [],
      inversePatches: [],
      undo: () =&gt; dispatch(api.util.patchQueryData(endpointName, arg, ret.inversePatches, updateProvided))
    };
    if (currentState.status === STATUS_UNINITIALIZED) {
      return ret;
    }
    let newValue;
    if (&quot;data&quot; in currentState) {
      if (isDraftable(currentState.data)) {
        const [value, patches, inversePatches] = produceWithPatches(currentState.data, updateRecipe);
        ret.patches.push(...patches);
        ret.inversePatches.push(...inversePatches);
        newValue = value;
      } else {
        newValue = updateRecipe(currentState.data);
        ret.patches.push({
          op: &quot;replace&quot;,
          path: [],
          value: newValue
        });
        ret.inversePatches.push({
          op: &quot;replace&quot;,
          path: [],
          value: currentState.data
        });
      }
    }
    if (ret.patches.length === 0) {
      return ret;
    }
    dispatch(api.util.patchQueryData(endpointName, arg, ret.patches, updateProvided));
    return ret;
  };
  const upsertQueryData = (endpointName, arg, value) =&gt; (dispatch) =&gt; {
    const res = dispatch(api.endpoints[endpointName].initiate(arg, {
      subscribe: false,
      forceRefetch: true,
      [forceQueryFnSymbol]: () =&gt; ({
        data: value
      })
    }));
    return res;
  };
  const getTransformCallbackForEndpoint = (endpointDefinition, transformFieldName) =&gt; {
    return endpointDefinition.query &amp;&amp; endpointDefinition[transformFieldName] ? endpointDefinition[transformFieldName] : defaultTransformResponse;
  };
  const executeEndpoint = async (arg, {
    signal,
    abort,
    rejectWithValue,
    fulfillWithValue,
    dispatch,
    getState,
    extra
  }) =&gt; {
    const endpointDefinition = endpointDefinitions[arg.endpointName];
    const {
      metaSchema,
      skipSchemaValidation = globalSkipSchemaValidation
    } = endpointDefinition;
    const isQuery = arg.type === ENDPOINT_QUERY;
    try {
      let transformResponse = defaultTransformResponse;
      const baseQueryApi = {
        signal,
        abort,
        dispatch,
        getState,
        extra,
        endpoint: arg.endpointName,
        type: arg.type,
        forced: isQuery ? isForcedQuery(arg, getState()) : void 0,
        queryCacheKey: isQuery ? arg.queryCacheKey : void 0
      };
      const forceQueryFn = isQuery ? arg[forceQueryFnSymbol] : void 0;
      let finalQueryReturnValue;
      const fetchPage = async (data, param, maxPages, previous) =&gt; {
        if (param == null &amp;&amp; data.pages.length) {
          return Promise.resolve({
            data
          });
        }
        const finalQueryArg = {
          queryArg: arg.originalArgs,
          pageParam: param
        };
        const pageResponse = await executeRequest(finalQueryArg);
        const addTo = previous ? addToStart : addToEnd;
        return {
          data: {
            pages: addTo(data.pages, pageResponse.data, maxPages),
            pageParams: addTo(data.pageParams, param, maxPages)
          },
          meta: pageResponse.meta
        };
      };
      async function executeRequest(finalQueryArg) {
        let result;
        const {
          extraOptions,
          argSchema,
          rawResponseSchema,
          responseSchema
        } = endpointDefinition;
        if (argSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;arg&quot;)) {
          finalQueryArg = await parseWithSchema(
            argSchema,
            finalQueryArg,
            &quot;argSchema&quot;,
            {}
            // we don&#39;t have a meta yet, so we can&#39;t pass it
          );
        }
        if (forceQueryFn) {
          result = forceQueryFn();
        } else if (endpointDefinition.query) {
          transformResponse = getTransformCallbackForEndpoint(endpointDefinition, &quot;transformResponse&quot;);
          result = await baseQuery(endpointDefinition.query(finalQueryArg), baseQueryApi, extraOptions);
        } else {
          result = await endpointDefinition.queryFn(finalQueryArg, baseQueryApi, extraOptions, (arg2) =&gt; baseQuery(arg2, baseQueryApi, extraOptions));
        }
        if (typeof process !== &quot;undefined&quot; &amp;&amp; false) ;
        if (result.error) throw new HandledError(result.error, result.meta);
        let {
          data
        } = result;
        if (rawResponseSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;rawResponse&quot;)) {
          data = await parseWithSchema(rawResponseSchema, result.data, &quot;rawResponseSchema&quot;, result.meta);
        }
        let transformedResponse = await transformResponse(data, result.meta, finalQueryArg);
        if (responseSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;response&quot;)) {
          transformedResponse = await parseWithSchema(responseSchema, transformedResponse, &quot;responseSchema&quot;, result.meta);
        }
        return {
          ...result,
          data: transformedResponse
        };
      }
      if (isQuery &amp;&amp; &quot;infiniteQueryOptions&quot; in endpointDefinition) {
        const {
          infiniteQueryOptions
        } = endpointDefinition;
        const {
          maxPages = Infinity
        } = infiniteQueryOptions;
        let result;
        const blankData = {
          pages: [],
          pageParams: []
        };
        const cachedData = selectors.selectQueryEntry(getState(), arg.queryCacheKey)?.data;
        const isForcedQueryNeedingRefetch = (
          // arg.forceRefetch
          isForcedQuery(arg, getState()) &amp;&amp; !arg.direction
        );
        const existingData = isForcedQueryNeedingRefetch || !cachedData ? blankData : cachedData;
        if (&quot;direction&quot; in arg &amp;&amp; arg.direction &amp;&amp; existingData.pages.length) {
          const previous = arg.direction === &quot;backward&quot;;
          const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
          const param = pageParamFn(infiniteQueryOptions, existingData, arg.originalArgs);
          result = await fetchPage(existingData, param, maxPages, previous);
        } else {
          const {
            initialPageParam = infiniteQueryOptions.initialPageParam
          } = arg;
          const cachedPageParams = cachedData?.pageParams ?? [];
          const firstPageParam = cachedPageParams[0] ?? initialPageParam;
          const totalPages = cachedPageParams.length;
          result = await fetchPage(existingData, firstPageParam, maxPages);
          if (forceQueryFn) {
            result = {
              data: result.data.pages[0]
            };
          }
          for (let i = 1; i &lt; totalPages; i++) {
            const param = getNextPageParam(infiniteQueryOptions, result.data, arg.originalArgs);
            result = await fetchPage(result.data, param, maxPages);
          }
        }
        finalQueryReturnValue = result;
      } else {
        finalQueryReturnValue = await executeRequest(arg.originalArgs);
      }
      if (metaSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;meta&quot;) &amp;&amp; finalQueryReturnValue.meta) {
        finalQueryReturnValue.meta = await parseWithSchema(metaSchema, finalQueryReturnValue.meta, &quot;metaSchema&quot;, finalQueryReturnValue.meta);
      }
      return fulfillWithValue(finalQueryReturnValue.data, addShouldAutoBatch({
        fulfilledTimeStamp: Date.now(),
        baseQueryMeta: finalQueryReturnValue.meta
      }));
    } catch (error) {
      let caughtError = error;
      if (caughtError instanceof HandledError) {
        let transformErrorResponse = getTransformCallbackForEndpoint(endpointDefinition, &quot;transformErrorResponse&quot;);
        const {
          rawErrorResponseSchema,
          errorResponseSchema
        } = endpointDefinition;
        let {
          value,
          meta
        } = caughtError;
        try {
          if (rawErrorResponseSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;rawErrorResponse&quot;)) {
            value = await parseWithSchema(rawErrorResponseSchema, value, &quot;rawErrorResponseSchema&quot;, meta);
          }
          if (metaSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;meta&quot;)) {
            meta = await parseWithSchema(metaSchema, meta, &quot;metaSchema&quot;, meta);
          }
          let transformedErrorResponse = await transformErrorResponse(value, meta, arg.originalArgs);
          if (errorResponseSchema &amp;&amp; !shouldSkip(skipSchemaValidation, &quot;errorResponse&quot;)) {
            transformedErrorResponse = await parseWithSchema(errorResponseSchema, transformedErrorResponse, &quot;errorResponseSchema&quot;, meta);
          }
          return rejectWithValue(transformedErrorResponse, addShouldAutoBatch({
            baseQueryMeta: meta
          }));
        } catch (e) {
          caughtError = e;
        }
      }
      try {
        if (caughtError instanceof NamedSchemaError) {
          const info = {
            endpoint: arg.endpointName,
            arg: arg.originalArgs,
            type: arg.type,
            queryCacheKey: isQuery ? arg.queryCacheKey : void 0
          };
          endpointDefinition.onSchemaFailure?.(caughtError, info);
          onSchemaFailure?.(caughtError, info);
          const {
            catchSchemaFailure = globalCatchSchemaFailure
          } = endpointDefinition;
          if (catchSchemaFailure) {
            return rejectWithValue(catchSchemaFailure(caughtError, info), addShouldAutoBatch({
              baseQueryMeta: caughtError._bqMeta
            }));
          }
        }
      } catch (e) {
        caughtError = e;
      }
      {
        console.error(caughtError);
      }
      throw caughtError;
    }
  };
  function isForcedQuery(arg, state) {
    const requestState = selectors.selectQueryEntry(state, arg.queryCacheKey);
    const baseFetchOnMountOrArgChange = selectors.selectConfig(state).refetchOnMountOrArgChange;
    const fulfilledVal = requestState?.fulfilledTimeStamp;
    const refetchVal = arg.forceRefetch ?? (arg.subscribe &amp;&amp; baseFetchOnMountOrArgChange);
    if (refetchVal) {
      return refetchVal === true || (Number(/* @__PURE__ */ new Date()) - Number(fulfilledVal)) / 1e3 &gt;= refetchVal;
    }
    return false;
  }
  const createQueryThunk = () =&gt; {
    const generatedQueryThunk = createAsyncThunk(`${reducerPath}/executeQuery`, executeEndpoint, {
      getPendingMeta({
        arg
      }) {
        const endpointDefinition = endpointDefinitions[arg.endpointName];
        return addShouldAutoBatch({
          startedTimeStamp: Date.now(),
          ...isInfiniteQueryDefinition(endpointDefinition) ? {
            direction: arg.direction
          } : {}
        });
      },
      condition(queryThunkArg, {
        getState
      }) {
        const state = getState();
        const requestState = selectors.selectQueryEntry(state, queryThunkArg.queryCacheKey);
        const fulfilledVal = requestState?.fulfilledTimeStamp;
        const currentArg = queryThunkArg.originalArgs;
        const previousArg = requestState?.originalArgs;
        const endpointDefinition = endpointDefinitions[queryThunkArg.endpointName];
        const direction = queryThunkArg.direction;
        if (isUpsertQuery(queryThunkArg)) {
          return true;
        }
        if (requestState?.status === &quot;pending&quot;) {
          return false;
        }
        if (isForcedQuery(queryThunkArg, state)) {
          return true;
        }
        if (isQueryDefinition(endpointDefinition) &amp;&amp; endpointDefinition?.forceRefetch?.({
          currentArg,
          previousArg,
          endpointState: requestState,
          state
        })) {
          return true;
        }
        if (fulfilledVal &amp;&amp; !direction) {
          return false;
        }
        return true;
      },
      dispatchConditionRejection: true
    });
    return generatedQueryThunk;
  };
  const queryThunk = createQueryThunk();
  const infiniteQueryThunk = createQueryThunk();
  const mutationThunk = createAsyncThunk(`${reducerPath}/executeMutation`, executeEndpoint, {
    getPendingMeta() {
      return addShouldAutoBatch({
        startedTimeStamp: Date.now()
      });
    }
  });
  const hasTheForce = (options) =&gt; &quot;force&quot; in options;
  const hasMaxAge = (options) =&gt; &quot;ifOlderThan&quot; in options;
  const prefetch = (endpointName, arg, options = {}) =&gt; (dispatch, getState) =&gt; {
    const force = hasTheForce(options) &amp;&amp; options.force;
    const maxAge = hasMaxAge(options) &amp;&amp; options.ifOlderThan;
    const queryAction = (force2 = true) =&gt; {
      const options2 = {
        forceRefetch: force2,
        subscribe: false
      };
      return api.endpoints[endpointName].initiate(arg, options2);
    };
    const latestStateValue = api.endpoints[endpointName].select(arg)(getState());
    if (force) {
      dispatch(queryAction());
    } else if (maxAge) {
      const lastFulfilledTs = latestStateValue?.fulfilledTimeStamp;
      if (!lastFulfilledTs) {
        dispatch(queryAction());
        return;
      }
      const shouldRetrigger = (Number(/* @__PURE__ */ new Date()) - Number(new Date(lastFulfilledTs))) / 1e3 &gt;= maxAge;
      if (shouldRetrigger) {
        dispatch(queryAction());
      }
    } else {
      dispatch(queryAction(false));
    }
  };
  function matchesEndpoint(endpointName) {
    return (action) =&gt; action?.meta?.arg?.endpointName === endpointName;
  }
  function buildMatchThunkActions(thunk, endpointName) {
    return {
      matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)),
      matchFulfilled: isAllOf(isFulfilled(thunk), matchesEndpoint(endpointName)),
      matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName))
    };
  }
  return {
    queryThunk,
    mutationThunk,
    infiniteQueryThunk,
    prefetch,
    updateQueryData,
    upsertQueryData,
    patchQueryData,
    buildMatchThunkActions
  };
}
function getNextPageParam(options, {
  pages,
  pageParams
}, queryArg) {
  const lastIndex = pages.length - 1;
  return options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams, queryArg);
}
function getPreviousPageParam(options, {
  pages,
  pageParams
}, queryArg) {
  return options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams, queryArg);
}
function calculateProvidedByThunk(action, type, endpointDefinitions, assertTagType) {
  return calculateProvidedBy(endpointDefinitions[action.meta.arg.endpointName][type], isFulfilled(action) ? action.payload : void 0, isRejectedWithValue(action) ? action.payload : void 0, action.meta.arg.originalArgs, &quot;baseQueryMeta&quot; in action.meta ? action.meta.baseQueryMeta : void 0, assertTagType);
}
function getCurrent(value) {
  return isDraft(value) ? current(value) : value;
}
function updateQuerySubstateIfExists(state, queryCacheKey, update) {
  const substate = state[queryCacheKey];
  if (substate) {
    update(substate);
  }
}
function getMutationCacheKey(id) {
  return (&quot;arg&quot; in id ? id.arg.fixedCacheKey : id.fixedCacheKey) ?? id.requestId;
}
function updateMutationSubstateIfExists(state, id, update) {
  const substate = state[getMutationCacheKey(id)];
  if (substate) {
    update(substate);
  }
}
var initialState = {};
function buildSlice({
  reducerPath,
  queryThunk,
  mutationThunk,
  serializeQueryArgs,
  context: {
    endpointDefinitions: definitions,
    apiUid,
    extractRehydrationInfo,
    hasRehydrationInfo
  },
  assertTagType,
  config
}) {
  const resetApiState = createAction(`${reducerPath}/resetApiState`);
  function writePendingCacheEntry(draft, arg, upserting, meta) {
    draft[arg.queryCacheKey] ??= {
      status: STATUS_UNINITIALIZED,
      endpointName: arg.endpointName
    };
    updateQuerySubstateIfExists(draft, arg.queryCacheKey, (substate) =&gt; {
      substate.status = STATUS_PENDING;
      substate.requestId = upserting &amp;&amp; substate.requestId ? (
        // for `upsertQuery` **updates**, keep the current `requestId`
        substate.requestId
      ) : (
        // for normal queries or `upsertQuery` **inserts** always update the `requestId`
        meta.requestId
      );
      if (arg.originalArgs !== void 0) {
        substate.originalArgs = arg.originalArgs;
      }
      substate.startedTimeStamp = meta.startedTimeStamp;
      const endpointDefinition = definitions[meta.arg.endpointName];
      if (isInfiniteQueryDefinition(endpointDefinition) &amp;&amp; &quot;direction&quot; in arg) {
        substate.direction = arg.direction;
      }
    });
  }
  function writeFulfilledCacheEntry(draft, meta, payload, upserting) {
    updateQuerySubstateIfExists(draft, meta.arg.queryCacheKey, (substate) =&gt; {
      if (substate.requestId !== meta.requestId &amp;&amp; !upserting) return;
      const {
        merge
      } = definitions[meta.arg.endpointName];
      substate.status = STATUS_FULFILLED;
      if (merge) {
        if (substate.data !== void 0) {
          const {
            fulfilledTimeStamp,
            arg,
            baseQueryMeta,
            requestId
          } = meta;
          let newData = produce(substate.data, (draftSubstateData) =&gt; {
            return merge(draftSubstateData, payload, {
              arg: arg.originalArgs,
              baseQueryMeta,
              fulfilledTimeStamp,
              requestId
            });
          });
          substate.data = newData;
        } else {
          substate.data = payload;
        }
      } else {
        substate.data = definitions[meta.arg.endpointName].structuralSharing ?? true ? copyWithStructuralSharing(isDraft(substate.data) ? original(substate.data) : substate.data, payload) : payload;
      }
      delete substate.error;
      substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;
    });
  }
  const querySlice = createSlice({
    name: `${reducerPath}/queries`,
    initialState,
    reducers: {
      removeQueryResult: {
        reducer(draft, {
          payload: {
            queryCacheKey
          }
        }) {
          delete draft[queryCacheKey];
        },
        prepare: prepareAutoBatched()
      },
      cacheEntriesUpserted: {
        reducer(draft, action) {
          for (const entry of action.payload) {
            const {
              queryDescription: arg,
              value
            } = entry;
            writePendingCacheEntry(draft, arg, true, {
              arg,
              requestId: action.meta.requestId,
              startedTimeStamp: action.meta.timestamp
            });
            writeFulfilledCacheEntry(
              draft,
              {
                arg,
                requestId: action.meta.requestId,
                fulfilledTimeStamp: action.meta.timestamp,
                baseQueryMeta: {}
              },
              value,
              // We know we&#39;re upserting here
              true
            );
          }
        },
        prepare: (payload) =&gt; {
          const queryDescriptions = payload.map((entry) =&gt; {
            const {
              endpointName,
              arg,
              value
            } = entry;
            const endpointDefinition = definitions[endpointName];
            const queryDescription = {
              type: ENDPOINT_QUERY,
              endpointName,
              originalArgs: entry.arg,
              queryCacheKey: serializeQueryArgs({
                queryArgs: arg,
                endpointDefinition,
                endpointName
              })
            };
            return {
              queryDescription,
              value
            };
          });
          const result = {
            payload: queryDescriptions,
            meta: {
              [SHOULD_AUTOBATCH]: true,
              requestId: nanoid(),
              timestamp: Date.now()
            }
          };
          return result;
        }
      },
      queryResultPatched: {
        reducer(draft, {
          payload: {
            queryCacheKey,
            patches
          }
        }) {
          updateQuerySubstateIfExists(draft, queryCacheKey, (substate) =&gt; {
            substate.data = applyPatches(substate.data, patches.concat());
          });
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(queryThunk.pending, (draft, {
        meta,
        meta: {
          arg
        }
      }) =&gt; {
        const upserting = isUpsertQuery(arg);
        writePendingCacheEntry(draft, arg, upserting, meta);
      }).addCase(queryThunk.fulfilled, (draft, {
        meta,
        payload
      }) =&gt; {
        const upserting = isUpsertQuery(meta.arg);
        writeFulfilledCacheEntry(draft, meta, payload, upserting);
      }).addCase(queryThunk.rejected, (draft, {
        meta: {
          condition,
          arg,
          requestId
        },
        error,
        payload
      }) =&gt; {
        updateQuerySubstateIfExists(draft, arg.queryCacheKey, (substate) =&gt; {
          if (condition) ; else {
            if (substate.requestId !== requestId) return;
            substate.status = STATUS_REJECTED;
            substate.error = payload ?? error;
          }
        });
      }).addMatcher(hasRehydrationInfo, (draft, action) =&gt; {
        const {
          queries
        } = extractRehydrationInfo(action);
        for (const [key, entry] of Object.entries(queries)) {
          if (
            // do not rehydrate entries that were currently in flight.
            entry?.status === STATUS_FULFILLED || entry?.status === STATUS_REJECTED
          ) {
            draft[key] = entry;
          }
        }
      });
    }
  });
  const mutationSlice = createSlice({
    name: `${reducerPath}/mutations`,
    initialState,
    reducers: {
      removeMutationResult: {
        reducer(draft, {
          payload
        }) {
          const cacheKey = getMutationCacheKey(payload);
          if (cacheKey in draft) {
            delete draft[cacheKey];
          }
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(mutationThunk.pending, (draft, {
        meta,
        meta: {
          requestId,
          arg,
          startedTimeStamp
        }
      }) =&gt; {
        if (!arg.track) return;
        draft[getMutationCacheKey(meta)] = {
          requestId,
          status: STATUS_PENDING,
          endpointName: arg.endpointName,
          startedTimeStamp
        };
      }).addCase(mutationThunk.fulfilled, (draft, {
        payload,
        meta
      }) =&gt; {
        if (!meta.arg.track) return;
        updateMutationSubstateIfExists(draft, meta, (substate) =&gt; {
          if (substate.requestId !== meta.requestId) return;
          substate.status = STATUS_FULFILLED;
          substate.data = payload;
          substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;
        });
      }).addCase(mutationThunk.rejected, (draft, {
        payload,
        error,
        meta
      }) =&gt; {
        if (!meta.arg.track) return;
        updateMutationSubstateIfExists(draft, meta, (substate) =&gt; {
          if (substate.requestId !== meta.requestId) return;
          substate.status = STATUS_REJECTED;
          substate.error = payload ?? error;
        });
      }).addMatcher(hasRehydrationInfo, (draft, action) =&gt; {
        const {
          mutations
        } = extractRehydrationInfo(action);
        for (const [key, entry] of Object.entries(mutations)) {
          if (
            // do not rehydrate entries that were currently in flight.
            (entry?.status === STATUS_FULFILLED || entry?.status === STATUS_REJECTED) &amp;&amp; // only rehydrate endpoints that were persisted using a `fixedCacheKey`
            key !== entry?.requestId
          ) {
            draft[key] = entry;
          }
        }
      });
    }
  });
  const initialInvalidationState = {
    tags: {},
    keys: {}
  };
  const invalidationSlice = createSlice({
    name: `${reducerPath}/invalidation`,
    initialState: initialInvalidationState,
    reducers: {
      updateProvidedBy: {
        reducer(draft, action) {
          for (const {
            queryCacheKey,
            providedTags
          } of action.payload) {
            removeCacheKeyFromTags(draft, queryCacheKey);
            for (const {
              type,
              id
            } of providedTags) {
              const subscribedQueries = (draft.tags[type] ??= {})[id || &quot;__internal_without_id&quot;] ??= [];
              const alreadySubscribed = subscribedQueries.includes(queryCacheKey);
              if (!alreadySubscribed) {
                subscribedQueries.push(queryCacheKey);
              }
            }
            draft.keys[queryCacheKey] = providedTags;
          }
        },
        prepare: prepareAutoBatched()
      }
    },
    extraReducers(builder) {
      builder.addCase(querySlice.actions.removeQueryResult, (draft, {
        payload: {
          queryCacheKey
        }
      }) =&gt; {
        removeCacheKeyFromTags(draft, queryCacheKey);
      }).addMatcher(hasRehydrationInfo, (draft, action) =&gt; {
        const {
          provided
        } = extractRehydrationInfo(action);
        for (const [type, incomingTags] of Object.entries(provided.tags ?? {})) {
          for (const [id, cacheKeys] of Object.entries(incomingTags)) {
            const subscribedQueries = (draft.tags[type] ??= {})[id || &quot;__internal_without_id&quot;] ??= [];
            for (const queryCacheKey of cacheKeys) {
              const alreadySubscribed = subscribedQueries.includes(queryCacheKey);
              if (!alreadySubscribed) {
                subscribedQueries.push(queryCacheKey);
              }
              draft.keys[queryCacheKey] = provided.keys[queryCacheKey];
            }
          }
        }
      }).addMatcher(isAnyOf(isFulfilled(queryThunk), isRejectedWithValue(queryThunk)), (draft, action) =&gt; {
        writeProvidedTagsForQueries(draft, [action]);
      }).addMatcher(querySlice.actions.cacheEntriesUpserted.match, (draft, action) =&gt; {
        const mockActions = action.payload.map(({
          queryDescription,
          value
        }) =&gt; {
          return {
            type: &quot;UNKNOWN&quot;,
            payload: value,
            meta: {
              requestStatus: &quot;fulfilled&quot;,
              requestId: &quot;UNKNOWN&quot;,
              arg: queryDescription
            }
          };
        });
        writeProvidedTagsForQueries(draft, mockActions);
      });
    }
  });
  function removeCacheKeyFromTags(draft, queryCacheKey) {
    const existingTags = getCurrent(draft.keys[queryCacheKey] ?? []);
    for (const tag of existingTags) {
      const tagType = tag.type;
      const tagId = tag.id ?? &quot;__internal_without_id&quot;;
      const tagSubscriptions = draft.tags[tagType]?.[tagId];
      if (tagSubscriptions) {
        draft.tags[tagType][tagId] = getCurrent(tagSubscriptions).filter((qc) =&gt; qc !== queryCacheKey);
      }
    }
    delete draft.keys[queryCacheKey];
  }
  function writeProvidedTagsForQueries(draft, actions3) {
    const providedByEntries = actions3.map((action) =&gt; {
      const providedTags = calculateProvidedByThunk(action, &quot;providesTags&quot;, definitions, assertTagType);
      const {
        queryCacheKey
      } = action.meta.arg;
      return {
        queryCacheKey,
        providedTags
      };
    });
    invalidationSlice.caseReducers.updateProvidedBy(draft, invalidationSlice.actions.updateProvidedBy(providedByEntries));
  }
  const subscriptionSlice = createSlice({
    name: `${reducerPath}/subscriptions`,
    initialState,
    reducers: {
      updateSubscriptionOptions(d, a) {
      },
      unsubscribeQueryResult(d, a) {
      },
      internal_getRTKQSubscriptions() {
      }
    }
  });
  const internalSubscriptionsSlice = createSlice({
    name: `${reducerPath}/internalSubscriptions`,
    initialState,
    reducers: {
      subscriptionsUpdated: {
        reducer(state, action) {
          return applyPatches(state, action.payload);
        },
        prepare: prepareAutoBatched()
      }
    }
  });
  const configSlice = createSlice({
    name: `${reducerPath}/config`,
    initialState: {
      online: isOnline(),
      focused: isDocumentVisible(),
      middlewareRegistered: false,
      ...config
    },
    reducers: {
      middlewareRegistered(state, {
        payload
      }) {
        state.middlewareRegistered = state.middlewareRegistered === &quot;conflict&quot; || apiUid !== payload ? &quot;conflict&quot; : true;
      }
    },
    extraReducers: (builder) =&gt; {
      builder.addCase(onOnline, (state) =&gt; {
        state.online = true;
      }).addCase(onOffline, (state) =&gt; {
        state.online = false;
      }).addCase(onFocus, (state) =&gt; {
        state.focused = true;
      }).addCase(onFocusLost, (state) =&gt; {
        state.focused = false;
      }).addMatcher(hasRehydrationInfo, (draft) =&gt; ({
        ...draft
      }));
    }
  });
  const combinedReducer = combineReducers({
    queries: querySlice.reducer,
    mutations: mutationSlice.reducer,
    provided: invalidationSlice.reducer,
    subscriptions: internalSubscriptionsSlice.reducer,
    config: configSlice.reducer
  });
  const reducer = (state, action) =&gt; combinedReducer(resetApiState.match(action) ? void 0 : state, action);
  const actions2 = {
    ...configSlice.actions,
    ...querySlice.actions,
    ...subscriptionSlice.actions,
    ...internalSubscriptionsSlice.actions,
    ...mutationSlice.actions,
    ...invalidationSlice.actions,
    resetApiState
  };
  return {
    reducer,
    actions: actions2
  };
}
var skipToken = /* @__PURE__ */ Symbol.for(&quot;RTKQ/skipToken&quot;);
var initialSubState = {
  status: STATUS_UNINITIALIZED
};
var defaultQuerySubState = /* @__PURE__ */ produce(initialSubState, () =&gt; {
});
var defaultMutationSubState = /* @__PURE__ */ produce(initialSubState, () =&gt; {
});
function buildSelectors({
  serializeQueryArgs,
  reducerPath,
  createSelector: createSelector2
}) {
  const selectSkippedQuery = (state) =&gt; defaultQuerySubState;
  const selectSkippedMutation = (state) =&gt; defaultMutationSubState;
  return {
    buildQuerySelector,
    buildInfiniteQuerySelector,
    buildMutationSelector,
    selectInvalidatedBy,
    selectCachedArgsForQuery,
    selectApiState,
    selectQueries,
    selectMutations,
    selectQueryEntry,
    selectConfig
  };
  function withRequestFlags(substate) {
    return {
      ...substate,
      ...getRequestStatusFlags(substate.status)
    };
  }
  function selectApiState(rootState) {
    const state = rootState[reducerPath];
    return state;
  }
  function selectQueries(rootState) {
    return selectApiState(rootState)?.queries;
  }
  function selectQueryEntry(rootState, cacheKey) {
    return selectQueries(rootState)?.[cacheKey];
  }
  function selectMutations(rootState) {
    return selectApiState(rootState)?.mutations;
  }
  function selectConfig(rootState) {
    return selectApiState(rootState)?.config;
  }
  function buildAnyQuerySelector(endpointName, endpointDefinition, combiner) {
    return (queryArgs) =&gt; {
      if (queryArgs === skipToken) {
        return createSelector2(selectSkippedQuery, combiner);
      }
      const serializedArgs = serializeQueryArgs({
        queryArgs,
        endpointDefinition,
        endpointName
      });
      const selectQuerySubstate = (state) =&gt; selectQueryEntry(state, serializedArgs) ?? defaultQuerySubState;
      return createSelector2(selectQuerySubstate, combiner);
    };
  }
  function buildQuerySelector(endpointName, endpointDefinition) {
    return buildAnyQuerySelector(endpointName, endpointDefinition, withRequestFlags);
  }
  function buildInfiniteQuerySelector(endpointName, endpointDefinition) {
    const {
      infiniteQueryOptions
    } = endpointDefinition;
    function withInfiniteQueryResultFlags(substate) {
      const stateWithRequestFlags = {
        ...substate,
        ...getRequestStatusFlags(substate.status)
      };
      const {
        isLoading,
        isError,
        direction
      } = stateWithRequestFlags;
      const isForward = direction === &quot;forward&quot;;
      const isBackward = direction === &quot;backward&quot;;
      return {
        ...stateWithRequestFlags,
        hasNextPage: getHasNextPage(infiniteQueryOptions, stateWithRequestFlags.data, stateWithRequestFlags.originalArgs),
        hasPreviousPage: getHasPreviousPage(infiniteQueryOptions, stateWithRequestFlags.data, stateWithRequestFlags.originalArgs),
        isFetchingNextPage: isLoading &amp;&amp; isForward,
        isFetchingPreviousPage: isLoading &amp;&amp; isBackward,
        isFetchNextPageError: isError &amp;&amp; isForward,
        isFetchPreviousPageError: isError &amp;&amp; isBackward
      };
    }
    return buildAnyQuerySelector(endpointName, endpointDefinition, withInfiniteQueryResultFlags);
  }
  function buildMutationSelector() {
    return (id) =&gt; {
      let mutationId;
      if (typeof id === &quot;object&quot;) {
        mutationId = getMutationCacheKey(id) ?? skipToken;
      } else {
        mutationId = id;
      }
      const selectMutationSubstate = (state) =&gt; selectApiState(state)?.mutations?.[mutationId] ?? defaultMutationSubState;
      const finalSelectMutationSubstate = mutationId === skipToken ? selectSkippedMutation : selectMutationSubstate;
      return createSelector2(finalSelectMutationSubstate, withRequestFlags);
    };
  }
  function selectInvalidatedBy(state, tags) {
    const apiState = state[reducerPath];
    const toInvalidate = /* @__PURE__ */ new Set();
    const finalTags = filterMap(tags, isNotNullish, expandTagDescription);
    for (const tag of finalTags) {
      const provided = apiState.provided.tags[tag.type];
      if (!provided) {
        continue;
      }
      let invalidateSubscriptions = (tag.id !== void 0 ? (
        // id given: invalidate all queries that provide this type &amp; id
        provided[tag.id]
      ) : (
        // no id: invalidate all queries that provide this type
        Object.values(provided).flat()
      )) ?? [];
      for (const invalidate of invalidateSubscriptions) {
        toInvalidate.add(invalidate);
      }
    }
    return Array.from(toInvalidate.values()).flatMap((queryCacheKey) =&gt; {
      const querySubState = apiState.queries[queryCacheKey];
      return querySubState ? {
        queryCacheKey,
        endpointName: querySubState.endpointName,
        originalArgs: querySubState.originalArgs
      } : [];
    });
  }
  function selectCachedArgsForQuery(state, queryName) {
    return filterMap(Object.values(selectQueries(state)), (entry) =&gt; entry?.endpointName === queryName &amp;&amp; entry.status !== STATUS_UNINITIALIZED, (entry) =&gt; entry.originalArgs);
  }
  function getHasNextPage(options, data, queryArg) {
    if (!data) return false;
    return getNextPageParam(options, data, queryArg) != null;
  }
  function getHasPreviousPage(options, data, queryArg) {
    if (!data || !options.getPreviousPageParam) return false;
    return getPreviousPageParam(options, data, queryArg) != null;
  }
}
var cache = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0;
var defaultSerializeQueryArgs = ({
  endpointName,
  queryArgs
}) =&gt; {
  let serialized = &quot;&quot;;
  const cached = cache?.get(queryArgs);
  if (typeof cached === &quot;string&quot;) {
    serialized = cached;
  } else {
    const stringified = JSON.stringify(queryArgs, (key, value) =&gt; {
      value = typeof value === &quot;bigint&quot; ? {
        $bigint: value.toString()
      } : value;
      value = isPlainObject$1(value) ? Object.keys(value).sort().reduce((acc, key2) =&gt; {
        acc[key2] = value[key2];
        return acc;
      }, {}) : value;
      return value;
    });
    if (isPlainObject$1(queryArgs)) {
      cache?.set(queryArgs, stringified);
    }
    serialized = stringified;
  }
  return `${endpointName}(${serialized})`;
};
function buildCreateApi(...modules) {
  return function baseCreateApi(options) {
    const extractRehydrationInfo = weakMapMemoize((action) =&gt; options.extractRehydrationInfo?.(action, {
      reducerPath: options.reducerPath ?? &quot;api&quot;
    }));
    const optionsWithDefaults = {
      reducerPath: &quot;api&quot;,
      keepUnusedDataFor: 60,
      refetchOnMountOrArgChange: false,
      refetchOnFocus: false,
      refetchOnReconnect: false,
      invalidationBehavior: &quot;delayed&quot;,
      ...options,
      extractRehydrationInfo,
      serializeQueryArgs(queryArgsApi) {
        let finalSerializeQueryArgs = defaultSerializeQueryArgs;
        if (&quot;serializeQueryArgs&quot; in queryArgsApi.endpointDefinition) {
          const endpointSQA = queryArgsApi.endpointDefinition.serializeQueryArgs;
          finalSerializeQueryArgs = (queryArgsApi2) =&gt; {
            const initialResult = endpointSQA(queryArgsApi2);
            if (typeof initialResult === &quot;string&quot;) {
              return initialResult;
            } else {
              return defaultSerializeQueryArgs({
                ...queryArgsApi2,
                queryArgs: initialResult
              });
            }
          };
        } else if (options.serializeQueryArgs) {
          finalSerializeQueryArgs = options.serializeQueryArgs;
        }
        return finalSerializeQueryArgs(queryArgsApi);
      },
      tagTypes: [...options.tagTypes || []]
    };
    const context = {
      endpointDefinitions: {},
      batch(fn) {
        fn();
      },
      apiUid: nanoid(),
      extractRehydrationInfo,
      hasRehydrationInfo: weakMapMemoize((action) =&gt; extractRehydrationInfo(action) != null)
    };
    const api = {
      injectEndpoints,
      enhanceEndpoints({
        addTagTypes,
        endpoints
      }) {
        if (addTagTypes) {
          for (const eT of addTagTypes) {
            if (!optionsWithDefaults.tagTypes.includes(eT)) {
              optionsWithDefaults.tagTypes.push(eT);
            }
          }
        }
        if (endpoints) {
          for (const [endpointName, partialDefinition] of Object.entries(endpoints)) {
            if (typeof partialDefinition === &quot;function&quot;) {
              partialDefinition(getEndpointDefinition(context, endpointName));
            } else {
              Object.assign(getEndpointDefinition(context, endpointName) || {}, partialDefinition);
            }
          }
        }
        return api;
      }
    };
    const initializedModules = modules.map((m) =&gt; m.init(api, optionsWithDefaults, context));
    function injectEndpoints(inject) {
      const evaluatedEndpoints = inject.endpoints({
        query: (x) =&gt; ({
          ...x,
          type: ENDPOINT_QUERY
        }),
        mutation: (x) =&gt; ({
          ...x,
          type: ENDPOINT_MUTATION
        }),
        infiniteQuery: (x) =&gt; ({
          ...x,
          type: ENDPOINT_INFINITEQUERY
        })
      });
      for (const [endpointName, definition] of Object.entries(evaluatedEndpoints)) {
        if (inject.overrideExisting !== true &amp;&amp; endpointName in context.endpointDefinitions) {
          if (inject.overrideExisting === &quot;throw&quot;) {
            throw new Error(formatProdErrorMessage(39) );
          }
          continue;
        }
        context.endpointDefinitions[endpointName] = definition;
        for (const m of initializedModules) {
          m.injectEndpoint(endpointName, definition);
        }
      }
      return api;
    }
    return api.injectEndpoints({
      endpoints: options.endpoints
    });
  };
}
function safeAssign(target, ...args) {
  return Object.assign(target, ...args);
}
var buildBatchedActionsHandler = ({
  api,
  queryThunk,
  internalState,
  mwApi
}) =&gt; {
  const subscriptionsPrefix = `${api.reducerPath}/subscriptions`;
  let previousSubscriptions = null;
  let updateSyncTimer = null;
  const {
    updateSubscriptionOptions,
    unsubscribeQueryResult
  } = api.internalActions;
  const actuallyMutateSubscriptions = (currentSubscriptions, action) =&gt; {
    if (updateSubscriptionOptions.match(action)) {
      const {
        queryCacheKey,
        requestId,
        options
      } = action.payload;
      const sub = currentSubscriptions.get(queryCacheKey);
      if (sub?.has(requestId)) {
        sub.set(requestId, options);
      }
      return true;
    }
    if (unsubscribeQueryResult.match(action)) {
      const {
        queryCacheKey,
        requestId
      } = action.payload;
      const sub = currentSubscriptions.get(queryCacheKey);
      if (sub) {
        sub.delete(requestId);
      }
      return true;
    }
    if (api.internalActions.removeQueryResult.match(action)) {
      currentSubscriptions.delete(action.payload.queryCacheKey);
      return true;
    }
    if (queryThunk.pending.match(action)) {
      const {
        meta: {
          arg,
          requestId
        }
      } = action;
      const substate = getOrInsertComputed(currentSubscriptions, arg.queryCacheKey, createNewMap);
      if (arg.subscribe) {
        substate.set(requestId, arg.subscriptionOptions ?? substate.get(requestId) ?? {});
      }
      return true;
    }
    let mutated = false;
    if (queryThunk.rejected.match(action)) {
      const {
        meta: {
          condition,
          arg,
          requestId
        }
      } = action;
      if (condition &amp;&amp; arg.subscribe) {
        const substate = getOrInsertComputed(currentSubscriptions, arg.queryCacheKey, createNewMap);
        substate.set(requestId, arg.subscriptionOptions ?? substate.get(requestId) ?? {});
        mutated = true;
      }
    }
    return mutated;
  };
  const getSubscriptions = () =&gt; internalState.currentSubscriptions;
  const getSubscriptionCount = (queryCacheKey) =&gt; {
    const subscriptions = getSubscriptions();
    const subscriptionsForQueryArg = subscriptions.get(queryCacheKey);
    return subscriptionsForQueryArg?.size ?? 0;
  };
  const isRequestSubscribed = (queryCacheKey, requestId) =&gt; {
    const subscriptions = getSubscriptions();
    return !!subscriptions?.get(queryCacheKey)?.get(requestId);
  };
  const subscriptionSelectors = {
    getSubscriptions,
    getSubscriptionCount,
    isRequestSubscribed
  };
  function serializeSubscriptions(currentSubscriptions) {
    return JSON.parse(JSON.stringify(Object.fromEntries([...currentSubscriptions].map(([k, v]) =&gt; [k, Object.fromEntries(v)]))));
  }
  return (action, mwApi2) =&gt; {
    if (!previousSubscriptions) {
      previousSubscriptions = serializeSubscriptions(internalState.currentSubscriptions);
    }
    if (api.util.resetApiState.match(action)) {
      previousSubscriptions = {};
      internalState.currentSubscriptions.clear();
      updateSyncTimer = null;
      return [true, false];
    }
    if (api.internalActions.internal_getRTKQSubscriptions.match(action)) {
      return [false, subscriptionSelectors];
    }
    const didMutate = actuallyMutateSubscriptions(internalState.currentSubscriptions, action);
    let actionShouldContinue = true;
    if (didMutate) {
      if (!updateSyncTimer) {
        updateSyncTimer = setTimeout(() =&gt; {
          const newSubscriptions = serializeSubscriptions(internalState.currentSubscriptions);
          const [, patches] = produceWithPatches(previousSubscriptions, () =&gt; newSubscriptions);
          mwApi2.next(api.internalActions.subscriptionsUpdated(patches));
          previousSubscriptions = newSubscriptions;
          updateSyncTimer = null;
        }, 500);
      }
      const isSubscriptionSliceAction = typeof action.type == &quot;string&quot; &amp;&amp; !!action.type.startsWith(subscriptionsPrefix);
      const isAdditionalSubscriptionAction = queryThunk.rejected.match(action) &amp;&amp; action.meta.condition &amp;&amp; !!action.meta.arg.subscribe;
      actionShouldContinue = !isSubscriptionSliceAction &amp;&amp; !isAdditionalSubscriptionAction;
    }
    return [actionShouldContinue, false];
  };
};
var THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2147483647 / 1e3 - 1;
var buildCacheCollectionHandler = ({
  reducerPath,
  api,
  queryThunk,
  context,
  internalState,
  selectors: {
    selectQueryEntry,
    selectConfig
  },
  getRunningQueryThunk,
  mwApi
}) =&gt; {
  const {
    removeQueryResult,
    unsubscribeQueryResult,
    cacheEntriesUpserted
  } = api.internalActions;
  const canTriggerUnsubscribe = isAnyOf(unsubscribeQueryResult.match, queryThunk.fulfilled, queryThunk.rejected, cacheEntriesUpserted.match);
  function anySubscriptionsRemainingForKey(queryCacheKey) {
    const subscriptions = internalState.currentSubscriptions.get(queryCacheKey);
    if (!subscriptions) {
      return false;
    }
    const hasSubscriptions = subscriptions.size &gt; 0;
    return hasSubscriptions;
  }
  const currentRemovalTimeouts = {};
  function abortAllPromises(promiseMap) {
    for (const promise of promiseMap.values()) {
      promise?.abort?.();
    }
  }
  const handler = (action, mwApi2) =&gt; {
    const state = mwApi2.getState();
    const config = selectConfig(state);
    if (canTriggerUnsubscribe(action)) {
      let queryCacheKeys;
      if (cacheEntriesUpserted.match(action)) {
        queryCacheKeys = action.payload.map((entry) =&gt; entry.queryDescription.queryCacheKey);
      } else {
        const {
          queryCacheKey
        } = unsubscribeQueryResult.match(action) ? action.payload : action.meta.arg;
        queryCacheKeys = [queryCacheKey];
      }
      handleUnsubscribeMany(queryCacheKeys, mwApi2, config);
    }
    if (api.util.resetApiState.match(action)) {
      for (const [key, timeout] of Object.entries(currentRemovalTimeouts)) {
        if (timeout) clearTimeout(timeout);
        delete currentRemovalTimeouts[key];
      }
      abortAllPromises(internalState.runningQueries);
      abortAllPromises(internalState.runningMutations);
    }
    if (context.hasRehydrationInfo(action)) {
      const {
        queries
      } = context.extractRehydrationInfo(action);
      handleUnsubscribeMany(Object.keys(queries), mwApi2, config);
    }
  };
  function handleUnsubscribeMany(cacheKeys, api2, config) {
    const state = api2.getState();
    for (const queryCacheKey of cacheKeys) {
      const entry = selectQueryEntry(state, queryCacheKey);
      if (entry?.endpointName) {
        handleUnsubscribe(queryCacheKey, entry.endpointName, api2, config);
      }
    }
  }
  function handleUnsubscribe(queryCacheKey, endpointName, api2, config) {
    const endpointDefinition = getEndpointDefinition(context, endpointName);
    const keepUnusedDataFor = endpointDefinition?.keepUnusedDataFor ?? config.keepUnusedDataFor;
    if (keepUnusedDataFor === Infinity) {
      return;
    }
    const finalKeepUnusedDataFor = Math.max(0, Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS));
    if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
      const currentTimeout = currentRemovalTimeouts[queryCacheKey];
      if (currentTimeout) {
        clearTimeout(currentTimeout);
      }
      currentRemovalTimeouts[queryCacheKey] = setTimeout(() =&gt; {
        if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
          const entry = selectQueryEntry(api2.getState(), queryCacheKey);
          if (entry?.endpointName) {
            const runningQuery = api2.dispatch(getRunningQueryThunk(entry.endpointName, entry.originalArgs));
            runningQuery?.abort();
          }
          api2.dispatch(removeQueryResult({
            queryCacheKey
          }));
        }
        delete currentRemovalTimeouts[queryCacheKey];
      }, finalKeepUnusedDataFor * 1e3);
    }
  }
  return handler;
};
var neverResolvedError = new Error(&quot;Promise never resolved before cacheEntryRemoved.&quot;);
var buildCacheLifecycleHandler = ({
  api,
  reducerPath,
  context,
  queryThunk,
  mutationThunk,
  internalState,
  selectors: {
    selectQueryEntry,
    selectApiState
  }
}) =&gt; {
  const isQueryThunk = isAsyncThunkAction(queryThunk);
  const isMutationThunk = isAsyncThunkAction(mutationThunk);
  const isFulfilledThunk = isFulfilled(queryThunk, mutationThunk);
  const lifecycleMap = {};
  const {
    removeQueryResult,
    removeMutationResult,
    cacheEntriesUpserted
  } = api.internalActions;
  function resolveLifecycleEntry(cacheKey, data, meta) {
    const lifecycle = lifecycleMap[cacheKey];
    if (lifecycle?.valueResolved) {
      lifecycle.valueResolved({
        data,
        meta
      });
      delete lifecycle.valueResolved;
    }
  }
  function removeLifecycleEntry(cacheKey) {
    const lifecycle = lifecycleMap[cacheKey];
    if (lifecycle) {
      delete lifecycleMap[cacheKey];
      lifecycle.cacheEntryRemoved();
    }
  }
  function getActionMetaFields(action) {
    const {
      arg,
      requestId
    } = action.meta;
    const {
      endpointName,
      originalArgs
    } = arg;
    return [endpointName, originalArgs, requestId];
  }
  const handler = (action, mwApi, stateBefore) =&gt; {
    const cacheKey = getCacheKey(action);
    function checkForNewCacheKey(endpointName, cacheKey2, requestId, originalArgs) {
      const oldEntry = selectQueryEntry(stateBefore, cacheKey2);
      const newEntry = selectQueryEntry(mwApi.getState(), cacheKey2);
      if (!oldEntry &amp;&amp; newEntry) {
        handleNewKey(endpointName, originalArgs, cacheKey2, mwApi, requestId);
      }
    }
    if (queryThunk.pending.match(action)) {
      const [endpointName, originalArgs, requestId] = getActionMetaFields(action);
      checkForNewCacheKey(endpointName, cacheKey, requestId, originalArgs);
    } else if (cacheEntriesUpserted.match(action)) {
      for (const {
        queryDescription,
        value
      } of action.payload) {
        const {
          endpointName,
          originalArgs,
          queryCacheKey
        } = queryDescription;
        checkForNewCacheKey(endpointName, queryCacheKey, action.meta.requestId, originalArgs);
        resolveLifecycleEntry(queryCacheKey, value, {});
      }
    } else if (mutationThunk.pending.match(action)) {
      const state = mwApi.getState()[reducerPath].mutations[cacheKey];
      if (state) {
        const [endpointName, originalArgs, requestId] = getActionMetaFields(action);
        handleNewKey(endpointName, originalArgs, cacheKey, mwApi, requestId);
      }
    } else if (isFulfilledThunk(action)) {
      resolveLifecycleEntry(cacheKey, action.payload, action.meta.baseQueryMeta);
    } else if (removeQueryResult.match(action) || removeMutationResult.match(action)) {
      removeLifecycleEntry(cacheKey);
    } else if (api.util.resetApiState.match(action)) {
      for (const cacheKey2 of Object.keys(lifecycleMap)) {
        removeLifecycleEntry(cacheKey2);
      }
    }
  };
  function getCacheKey(action) {
    if (isQueryThunk(action)) return action.meta.arg.queryCacheKey;
    if (isMutationThunk(action)) {
      return action.meta.arg.fixedCacheKey ?? action.meta.requestId;
    }
    if (removeQueryResult.match(action)) return action.payload.queryCacheKey;
    if (removeMutationResult.match(action)) return getMutationCacheKey(action.payload);
    return &quot;&quot;;
  }
  function handleNewKey(endpointName, originalArgs, queryCacheKey, mwApi, requestId) {
    const endpointDefinition = getEndpointDefinition(context, endpointName);
    const onCacheEntryAdded = endpointDefinition?.onCacheEntryAdded;
    if (!onCacheEntryAdded) return;
    const lifecycle = {};
    const cacheEntryRemoved = new Promise((resolve) =&gt; {
      lifecycle.cacheEntryRemoved = resolve;
    });
    const cacheDataLoaded = Promise.race([new Promise((resolve) =&gt; {
      lifecycle.valueResolved = resolve;
    }), cacheEntryRemoved.then(() =&gt; {
      throw neverResolvedError;
    })]);
    cacheDataLoaded.catch(() =&gt; {
    });
    lifecycleMap[queryCacheKey] = lifecycle;
    const selector = api.endpoints[endpointName].select(isAnyQueryDefinition(endpointDefinition) ? originalArgs : queryCacheKey);
    const extra = mwApi.dispatch((_, __, extra2) =&gt; extra2);
    const lifecycleApi = {
      ...mwApi,
      getCacheEntry: () =&gt; selector(mwApi.getState()),
      requestId,
      extra,
      updateCachedData: isAnyQueryDefinition(endpointDefinition) ? (updateRecipe) =&gt; mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)) : void 0,
      cacheDataLoaded,
      cacheEntryRemoved
    };
    const runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi);
    Promise.resolve(runningHandler).catch((e) =&gt; {
      if (e === neverResolvedError) return;
      throw e;
    });
  }
  return handler;
};
var buildDevCheckHandler = ({
  api,
  context: {
    apiUid
  },
  reducerPath
}) =&gt; {
  return (action, mwApi) =&gt; {
    if (api.util.resetApiState.match(action)) {
      mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));
    }
  };
};
var buildInvalidationByTagsHandler = ({
  reducerPath,
  context,
  context: {
    endpointDefinitions
  },
  mutationThunk,
  queryThunk,
  api,
  assertTagType,
  refetchQuery,
  internalState
}) =&gt; {
  const {
    removeQueryResult
  } = api.internalActions;
  const isThunkActionWithTags = isAnyOf(isFulfilled(mutationThunk), isRejectedWithValue(mutationThunk));
  const isQueryEnd = isAnyOf(isFulfilled(queryThunk, mutationThunk), isRejected(queryThunk, mutationThunk));
  let pendingTagInvalidations = [];
  let pendingRequestCount = 0;
  const handler = (action, mwApi) =&gt; {
    if (queryThunk.pending.match(action) || mutationThunk.pending.match(action)) {
      pendingRequestCount++;
    }
    if (isQueryEnd(action)) {
      pendingRequestCount = Math.max(0, pendingRequestCount - 1);
    }
    if (isThunkActionWithTags(action)) {
      invalidateTags(calculateProvidedByThunk(action, &quot;invalidatesTags&quot;, endpointDefinitions, assertTagType), mwApi);
    } else if (isQueryEnd(action)) {
      invalidateTags([], mwApi);
    } else if (api.util.invalidateTags.match(action)) {
      invalidateTags(calculateProvidedBy(action.payload, void 0, void 0, void 0, void 0, assertTagType), mwApi);
    }
  };
  function hasPendingRequests() {
    return pendingRequestCount &gt; 0;
  }
  function invalidateTags(newTags, mwApi) {
    const rootState = mwApi.getState();
    const state = rootState[reducerPath];
    pendingTagInvalidations.push(...newTags);
    if (state.config.invalidationBehavior === &quot;delayed&quot; &amp;&amp; hasPendingRequests()) {
      return;
    }
    const tags = pendingTagInvalidations;
    pendingTagInvalidations = [];
    if (tags.length === 0) return;
    const toInvalidate = api.util.selectInvalidatedBy(rootState, tags);
    context.batch(() =&gt; {
      const valuesArray = Array.from(toInvalidate.values());
      for (const {
        queryCacheKey
      } of valuesArray) {
        const querySubState = state.queries[queryCacheKey];
        const subscriptionSubState = getOrInsertComputed(internalState.currentSubscriptions, queryCacheKey, createNewMap);
        if (querySubState) {
          if (subscriptionSubState.size === 0) {
            mwApi.dispatch(removeQueryResult({
              queryCacheKey
            }));
          } else if (querySubState.status !== STATUS_UNINITIALIZED) {
            mwApi.dispatch(refetchQuery(querySubState));
          }
        }
      }
    });
  }
  return handler;
};
var buildPollingHandler = ({
  reducerPath,
  queryThunk,
  api,
  refetchQuery,
  internalState
}) =&gt; {
  const {
    currentPolls,
    currentSubscriptions
  } = internalState;
  const pendingPollingUpdates = /* @__PURE__ */ new Set();
  let pollingUpdateTimer = null;
  const handler = (action, mwApi) =&gt; {
    if (api.internalActions.updateSubscriptionOptions.match(action) || api.internalActions.unsubscribeQueryResult.match(action)) {
      schedulePollingUpdate(action.payload.queryCacheKey, mwApi);
    }
    if (queryThunk.pending.match(action) || queryThunk.rejected.match(action) &amp;&amp; action.meta.condition) {
      schedulePollingUpdate(action.meta.arg.queryCacheKey, mwApi);
    }
    if (queryThunk.fulfilled.match(action) || queryThunk.rejected.match(action) &amp;&amp; !action.meta.condition) {
      startNextPoll(action.meta.arg, mwApi);
    }
    if (api.util.resetApiState.match(action)) {
      clearPolls();
      if (pollingUpdateTimer) {
        clearTimeout(pollingUpdateTimer);
        pollingUpdateTimer = null;
      }
      pendingPollingUpdates.clear();
    }
  };
  function schedulePollingUpdate(queryCacheKey, api2) {
    pendingPollingUpdates.add(queryCacheKey);
    if (!pollingUpdateTimer) {
      pollingUpdateTimer = setTimeout(() =&gt; {
        for (const key of pendingPollingUpdates) {
          updatePollingInterval({
            queryCacheKey: key
          }, api2);
        }
        pendingPollingUpdates.clear();
        pollingUpdateTimer = null;
      }, 0);
    }
  }
  function startNextPoll({
    queryCacheKey
  }, api2) {
    const state = api2.getState()[reducerPath];
    const querySubState = state.queries[queryCacheKey];
    const subscriptions = currentSubscriptions.get(queryCacheKey);
    if (!querySubState || querySubState.status === STATUS_UNINITIALIZED) return;
    const {
      lowestPollingInterval,
      skipPollingIfUnfocused
    } = findLowestPollingInterval(subscriptions);
    if (!Number.isFinite(lowestPollingInterval)) return;
    const currentPoll = currentPolls.get(queryCacheKey);
    if (currentPoll?.timeout) {
      clearTimeout(currentPoll.timeout);
      currentPoll.timeout = void 0;
    }
    const nextPollTimestamp = Date.now() + lowestPollingInterval;
    currentPolls.set(queryCacheKey, {
      nextPollTimestamp,
      pollingInterval: lowestPollingInterval,
      timeout: setTimeout(() =&gt; {
        if (state.config.focused || !skipPollingIfUnfocused) {
          api2.dispatch(refetchQuery(querySubState));
        }
        startNextPoll({
          queryCacheKey
        }, api2);
      }, lowestPollingInterval)
    });
  }
  function updatePollingInterval({
    queryCacheKey
  }, api2) {
    const state = api2.getState()[reducerPath];
    const querySubState = state.queries[queryCacheKey];
    const subscriptions = currentSubscriptions.get(queryCacheKey);
    if (!querySubState || querySubState.status === STATUS_UNINITIALIZED) {
      return;
    }
    const {
      lowestPollingInterval
    } = findLowestPollingInterval(subscriptions);
    if (!Number.isFinite(lowestPollingInterval)) {
      cleanupPollForKey(queryCacheKey);
      return;
    }
    const currentPoll = currentPolls.get(queryCacheKey);
    const nextPollTimestamp = Date.now() + lowestPollingInterval;
    if (!currentPoll || nextPollTimestamp &lt; currentPoll.nextPollTimestamp) {
      startNextPoll({
        queryCacheKey
      }, api2);
    }
  }
  function cleanupPollForKey(key) {
    const existingPoll = currentPolls.get(key);
    if (existingPoll?.timeout) {
      clearTimeout(existingPoll.timeout);
    }
    currentPolls.delete(key);
  }
  function clearPolls() {
    for (const key of currentPolls.keys()) {
      cleanupPollForKey(key);
    }
  }
  function findLowestPollingInterval(subscribers = /* @__PURE__ */ new Map()) {
    let skipPollingIfUnfocused = false;
    let lowestPollingInterval = Number.POSITIVE_INFINITY;
    for (const entry of subscribers.values()) {
      if (!!entry.pollingInterval) {
        lowestPollingInterval = Math.min(entry.pollingInterval, lowestPollingInterval);
        skipPollingIfUnfocused = entry.skipPollingIfUnfocused || skipPollingIfUnfocused;
      }
    }
    return {
      lowestPollingInterval,
      skipPollingIfUnfocused
    };
  }
  return handler;
};
var buildQueryLifecycleHandler = ({
  api,
  context,
  queryThunk,
  mutationThunk
}) =&gt; {
  const isPendingThunk = isPending(queryThunk, mutationThunk);
  const isRejectedThunk = isRejected(queryThunk, mutationThunk);
  const isFullfilledThunk = isFulfilled(queryThunk, mutationThunk);
  const lifecycleMap = {};
  const handler = (action, mwApi) =&gt; {
    if (isPendingThunk(action)) {
      const {
        requestId,
        arg: {
          endpointName,
          originalArgs
        }
      } = action.meta;
      const endpointDefinition = getEndpointDefinition(context, endpointName);
      const onQueryStarted = endpointDefinition?.onQueryStarted;
      if (onQueryStarted) {
        const lifecycle = {};
        const queryFulfilled = new Promise((resolve, reject) =&gt; {
          lifecycle.resolve = resolve;
          lifecycle.reject = reject;
        });
        queryFulfilled.catch(() =&gt; {
        });
        lifecycleMap[requestId] = lifecycle;
        const selector = api.endpoints[endpointName].select(isAnyQueryDefinition(endpointDefinition) ? originalArgs : requestId);
        const extra = mwApi.dispatch((_, __, extra2) =&gt; extra2);
        const lifecycleApi = {
          ...mwApi,
          getCacheEntry: () =&gt; selector(mwApi.getState()),
          requestId,
          extra,
          updateCachedData: isAnyQueryDefinition(endpointDefinition) ? (updateRecipe) =&gt; mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)) : void 0,
          queryFulfilled
        };
        onQueryStarted(originalArgs, lifecycleApi);
      }
    } else if (isFullfilledThunk(action)) {
      const {
        requestId,
        baseQueryMeta
      } = action.meta;
      lifecycleMap[requestId]?.resolve({
        data: action.payload,
        meta: baseQueryMeta
      });
      delete lifecycleMap[requestId];
    } else if (isRejectedThunk(action)) {
      const {
        requestId,
        rejectedWithValue,
        baseQueryMeta
      } = action.meta;
      lifecycleMap[requestId]?.reject({
        error: action.payload ?? action.error,
        isUnhandledError: !rejectedWithValue,
        meta: baseQueryMeta
      });
      delete lifecycleMap[requestId];
    }
  };
  return handler;
};
var buildWindowEventHandler = ({
  reducerPath,
  context,
  api,
  refetchQuery,
  internalState
}) =&gt; {
  const {
    removeQueryResult
  } = api.internalActions;
  const handler = (action, mwApi) =&gt; {
    if (onFocus.match(action)) {
      refetchValidQueries(mwApi, &quot;refetchOnFocus&quot;);
    }
    if (onOnline.match(action)) {
      refetchValidQueries(mwApi, &quot;refetchOnReconnect&quot;);
    }
  };
  function refetchValidQueries(api2, type) {
    const state = api2.getState()[reducerPath];
    const queries = state.queries;
    const subscriptions = internalState.currentSubscriptions;
    context.batch(() =&gt; {
      for (const queryCacheKey of subscriptions.keys()) {
        const querySubState = queries[queryCacheKey];
        const subscriptionSubState = subscriptions.get(queryCacheKey);
        if (!subscriptionSubState || !querySubState) continue;
        const values = [...subscriptionSubState.values()];
        const shouldRefetch = values.some((sub) =&gt; sub[type] === true) || values.every((sub) =&gt; sub[type] === void 0) &amp;&amp; state.config[type];
        if (shouldRefetch) {
          if (subscriptionSubState.size === 0) {
            api2.dispatch(removeQueryResult({
              queryCacheKey
            }));
          } else if (querySubState.status !== STATUS_UNINITIALIZED) {
            api2.dispatch(refetchQuery(querySubState));
          }
        }
      }
    });
  }
  return handler;
};
function buildMiddleware(input) {
  const {
    reducerPath,
    queryThunk,
    api,
    context,
    getInternalState
  } = input;
  const {
    apiUid
  } = context;
  const actions2 = {
    invalidateTags: createAction(`${reducerPath}/invalidateTags`)
  };
  const isThisApiSliceAction = (action) =&gt; action.type.startsWith(`${reducerPath}/`);
  const handlerBuilders = [buildDevCheckHandler, buildCacheCollectionHandler, buildInvalidationByTagsHandler, buildPollingHandler, buildCacheLifecycleHandler, buildQueryLifecycleHandler];
  const middleware = (mwApi) =&gt; {
    let initialized2 = false;
    const internalState = getInternalState(mwApi.dispatch);
    const builderArgs = {
      ...input,
      internalState,
      refetchQuery,
      isThisApiSliceAction,
      mwApi
    };
    const handlers = handlerBuilders.map((build) =&gt; build(builderArgs));
    const batchedActionsHandler = buildBatchedActionsHandler(builderArgs);
    const windowEventsHandler = buildWindowEventHandler(builderArgs);
    return (next) =&gt; {
      return (action) =&gt; {
        if (!isAction(action)) {
          return next(action);
        }
        if (!initialized2) {
          initialized2 = true;
          mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));
        }
        const mwApiWithNext = {
          ...mwApi,
          next
        };
        const stateBefore = mwApi.getState();
        const [actionShouldContinue, internalProbeResult] = batchedActionsHandler(action, mwApiWithNext, stateBefore);
        let res;
        if (actionShouldContinue) {
          res = next(action);
        } else {
          res = internalProbeResult;
        }
        if (!!mwApi.getState()[reducerPath]) {
          windowEventsHandler(action, mwApiWithNext, stateBefore);
          if (isThisApiSliceAction(action) || context.hasRehydrationInfo(action)) {
            for (const handler of handlers) {
              handler(action, mwApiWithNext, stateBefore);
            }
          }
        }
        return res;
      };
    };
  };
  return {
    middleware,
    actions: actions2
  };
  function refetchQuery(querySubState) {
    return input.api.endpoints[querySubState.endpointName].initiate(querySubState.originalArgs, {
      subscribe: false,
      forceRefetch: true
    });
  }
}
var coreModuleName = /* @__PURE__ */ Symbol();
var coreModule = ({
  createSelector: createSelector2 = createSelector
} = {}) =&gt; ({
  name: coreModuleName,
  init(api, {
    baseQuery,
    tagTypes,
    reducerPath,
    serializeQueryArgs,
    keepUnusedDataFor,
    refetchOnMountOrArgChange,
    refetchOnFocus,
    refetchOnReconnect,
    invalidationBehavior,
    onSchemaFailure,
    catchSchemaFailure,
    skipSchemaValidation
  }, context) {
    enablePatches();
    const assertTagType = (tag) =&gt; {
      return tag;
    };
    Object.assign(api, {
      reducerPath,
      endpoints: {},
      internalActions: {
        onOnline,
        onOffline,
        onFocus,
        onFocusLost
      },
      util: {}
    });
    const selectors = buildSelectors({
      serializeQueryArgs,
      reducerPath,
      createSelector: createSelector2
    });
    const {
      selectInvalidatedBy,
      selectCachedArgsForQuery,
      buildQuerySelector,
      buildInfiniteQuerySelector,
      buildMutationSelector
    } = selectors;
    safeAssign(api.util, {
      selectInvalidatedBy,
      selectCachedArgsForQuery
    });
    const {
      queryThunk,
      infiniteQueryThunk,
      mutationThunk,
      patchQueryData,
      updateQueryData,
      upsertQueryData,
      prefetch,
      buildMatchThunkActions
    } = buildThunks({
      baseQuery,
      reducerPath,
      context,
      api,
      serializeQueryArgs,
      assertTagType,
      selectors,
      onSchemaFailure,
      catchSchemaFailure,
      skipSchemaValidation
    });
    const {
      reducer,
      actions: sliceActions
    } = buildSlice({
      context,
      queryThunk,
      mutationThunk,
      serializeQueryArgs,
      reducerPath,
      assertTagType,
      config: {
        refetchOnFocus,
        refetchOnReconnect,
        refetchOnMountOrArgChange,
        keepUnusedDataFor,
        reducerPath,
        invalidationBehavior
      }
    });
    safeAssign(api.util, {
      patchQueryData,
      updateQueryData,
      upsertQueryData,
      prefetch,
      resetApiState: sliceActions.resetApiState,
      upsertQueryEntries: sliceActions.cacheEntriesUpserted
    });
    safeAssign(api.internalActions, sliceActions);
    const internalStateMap = /* @__PURE__ */ new WeakMap();
    const getInternalState = (dispatch) =&gt; {
      const state = getOrInsertComputed(internalStateMap, dispatch, () =&gt; ({
        currentSubscriptions: /* @__PURE__ */ new Map(),
        currentPolls: /* @__PURE__ */ new Map(),
        runningQueries: /* @__PURE__ */ new Map(),
        runningMutations: /* @__PURE__ */ new Map()
      }));
      return state;
    };
    const {
      buildInitiateQuery,
      buildInitiateInfiniteQuery,
      buildInitiateMutation,
      getRunningMutationThunk,
      getRunningMutationsThunk,
      getRunningQueriesThunk,
      getRunningQueryThunk
    } = buildInitiate({
      queryThunk,
      mutationThunk,
      infiniteQueryThunk,
      api,
      serializeQueryArgs,
      context,
      getInternalState
    });
    safeAssign(api.util, {
      getRunningMutationThunk,
      getRunningMutationsThunk,
      getRunningQueryThunk,
      getRunningQueriesThunk
    });
    const {
      middleware,
      actions: middlewareActions
    } = buildMiddleware({
      reducerPath,
      context,
      queryThunk,
      mutationThunk,
      infiniteQueryThunk,
      api,
      assertTagType,
      selectors,
      getRunningQueryThunk,
      getInternalState
    });
    safeAssign(api.util, middlewareActions);
    safeAssign(api, {
      reducer,
      middleware
    });
    return {
      name: coreModuleName,
      injectEndpoint(endpointName, definition) {
        const anyApi = api;
        const endpoint = anyApi.endpoints[endpointName] ??= {};
        if (isQueryDefinition(definition)) {
          safeAssign(endpoint, {
            name: endpointName,
            select: buildQuerySelector(endpointName, definition),
            initiate: buildInitiateQuery(endpointName, definition)
          }, buildMatchThunkActions(queryThunk, endpointName));
        }
        if (isMutationDefinition(definition)) {
          safeAssign(endpoint, {
            name: endpointName,
            select: buildMutationSelector(),
            initiate: buildInitiateMutation(endpointName)
          }, buildMatchThunkActions(mutationThunk, endpointName));
        }
        if (isInfiniteQueryDefinition(definition)) {
          safeAssign(endpoint, {
            name: endpointName,
            select: buildInfiniteQuerySelector(endpointName, definition),
            initiate: buildInitiateInfiniteQuery(endpointName, definition)
          }, buildMatchThunkActions(queryThunk, endpointName));
        }
      }
    };
  }
});
var createApi = /* @__PURE__ */ buildCreateApi(coreModule());

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function constructUrl(serverConfig, tree, query) {
    const treeParams = tree ? { authIndexType: &#39;service&#39;, authIndexValue: tree } : undefined;
    const params = { ...query, ...treeParams };
    const queryString = Object.keys(params).length &gt; 0 ? `?${stringify(params)}` : &#39;&#39;;
    const path = getEndpointPath({
        endpoint: &#39;authenticate&#39;,
        customPaths: serverConfig.paths,
    });
    const url = resolve(serverConfig.baseUrl, `${path}${queryString}`);
    return url;
}
function constructSessionsUrl(serverConfig, query) {
    const params = { ...query };
    const queryString = Object.keys(params).length &gt; 0 ? `?${stringify(params)}` : &#39;&#39;;
    const path = getEndpointPath({
        endpoint: &#39;sessions&#39;,
        customPaths: serverConfig.paths,
    });
    const url = resolve(serverConfig.baseUrl, `${path}${queryString}`);
    return url;
}
function configureRequest(step) {
    const init = {
        body: step ? JSON.stringify(step.payload) : undefined,
        credentials: &#39;include&#39;,
        headers: new Headers({}),
        method: &#39;POST&#39;,
    };
    return init;
}
function configureSessionRequest() {
    const init = {
        credentials: &#39;include&#39;,
        headers: new Headers({}),
        method: &#39;POST&#39;,
    };
    return init;
}
const journeyApi = createApi({
    reducerPath: &#39;journeyReducer&#39;,
    baseQuery: fetchBaseQuery({
        baseUrl: &#39;/&#39;,
        prepareHeaders: (headers) =&gt; {
            headers.set(&#39;Accept&#39;, &#39;application/json&#39;);
            headers.set(&#39;Accept-API-Version&#39;, &#39;protocol=1.0,resource=2.1&#39;);
            headers.set(&#39;Content-Type&#39;, &#39;application/json&#39;);
            headers.set(&#39;X-Requested-With&#39;, REQUESTED_WITH);
            return headers;
        },
    }),
    endpoints: (builder) =&gt; ({
        start: builder.mutation({
            queryFn: async (options, api, _, baseQuery) =&gt; {
                const state = api.getState();
                const { serverConfig } = state.config;
                if (!serverConfig) {
                    throw new Error(&#39;Server configuration is missing.&#39;);
                }
                const query = options?.query || {};
                const url = constructUrl(serverConfig, options?.journey, query);
                const request = configureRequest();
                const { requestMiddleware } = api.extra;
                const response = await initQuery({ ...request, url: url }, &#39;begin&#39;, {
                    type: &#39;service&#39;,
                    tree: options?.journey,
                })
                    .applyMiddleware(requestMiddleware)
                    .applyQuery(async (req) =&gt; {
                    const result = await baseQuery(req, api, api.extra);
                    return result;
                });
                return response;
            },
        }),
        next: builder.mutation({
            queryFn: async ({ step, options }, api, _, baseQuery) =&gt; {
                const state = api.getState();
                const { serverConfig } = state.config;
                if (!serverConfig) {
                    throw new Error(&#39;Server configuration is missing.&#39;);
                }
                const query = options?.query || {};
                const url = constructUrl(serverConfig, undefined, query);
                const request = configureRequest(step);
                const { requestMiddleware } = api.extra;
                const response = await initQuery({ ...request, url }, &#39;continue&#39;)
                    .applyMiddleware(requestMiddleware)
                    .applyQuery(async (req) =&gt; {
                    const result = await baseQuery(req, api, api.extra);
                    return result;
                });
                return response;
            },
        }),
        terminate: builder.mutation({
            queryFn: async (options, api, _, baseQuery) =&gt; {
                const state = api.getState();
                const { serverConfig } = state.config;
                if (!serverConfig) {
                    throw new Error(&#39;Server configuration is missing.&#39;);
                }
                const query = { ...options?.query, _action: &#39;logout&#39; };
                const url = constructSessionsUrl(serverConfig, query);
                const request = configureSessionRequest();
                const { requestMiddleware } = api.extra;
                const response = await initQuery({ ...request, url }, &#39;terminate&#39;)
                    .applyMiddleware(requestMiddleware)
                    .applyQuery(async (req) =&gt; {
                    const result = await baseQuery(req, api, api.extra);
                    return result;
                });
                return response;
            },
        }),
    }),
});

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function createError(message, status = &#39;unknown&#39;) {
    return {
        error: &#39;Well-known configuration fetch failed&#39;,
        message,
        type: &#39;wellknown_error&#39;,
        status,
    };
}
function isObject(value) {
    return typeof value === &#39;object&#39; &amp;&amp; value !== null;
}
/**
 * Validates that the response contains the minimum required OIDC well-known fields.
 *
 * Checks for `issuer`, `authorization_endpoint`, and `token_endpoint` — the
 * minimum subset needed by this SDK. Note that the full OpenID Connect
 * Discovery 1.0 spec defines additional required fields that some providers
 * may not include.
 */
function isValidWellknownResponse(data) {
    if (!isObject(data))
        return false;
    return (typeof data.issuer === &#39;string&#39; &amp;&amp;
        typeof data.authorization_endpoint === &#39;string&#39; &amp;&amp;
        typeof data.token_endpoint === &#39;string&#39;);
}
/**
 * Creates a well-known query builder for use inside RTK Query `queryFn`.
 *
 * Constructs a request object from the URL, then exposes `applyQuery` to
 * execute the request through the caller&#39;s `baseQuery`. Response validation
 * uses {@link isValidWellknownResponse}.
 *
 * @param url - The well-known endpoint URL
 * @returns A builder with `applyQuery(callback)` that returns a result compatible with RTK Query&#39;s `QueryReturnValue`
 *
 * @example
 * ```typescript
 * queryFn: async (url, _api, _extra, baseQuery) =&gt; {
 *   return initWellknownQuery(url).applyQuery(async (req) =&gt; await baseQuery(req));
 * }
 * ```
 */
function initWellknownQuery(url) {
    const request = {
        url,
        headers: { Accept: &#39;application/json&#39; },
    };
    return {
        async applyQuery(callback) {
            let result;
            try {
                result = await callback(request);
            }
            catch (error) {
                const message = error instanceof Error
                    ? error.message
                    : &#39;An unknown error occurred during well-known fetch&#39;;
                return {
                    error: {
                        status: &#39;CUSTOM_ERROR&#39;,
                        error: message,
                        data: createError(message),
                    },
                };
            }
            if (result.error) {
                return { error: result.error };
            }
            if (!isValidWellknownResponse(result.data)) {
                return {
                    error: {
                        status: &#39;CUSTOM_ERROR&#39;,
                        error: &#39;Invalid well-known response: missing required fields (issuer, authorization_endpoint, token_endpoint)&#39;,
                        data: createError(&#39;Invalid well-known response: missing required fields (issuer, authorization_endpoint, token_endpoint)&#39;),
                    },
                };
            }
            return { data: result.data };
        },
    };
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * RTK Query API for well-known endpoint discovery.
 *
 * Uses the `initWellknownQuery` builder pattern from `@forgerock/sdk-oidc`.
 * The builder constructs the request and validates the response;
 * `fetchBaseQuery` handles the HTTP transport through RTK Query&#39;s pipeline.
 */
const wellknownApi = createApi({
    reducerPath: &#39;wellknown&#39;,
    baseQuery: fetchBaseQuery(),
    endpoints: (builder) =&gt; ({
        configuration: builder.query({
            queryFn: async (url, _api, _extra, baseQuery) =&gt; {
                const result = await initWellknownQuery(url).applyQuery(async (req) =&gt; {
                    const queryResult = await baseQuery(req);
                    return queryResult;
                });
                return result;
            },
        }),
    }),
});

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const rootReducer = combineReducers({
    [journeyApi.reducerPath]: journeyApi.reducer,
    [configSlice.name]: configSlice.reducer,
    [wellknownApi.reducerPath]: wellknownApi.reducer,
});
const createJourneyStore = ({ requestMiddleware, logger, }) =&gt; {
    return configureStore({
        reducer: rootReducer,
        middleware: (getDefaultMiddleware) =&gt; getDefaultMiddleware({
            serializableCheck: true,
            thunk: {
                extraArgument: {
                    requestMiddleware,
                    logger,
                },
            },
        })
            .concat(journeyApi.middleware)
            .concat(wellknownApi.middleware),
    });
};

function createStorageError(storeType, action) {
    let storageName;
    switch (storeType) {
        case &#39;localStorage&#39;:
            storageName = &#39;local&#39;;
            break;
        case &#39;sessionStorage&#39;:
            storageName = &#39;session&#39;;
            break;
        case &#39;custom&#39;:
            storageName = &#39;custom&#39;;
            break;
    }
    return {
        error: `${action}_error`,
        message: `Error ${action.toLowerCase()} value from ${storageName} storage`,
        type: action === &#39;Parsing&#39; ? &#39;parse_error&#39; : &#39;unknown_error&#39;,
    };
}
function createStorage(config) {
    const { type: storeType, prefix = &#39;pic&#39;, name } = config;
    const key = `${prefix}-${name}`;
    const storageTypes = {
        sessionStorage,
        localStorage,
    };
    return {
        get: async function storageGet() {
            let value;
            try {
                value = await storageTypes[storeType].getItem(key);
                if (value === null) {
                    return value;
                }
            }
            catch {
                return createStorageError(storeType, &#39;Retrieving&#39;);
            }
            try {
                const parsed = JSON.parse(value);
                return parsed;
            }
            catch {
                return createStorageError(storeType, &#39;Parsing&#39;);
            }
        },
        set: async function storageSet(value) {
            const valueToStore = JSON.stringify(value);
            try {
                await storageTypes[storeType].setItem(key, valueToStore);
                return Promise.resolve(null);
            }
            catch {
                return createStorageError(storeType, &#39;Storing&#39;);
            }
        },
        remove: async function storageRemove() {
            try {
                await storageTypes[storeType].removeItem(key);
                return Promise.resolve(null);
            }
            catch {
                return createStorageError(storeType, &#39;Removing&#39;);
            }
        },
    };
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function getRealm(payload) {
    return payload.realm;
}
function getSessionToken(payload) {
    return payload.tokenId;
}
function getSuccessUrl(payload) {
    return payload.successUrl;
}
function createJourneyLoginSuccess(payload) {
    return {
        payload,
        type: StepType.LoginSuccess,
        getRealm: () =&gt; getRealm(payload),
        getSessionToken: () =&gt; getSessionToken(payload),
        getSuccessUrl: () =&gt; getSuccessUrl(payload),
    };
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * message-creator.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const defaultMessageCreator = {
    [PolicyKey.CannotContainCharacters]: (property, params) =&gt; {
        const forbiddenChars = getProp(params, &#39;forbiddenChars&#39;, &#39;&#39;);
        return `${property} must not contain following characters: &quot;${forbiddenChars}&quot;`;
    },
    [PolicyKey.CannotContainDuplicates]: (property, params) =&gt; {
        const duplicateValue = getProp(params, &#39;duplicateValue&#39;, &#39;&#39;);
        return `${property} must not contain duplicates: &quot;${duplicateValue}&quot;`;
    },
    [PolicyKey.CannotContainOthers]: (property, params) =&gt; {
        const disallowedFields = getProp(params, &#39;disallowedFields&#39;, &#39;&#39;);
        return `${property} must not contain: &quot;${disallowedFields}&quot;`;
    },
    [PolicyKey.LeastCapitalLetters]: (property, params) =&gt; {
        const numCaps = getProp(params, &#39;numCaps&#39;, 0);
        return `${property} must contain at least ${numCaps} capital ${plural(numCaps, &#39;letter&#39;)}`;
    },
    [PolicyKey.LeastNumbers]: (property, params) =&gt; {
        const numNums = getProp(params, &#39;numNums&#39;, 0);
        return `${property} must contain at least ${numNums} numeric ${plural(numNums, &#39;value&#39;)}`;
    },
    [PolicyKey.MatchRegexp]: (property) =&gt; `${property} has failed the &quot;MATCH_REGEXP&quot; policy`,
    [PolicyKey.MaximumLength]: (property, params) =&gt; {
        const maxLength = getProp(params, &#39;maxLength&#39;, 0);
        return `${property} must be at most ${maxLength} ${plural(maxLength, &#39;character&#39;)}`;
    },
    [PolicyKey.MaximumNumber]: (property) =&gt; `${property} has failed the &quot;MAXIMUM_NUMBER_VALUE&quot; policy`,
    [PolicyKey.MinimumLength]: (property, params) =&gt; {
        const minLength = getProp(params, &#39;minLength&#39;, 0);
        return `${property} must be at least ${minLength} ${plural(minLength, &#39;character&#39;)}`;
    },
    [PolicyKey.MinimumNumber]: (property) =&gt; `${property} has failed the &quot;MINIMUM_NUMBER_VALUE&quot; policy`,
    [PolicyKey.Required]: (property) =&gt; `${property} is required`,
    [PolicyKey.Unique]: (property) =&gt; `${property} must be unique`,
    [PolicyKey.UnknownPolicy]: (property, params) =&gt; {
        const policyRequirement = getProp(params, &#39;policyRequirement&#39;, &#39;Unknown&#39;);
        return `${property}: Unknown policy requirement &quot;${policyRequirement}&quot;`;
    },
    [PolicyKey.ValidArrayItems]: (property) =&gt; `${property} has failed the &quot;VALID_ARRAY_ITEMS&quot; policy`,
    [PolicyKey.ValidDate]: (property) =&gt; `${property} has an invalid date`,
    [PolicyKey.ValidEmailAddress]: (property) =&gt; `${property} has an invalid email address`,
    [PolicyKey.ValidNameFormat]: (property) =&gt; `${property} has an invalid name format`,
    [PolicyKey.ValidNumber]: (property) =&gt; `${property} has an invalid number`,
    [PolicyKey.ValidPhoneFormat]: (property) =&gt; `${property} has an invalid phone number`,
    [PolicyKey.ValidQueryFilter]: (property) =&gt; `${property} has failed the &quot;VALID_QUERY_FILTER&quot; policy`,
    [PolicyKey.ValidType]: (property) =&gt; `${property} has failed the &quot;VALID_TYPE&quot; policy`,
};

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Utility for processing policy failures into human readable messages.
 *
 * Example:
 *
 * ```js
 * // Create message overrides and extensions as needed
 * const messageCreator = {
 *   [PolicyKey.unique]: (property: string) =&gt; (
 *     `this is a custom message for &quot;UNIQUE&quot; policy of ${property}`
 *   ),
 *   CUSTOM_POLICY: (property: string, params: any) =&gt; (
 *     `this is a custom message for &quot;${params.policyRequirement}&quot; policy of ${property}`
 *   ),
 * };
 *
 * const thisStep = await journeyClient.next(previousStep);
 *
 * if (thisStep.type === StepType.LoginFailure) {
 *   const messagesStepMethod = thisStep.getProcessedMessage(messageCreator);
 *   const messagesClassMethod = Policy.parseErrors(thisStep, messageCreator)
 * }
 */
class Policy {
    /**
     * Parses policy errors and generates human readable error messages.
     *
     * @param {Step} err The step containing the error.
     * @param {MessageCreator} messageCreator
     * Extensible and overridable custom error messages for policy failures.
     * @return {ProcessedPropertyError[]} Array of objects containing all processed policy errors.
     */
    static parseErrors(err, messageCreator) {
        const errors = [];
        if (err.detail &amp;&amp; err.detail.failedPolicyRequirements) {
            err.detail.failedPolicyRequirements.map((x) =&gt; {
                errors.push.apply(errors, [
                    {
                        detail: x,
                        messages: this.parseFailedPolicyRequirement(x, messageCreator),
                    },
                ]);
            });
        }
        return errors;
    }
    /**
     * Parses a failed policy and returns a string array of error messages.
     *
     * @param {FailedPolicyRequirement} failedPolicy The detail data of the failed policy.
     * @param {MessageCreator} customMessage
     * Extensible and overridable custom error messages for policy failures.
     * @return {string[]} Array of strings with all processed policy errors.
     */
    static parseFailedPolicyRequirement(failedPolicy, messageCreator) {
        const errors = [];
        failedPolicy.policyRequirements.map((policyRequirement) =&gt; {
            errors.push(this.parsePolicyRequirement(failedPolicy.property, policyRequirement, messageCreator));
        });
        return errors;
    }
    /**
     * Parses a policy error into a human readable error message.
     *
     * @param {string} property The property with the policy failure.
     * @param {PolicyRequirement} policy The policy failure data.
     * @param {MessageCreator} customMessage
     * Extensible and overridable custom error messages for policy failures.
     * @return {string} Human readable error message.
     */
    static parsePolicyRequirement(property, policy, messageCreator = {}) {
        // AM is returning policy requirement failures as JSON strings
        let policyObject;
        if (typeof policy === &#39;string&#39;) {
            try {
                const parsed = JSON.parse(policy);
                policyObject =
                    typeof parsed === &#39;string&#39;
                        ? { policyRequirement: parsed }
                        : parsed;
            }
            catch {
                policyObject = { policyRequirement: policy };
            }
        }
        else {
            policyObject = { ...policy };
        }
        const policyRequirement = policyObject.policyRequirement;
        // Determine which message creator function to use
        const effectiveMessageCreator = messageCreator[policyRequirement] ||
            defaultMessageCreator[policyRequirement] ||
            defaultMessageCreator[PolicyKey.UnknownPolicy];
        // Flatten the parameters and create the message
        const params = policyObject.params
            ? { ...policyObject.params, policyRequirement }
            : { policyRequirement };
        const message = effectiveMessageCreator(property, params);
        return message;
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function getCode(payload) {
    return Number(payload.code);
}
function getDetail(payload) {
    return payload.detail;
}
function getMessage(payload) {
    return payload.message;
}
function getProcessedMessage(payload, messageCreator) {
    return Policy.parseErrors(payload, messageCreator);
}
function getReason(payload) {
    return payload.reason;
}
function createJourneyLoginFailure(payload) {
    return {
        payload,
        type: StepType.LoginFailure,
        getCode: () =&gt; getCode(payload),
        getDetail: () =&gt; getDetail(payload),
        getMessage: () =&gt; getMessage(payload),
        getProcessedMessage: (messageCreator) =&gt; getProcessedMessage(payload, messageCreator),
        getReason: () =&gt; getReason(payload),
    };
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Base class for authentication tree callback wrappers.
 */
class BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        this.payload = payload;
    }
    /**
     * Gets the name of this callback type.
     */
    getType() {
        return this.payload.type;
    }
    /**
     * Gets the value of the specified input element, or the first element if `selector` is not
     * provided.
     *
     * @param selector The index position or name of the desired element
     */
    getInputValue(selector = 0) {
        return this.getArrayElement(this.payload.input, selector).value;
    }
    /**
     * Sets the value of the specified input element, or the first element if `selector` is not
     * provided.
     *
     * @param selector The index position or name of the desired element
     */
    setInputValue(value, selector = 0) {
        this.getArrayElement(this.payload.input, selector).value = value;
    }
    /**
     * Gets the value of the specified output element, or the first element if `selector`
     * is not provided.
     *
     * @param selector The index position or name of the desired element
     */
    getOutputValue(selector = 0) {
        return this.getArrayElement(this.payload.output, selector).value;
    }
    /**
     * Gets the value of the first output element with the specified name or the
     * specified default value.
     *
     * @param name The name of the desired element
     */
    getOutputByName(name, defaultValue) {
        const output = this.payload.output.find((x) =&gt; x.name === name);
        return output ? output.value : defaultValue;
    }
    getArrayElement(array, selector = 0) {
        if (array === undefined) {
            throw new Error(`No NameValue array was provided to search (selector ${selector})`);
        }
        if (typeof selector === &#39;number&#39;) {
            if (selector &lt; 0 || selector &gt; array.length - 1) {
                throw new Error(`Selector index ${selector} is out of range`);
            }
            return array[selector];
        }
        if (typeof selector === &#39;string&#39;) {
            const input = array.find((x) =&gt; x.name === selector);
            if (!input) {
                throw new Error(`Missing callback input entry &quot;${selector}&quot;`);
            }
            return input;
        }
        // Duck typing for RegEx
        if (typeof selector === &#39;object&#39; &amp;&amp; selector.test &amp;&amp; Boolean(selector.exec)) {
            const input = array.find((x) =&gt; selector.test(x.name));
            if (!input) {
                throw new Error(`Missing callback input entry &quot;${selector}&quot;`);
            }
            return input;
        }
        throw new Error(&#39;Invalid selector value type&#39;);
    }
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect attributes.
 *
 * @typeparam T Maps to StringAttributeInputCallback, NumberAttributeInputCallback and
 *     BooleanAttributeInputCallback, respectively
 */
class AttributeInputCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the attribute name.
     */
    getName() {
        return this.getOutputByName(&#39;name&#39;, &#39;&#39;);
    }
    /**
     * Gets the attribute prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Gets whether the attribute is required.
     */
    isRequired() {
        return this.getOutputByName(&#39;required&#39;, false);
    }
    /**
     * Gets the callback&#39;s failed policies.
     */
    getFailedPolicies() {
        const failedPoliciesJsonStrings = this.getOutputByName(&#39;failedPolicies&#39;, []);
        try {
            return failedPoliciesJsonStrings.map((v) =&gt; JSON.parse(v));
        }
        catch {
            throw new Error(&#39;Unable to parse &quot;failed policies&quot; from the ForgeRock server. The JSON within `AttributeInputCallback` was either malformed or missing.&#39;);
        }
    }
    /**
     * Gets the callback&#39;s applicable policies.
     */
    getPolicies() {
        return this.getOutputByName(&#39;policies&#39;, {});
    }
    /**
     * Set if validating value only.
     */
    setValidateOnly(value) {
        this.setInputValue(value, /validateOnly/);
    }
    /**
     * Sets the attribute&#39;s value.
     */
    setValue(value) {
        this.setInputValue(value);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect an answer to a choice.
 */
class ChoiceCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the choice&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Gets the choice&#39;s default answer.
     */
    getDefaultChoice() {
        return this.getOutputByName(&#39;defaultChoice&#39;, 0);
    }
    /**
     * Gets the choice&#39;s possible answers.
     */
    getChoices() {
        return this.getOutputByName(&#39;choices&#39;, []);
    }
    /**
     * Sets the choice&#39;s answer by index position.
     */
    setChoiceIndex(index) {
        const length = this.getChoices().length;
        if (index &lt; 0 || index &gt; length - 1) {
            throw new Error(`${index} is out of bounds`);
        }
        this.setInputValue(index);
    }
    /**
     * Sets the choice&#39;s answer by value.
     */
    setChoiceValue(value) {
        const index = this.getChoices().indexOf(value);
        if (index === -1) {
            throw new Error(`&quot;${value}&quot; is not a valid choice`);
        }
        this.setInputValue(index);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect a confirmation to a message.
 */
class ConfirmationCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the index position of the confirmation&#39;s default answer.
     */
    getDefaultOption() {
        return Number(this.getOutputByName(&#39;defaultOption&#39;, 0));
    }
    /**
     * Gets the confirmation&#39;s message type.
     */
    getMessageType() {
        return Number(this.getOutputByName(&#39;messageType&#39;, 0));
    }
    /**
     * Gets the confirmation&#39;s possible answers.
     */
    getOptions() {
        return this.getOutputByName(&#39;options&#39;, []);
    }
    /**
     * Gets the confirmation&#39;s option type.
     */
    getOptionType() {
        return Number(this.getOutputByName(&#39;optionType&#39;, 0));
    }
    /**
     * Gets the confirmation&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Set option index.
     */
    setOptionIndex(index) {
        const opts = this.getOptions();
        if (!Number.isInteger(index) || index &lt; 0 || index &gt;= opts.length) {
            throw new Error(`&quot;${index}&quot; is not a valid choice (0-${Math.max(0, opts.length - 1)})`);
        }
        this.setInputValue(index);
    }
    /**
     * Set option value.
     */
    setOptionValue(value) {
        const index = this.getOptions().indexOf(value);
        if (index === -1) {
            throw new Error(`&quot;${value}&quot; is not a valid choice`);
        }
        this.setInputValue(index);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect device profile data.
 */
class DeviceProfileCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s data.
     */
    getMessage() {
        return this.getOutputByName(&#39;message&#39;, &#39;&#39;);
    }
    /**
     * Does callback require metadata?
     */
    isMetadataRequired() {
        return this.getOutputByName(&#39;metadata&#39;, false);
    }
    /**
     * Does callback require location data?
     */
    isLocationRequired() {
        return this.getOutputByName(&#39;location&#39;, false);
    }
    /**
     * Sets the profile.
     */
    setProfile(profile) {
        this.setInputValue(JSON.stringify(profile));
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect information indirectly from the user.
 */
class HiddenValueCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect KBA-style security questions and answers.
 */
class KbaCreateCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Gets the callback&#39;s list of pre-defined security questions.
     */
    getPredefinedQuestions() {
        return this.getOutputByName(&#39;predefinedQuestions&#39;, []);
    }
    /**
     * Gets whether the user can define questions.
     */
    isAllowedUserDefinedQuestions() {
        return this.getOutputByName(&#39;allowUserDefinedQuestions&#39;, false);
    }
    /**
     * Sets the callback&#39;s security question.
     */
    setQuestion(question) {
        this.setValue(&#39;question&#39;, question);
    }
    /**
     * Sets the callback&#39;s security question answer.
     */
    setAnswer(answer) {
        this.setValue(&#39;answer&#39;, answer);
    }
    setValue(type, value) {
        if (!this.payload.input) {
            throw new Error(&#39;KBA payload is missing input&#39;);
        }
        const input = this.payload.input.find((x) =&gt; x.name.endsWith(type));
        if (!input) {
            throw new Error(`No input has name ending in &quot;${type}&quot;`);
        }
        input.value = value;
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to deliver and collect miscellaneous data.
 */
class MetadataCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s data.
     */
    getData() {
        return this.getOutputByName(&#39;data&#39;, {});
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect a username.
 */
class NameCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Sets the username.
     */
    setName(name) {
        this.setInputValue(name);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect a password.
 */
class PasswordCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s failed policies.
     */
    getFailedPolicies() {
        return this.getOutputByName(&#39;failedPolicies&#39;, []);
    }
    /**
     * Gets the callback&#39;s applicable policies.
     */
    getPolicies() {
        return this.getOutputByName(&#39;policies&#39;, []);
    }
    /**
     * Gets the callback&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Sets the password.
     */
    setPassword(password) {
        this.setInputValue(password);
    }
}

/*
 * Copyright (c) 2024 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @class - Represents a callback used to complete and package up device and behavioral data.
 */
class PingOneProtectEvaluationCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s pauseBehavioralData value.
     * @returns {boolean}
     */
    getPauseBehavioralData() {
        return this.getOutputByName(&#39;pauseBehavioralData&#39;, false);
    }
    /**
     * @method setData - Set the result of data collection
     * @param {string} data - Data from calling pingProtect.get()
     * @returns {void}
     */
    setData(data) {
        this.setInputValue(data, /signals/);
    }
    /**
     * @method setClientError - Set the client error message
     * @param {string} errorMessage - Error message
     * @returns {void}
     */
    setClientError(errorMessage) {
        this.setInputValue(errorMessage, /clientError/);
    }
}
/**
  * Example of callback:
{
  &quot;type&quot;: &quot;PingOneProtectEvaluationCallback&quot;,
  &quot;output&quot;: [
    {
      &quot;name&quot;: &quot;pauseBehavioralData&quot;,
      &quot;value&quot;: true
    }
  ],
  &quot;input&quot;: [
    {
      &quot;name&quot;: &quot;IDToken1signals&quot;,
      &quot;value&quot;: &quot;&quot;
    },
    {
      &quot;name&quot;: &quot;IDToken1clientError&quot;,
      &quot;value&quot;: &quot;&quot;
    }
  ]
}
*/

/*
 * Copyright (c) 2024 - 2026 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @class - Represents a callback used to initialize and start device and behavioral data collection.
 */
class PingOneProtectInitializeCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Get callback&#39;s initialization config settings
     */
    getConfig() {
        const signalsInitializationOptions = this.getOutputByName(&#39;signalsInitializationOptions&#39;, undefined);
        if (signalsInitializationOptions !== null &amp;&amp;
            typeof signalsInitializationOptions === &#39;object&#39; &amp;&amp;
            !Array.isArray(signalsInitializationOptions)) {
            return signalsInitializationOptions;
        }
        const config = {
            envId: this.getOutputByName(&#39;envId&#39;, &#39;&#39;),
            consoleLogEnabled: this.getOutputByName(&#39;consoleLogEnabled&#39;, false),
            deviceAttributesToIgnore: this.getOutputByName(&#39;deviceAttributesToIgnore&#39;, []),
            customHost: this.getOutputByName(&#39;customHost&#39;, &#39;&#39;),
            lazyMetadata: this.getOutputByName(&#39;lazyMetadata&#39;, false),
            behavioralDataCollection: this.getOutputByName(&#39;behavioralDataCollection&#39;, true),
            deviceKeyRsyncIntervals: this.getOutputByName(&#39;deviceKeyRsyncIntervals&#39;, 14),
            enableTrust: this.getOutputByName(&#39;enableTrust&#39;, false),
            disableTags: this.getOutputByName(&#39;disableTags&#39;, false),
            disableHub: this.getOutputByName(&#39;disableHub&#39;, false),
        };
        return config;
    }
    setClientError(errorMessage) {
        this.setInputValue(errorMessage, /clientError/);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to instruct the system to poll while a backend process completes.
 */
class PollingWaitCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the message to display while polling.
     */
    getMessage() {
        return this.getOutputByName(&#39;message&#39;, &#39;&#39;);
    }
    /**
     * Gets the polling interval in milliseconds.
     */
    getWaitTime() {
        return Number(this.getOutputByName(&#39;waitTime&#39;, 0));
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to integrate reCAPTCHA.
 */
class ReCaptchaCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the reCAPTCHA site key.
     */
    getSiteKey() {
        return this.getOutputByName(&#39;recaptchaSiteKey&#39;, &#39;&#39;);
    }
    /**
     * Sets the reCAPTCHA result.
     */
    setResult(result) {
        this.setInputValue(result);
    }
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * recaptcha-callback.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to integrate reCAPTCHA.
 */
class ReCaptchaEnterpriseCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the reCAPTCHA site key.
     */
    getSiteKey() {
        return this.getOutputByName(&#39;recaptchaSiteKey&#39;, &#39;&#39;);
    }
    /**
     * Get the api url
     */
    getApiUrl() {
        return this.getOutputByName(&#39;captchaApiUri&#39;, &#39;&#39;);
    }
    /**
     * Get the class name
     */
    getElementClass() {
        return this.getOutputByName(&#39;captchaDivClass&#39;, &#39;&#39;);
    }
    /**
     * Sets the reCAPTCHA result.
     */
    setResult(result) {
        this.setInputValue(result);
    }
    /**
     * Set client client error
     */
    setClientError(error) {
        this.setInputValue(error, &#39;IDToken1clientError&#39;);
    }
    /**
     * Set the recaptcha payload
     */
    setPayload(payload) {
        this.setInputValue(payload, &#39;IDToken1payload&#39;);
    }
    /**
     * Set the recaptcha action
     */
    setAction(action) {
        this.setInputValue(action, &#39;IDToken1action&#39;);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect an answer to a choice.
 */
class RedirectCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the redirect URL.
     */
    getRedirectUrl() {
        return this.getOutputByName(&#39;redirectUrl&#39;, &#39;&#39;);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect an answer to a choice.
 */
class SelectIdPCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the available providers.
     */
    getProviders() {
        return this.getOutputByName(&#39;providers&#39;, []);
    }
    /**
     * Sets the provider by name.
     */
    setProvider(value) {
        const item = this.getProviders().find((item) =&gt; item.provider === value);
        if (!item) {
            throw new Error(`&quot;${value}&quot; is not a valid choice`);
        }
        this.setInputValue(item.provider);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to display a message.
 */
class TextOutputCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the message content.
     */
    getMessage() {
        return this.getOutputByName(&#39;message&#39;, &#39;&#39;);
    }
    /**
     * Gets the message type.
     * Official docs state this is a number, but in practice it&#39;s a string.
     */
    getMessageType() {
        return this.getOutputByName(&#39;messageType&#39;, &#39;&#39;);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to display a message.
 */
class SuspendedTextOutputCallback extends TextOutputCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect acceptance of terms and conditions.
 */
class TermsAndConditionsCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the terms and conditions content.
     */
    getTerms() {
        return this.getOutputByName(&#39;terms&#39;, &#39;&#39;);
    }
    /**
     * Gets the version of the terms and conditions.
     */
    getVersion() {
        return this.getOutputByName(&#39;version&#39;, &#39;&#39;);
    }
    /**
     * Gets the date of the terms and conditions.
     */
    getCreateDate() {
        const data = this.getOutputByName(&#39;createDate&#39;, &#39;&#39;);
        const date = new Date(data);
        return Number.isNaN(date.getTime()) ? null : date;
    }
    /**
     * Sets the callback&#39;s acceptance.
     */
    setAccepted(accepted = true) {
        this.setInputValue(accepted);
    }
}

/*
 * Copyright (c) 2022 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to retrieve input from the user.
 */
class TextInputCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Sets the callback&#39;s input value.
     */
    setInput(input) {
        this.setInputValue(input);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect a valid platform password.
 */
class ValidatedCreatePasswordCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s failed policies.
     */
    getFailedPolicies() {
        const failedPolicies = this.getOutputByName(&#39;failedPolicies&#39;, []);
        try {
            return failedPolicies.map((v) =&gt; JSON.parse(v));
        }
        catch {
            throw new Error(&#39;Unable to parse &quot;failed policies&quot; from the ForgeRock server. The JSON within `ValidatedCreatePasswordCallback` was either malformed or missing.&#39;);
        }
    }
    /**
     * Gets the callback&#39;s applicable policies.
     */
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    getPolicies() {
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        return this.getOutputByName(&#39;policies&#39;, {});
    }
    /**
     * Gets the callback&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Gets whether the password is required.
     */
    isRequired() {
        return this.getOutputByName(&#39;required&#39;, false);
    }
    /**
     * Sets the callback&#39;s password.
     */
    setPassword(password) {
        this.setInputValue(password);
    }
    /**
     * Set if validating value only.
     */
    setValidateOnly(value) {
        this.setInputValue(value, /validateOnly/);
    }
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Represents a callback used to collect a valid platform username.
 */
class ValidatedCreateUsernameCallback extends BaseCallback {
    payload;
    /**
     * @param payload The raw payload returned by OpenAM
     */
    constructor(payload) {
        super(payload);
        this.payload = payload;
    }
    /**
     * Gets the callback&#39;s prompt.
     */
    getPrompt() {
        return this.getOutputByName(&#39;prompt&#39;, &#39;&#39;);
    }
    /**
     * Gets the callback&#39;s failed policies.
     */
    getFailedPolicies() {
        const failedPolicies = this.getOutputByName(&#39;failedPolicies&#39;, []);
        try {
            return failedPolicies.map((v) =&gt; JSON.parse(v));
        }
        catch {
            throw new Error(&#39;Unable to parse &quot;failed policies&quot; from the ForgeRock server. The JSON within `ValidatedCreateUsernameCallback` was either malformed or missing.&#39;);
        }
    }
    /**
     * Gets the callback&#39;s applicable policies.
     */
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    getPolicies() {
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        return this.getOutputByName(&#39;policies&#39;, {});
    }
    /**
     * Gets whether the username is required.
     */
    isRequired() {
        return this.getOutputByName(&#39;required&#39;, false);
    }
    /**
     * Sets the callback&#39;s username.
     */
    setName(name) {
        this.setInputValue(name);
    }
    /**
     * Set if validating value only.
     */
    setValidateOnly(value) {
        this.setInputValue(value, /validateOnly/);
    }
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @hidden
 */
function createCallback(callback) {
    switch (callback.type) {
        case callbackType.BooleanAttributeInputCallback:
            return new AttributeInputCallback(callback);
        case callbackType.ChoiceCallback:
            return new ChoiceCallback(callback);
        case callbackType.ConfirmationCallback:
            return new ConfirmationCallback(callback);
        case callbackType.DeviceProfileCallback:
            return new DeviceProfileCallback(callback);
        case callbackType.HiddenValueCallback:
            return new HiddenValueCallback(callback);
        case callbackType.KbaCreateCallback:
            return new KbaCreateCallback(callback);
        case callbackType.MetadataCallback:
            return new MetadataCallback(callback);
        case callbackType.NameCallback:
            return new NameCallback(callback);
        case callbackType.NumberAttributeInputCallback:
            return new AttributeInputCallback(callback);
        case callbackType.PasswordCallback:
            return new PasswordCallback(callback);
        case callbackType.PingOneProtectEvaluationCallback:
            return new PingOneProtectEvaluationCallback(callback);
        case callbackType.PingOneProtectInitializeCallback:
            return new PingOneProtectInitializeCallback(callback);
        case callbackType.PollingWaitCallback:
            return new PollingWaitCallback(callback);
        case callbackType.ReCaptchaCallback:
            return new ReCaptchaCallback(callback);
        case callbackType.ReCaptchaEnterpriseCallback:
            return new ReCaptchaEnterpriseCallback(callback);
        case callbackType.RedirectCallback:
            return new RedirectCallback(callback);
        case callbackType.SelectIdPCallback:
            return new SelectIdPCallback(callback);
        case callbackType.StringAttributeInputCallback:
            return new AttributeInputCallback(callback);
        case callbackType.SuspendedTextOutputCallback:
            return new SuspendedTextOutputCallback(callback);
        case callbackType.TermsAndConditionsCallback:
            return new TermsAndConditionsCallback(callback);
        case callbackType.TextInputCallback:
            return new TextInputCallback(callback);
        case callbackType.TextOutputCallback:
            return new TextOutputCallback(callback);
        case callbackType.ValidatedCreatePasswordCallback:
            return new ValidatedCreatePasswordCallback(callback);
        case callbackType.ValidatedCreateUsernameCallback:
            return new ValidatedCreateUsernameCallback(callback);
        default:
            return new BaseCallback(callback);
    }
}

/*
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function getCallbacksOfType(callbacks, type) {
    return callbacks.filter((x) =&gt; x.getType() === type);
}
function getCallbackOfType(callbacks, type) {
    const callbacksOfType = getCallbacksOfType(callbacks, type);
    if (callbacksOfType.length !== 1) {
        throw new Error(`Expected 1 callback of type &quot;${type}&quot;, but found ${callbacksOfType.length}`);
    }
    return callbacksOfType[0];
}
function setCallbackValue(callbacks, type, value) {
    const callbacksToUpdate = getCallbacksOfType(callbacks, type);
    if (callbacksToUpdate.length !== 1) {
        throw new Error(`Expected 1 callback of type &quot;${type}&quot;, but found ${callbacksToUpdate.length}`);
    }
    callbacksToUpdate[0].setInputValue(value);
}
function getDescription(payload) {
    return payload.description;
}
function getHeader(payload) {
    return payload.header;
}
function getStage(payload) {
    return payload.stage;
}
function convertCallbacks(callbacks, callbackFactory) {
    const converted = callbacks.map((x) =&gt; {
        // This gives preference to the provided factory and falls back to our default implementation
        return (createCallback)(x) || createCallback(x);
    });
    return converted;
}
function createJourneyStep(payload, callbackFactory) {
    // Redux Toolkit freezes data, so we need to clone it before making any changes
    const unfrozenPayload = typeof structuredClone === &#39;function&#39;
        ? structuredClone(payload)
        : JSON.parse(JSON.stringify(payload));
    const convertedCallbacks = unfrozenPayload.callbacks
        ? convertCallbacks(unfrozenPayload.callbacks)
        : [];
    return {
        payload: unfrozenPayload,
        callbacks: convertedCallbacks,
        type: StepType.Step,
        getCallbackOfType: (type) =&gt; getCallbackOfType(convertedCallbacks, type),
        getCallbacksOfType: (type) =&gt; getCallbacksOfType(convertedCallbacks, type),
        setCallbackValue: (type, value) =&gt; setCallbackValue(convertedCallbacks, type, value),
        getDescription: () =&gt; getDescription(payload),
        getHeader: () =&gt; getHeader(payload),
        getStage: () =&gt; getStage(payload),
    };
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Creates a journey object from a raw Step response.
 * Determines the step type based on the presence of authId or successUrl properties
 * and returns the appropriate journey object type.
 *
 * @param step - The raw Step response from the authentication API
 * @returns A JourneyStep, JourneyLoginSuccess, JourneyLoginFailure, or GenericError if the step type cannot be determined
 */
function createJourneyObject(step) {
    let type;
    if (step.authId) {
        type = StepType.Step;
    }
    else if (step.successUrl) {
        type = StepType.LoginSuccess;
    }
    else {
        type = StepType.LoginFailure;
    }
    switch (type) {
        case StepType.LoginSuccess:
            return createJourneyLoginSuccess(step);
        case StepType.LoginFailure:
            return createJourneyLoginFailure(step);
        case StepType.Step:
            return createJourneyStep(step);
        default:
            return {
                error: &#39;unknown_step_type&#39;,
                message: &#39;Unable to determine step type from server response&#39;,
                type: &#39;unknown_error&#39;,
            };
    }
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Creates a journey client for AM authentication tree/journey interactions.
 *
 * Journey-client is designed specifically for ForgeRock Access Management (AM) servers.
 * It uses AM-proprietary endpoints for callback-based authentication trees.
 *
 * @param options - Configuration options for the journey client
 * @param options.config - Configuration options (see {@link JourneyClientConfig}); only `serverConfig.wellknown` is required
 * @param options.requestMiddleware - Optional middleware for request customization
 * @param options.logger - Optional logger configuration
 * @returns A journey client instance
 * @throws When the wellknown URL is invalid, the fetch fails, or the response indicates a non-AM server
 *
 * @example
 * ```typescript
 * try {
 *   const client = await journey({
 *     config: {
 *       serverConfig: {
 *         wellknown: &#39;https://am.example.com/am/oauth2/alpha/.well-known/openid-configuration&#39;,
 *       },
 *     },
 *   });
 *   const step = await client.start({ journey: &#39;Login&#39; });
 * } catch (error) {
 *   console.error(&#39;Failed to initialize:&#39;, error.message);
 * }
 * ```
 */
async function journey({ config, requestMiddleware, logger: logger$1, }) {
    const log = logger({ level: logger$1?.level || &#39;error&#39;, custom: logger$1?.custom });
    const ignoredProperties = [
        &#39;callbackFactory&#39;,
        &#39;clientId&#39;,
        &#39;middleware&#39;,
        &#39;oauthThreshold&#39;,
        &#39;platformHeader&#39;,
        &#39;prefix&#39;,
        &#39;realmPath&#39;,
        &#39;redirectUri&#39;,
        &#39;scope&#39;,
        &#39;tokenStore&#39;,
        &#39;tree&#39;,
        &#39;type&#39;,
    ];
    const providedIgnored = ignoredProperties.filter((prop) =&gt; config[prop] !== undefined);
    if (config.serverConfig?.timeout !== undefined) {
        providedIgnored.push(&#39;serverConfig.timeout&#39;);
    }
    if (providedIgnored.length &gt; 0) {
        log.warn(`The following configuration properties are not used by journey-client and will be ignored: ${providedIgnored.join(&#39;, &#39;)}`);
    }
    const store = createJourneyStore({ requestMiddleware, logger: log });
    const { wellknown } = config.serverConfig;
    if (!isValidWellknownUrl(wellknown)) {
        const message = `Invalid wellknown URL: ${wellknown}. URL must use HTTPS (or HTTP for localhost) and end with /.well-known/openid-configuration.`;
        log.error(message);
        throw new Error(message);
    }
    const { data: wellknownResponse, error: fetchError } = await store.dispatch(wellknownApi.endpoints.configuration.initiate(wellknown));
    if (fetchError || !wellknownResponse) {
        const error = createWellknownError(fetchError);
        const message = `${error.error}: ${error.message}`;
        log.error(message);
        throw new Error(message);
    }
    store.dispatch(configSlice.actions.set({
        wellknownResponse: wellknownResponse,
    }));
    const configError = store.getState().config.error;
    if (configError) {
        const message = `${configError.error}: ${configError.message}`;
        log.error(message);
        throw new Error(message);
    }
    const stepStorage = createStorage({
        type: &#39;sessionStorage&#39;,
        name: &#39;journey-step&#39;,
    });
    const self = {
        start: async (options) =&gt; {
            const { data } = await store.dispatch(journeyApi.endpoints.start.initiate(options));
            if (!data) {
                const error = {
                    error: &#39;no_response_data&#39;,
                    message: &#39;No data received from server when starting journey&#39;,
                    type: &#39;unknown_error&#39;,
                };
                return error;
            }
            return createJourneyObject(data);
        },
        /**
         * Submits the current Step payload to the authentication API and retrieves the next JourneyStep in the journey.
         */
        next: async (step, options) =&gt; {
            const { data } = await store.dispatch(journeyApi.endpoints.next.initiate({ step, options }));
            if (!data) {
                const error = {
                    error: &#39;no_response_data&#39;,
                    message: &#39;No data received from server when submitting step&#39;,
                    type: &#39;unknown_error&#39;,
                };
                return error;
            }
            return createJourneyObject(data);
        },
        // TODO: Remove the actual redirect from this method and just return the URL to the caller
        redirect: async (step) =&gt; {
            const cb = step.getCallbackOfType(callbackType.RedirectCallback);
            if (!cb) {
                // TODO: Remove throwing errors from SDK and use Result types instead
                throw new Error(&#39;RedirectCallback not found on step&#39;);
            }
            const redirectUrl = cb.getRedirectUrl();
            if (!redirectUrl || typeof redirectUrl !== &#39;string&#39;) {
                throw new Error(&#39;Redirect URL not found on RedirectCallback&#39;);
            }
            const err = await stepStorage.set({ step: step.payload });
            if (isGenericError$1(err)) {
                log.warn(&#39;Failed to persist step before redirect&#39;, err);
            }
            window.location.assign(redirectUrl);
        },
        resume: async (url, options) =&gt; {
            const parsedUrl = new URL(url);
            const code = parsedUrl.searchParams.get(&#39;code&#39;);
            const error = parsedUrl.searchParams.get(&#39;error&#39;);
            const errorCode = parsedUrl.searchParams.get(&#39;errorCode&#39;);
            const errorMessage = parsedUrl.searchParams.get(&#39;errorMessage&#39;);
            const state = parsedUrl.searchParams.get(&#39;state&#39;);
            const form_post_entry = parsedUrl.searchParams.get(&#39;form_post_entry&#39;);
            const nonce = parsedUrl.searchParams.get(&#39;nonce&#39;);
            const RelayState = parsedUrl.searchParams.get(&#39;RelayState&#39;);
            const responsekey = parsedUrl.searchParams.get(&#39;responsekey&#39;);
            const scope = parsedUrl.searchParams.get(&#39;scope&#39;);
            const suspendedId = parsedUrl.searchParams.get(&#39;suspendedId&#39;);
            const authIndexValue = parsedUrl.searchParams.get(&#39;authIndexValue&#39;) ?? undefined;
            let previousStep;
            function requiresPreviousStep() {
                return (code &amp;&amp; state) || form_post_entry || responsekey;
            }
            function isStoredStep(obj) {
                return (typeof obj === &#39;object&#39; &amp;&amp;
                    obj !== null &amp;&amp;
                    &#39;step&#39; in obj &amp;&amp;
                    typeof obj.step === &#39;object&#39;);
            }
            if (requiresPreviousStep()) {
                const stored = await stepStorage.get();
                if (stored) {
                    if (isGenericError$1(stored)) {
                        throw new Error(`Error retrieving previous step: ${stored.message || stored.error}`);
                    }
                    else if (isStoredStep(stored)) {
                        previousStep = createJourneyObject(stored.step);
                    }
                }
                await stepStorage.remove();
                if (!previousStep) {
                    throw new Error(&#39;Error: previous step information not found in storage for resume operation.&#39;);
                }
            }
            const resumeOptions = {
                ...options,
                query: {
                    ...(code &amp;&amp; { code }),
                    ...(error &amp;&amp; { error }),
                    ...(errorCode &amp;&amp; { errorCode }),
                    ...(errorMessage &amp;&amp; { errorMessage }),
                    ...(form_post_entry &amp;&amp; { form_post_entry }),
                    ...(nonce &amp;&amp; { nonce }),
                    ...(RelayState &amp;&amp; { RelayState }),
                    ...(responsekey &amp;&amp; { responsekey }),
                    ...(scope &amp;&amp; { scope }),
                    ...(state &amp;&amp; { state }),
                    ...(suspendedId &amp;&amp; { suspendedId }),
                    ...(options &amp;&amp; options.query),
                },
                ...((options?.journey ?? authIndexValue) &amp;&amp; {
                    journey: options?.journey ?? authIndexValue,
                }),
            };
            if (previousStep) {
                return await self.next(previousStep, resumeOptions);
            }
            else {
                // TODO: We should better handle this type misalignment
                const startOptions = resumeOptions;
                return await self.start(startOptions);
            }
        },
        /**
         * Ends the current authentication session by calling the `/sessions` endpoint.
         */
        terminate: async (options) =&gt; {
            const { error } = await store.dispatch(journeyApi.endpoints.terminate.initiate(options));
            if (error) {
                return {
                    error: &#39;terminate_failed&#39;,
                    message: &#39;status&#39; in error
                        ? `Failed to terminate session: ${error.status}`
                        : &#39;Failed to terminate session&#39;,
                    type: &#39;unknown_error&#39;,
                };
            }
        },
    };
    return self;
}

function attributeInputComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const input = document.createElement(&quot;input&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  const attributeType = callback.getType();
  if (attributeType === &quot;BooleanAttributeInputCallback&quot;) {
    input.type = &quot;checkbox&quot;;
    input.checked = callback.getInputValue() || false;
  } else if (attributeType === &quot;NumberAttributeInputCallback&quot;) {
    input.type = &quot;number&quot;;
    input.value = String(callback.getInputValue() || &quot;&quot;);
  } else {
    input.type = &quot;text&quot;;
    input.value = String(callback.getInputValue() || &quot;&quot;);
  }
  input.id = collectorKey;
  input.name = collectorKey;
  input.required = callback.isRequired();
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;input&quot;, (event) =&gt; {
    const target = event.target;
    if (attributeType === &quot;BooleanAttributeInputCallback&quot;) {
      callback.setInputValue(target.checked);
    } else if (attributeType === &quot;NumberAttributeInputCallback&quot;) {
      callback.setInputValue(Number(target.value));
    } else {
      callback.setInputValue(target.value);
    }
  });
}

function choiceComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const select = document.createElement(&quot;select&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  select.id = collectorKey;
  select.name = collectorKey;
  const choices = callback.getChoices();
  const defaultChoice = callback.getDefaultChoice();
  choices.forEach((choice, index) =&gt; {
    const option = document.createElement(&quot;option&quot;);
    option.value = String(index);
    option.text = choice;
    option.selected = index === defaultChoice;
    select.appendChild(option);
  });
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(select);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;change&quot;, (event) =&gt; {
    const selectedIndex = Number(event.target.value);
    callback.setChoiceIndex(selectedIndex);
  });
}

function confirmationComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const container = document.createElement(&quot;div&quot;);
  label.innerText = callback.getPrompt();
  container.id = collectorKey;
  const options = callback.getOptions();
  const defaultOption = callback.getDefaultOption();
  options.forEach((option, index) =&gt; {
    const radioContainer = document.createElement(&quot;div&quot;);
    const radio = document.createElement(&quot;input&quot;);
    const radioLabel = document.createElement(&quot;label&quot;);
    radio.type = &quot;radio&quot;;
    radio.id = `${collectorKey}-${index}`;
    radio.name = collectorKey;
    radio.value = String(index);
    radio.checked = index === defaultOption;
    radioLabel.htmlFor = `${collectorKey}-${index}`;
    radioLabel.innerText = option;
    radioContainer.appendChild(radio);
    radioContainer.appendChild(radioLabel);
    container.appendChild(radioContainer);
  });
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(container);
  journeyEl?.querySelectorAll(`input[name=&quot;${collectorKey}&quot;]`)?.forEach((radio) =&gt; {
    radio.addEventListener(&quot;change&quot;, (event) =&gt; {
      if (event.target.checked) {
        const selectedIndex = Number(event.target.value);
        callback.setOptionIndex(selectedIndex);
      }
    });
  });
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * defaults.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const browserProps = [
    &#39;userAgent&#39;,
    &#39;appName&#39;,
    &#39;appCodeName&#39;,
    &#39;appVersion&#39;,
    &#39;appMinorVersion&#39;,
    &#39;buildID&#39;,
    &#39;product&#39;,
    &#39;productSub&#39;,
    &#39;vendor&#39;,
    &#39;vendorSub&#39;,
    &#39;browserLanguage&#39;,
];
const configurableCategories = [
    &#39;fontNames&#39;,
    &#39;displayProps&#39;,
    &#39;browserProps&#39;,
    &#39;hardwareProps&#39;,
    &#39;platformProps&#39;,
];
const delay = 30 * 1000;
const devicePlatforms = {
    mac: [&#39;Macintosh&#39;, &#39;MacIntel&#39;, &#39;MacPPC&#39;, &#39;Mac68K&#39;],
    windows: [&#39;Win32&#39;, &#39;Win64&#39;, &#39;Windows&#39;, &#39;WinCE&#39;],
    ios: [&#39;iPhone&#39;, &#39;iPad&#39;, &#39;iPod&#39;],
};
const displayProps = [&#39;width&#39;, &#39;height&#39;, &#39;pixelDepth&#39;, &#39;orientation.angle&#39;];
const fontNames = [
    &#39;cursive&#39;,
    &#39;monospace&#39;,
    &#39;serif&#39;,
    &#39;sans-serif&#39;,
    &#39;fantasy&#39;,
    &#39;Arial&#39;,
    &#39;Arial Black&#39;,
    &#39;Arial Narrow&#39;,
    &#39;Arial Rounded MT Bold&#39;,
    &#39;Bookman Old Style&#39;,
    &#39;Bradley Hand ITC&#39;,
    &#39;Century&#39;,
    &#39;Century Gothic&#39;,
    &#39;Comic Sans MS&#39;,
    &#39;Courier&#39;,
    &#39;Courier New&#39;,
    &#39;Georgia&#39;,
    &#39;Gentium&#39;,
    &#39;Impact&#39;,
    &#39;King&#39;,
    &#39;Lucida Console&#39;,
    &#39;Lalit&#39;,
    &#39;Modena&#39;,
    &#39;Monotype Corsiva&#39;,
    &#39;Papyrus&#39;,
    &#39;Tahoma&#39;,
    &#39;TeX&#39;,
    &#39;Times&#39;,
    &#39;Times New Roman&#39;,
    &#39;Trebuchet MS&#39;,
    &#39;Verdana&#39;,
    &#39;Verona&#39;,
];
const hardwareProps = [
    &#39;cpuClass&#39;,
    &#39;deviceMemory&#39;,
    &#39;hardwareConcurrency&#39;,
    &#39;maxTouchPoints&#39;,
    &#39;oscpu&#39;,
];
const platformProps = [&#39;language&#39;, &#39;platform&#39;, &#39;userLanguage&#39;, &#39;systemLanguage&#39;];

/*
 * @forgerock/ping-javascript-sdk
 *
 * index.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @class JourneyDevice - Collects user device metadata.
 *
 * Example:
 *
 * ```js
 * // Instantiate new device object (w/optional config, if needed)
 * const device = new Device({
 *   // optional configuration
 * });
 *
 * // Call getProfile with required argument obj of boolean properties
 * // of location and metadata
 * const profile = await device.getProfile({
 *   location: isLocationRequired,
 *   metadata: isMetadataRequired,
 * });
 * ```
 */
class Device {
    config;
    logger;
    prefix;
    constructor(configOptions, logLevel = &#39;info&#39;, prefix = &#39;forgerock&#39;) {
        this.logger = logger({ level: logLevel });
        this.prefix = prefix;
        this.config = {
            fontNames,
            devicePlatforms,
            displayProps,
            browserProps,
            hardwareProps,
            platformProps,
        };
        if (configOptions) {
            Object.keys(configOptions).forEach((key) =&gt; {
                if (!configurableCategories.includes(key)) {
                    throw new Error(&#39;Device profile configuration category does not exist.&#39;);
                }
                this.config[key] = configOptions[key];
            });
        }
    }
    getBrowserMeta() {
        if (typeof navigator === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect browser metadata. navigator is not defined.&#39;);
            return {};
        }
        return reduceToObject(this.config.browserProps, navigator);
    }
    getBrowserPluginsNames() {
        if (!(typeof navigator !== &#39;undefined&#39; &amp;&amp; navigator.plugins)) {
            this.logger.warn(&#39;Cannot collect browser plugin information. navigator.plugins is not defined.&#39;);
            return &#39;&#39;;
        }
        return reduceToString(Object.keys(navigator.plugins), navigator.plugins);
    }
    getDeviceName() {
        if (typeof navigator === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect device name. navigator is not defined.&#39;);
            return &#39;&#39;;
        }
        const userAgent = navigator.userAgent;
        const platform = navigator.platform;
        switch (true) {
            case this.config.devicePlatforms.mac.includes(platform):
                return &#39;Mac (Browser)&#39;;
            case this.config.devicePlatforms.ios.includes(platform):
                return `${platform} (Browser)`;
            case this.config.devicePlatforms.windows.includes(platform):
                return &#39;Windows (Browser)&#39;;
            case /Android/.test(platform) || /Android/.test(userAgent):
                return &#39;Android (Browser)&#39;;
            case /CrOS/.test(userAgent) || /Chromebook/.test(userAgent):
                return &#39;Chrome OS (Browser)&#39;;
            case /Linux/.test(platform):
                return &#39;Linux (Browser)&#39;;
            default:
                return `${platform || &#39;Unknown&#39;} (Browser)`;
        }
    }
    getDisplayMeta() {
        if (typeof screen === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect screen information. screen is not defined.&#39;);
            return {};
        }
        return reduceToObject(this.config.displayProps, screen);
    }
    getHardwareMeta() {
        if (typeof navigator === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect OS metadata. Navigator is not defined.&#39;);
            return {};
        }
        return reduceToObject(this.config.hardwareProps, navigator);
    }
    getIdentifier() {
        const storageKey = `${this.prefix}-DeviceID`;
        if (!(typeof globalThis.crypto !== &#39;undefined&#39; &amp;&amp; globalThis.crypto.getRandomValues)) {
            this.logger.warn(&#39;Cannot generate profile ID. Crypto and/or getRandomValues is not supported.&#39;);
            return &#39;&#39;;
        }
        if (!localStorage) {
            this.logger.warn(&#39;Cannot store profile ID. localStorage is not supported.&#39;);
            return &#39;&#39;;
        }
        let id = localStorage.getItem(storageKey);
        if (!id) {
            // generate ID, 3 sections of random numbers: &quot;714524572-2799534390-3707617532&quot;
            id = globalThis.crypto.getRandomValues(new Uint32Array(3)).join(&#39;-&#39;);
            localStorage.setItem(storageKey, id);
        }
        return id;
    }
    getInstalledFonts() {
        if (typeof document === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect font data. Global document object is undefined.&#39;);
            return &#39;&#39;;
        }
        const canvas = document.createElement(&#39;canvas&#39;);
        if (!canvas) {
            this.logger.warn(&#39;Cannot collect font data. Browser does not support canvas element&#39;);
            return &#39;&#39;;
        }
        const context = canvas.getContext &amp;&amp; canvas.getContext(&#39;2d&#39;);
        if (!context) {
            this.logger.warn(&#39;Cannot collect font data. Browser does not support 2d canvas context&#39;);
            return &#39;&#39;;
        }
        const text = &#39;abcdefghi0123456789&#39;;
        context.font = &#39;72px Comic Sans&#39;;
        const baseWidth = context.measureText(text).width;
        const installedFonts = this.config.fontNames.reduce((prev, curr) =&gt; {
            context.font = `72px ${curr}, Comic Sans`;
            const newWidth = context.measureText(text).width;
            if (newWidth !== baseWidth) {
                prev = `${prev}${curr};`;
            }
            return prev;
        }, &#39;&#39;);
        return installedFonts;
    }
    async getLocationCoordinates() {
        if (!(typeof navigator !== &#39;undefined&#39; &amp;&amp; navigator.geolocation)) {
            this.logger.warn(&#39;Cannot collect geolocation information. navigator.geolocation is not defined.&#39;);
            return Promise.resolve({});
        }
        return new Promise((resolve) =&gt; {
            navigator.geolocation.getCurrentPosition((position) =&gt; resolve({
                latitude: position.coords.latitude,
                longitude: position.coords.longitude,
            }), () =&gt; {
                this.logger.warn(&#39;Cannot collect geolocation information. Geolocation API error.&#39;);
                resolve({});
            }, {
                enableHighAccuracy: true,
                timeout: delay,
                maximumAge: 0,
            });
        });
    }
    getOSMeta() {
        if (typeof navigator === &#39;undefined&#39;) {
            this.logger.warn(&#39;Cannot collect OS metadata. navigator is not defined.&#39;);
            return {};
        }
        return reduceToObject(this.config.platformProps, navigator);
    }
    getTimezoneOffset() {
        try {
            return new Date().getTimezoneOffset();
        }
        catch {
            this.logger.warn(&#39;Cannot collect timezone information. getTimezoneOffset is not defined.&#39;);
            return null;
        }
    }
    async getProfile({ location, metadata }) {
        const profile = {
            identifier: this.getIdentifier(),
        };
        if (metadata) {
            profile.metadata = {
                hardware: {
                    ...this.getHardwareMeta(),
                    display: this.getDisplayMeta(),
                },
                browser: {
                    ...this.getBrowserMeta(),
                    plugins: this.getBrowserPluginsNames(),
                },
                platform: {
                    ...this.getOSMeta(),
                    deviceName: this.getDeviceName(),
                    fonts: this.getInstalledFonts(),
                    timezone: this.getTimezoneOffset(),
                },
            };
        }
        if (location) {
            profile.location = await this.getLocationCoordinates();
        }
        return profile;
    }
}

function deviceProfileComponent(journeyEl, callback, idx, onSubmit) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&quot;p&quot;);
  message.id = collectorKey;
  message.innerText = &quot;Collecting device profile information...&quot;;
  journeyEl?.appendChild(message);
  setTimeout(async () =&gt; {
    try {
      const isLocationRequired = callback.isLocationRequired();
      const isMetadataRequired = callback.isMetadataRequired();
      console.log(&quot;Collecting device profile...&quot;, { isLocationRequired, isMetadataRequired });
      const device = new Device();
      const profile = await device.getProfile({
        location: isLocationRequired,
        metadata: isMetadataRequired
      });
      console.log(&quot;Device profile collected successfully&quot;);
      callback.setProfile(profile);
      message.innerText = &quot;Device profile collected successfully!&quot;;
      message.style.color = &quot;green&quot;;
      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&quot;Device profile collection failed:&quot;, error);
      const errorMessage = error instanceof Error ? error.message : &quot;Unknown error&quot;;
      message.innerText = `Collection failed: ${errorMessage}`;
      message.style.color = &quot;red&quot;;
    }
  }, 100);
}

function hiddenValueComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const input = document.createElement(&quot;input&quot;);
  input.type = &quot;hidden&quot;;
  input.id = collectorKey;
  input.name = collectorKey;
  input.value = String(callback.getInputValue() || &quot;&quot;);
  journeyEl?.appendChild(input);
}

function kbaCreateComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const questions = callback.getPredefinedQuestions();
  container.id = collectorKey;
  const questionLabel = document.createElement(&quot;label&quot;);
  questionLabel.htmlFor = `${collectorKey}-question`;
  questionLabel.innerText = callback.getPrompt() + &quot; &quot; + idx;
  const questionInput = document.createElement(&quot;select&quot;);
  questionInput.id = `${collectorKey}-question`;
  questions.forEach((question) =&gt; {
    const option = document.createElement(&quot;option&quot;);
    option.value = question;
    option.text = question;
    questionInput.appendChild(option);
  });
  if (callback.isAllowedUserDefinedQuestions()) {
    const userDefinedOption = document.createElement(&quot;option&quot;);
    userDefinedOption.value = &quot;user-defined&quot;;
    userDefinedOption.text = &quot;Enter your own question&quot;;
    questionInput.appendChild(userDefinedOption);
  }
  const answerLabel = document.createElement(&quot;label&quot;);
  answerLabel.htmlFor = `${collectorKey}-answer`;
  answerLabel.innerText = &quot;Answer &quot; + idx + &quot;:&quot;;
  const answerInput = document.createElement(&quot;input&quot;);
  answerInput.type = &quot;text&quot;;
  answerInput.id = `${collectorKey}-answer`;
  answerInput.placeholder = &quot;Enter your answer&quot;;
  container.appendChild(questionLabel);
  container.appendChild(questionInput);
  container.appendChild(answerLabel);
  container.appendChild(answerInput);
  journeyEl?.appendChild(container);
  questionInput.addEventListener(&quot;input&quot;, (event) =&gt; {
    const selectedQuestion = event.target.value;
    if (selectedQuestion === &quot;user-defined&quot;) {
      const customQuestionLabel = document.createElement(&quot;label&quot;);
      customQuestionLabel.htmlFor = `${collectorKey}-question-user-defined`;
      customQuestionLabel.innerText = &quot;Type your question &quot; + idx + &quot;:&quot;;
      const customQuestionInput = document.createElement(&quot;input&quot;);
      customQuestionInput.type = &quot;text&quot;;
      customQuestionInput.id = `${collectorKey}-question-user-defined`;
      customQuestionInput.placeholder = &quot;Type your question&quot;;
      container.lastElementChild?.before(customQuestionLabel);
      container.lastElementChild?.before(customQuestionInput);
      customQuestionInput.addEventListener(&quot;input&quot;, (e) =&gt; {
        callback.setQuestion(e.target.value);
        console.log(&quot;Custom question &quot; + idx + &quot;:&quot;, callback.getInputValue(0));
      });
    } else {
      callback.setQuestion(event.target.value);
      console.log(&quot;Selected question &quot; + idx + &quot;:&quot;, callback.getInputValue(0));
    }
  });
  answerInput.addEventListener(&quot;input&quot;, (event) =&gt; {
    callback.setAnswer(event.target.value);
    console.log(&quot;Answer &quot; + idx + &quot;:&quot;, callback.getInputValue(1));
  });
}

function metadataComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const hiddenInput = document.createElement(&quot;input&quot;);
  hiddenInput.type = &quot;hidden&quot;;
  hiddenInput.id = collectorKey;
  hiddenInput.name = collectorKey;
  hiddenInput.value = JSON.stringify(callback.getData());
  journeyEl?.appendChild(hiddenInput);
  console.log(&quot;Metadata callback data:&quot;, callback.getData());
}

function passwordComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const input = document.createElement(&quot;input&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &quot;password&quot;;
  input.id = collectorKey;
  input.name = collectorKey;
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;input&quot;, (event) =&gt; {
    callback.setPassword(event.target.value);
  });
}

const scriptRel = &#39;modulepreload&#39;;const assetsURL = function(dep) { return &quot;/&quot;+dep };const seen = {};const __vitePreload = function preload(baseModule, deps, importerUrl) {
	let promise = Promise.resolve();
	if (true               &amp;&amp; deps &amp;&amp; deps.length &gt; 0) {
		document.getElementsByTagName(&quot;link&quot;);
		const cspNonceMeta = document.querySelector(&quot;meta[property=csp-nonce]&quot;);
		const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute(&quot;nonce&quot;);
		function allSettled(promises$2) {
			return Promise.all(promises$2.map((p) =&gt; Promise.resolve(p).then((value$1) =&gt; ({
				status: &quot;fulfilled&quot;,
				value: value$1
			}), (reason) =&gt; ({
				status: &quot;rejected&quot;,
				reason
			}))));
		}
		promise = allSettled(deps.map((dep) =&gt; {
			dep = assetsURL(dep);
			if (dep in seen) return;
			seen[dep] = true;
			const isCss = dep.endsWith(&quot;.css&quot;);
			const cssSelector = isCss ? &quot;[rel=\&quot;stylesheet\&quot;]&quot; : &quot;&quot;;
			if (document.querySelector(`link[href=&quot;${dep}&quot;]${cssSelector}`)) return;
			const link = document.createElement(&quot;link&quot;);
			link.rel = isCss ? &quot;stylesheet&quot; : scriptRel;
			if (!isCss) link.as = &quot;script&quot;;
			link.crossOrigin = &quot;&quot;;
			link.href = dep;
			if (cspNonce) link.setAttribute(&quot;nonce&quot;, cspNonce);
			document.head.appendChild(link);
			if (isCss) return new Promise((res, rej) =&gt; {
				link.addEventListener(&quot;load&quot;, res);
				link.addEventListener(&quot;error&quot;, () =&gt; rej(/* @__PURE__ */ new Error(`Unable to preload CSS for ${dep}`)));
			});
		}));
	}
	function handlePreloadError(err$2) {
		const e$1 = new Event(&quot;vite:preloadError&quot;, { cancelable: true });
		e$1.payload = err$2;
		window.dispatchEvent(e$1);
		if (!e$1.defaultPrevented) throw err$2;
	}
	return promise.then((res) =&gt; {
		for (const item of res || []) {
			if (item.status !== &quot;rejected&quot;) continue;
			handlePreloadError(item.reason);
		}
		return baseModule().catch(handlePreloadError);
	});
};

/**
 * @async
 * @function protect - returns a set of methods to interact with the PingOne Signals SDK
 * @param {ProtectConfig | SignalsInitializationOptions} options - the configuration options for the PingOne Signals SDK
 * @returns {Promise&lt;Protect&gt;} - a set of methods to interact with the PingOne Signals SDK
 */
function protect(options) {
    let protectApiInitialized = false;
    return {
        start: async () =&gt; {
            try {
                /*
                 * Load the Ping Signals SDK
                 * this automatically pollutes the window
                 * there are no exports of this module
                 */
                await __vitePreload(() =&gt; import(&#39;./assets/signals-sdk-DGallF9Y.js&#39;),true              ?[]:void 0);
                protectApiInitialized = true;
            }
            catch (err) {
                console.error(&#39;error loading ping signals&#39;, err);
                return { error: &#39;Failed to load PingOne Signals SDK&#39; };
            }
            try {
                await window._pingOneSignals.init(options);
                if (options.behavioralDataCollection === true ||
                    options.behavioralDataCollection === &#39;true&#39;) {
                    window._pingOneSignals.resumeBehavioralData();
                }
            }
            catch (err) {
                console.error(&#39;error initializing ping protect&#39;, err);
                return { error: &#39;Failed to initialize PingOne Signals SDK&#39; };
            }
        },
        getData: async () =&gt; {
            if (!protectApiInitialized) {
                return { error: &#39;PingOne Signals SDK is not initialized&#39; };
            }
            try {
                return await window._pingOneSignals.getData();
            }
            catch (err) {
                console.error(&#39;error getting data from ping protect&#39;, err);
                return { error: &#39;Failed to get data from Protect&#39; };
            }
        },
        pauseBehavioralData: () =&gt; {
            if (!protectApiInitialized) {
                return { error: &#39;PingOne Signals SDK is not initialized&#39; };
            }
            try {
                window._pingOneSignals.pauseBehavioralData();
            }
            catch (err) {
                console.error(&#39;error pausing behavioral data in ping protect&#39;, err);
                return { error: &#39;Failed to pause behavioral data in Protect&#39; };
            }
        },
        resumeBehavioralData: () =&gt; {
            if (!protectApiInitialized) {
                return { error: &#39;PingOne Signals SDK is not initialized&#39; };
            }
            try {
                window._pingOneSignals.resumeBehavioralData();
            }
            catch (err) {
                console.error(&#39;error resuming behavioral data in ping protect&#39;, err);
                return { error: &#39;Failed to resume behavioral data in Protect&#39; };
            }
        },
    };
}

let protectInstance = null;
function getProtectInstance() {
  return protectInstance;
}
function pingProtectInitializeComponent(journeyEl, callback, idx, onSubmit) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&quot;p&quot;);
  message.id = collectorKey;
  message.innerText = &quot;Initializing PingOne Protect...&quot;;
  journeyEl?.appendChild(message);
  setTimeout(async () =&gt; {
    try {
      const config = callback.getConfig();
      console.log(&quot;Protect callback config:&quot;, config);
      if (!config?.envId) {
        const error = &quot;Missing envId in Protect configuration&quot;;
        console.error(error);
        callback.setClientError(error);
        message.innerText = `Initialization failed: ${error}`;
        message.style.color = &quot;red&quot;;
        return;
      }
      console.log(&quot;Initializing Protect with envId:&quot;, config.envId);
      protectInstance = protect({ envId: config.envId });
      console.log(&quot;Protect instance created&quot;);
      console.log(&quot;Calling protect.start()...&quot;);
      const result = await protectInstance.start();
      console.log(&quot;protect.start() result:&quot;, result);
      if (result?.error) {
        console.error(&quot;Error initializing Protect:&quot;, result.error);
        callback.setClientError(result.error);
        message.innerText = `Initialization failed: ${result.error}`;
        message.style.color = &quot;red&quot;;
        return;
      }
      console.log(&quot;Protect initialized successfully - no errors&quot;);
      message.innerText = &quot;PingOne Protect initialized successfully!&quot;;
      message.style.color = &quot;green&quot;;
      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&quot;Protect initialization failed:&quot;, error);
      const errorMessage = error instanceof Error ? error.message : &quot;Unknown error&quot;;
      callback.setClientError(errorMessage);
      message.innerText = `Initialization failed: ${errorMessage}`;
      message.style.color = &quot;red&quot;;
    }
  }, 100);
}

function pingProtectEvaluationComponent(journeyEl, callback, idx, onSubmit) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&quot;p&quot;);
  message.id = collectorKey;
  message.innerText = &quot;Evaluating risk assessment...&quot;;
  journeyEl?.appendChild(message);
  setTimeout(async () =&gt; {
    try {
      const protectInstance = getProtectInstance();
      if (!protectInstance) {
        throw new Error(
          &quot;Protect instance not initialized. Initialize callback must be called first.&quot;
        );
      }
      console.log(&quot;Collecting Protect signals...&quot;);
      const result = await protectInstance.getData();
      if (typeof result !== &quot;string&quot; &amp;&amp; &quot;error&quot; in result) {
        console.error(&quot;Error collecting Protect data:&quot;, result.error);
        callback.setClientError(result.error);
        message.innerText = `Data collection failed: ${result.error}`;
        message.style.color = &quot;red&quot;;
        return;
      }
      console.log(&quot;Protect data collected successfully&quot;);
      callback.setData(result);
      message.innerText = &quot;Risk assessment completed successfully!&quot;;
      message.style.color = &quot;green&quot;;
      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&quot;Protect evaluation failed:&quot;, error);
      const errorMessage = error instanceof Error ? error.message : &quot;Unknown error&quot;;
      callback.setClientError(errorMessage);
      message.innerText = `Evaluation failed: ${errorMessage}`;
      message.style.color = &quot;red&quot;;
    }
  }, 100);
}

function pollingWaitComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const message = document.createElement(&quot;p&quot;);
  const spinner = document.createElement(&quot;div&quot;);
  container.id = collectorKey;
  message.innerText = callback.getMessage() || &quot;Please wait...&quot;;
  spinner.style.cssText = `
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px 0;
  `;
  const style = document.createElement(&quot;style&quot;);
  style.textContent = `
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
  `;
  document.head.appendChild(style);
  container.appendChild(message);
  container.appendChild(spinner);
  journeyEl?.appendChild(container);
}

function recaptchaComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const message = document.createElement(&quot;p&quot;);
  container.id = collectorKey;
  message.innerText = &quot;Please complete the reCAPTCHA challenge&quot;;
  const recaptchaDiv = document.createElement(&quot;div&quot;);
  recaptchaDiv.id = `recaptcha-${collectorKey}`;
  recaptchaDiv.style.cssText = `
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    margin: 10px 0;
  `;
  recaptchaDiv.innerText = &quot;reCAPTCHA placeholder (requires reCAPTCHA script)&quot;;
  container.appendChild(message);
  container.appendChild(recaptchaDiv);
  journeyEl?.appendChild(container);
  console.log(&quot;reCAPTCHA callback initialized&quot;);
}

function recaptchaEnterpriseComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const message = document.createElement(&quot;p&quot;);
  container.id = collectorKey;
  message.innerText = &quot;Please complete the reCAPTCHA Enterprise challenge&quot;;
  const recaptchaDiv = document.createElement(&quot;div&quot;);
  recaptchaDiv.id = `recaptcha-enterprise-${collectorKey}`;
  recaptchaDiv.style.cssText = `
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    background-color: #f0f8ff;
    margin: 10px 0;
  `;
  recaptchaDiv.innerText = &quot;reCAPTCHA Enterprise placeholder (requires reCAPTCHA Enterprise script)&quot;;
  container.appendChild(message);
  container.appendChild(recaptchaDiv);
  journeyEl?.appendChild(container);
  console.log(&quot;reCAPTCHA Enterprise callback initialized&quot;);
}

function redirectComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const message = document.createElement(&quot;p&quot;);
  const button = document.createElement(&quot;button&quot;);
  container.id = collectorKey;
  message.innerText = &quot;You will be redirected to complete authentication&quot;;
  button.innerText = &quot;Continue to External Provider&quot;;
  button.style.cssText = `
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0;
  `;
  container.appendChild(message);
  container.appendChild(button);
  journeyEl?.appendChild(container);
  button.addEventListener(&quot;click&quot;, () =&gt; {
    try {
      const redirectUrl = callback.getRedirectUrl();
      console.log(&quot;Redirecting to:&quot;, redirectUrl);
      window.location.href = redirectUrl;
    } catch (error) {
      console.error(&quot;Redirect failed:&quot;, error);
    }
  });
}

function selectIdpComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const label = document.createElement(&quot;label&quot;);
  container.id = collectorKey;
  label.innerText = &quot;Select Identity Provider:&quot;;
  const providers = callback.getProviders();
  const select = document.createElement(&quot;select&quot;);
  select.id = collectorKey;
  select.name = collectorKey;
  const defaultOption = document.createElement(&quot;option&quot;);
  defaultOption.value = &quot;&quot;;
  defaultOption.innerText = &quot;Choose a provider...&quot;;
  defaultOption.disabled = true;
  defaultOption.selected = true;
  select.appendChild(defaultOption);
  providers.forEach((provider) =&gt; {
    const option = document.createElement(&quot;option&quot;);
    option.value = provider.provider;
    option.innerText = provider.provider;
    select.appendChild(option);
  });
  container.appendChild(select);
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(container);
  select.addEventListener(&quot;change&quot;, (event) =&gt; {
    const selectedProvider = event.target.value;
    if (selectedProvider) {
      callback.setProvider(selectedProvider);
    }
  });
}

function suspendedTextOutputComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&quot;div&quot;);
  const message = document.createElement(&quot;p&quot;);
  container.id = collectorKey;
  message.innerText = callback.getMessage() || &quot;Authentication is suspended. Please contact your admin.&quot;;
  message.style.cssText = `
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    margin: 10px 0;
  `;
  container.appendChild(message);
  journeyEl?.appendChild(container);
  console.log(&quot;Suspended text output callback:&quot;, callback.getMessage());
}

function termsAndConditionsComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const checkbox = document.createElement(&quot;input&quot;);
  console.log(callback.getTerms);
  checkbox.type = &quot;checkbox&quot;;
  checkbox.id = collectorKey;
  checkbox.required = true;
  label.htmlFor = collectorKey;
  label.innerText = &quot; I accept the terms and conditions&quot;;
  journeyEl.appendChild(label);
  journeyEl.appendChild(checkbox);
  checkbox.addEventListener(&quot;change&quot;, (event) =&gt; {
    const accepted = event.target.checked;
    callback.setAccepted(accepted);
  });
}

function textComponent$1(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const input = document.createElement(&quot;input&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &quot;text&quot;;
  input.id = collectorKey;
  input.name = collectorKey;
  if (callback.getType() === &quot;NameCallback&quot;) {
    input.setAttribute(&quot;autocomplete&quot;, &quot;webauthn&quot;);
  }
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;input&quot;, (event) =&gt; {
    if (callback.getType() === &quot;NameCallback&quot;) {
      callback.setName(event.target.value);
    } else {
      callback.setInputValue(event.target.value);
    }
  });
}

function textComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = callback.getMessage() || &quot;&quot;;
  const p = document.createElement(&quot;paragraph&quot;);
  p.innerText = message;
  p.id = collectorKey;
  console.log(message);
  journeyEl?.appendChild(p);
}

function validatedPasswordComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const input = document.createElement(&quot;input&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &quot;password&quot;;
  input.id = collectorKey;
  input.name = collectorKey;
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;input&quot;, (event) =&gt; {
    callback.setPassword(event.target.value);
  });
}

function validatedUsernameComponent(journeyEl, callback, idx) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&quot;label&quot;);
  const input = document.createElement(&quot;input&quot;);
  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &quot;text&quot;;
  input.id = collectorKey;
  input.name = collectorKey;
  input.setAttribute(&quot;autocomplete&quot;, &quot;webauthn&quot;);
  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);
  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&quot;input&quot;, (event) =&gt; {
    callback.setName(event.target.value);
  });
}

function renderCallback(journeyEl, callback, idx, onSubmit) {
  switch (callback.getType()) {
    case &quot;BooleanAttributeInputCallback&quot;:
    case &quot;NumberAttributeInputCallback&quot;:
    case &quot;StringAttributeInputCallback&quot;:
      attributeInputComponent(
        journeyEl,
        callback,
        idx
      );
      break;
    case &quot;ChoiceCallback&quot;:
      choiceComponent(journeyEl, callback, idx);
      break;
    case &quot;ConfirmationCallback&quot;:
      confirmationComponent(journeyEl, callback, idx);
      break;
    case &quot;DeviceProfileCallback&quot;:
      deviceProfileComponent(journeyEl, callback, idx, onSubmit);
      break;
    case &quot;HiddenValueCallback&quot;:
      hiddenValueComponent(journeyEl, callback, idx);
      break;
    case &quot;KbaCreateCallback&quot;:
      kbaCreateComponent(journeyEl, callback, idx);
      break;
    case &quot;MetadataCallback&quot;:
      metadataComponent(journeyEl, callback, idx);
      break;
    case &quot;NameCallback&quot;:
      textComponent$1(journeyEl, callback, idx);
      break;
    case &quot;PasswordCallback&quot;:
      passwordComponent(journeyEl, callback, idx);
      break;
    case &quot;PingOneProtectEvaluationCallback&quot;:
      pingProtectEvaluationComponent(
        journeyEl,
        callback,
        idx,
        onSubmit
      );
      break;
    case &quot;PingOneProtectInitializeCallback&quot;:
      pingProtectInitializeComponent(
        journeyEl,
        callback,
        idx,
        onSubmit
      );
      break;
    case &quot;PollingWaitCallback&quot;:
      pollingWaitComponent(journeyEl, callback, idx);
      break;
    case &quot;ReCaptchaCallback&quot;:
      recaptchaComponent(journeyEl, callback, idx);
      break;
    case &quot;ReCaptchaEnterpriseCallback&quot;:
      recaptchaEnterpriseComponent(journeyEl, callback, idx);
      break;
    case &quot;RedirectCallback&quot;:
      redirectComponent(journeyEl, callback, idx);
      break;
    case &quot;SelectIdPCallback&quot;:
      selectIdpComponent(journeyEl, callback, idx);
      break;
    case &quot;SuspendedTextOutputCallback&quot;:
      suspendedTextOutputComponent(journeyEl, callback, idx);
      break;
    case &quot;TermsAndConditionsCallback&quot;:
      termsAndConditionsComponent(journeyEl, callback, idx);
      break;
    case &quot;TextInputCallback&quot;:
      textComponent$1(journeyEl, callback, idx);
      break;
    case &quot;TextOutputCallback&quot;:
      textComponent(journeyEl, callback, idx);
      break;
    case &quot;ValidatedCreatePasswordCallback&quot;:
      validatedPasswordComponent(journeyEl, callback, idx);
      break;
    case &quot;ValidatedCreateUsernameCallback&quot;:
      validatedUsernameComponent(journeyEl, callback, idx);
      break;
    default:
      console.warn(`Unknown callback type: ${callback.getType()}`);
      break;
  }
}
function renderCallbacks(journeyEl, callbacks, onSubmit) {
  callbacks.forEach((callback, idx) =&gt; {
    renderCallback(journeyEl, callback, idx, onSubmit);
  });
}

function renderDeleteDevicesSection(journeyEl, deleteWebAuthnDevice) {
  const deleteWebAuthnDeviceButton = document.createElement(&quot;button&quot;);
  deleteWebAuthnDeviceButton.type = &quot;button&quot;;
  deleteWebAuthnDeviceButton.id = &quot;deleteWebAuthnDeviceButton&quot;;
  deleteWebAuthnDeviceButton.innerText = &quot;Delete Webauthn Device&quot;;
  const deviceStatus = document.createElement(&quot;pre&quot;);
  deviceStatus.id = &quot;deviceStatus&quot;;
  deviceStatus.style.minHeight = &quot;1.5em&quot;;
  journeyEl.appendChild(deleteWebAuthnDeviceButton);
  journeyEl.appendChild(deviceStatus);
  deleteWebAuthnDeviceButton.addEventListener(&quot;click&quot;, async () =&gt; {
    try {
      deviceStatus.innerText = &quot;Deleting WebAuthn device...&quot;;
      deviceStatus.innerText = await deleteWebAuthnDevice();
    } catch (error) {
      const message = error instanceof Error ? error.message : String(error);
      deviceStatus.innerText = `Delete failed: ${message}`;
    }
  });
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * index.ts
 *
 * Copyright (c) 2024 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @class QRCode - A utility class for handling QR Code steps
 *
 * Example:
 *
 * ```js
 * const isQRCodeStep = QRCode.isQRCodeStep(step);
 * let qrCodeData;
 * if (isQRCodeStep) {
 *   qrCodeData = QRCode.getQRCodeData(step);
 * }
 * ```
 */
class QRCode {
    /**
     * @method isQRCodeStep - determines if step contains QR Code callbacks
     * @param {JourneyStep} step - step object from AM response
     * @returns {boolean}
     */
    static isQRCodeStep(step) {
        const hiddenValueCb = step.getCallbacksOfType(callbackType.HiddenValueCallback);
        // QR Codes step should have at least one HiddenValueCallback
        if (hiddenValueCb.length === 0) {
            return false;
        }
        return !!this.getQRCodeURICb(hiddenValueCb);
    }
    /**
     * @method getQRCodeData - gets the necessary information from the QR Code callbacks
     * @param {JourneyStep} step - step object from AM response
     * @returns {QRCodeData}
     */
    static getQRCodeData(step) {
        const hiddenValueCb = step.getCallbacksOfType(callbackType.HiddenValueCallback);
        // QR Codes step should have at least one HiddenValueCallback
        if (hiddenValueCb.length === 0) {
            throw new Error(&#39;QR Code step must contain a HiddenValueCallback. Use `QRCode.isQRCodeStep` to guard.&#39;);
        }
        const qrCodeURICb = this.getQRCodeURICb(hiddenValueCb);
        const outputValue = qrCodeURICb ? qrCodeURICb.getOutputValue(&#39;value&#39;) : &#39;&#39;;
        const qrCodeUse = typeof outputValue === &#39;string&#39; &amp;&amp; outputValue.includes(&#39;otpauth://&#39;) ? &#39;otp&#39; : &#39;push&#39;;
        const messageCbs = step.getCallbacksOfType(callbackType.TextOutputCallback);
        const displayMessageCb = messageCbs.find((cb) =&gt; {
            const textOutputCallback = cb;
            return textOutputCallback.getMessageType() !== &#39;4&#39;;
        });
        return {
            message: displayMessageCb ? displayMessageCb.getMessage() : &#39;&#39;,
            use: qrCodeUse,
            uri: typeof outputValue === &#39;string&#39; ? outputValue : &#39;&#39;,
        };
    }
    static getQRCodeURICb(hiddenValueCbs) {
        // Look for a HiddenValueCallback with an OTP URI
        return hiddenValueCbs.find((cb) =&gt; {
            const outputValue = cb.getOutputValue(&#39;value&#39;);
            if (typeof outputValue === &#39;string&#39;) {
                return outputValue?.includes(&#39;otpauth://&#39;) || outputValue?.includes(&#39;pushauth://&#39;);
            }
            return false;
        });
    }
}

function renderQRCodeStep(journeyEl, step) {
  if (!QRCode.isQRCodeStep(step)) {
    return false;
  }
  const qrCodeData = QRCode.getQRCodeData(step);
  console.log(&quot;QR Code step detected via QRCode module&quot;);
  console.log(&quot;QR Code data:&quot;, JSON.stringify(qrCodeData));
  const container = document.createElement(&quot;div&quot;);
  container.id = &quot;qr-code-container&quot;;
  const message = document.createElement(&quot;p&quot;);
  message.id = &quot;qr-code-message&quot;;
  message.innerText = qrCodeData.message || &quot;Scan the QR code below&quot;;
  container.appendChild(message);
  const uriDisplay = document.createElement(&quot;div&quot;);
  uriDisplay.id = &quot;qr-code-uri&quot;;
  uriDisplay.style.cssText = `
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    margin: 10px 0;
  `;
  uriDisplay.innerText = qrCodeData.uri;
  container.appendChild(uriDisplay);
  const useType = document.createElement(&quot;p&quot;);
  useType.id = &quot;qr-code-use-type&quot;;
  useType.innerText = `Type: ${qrCodeData.use}`;
  useType.style.color = &quot;#666&quot;;
  container.appendChild(useType);
  const confirmationCallbacks = step.getCallbacksOfType(&quot;ConfirmationCallback&quot;);
  if (confirmationCallbacks.length &gt; 0) {
    const confirmCb = confirmationCallbacks[0];
    const options = confirmCb.getOptions();
    const optionsContainer = document.createElement(&quot;div&quot;);
    optionsContainer.style.marginTop = &quot;10px&quot;;
    options.forEach((option, index) =&gt; {
      const label = document.createElement(&quot;label&quot;);
      label.style.display = &quot;block&quot;;
      label.style.marginBottom = &quot;5px&quot;;
      const radio = document.createElement(&quot;input&quot;);
      radio.type = &quot;radio&quot;;
      radio.name = &quot;qr-confirmation&quot;;
      radio.value = String(index);
      radio.checked = index === confirmCb.getDefaultOption();
      radio.addEventListener(&quot;change&quot;, () =&gt; {
        confirmCb.setOptionIndex(index);
      });
      if (index === confirmCb.getDefaultOption()) {
        confirmCb.setOptionIndex(index);
      }
      label.appendChild(radio);
      label.appendChild(document.createTextNode(` ${option}`));
      optionsContainer.appendChild(label);
    });
    container.appendChild(optionsContainer);
  }
  journeyEl.appendChild(container);
  return true;
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * script-parser.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
function parseDisplayRecoveryCodesText(text) {
    /**
     * e.g. ` ...
     *    &quot;&lt;div class=\&quot;text-center\&quot;&gt;\n&quot; +
     *    &quot;iZmEtxvQ00\n&quot; +
     *    &quot;&lt;/div&gt;\n&quot; +
     * ... `
     */
    const recoveryCodesMatches = text.match(/\s[\w\W]&quot;([\w]*)\\/g);
    const recoveryCodes = Array.isArray(recoveryCodesMatches) &amp;&amp;
        recoveryCodesMatches.map((substr) =&gt; {
            // e.g. `&quot;iZmEtxvQ00\`
            const arr = substr.match(/&quot;([\w]*)\\/);
            return Array.isArray(arr) ? arr[1] : &#39;&#39;;
        });
    return recoveryCodes || [];
}
/**
 *
 * @param text
 * @returns string
 */
function parseDeviceNameText(text) {
    /**
     * We default the device name to &#39;New Security Key&#39;
     * If the user has a device name, it will be wrapped in &lt;em&gt; tags
     * e.g. ` ... &lt;em&gt;My Security Key&lt;/em&gt; ... `
     * We want to remove the &lt;em&gt; tags and just return the device name
     * e.g. ` ... My Security Key ... `
     */
    const displayName = text
        ?.match(/&lt;em\s*.*&gt;\s*.*&lt;\/em&gt;/g)?.[0]
        ?.replace(&#39;&lt;em&gt;&#39;, &#39;&#39;)
        ?.replace(&#39;&lt;/em&gt;&#39;, &#39;&#39;) ?? &#39;New Security Key&#39;;
    return displayName;
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * index.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Utility for handling recovery code nodes.
 *
 * Example:
 *
 * ```js
 * // Determine if step is Display Recovery Codes step
 * const isDisplayRecoveryCodesStep = RecoveryCodes.isDisplayStep(step);
 * if (isDisplayRecoveryCodesStep) {
 *   const recoveryCodes = RecoveryCodes.getCodes(step);
 *   // Do the UI needful
 * }
 * ```
 */
class RecoveryCodes {
    static getDeviceName(step) {
        const text = this.getDisplayCallback(step)?.getOutputByName(&#39;message&#39;, &#39;&#39;) ?? &#39;&#39;;
        return parseDeviceNameText(text);
    }
    /**
     * Retrieves the recovery codes by parsing the JavaScript message text in callback.
     *
     * @param step The step to evaluate
     * @return Recovery Code values in array
     */
    static getCodes(step) {
        const text = this.getDisplayCallback(step)?.getOutputByName(&#39;message&#39;, &#39;&#39;);
        return parseDisplayRecoveryCodesText(text || &#39;&#39;);
    }
    /**
     * Determines if the given step is a Display Recovery Codes step.
     *
     * @param step The step to evaluate
     * @return Is this step a Display Recovery Codes step
     */
    static isDisplayStep(step) {
        return !!this.getDisplayCallback(step);
    }
    /**
     * Gets the recovery codes step.
     *
     * @param step The step to evaluate
     * @return gets the Display Recovery Codes&#39; callback
     */
    static getDisplayCallback(step) {
        return step
            .getCallbacksOfType(callbackType.TextOutputCallback)
            .find((x) =&gt; {
            const cb = x.getOutputByName(&#39;message&#39;, undefined);
            return cb &amp;&amp; (cb.includes(&#39;Recovery Codes&#39;) || cb.includes(&#39;recovery codes&#39;));
        });
    }
}

function renderRecoveryCodesStep(journeyEl, step) {
  if (!RecoveryCodes.isDisplayStep(step)) {
    return false;
  }
  const codes = RecoveryCodes.getCodes(step);
  const deviceName = RecoveryCodes.getDeviceName(step);
  console.log(&quot;Recovery Codes step detected via RecoveryCodes module&quot;);
  console.log(&quot;Recovery codes:&quot;, JSON.stringify(codes));
  console.log(&quot;Device name:&quot;, deviceName);
  const container = document.createElement(&quot;div&quot;);
  container.id = &quot;recovery-codes-container&quot;;
  const header = document.createElement(&quot;h3&quot;);
  header.id = &quot;recovery-codes-header&quot;;
  header.innerText = &quot;Your Recovery Codes&quot;;
  container.appendChild(header);
  const instruction = document.createElement(&quot;p&quot;);
  instruction.innerText = &quot;You must make a copy of these recovery codes. They cannot be displayed again.&quot;;
  instruction.style.color = &quot;#666&quot;;
  container.appendChild(instruction);
  const codesContainer = document.createElement(&quot;div&quot;);
  codesContainer.id = &quot;recovery-codes-list&quot;;
  codesContainer.style.cssText = `
    padding: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  `;
  codes.forEach((code, index) =&gt; {
    const codeEl = document.createElement(&quot;div&quot;);
    codeEl.className = &quot;recovery-code&quot;;
    codeEl.setAttribute(&quot;data-code-index&quot;, String(index));
    codeEl.innerText = code;
    codeEl.style.cssText = `
      padding: 5px 10px;
      background-color: white;
      border: 1px solid #ccc;
      border-radius: 3px;
      text-align: center;
    `;
    codesContainer.appendChild(codeEl);
  });
  container.appendChild(codesContainer);
  if (deviceName) {
    const deviceInfo = document.createElement(&quot;p&quot;);
    deviceInfo.id = &quot;recovery-codes-device&quot;;
    deviceInfo.innerText = `Device: ${deviceName}`;
    deviceInfo.style.color = &quot;#666&quot;;
    container.appendChild(deviceInfo);
  }
  const confirmationCallbacks = step.getCallbacksOfType(&quot;ConfirmationCallback&quot;);
  if (confirmationCallbacks.length &gt; 0) {
    const confirmCb = confirmationCallbacks[0];
    const options = confirmCb.getOptions();
    const optionsContainer = document.createElement(&quot;div&quot;);
    optionsContainer.style.marginTop = &quot;15px&quot;;
    options.forEach((option, index) =&gt; {
      const label = document.createElement(&quot;label&quot;);
      label.style.display = &quot;block&quot;;
      label.style.marginBottom = &quot;5px&quot;;
      const radio = document.createElement(&quot;input&quot;);
      radio.type = &quot;radio&quot;;
      radio.name = &quot;recovery-confirmation&quot;;
      radio.value = String(index);
      radio.checked = index === confirmCb.getDefaultOption();
      radio.addEventListener(&quot;change&quot;, () =&gt; {
        confirmCb.setOptionIndex(index);
      });
      if (index === confirmCb.getDefaultOption()) {
        confirmCb.setOptionIndex(index);
      }
      label.appendChild(radio);
      label.appendChild(document.createTextNode(` ${option}`));
      optionsContainer.appendChild(label);
    });
    container.appendChild(optionsContainer);
  }
  journeyEl.appendChild(container);
  return true;
}

/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
const deviceService = ({ baseUrl, realmPath }) =&gt; createApi({
    reducerPath: &#39;deviceClient&#39;,
    baseQuery: fetchBaseQuery({
        credentials: &#39;include&#39;,
        prepareHeaders: (headers) =&gt; {
            headers.set(&#39;Content-Type&#39;, &#39;application/json&#39;);
            headers.set(&#39;Accept&#39;, &#39;application/json&#39;);
            headers.set(&#39;x-requested-with&#39;, &#39;forgerock-sdk&#39;);
            headers.set(&#39;x-requested-platform&#39;, &#39;javascript&#39;);
            return headers;
        },
        baseUrl,
    }),
    endpoints: (builder) =&gt; ({
        // oath endpoints
        getOathDevices: builder.query({
            query: ({ realm = realmPath, userId }) =&gt; `json/realms/${realm}/users/${userId}/devices/2fa/oath?_queryFilter=true`,
        }),
        deleteOathDevice: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                method: &#39;DELETE&#39;,
                url: `json/realms/${realm}/users/${userId}/devices/2fa/oath/${device.uuid}`,
                body: device,
            }),
        }),
        // push device
        getPushDevices: builder.query({
            query: ({ realm = realmPath, userId }) =&gt; `/json/realms/${realm}/users/${userId}/devices/2fa/push?_queryFilter=true`,
        }),
        deletePushDevice: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `/json/realms/${realm}/users/${userId}/devices/2fa/push/${device.uuid}`,
                method: &#39;DELETE&#39;,
                body: {},
            }),
        }),
        // webauthn devices
        getWebAuthnDevices: builder.query({
            query: ({ realm = realmPath, userId }) =&gt; `/json/realms/${realm}/users/${userId}/devices/2fa/webauthn?_queryFilter=true`,
        }),
        updateWebAuthnDeviceName: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `/json/realms/${realm}/users/${userId}/devices/2fa/webauthn/${device.uuid}`,
                method: &#39;PUT&#39;,
                body: device,
            }),
        }),
        deleteWebAuthnDeviceName: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `/json/realms/${realm}/users/${userId}/devices/2fa/webauthn/${device.uuid}`,
                method: &#39;DELETE&#39;,
                body: device,
            }),
        }),
        getBoundDevices: builder.mutation({
            query: ({ realm = realmPath, userId }) =&gt; `/json/realms/${realm}/users/${userId}/devices/2fa/binding?_queryFilter=true`,
        }),
        updateBoundDevice: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `/json/realms/root/realms/${realm}/users/${userId}/devices/2fa/binding/${device.uuid}`,
                method: &#39;PUT&#39;,
                body: device,
            }),
        }),
        deleteBoundDevice: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `/json/realms/root/realms/${realm}/users/${userId}/devices/2fa/binding/${device.uuid}`,
                method: &#39;DELETE&#39;,
                body: device,
            }),
        }),
        getDeviceProfiles: builder.query({
            query: ({ realm = realmPath, userId }) =&gt; `json/realms/${realm}/users/${userId}/devices/profile?_queryFilter=true`,
        }),
        updateDeviceProfile: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `json/realms/${realm}/users/${userId}/devices/profile/${device.identifier}`,
                method: &#39;PUT&#39;,
                body: device,
            }),
        }),
        deleteDeviceProfile: builder.mutation({
            query: ({ realm = realmPath, userId, device }) =&gt; ({
                url: `json/realms/${realm}/users/${userId}/devices/profile/${device.identifier}`,
                method: &#39;DELETE&#39;,
                body: device,
            }),
        }),
    }),
});

function handleError(error, message) {
    /**
     * Handle an RTK Query error after narrowing to either FetchBaseQueryError or SerializedError
     * https://redux-toolkit.js.org/rtk-query/usage-with-typescript#type-safe-error-handling
     */
    if (&#39;status&#39; in error) {
        const errMsg = &#39;error&#39; in error ? error.error : JSON.stringify(error.data);
        throw new Error(`${message ?? &#39;&#39;}${errMsg}`);
    }
    throw new Error(`${message ?? &#39;&#39;}${error.message}`);
}

/**
 * @function deviceClient
 * @description Returns a device management object containing methods for handling various device types
 * @param {ConfigOptions} config The configuration options for the device client
 * @returns Methods for handling various device types
 */
const deviceClient = (config) =&gt; {
    const { middleware, reducerPath, reducer, endpoints } = deviceService({
        baseUrl: config.serverConfig?.baseUrl ?? &#39;&#39;,
        realmPath: config?.realmPath ?? &#39;&#39;,
    });
    const store = configureStore({
        reducer: {
            [reducerPath]: reducer,
        },
        middleware: (getDefaultMiddleware) =&gt; getDefaultMiddleware().concat(middleware),
    });
    return {
        /**
         * Oath device management methods.
         */
        oath: {
            /**
             * Retrieves Oath devices based on the specified query.
             *
             * @async
             * @function get
             * @param {RetrieveOathQuery} query - The query used to retrieve Oath devices.
             * @returns {Promise&lt;OathDevice[] | { error: unknown }&gt;} - A promise that resolves to the retrieved data or an error object if the response is not valid.
             */
            get: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.getOathDevices.initiate(query));
                    if (!response || !response.data || !response.data.result) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data.result;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Deletes an Oath device based on the provided query and device information.
             *
             * @async
             * @function delete
             * @param {RetrieveOathQuery &amp; { device: OathDevice }} query - The query and device information used to delete the Oath device.
             * @returns {Promise&lt;null | { error: unknown }&gt;} - A promise that resolves to null or an error object if the response is not valid.
             */
            delete: async function (query) {
                try {
                    const { error } = await store.dispatch(endpoints.deleteOathDevice.initiate(query));
                    if (error) {
                        handleError(error, &#39;Failed to delete device: &#39;);
                    }
                    return null;
                }
                catch (error) {
                    return { error };
                }
            },
        },
        /**
         * Push device management methods.
         */
        push: {
            /**
             * Retrieves Push devices based on the specified query.
             *
             * @async
             * @function get
             * @param {PushDeviceQuery} query - The query used to retrieve Push devices.
             * @returns {Promise&lt;PushDevice[] | { error: unknown }&gt;} - A promise that resolves to the retrieved data or an error object if the response is not valid.
             */
            get: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.getPushDevices.initiate(query));
                    if (!response || !response.data || !response.data.result) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data.result;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Deletes a Push device based on the provided query.
             *
             * @async
             * @function delete
             * @param {DeleteDeviceQuery} query - The query used to delete the Push device.
             * @returns {Promise&lt;null | { error: unknown }&gt;} - A promise that resolves to null or an error object if the response is not valid.
             */
            delete: async function (query) {
                try {
                    const { error } = await store.dispatch(endpoints.deletePushDevice.initiate(query));
                    if (error) {
                        handleError(error, &#39;Failed to delete device: &#39;);
                    }
                    return null;
                }
                catch (error) {
                    return { error };
                }
            },
        },
        /**
         * WebAuthn device management methods.
         */
        webAuthn: {
            /**
             * Retrieves WebAuthn devices based on the specified query.
             *
             * @async
             * @function get
             * @param {WebAuthnQuery} query - The query used to retrieve WebAuthn devices.
             * @returns {Promise&lt;WebAuthnDevice[] | { error: unknown }&gt;} - A promise that resolves to the retrieved data or an error object if the response is not valid.
             */
            get: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.getWebAuthnDevices.initiate(query));
                    if (!response || !response.data || !response.data.result) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data.result;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Updates the name of a WebAuthn device based on the provided query and body.
             *
             * @async
             * @function update
             * @param {WebAuthnQuery &amp; { device: WebAuthnDevice }} query - The query and body used to update the WebAuthn device name.
             * @returns {Promise&lt;UpdatedWebAuthnDevice | { error: unknown }&gt;} - A promise that resolves to the response data or an error object if the response is not valid.
             */
            update: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.updateWebAuthnDeviceName.initiate(query));
                    if (!response || !response.data) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Deletes a WebAuthn device based on the provided query and body.
             *
             * @async
             * @function delete
             * @param {WebAuthnQuery &amp; { device: WebAuthnDevice | UpdatedWebAuthnDevice }} query - The query and body used to delete the WebAuthn device.
             * @returns {Promise&lt;null | { error: unknown }&gt;} - A promise that resolves to null or an error object if the response is not valid.
             */
            delete: async function (query) {
                try {
                    const { error } = await store.dispatch(endpoints.deleteWebAuthnDeviceName.initiate(query));
                    if (error) {
                        handleError(error, &#39;Failed to delete device: &#39;);
                    }
                    return null;
                }
                catch (error) {
                    return { error };
                }
            },
        },
        /**
         * Bound devices management methods.
         */
        bound: {
            /**
             * Retrieves bound devices based on the specified query.
             *
             * @async
             * @function get
             * @param {GetBoundDevicesQuery} query - The query used to retrieve bound devices.
             * @returns {Promise&lt;Device[] | { error: unknown }&gt;} - A promise that resolves to the retrieved data or an error object if the response is not valid.
             */
            get: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.getBoundDevices.initiate(query));
                    if (!response || !response.data || !response.data.result) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data.result;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Deletes a bound device based on the provided query.
             *
             * @async
             * @function delete
             * @param {BoundDeviceQuery} query - The query used to delete the bound device.
             * @returns {Promise&lt;null | { error: unknown }&gt;} - A promise that resolves to null or an error object if the response is not valid.
             */
            delete: async function (query) {
                try {
                    const { error } = await store.dispatch(endpoints.deleteBoundDevice.initiate(query));
                    if (error) {
                        handleError(error, &#39;Failed to delete device: &#39;);
                    }
                    return null;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Updates the name of a bound device based on the provided query.
             *
             * @async
             * @function update
             * @param {BoundDeviceQuery} query - The query used to update the bound device name.
             * @returns {Promise&lt;Device | { error: unknown }&gt;} - A promise that resolves to the response data or an error object if the response is not valid.
             */
            update: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.updateBoundDevice.initiate(query));
                    if (!response || !response.data) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data;
                }
                catch (error) {
                    return { error };
                }
            },
        },
        profile: {
            /**
             * Get profile devices
             *
             * @async
             * @function get
             * @param {GetProfileDevices} query - The query used to get profile devices
             * @returns {Promise&lt;ProfileDevice[] | { error: unknown }&gt;} - A promise that resolves to the response data or an error object if the response is not valid.
             */
            get: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.getDeviceProfiles.initiate(query));
                    if (!response || !response.data || !response.data.result) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data.result;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Update profile devices
             *
             * @async
             * @function update
             * @param {ProfileDevicesQuery} query - The query used to update a profile device
             * @returns {Promise&lt;ProfileDevice | { error: unknown }&gt;} - A promise that resolves to the response data or or an error object if the response is not valid.
             */
            update: async function (query) {
                try {
                    const response = await store.dispatch(endpoints.updateDeviceProfile.initiate(query));
                    if (!response || !response.data) {
                        throw new Error(&#39;response did not contain data&#39;);
                    }
                    return response.data;
                }
                catch (error) {
                    return { error };
                }
            },
            /**
             * Delete profile devices
             *
             * @async
             * @function delete
             * @param {ProfileDevicesQuery} query - The query used to delete a profile device
             * @returns {Promise&lt;null | { error: unknown }&gt;} - A promise that resolves to null or an error object if the response is not valid.
             */
            delete: async function (query) {
                try {
                    const { error } = await store.dispatch(endpoints.deleteDeviceProfile.initiate(query));
                    if (error) {
                        handleError(error, &#39;Failed to delete device profile: &#39;);
                    }
                    return null;
                }
                catch (error) {
                    return { error };
                }
            },
        },
    };
};

function getBaseUrlFromWellknown(wellknown) {
  const parsed = new URL(wellknown);
  const [pathWithoutOauth] = parsed.pathname.split(&quot;/oauth2/&quot;);
  return `${parsed.origin}${pathWithoutOauth}`;
}
function getRealmUrlPathFromWellknown(wellknown) {
  const parsed = new URL(wellknown);
  const [, afterOauth] = parsed.pathname.split(&quot;/oauth2/&quot;);
  if (!afterOauth) {
    return &quot;realms/root&quot;;
  }
  const suffix = &quot;/.well-known/openid-configuration&quot;;
  const realmUrlPath = afterOauth.endsWith(suffix) ? afterOauth.slice(0, -suffix.length) : afterOauth.replace(/\/.well-known\/openid-configuration\/?$/, &quot;&quot;);
  return realmUrlPath.replace(/^\/+/, &quot;&quot;).replace(/\/+$/, &quot;&quot;) || &quot;realms/root&quot;;
}
async function getUserIdFromSession(baseUrl, realmUrlPath) {
  const url = `${baseUrl}/json/${realmUrlPath}/users?_action=idFromSession`;
  try {
    const response = await fetch(url, {
      method: &quot;POST&quot;,
      credentials: &quot;include&quot;,
      headers: {
        &quot;Content-Type&quot;: &quot;application/json&quot;,
        &quot;Accept-API-Version&quot;: &quot;protocol=2.1,resource=3.0&quot;
      }
    });
    const data = await response.json();
    if (!data || typeof data !== &quot;object&quot;) {
      return null;
    }
    const id = data.id;
    return typeof id === &quot;string&quot; &amp;&amp; id.length &gt; 0 ? id : null;
  } catch {
    return null;
  }
}
async function deleteWebAuthnDevice(config) {
  const WEBAUTHN_CREDENTIAL_ID_QUERY_PARAM = &quot;webauthnCredentialId&quot;;
  const params = new URLSearchParams(window.location.search);
  const credentialId = params.get(WEBAUTHN_CREDENTIAL_ID_QUERY_PARAM);
  if (!credentialId) {
    return &quot;No credential id found. Register a WebAuthn device first.&quot;;
  }
  const wellknown = config.serverConfig.wellknown;
  const baseUrl = getBaseUrlFromWellknown(wellknown);
  const realmUrlPath = getRealmUrlPathFromWellknown(wellknown);
  const userId = await getUserIdFromSession(baseUrl, realmUrlPath);
  if (!userId) {
    throw new Error(&quot;Failed to retrieve user id from session. Are you logged in?&quot;);
  }
  const realm = realmUrlPath.replace(/^realms\//, &quot;&quot;) || &quot;root&quot;;
  const deviceClient$1 = deviceClient({
    realmPath: realm,
    serverConfig: { baseUrl }
  });
  const devices = await deviceClient$1.webAuthn.get({ userId });
  if (!Array.isArray(devices)) {
    throw new Error(`Failed to retrieve devices: ${String(devices.error)}`);
  }
  const device = devices.find((d) =&gt; d.credentialId === credentialId);
  if (!device) {
    return `No WebAuthn device found matching credential id: ${credentialId}`;
  }
  const response = await deviceClient$1.webAuthn.delete({
    userId,
    device
  });
  if (response &amp;&amp; typeof response === &quot;object&quot; &amp;&amp; &quot;error&quot; in response) {
    const error = response.error;
    throw new Error(`Failed deleting device ${device.uuid}: ${String(error)}`);
  }
  return `Deleted WebAuthn device ${device.uuid} with credential id ${credentialId} for user ${userId}.`;
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * enums.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
var WebAuthnOutcome;
(function (WebAuthnOutcome) {
    WebAuthnOutcome[&quot;Error&quot;] = &quot;ERROR&quot;;
    WebAuthnOutcome[&quot;Unsupported&quot;] = &quot;unsupported&quot;;
})(WebAuthnOutcome || (WebAuthnOutcome = {}));
var WebAuthnOutcomeType;
(function (WebAuthnOutcomeType) {
    WebAuthnOutcomeType[&quot;AbortError&quot;] = &quot;AbortError&quot;;
    WebAuthnOutcomeType[&quot;DataError&quot;] = &quot;DataError&quot;;
    WebAuthnOutcomeType[&quot;ConstraintError&quot;] = &quot;ConstraintError&quot;;
    WebAuthnOutcomeType[&quot;EncodingError&quot;] = &quot;EncodingError&quot;;
    WebAuthnOutcomeType[&quot;InvalidError&quot;] = &quot;InvalidError&quot;;
    WebAuthnOutcomeType[&quot;NetworkError&quot;] = &quot;NetworkError&quot;;
    WebAuthnOutcomeType[&quot;NotAllowedError&quot;] = &quot;NotAllowedError&quot;;
    WebAuthnOutcomeType[&quot;NotSupportedError&quot;] = &quot;NotSupportedError&quot;;
    WebAuthnOutcomeType[&quot;SecurityError&quot;] = &quot;SecurityError&quot;;
    WebAuthnOutcomeType[&quot;TimeoutError&quot;] = &quot;TimeoutError&quot;;
    WebAuthnOutcomeType[&quot;UnknownError&quot;] = &quot;UnknownError&quot;;
})(WebAuthnOutcomeType || (WebAuthnOutcomeType = {}));
var WebAuthnStepType;
(function (WebAuthnStepType) {
    WebAuthnStepType[WebAuthnStepType[&quot;None&quot;] = 0] = &quot;None&quot;;
    WebAuthnStepType[WebAuthnStepType[&quot;Authentication&quot;] = 1] = &quot;Authentication&quot;;
    WebAuthnStepType[WebAuthnStepType[&quot;Registration&quot;] = 2] = &quot;Registration&quot;;
})(WebAuthnStepType || (WebAuthnStepType = {}));

/*
 * @forgerock/ping-javascript-sdk
 *
 * helpers.ts
 *
 * Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * @module
 * @ignore
 * These are private utility functions for HttpClient
 */
function arrayBufferToString(arrayBuffer) {
    // https://goo.gl/yabPex - To future-proof, we&#39;ll pass along whatever the browser
    // gives us and let AM disregard randomly-injected properties
    const uint8Array = new Uint8Array(arrayBuffer);
    const txtDecoder = new TextDecoder();
    const json = txtDecoder.decode(uint8Array);
    return json;
}
// TODO: Remove this once AM is providing fully-serialized JSON
function parseCredentials(value) {
    try {
        const creds = value
            .split(&#39;}&#39;)
            .filter((x) =&gt; !!x &amp;&amp; x !== &#39;]&#39;)
            .map((x) =&gt; {
            // eslint-disable-next-line @typescript-eslint/no-use-before-define
            const idArray = parseNumberArray(x);
            return {
                id: new Int8Array(idArray).buffer,
                type: &#39;public-key&#39;,
            };
        });
        return creds;
    }
    catch {
        const e = new Error(&#39;Transforming credential object to string failed&#39;);
        e.name = WebAuthnOutcomeType.EncodingError;
        throw e;
    }
}
function parseNumberArray(value) {
    const matches = /new Int8Array\((.+)\)/.exec(value);
    if (matches === null || matches.length &lt; 2) {
        return [];
    }
    return JSON.parse(matches[1]);
}
function parsePubKeyArray(value) {
    if (Array.isArray(value)) {
        return value;
    }
    if (typeof value !== &#39;string&#39;) {
        return undefined;
    }
    if (value &amp;&amp; value[0] === &#39;[&#39;) {
        return JSON.parse(value);
    }
    value = value.replace(/(\w+):/g, &#39;&quot;$1&quot;:&#39;);
    return JSON.parse(`[${value}]`);
}
/**
 * AM is currently serializing RP as one of the following formats, depending on
 * whether RP ID has been configured:
 *   &quot;relyingPartyId&quot;:&quot;&quot;
 *   &quot;relyingPartyId&quot;:&quot;rpId: \&quot;foo\&quot;,&quot;
 * This regex handles both formats, but should be removed once AM is fixed.
 */
function parseRelyingPartyId(relyingPartyId) {
    if (relyingPartyId.includes(&#39;rpId&#39;)) {
        return relyingPartyId.replace(/rpId: &quot;(.+)&quot;,/, &#39;$1&#39;);
    }
    else {
        return relyingPartyId.replace(/id: &quot;(.+)&quot;,/, &#39;$1&#39;);
    }
}

/*
 * @forgerock/ping-javascript-sdk
 *
 * webauthn.ts
 *
 * Copyright (c) 2024 - 2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
/**
 * Utility for integrating a web browser&#39;s WebAuthn API.
 *
 * Example:
 *
 * ```js
 * // Determine if a step is a WebAuthn step
 * const stepType = WebAuthn.getWebAuthnStepType(step);
 * if (stepType === WebAuthnStepType.Registration) {
 *   // Register a new device
 *   await WebAuthn.register(step);
 * } else if (stepType === WebAuthnStepType.Authentication) {
 *   // Authenticate with a registered device
 *   await WebAuthn.authenticate(step);
 * }
 * ```
 *
 * Conditional mediation (passkey autofill) support:
 *
 * Conditional mediation is **server-driven** in this SDK via WebAuthn metadata (`meta.mediation`).
 *
 * ```js
 * // Optional: feature-detect conditional UI before attempting
 * const supportsConditionalUI = await WebAuthn.isConditionalMediationSupported();
 *
 * if (supportsConditionalUI) {
 *   const controller = new AbortController();
 *
 *   // Optional: provide a signal to cancel an in-flight request
 *   await WebAuthn.authenticate(step, controller.signal);
 * }
 * ```
 *
 * Notes:
 * - When server-driven mediation is `&#39;conditional&#39;`, an `AbortSignal` will be used.
 *   If you don&#39;t provide one, the SDK will create one.
 * - If conditional mediation is requested but not supported by the browser,
 *   `authenticate()` throws a `NotSupportedError` and sets the hidden WebAuthn outcome to `unsupported`.
 * - To enable passkey autofill, add `autocomplete=&quot;webauthn&quot;` to your username field:
 *   `&lt;input type=&quot;text&quot; name=&quot;username&quot; autocomplete=&quot;webauthn&quot; /&gt;`
 */
class WebAuthn {
    static conditionalAbortController;
    /**
     * Determines if the given step is a WebAuthn step.
     *
     * @param step The step to evaluate
     * @return A WebAuthnStepType value
     */
    static getWebAuthnStepType(step) {
        const outcomeCallback = this.getOutcomeCallback(step);
        const metadataCallback = this.getMetadataCallback(step);
        const textOutputCallback = this.getTextOutputCallback(step);
        if (outcomeCallback &amp;&amp; metadataCallback) {
            const metadata = metadataCallback.getOutputValue(&#39;data&#39;);
            if (metadata?.pubKeyCredParams) {
                return WebAuthnStepType.Registration;
            }
            return WebAuthnStepType.Authentication;
        }
        if (outcomeCallback &amp;&amp; textOutputCallback) {
            const message = textOutputCallback.getMessage();
            if (message.includes(&#39;pubKeyCredParams&#39;)) {
                return WebAuthnStepType.Registration;
            }
            return WebAuthnStepType.Authentication;
        }
        else {
            return WebAuthnStepType.None;
        }
    }
    /**
     * Determines if the browser supports conditional mediation.
     *
     * @return Whether the browser supports conditional mediation
     */
    static async isConditionalMediationSupported() {
        return (typeof PublicKeyCredential !== &#39;undefined&#39; &amp;&amp;
            typeof PublicKeyCredential.isConditionalMediationAvailable === &#39;function&#39; &amp;&amp;
            (await PublicKeyCredential.isConditionalMediationAvailable()));
    }
    /**
     * Populates the step with the necessary authentication outcome.
     *
     * @param step The step that contains WebAuthn authentication data
     * @param signal Optional AbortSignal passed through to `navigator.credentials.get()`
     * @return The populated step
     */
    static async authenticate(step, signal) {
        const { hiddenCallback, metadataCallback, textOutputCallback } = this.getCallbacks(step);
        if (hiddenCallback &amp;&amp; (metadataCallback || textOutputCallback)) {
            let outcome;
            let credential = null;
            let mediation;
            try {
                let publicKey;
                if (metadataCallback) {
                    const meta = metadataCallback.getOutputValue(&#39;data&#39;);
                    mediation = meta.mediation;
                    publicKey = this.createAuthenticationPublicKey(meta);
                    if (mediation === &#39;conditional&#39;) {
                        // Abort any prior conditional request started by the SDK.
                        // (If the caller provides their own signal, we still abort the prior SDK-owned one.)
                        this.conditionalAbortController?.abort();
                        const abortSignal = signal ?? this.createAbortController().signal;
                        const isConditionalMediationSupported = await this.isConditionalMediationSupported();
                        if (!isConditionalMediationSupported) {
                            const e = new Error(&#39;Conditional mediation was requested, but is not supported by this browser.&#39;);
                            e.name = WebAuthnOutcomeType.NotSupportedError;
                            throw e;
                        }
                        credential = await this.getAuthenticationCredential(publicKey, mediation, abortSignal);
                        outcome = this.getAuthenticationOutcome(credential);
                    }
                    else {
                        credential = await this.getAuthenticationCredential(publicKey, mediation, signal);
                        outcome = this.getAuthenticationOutcome(credential);
                    }
                }
                else {
                    throw new Error(&#39;No metadata callback found for WebAuthn authentication. Please disable JavaScript in server node.&#39;);
                }
            }
            catch (error) {
                if (!(error instanceof Error))
                    throw error;
                // In conditional mediation flows, the app may abort an in-flight request when the user
                // submits a different method or the step changes. Treat this as cancellation and do not
                // mutate the hidden outcome.
                if (mediation === &#39;conditional&#39; &amp;&amp; error.name === &#39;AbortError&#39;) {
                    throw error;
                }
                // NotSupportedError is a special case
                if (error.name === WebAuthnOutcomeType.NotSupportedError) {
                    hiddenCallback.setInputValue(WebAuthnOutcome.Unsupported);
                    throw error;
                }
                hiddenCallback.setInputValue(`${WebAuthnOutcome.Error}::${error.name}:${error.message}`);
                throw error;
            }
            if (metadataCallback) {
                const meta = metadataCallback.getOutputValue(&#39;data&#39;);
                if (meta?.supportsJsonResponse &amp;&amp; credential &amp;&amp; &#39;authenticatorAttachment&#39; in credential) {
                    hiddenCallback.setInputValue(JSON.stringify({
                        authenticatorAttachment: credential.authenticatorAttachment,
                        legacyData: outcome,
                    }));
                    return step;
                }
            }
            hiddenCallback.setInputValue(outcome);
            return step;
        }
        else {
            const e = new Error(&#39;Incorrect callbacks for WebAuthn authentication&#39;);
            e.name = WebAuthnOutcomeType.DataError;
            hiddenCallback?.setInputValue(`${WebAuthnOutcome.Error}::${e.name}:${e.message}`);
            throw e;
        }
    }
    /**
     * Populates the step with the necessary registration outcome.
     *
     * @param step The step that contains WebAuthn registration data
     * @return The populated step
     */
    // Can make this generic const in Typescript 5.0 &gt; and the name itself will
    // be inferred from the type so `typeof deviceName` will not just return string
    // but the actual name of the deviceName passed in as a generic.
    static async register(step, deviceName) {
        const { hiddenCallback, metadataCallback, textOutputCallback } = this.getCallbacks(step);
        if (hiddenCallback &amp;&amp; (metadataCallback || textOutputCallback)) {
            let outcome;
            let credential = null;
            try {
                let publicKey;
                if (metadataCallback) {
                    const meta = metadataCallback.getOutputValue(&#39;data&#39;);
                    publicKey = this.createRegistrationPublicKey(meta);
                    credential = await this.getRegistrationCredential(publicKey);
                    outcome = this.getRegistrationOutcome(credential);
                }
                else {
                    throw new Error(&#39;No metadata callback found for WebAuthn registration. Please disable JavaScript in server node.&#39;);
                }
            }
            catch (error) {
                if (!(error instanceof Error))
                    throw error;
                // NotSupportedError is a special case
                if (error.name === WebAuthnOutcomeType.NotSupportedError) {
                    hiddenCallback.setInputValue(WebAuthnOutcome.Unsupported);
                    throw error;
                }
                hiddenCallback.setInputValue(`${WebAuthnOutcome.Error}::${error.name}:${error.message}`);
                throw error;
            }
            if (metadataCallback) {
                const meta = metadataCallback.getOutputValue(&#39;data&#39;);
                if (meta?.supportsJsonResponse &amp;&amp; credential &amp;&amp; &#39;authenticatorAttachment&#39; in credential) {
                    hiddenCallback.setInputValue(JSON.stringify({
                        authenticatorAttachment: credential.authenticatorAttachment,
                        legacyData: deviceName &amp;&amp; deviceName.length &gt; 0 ? `${outcome}::${deviceName}` : outcome,
                    }));
                    return step;
                }
            }
            hiddenCallback.setInputValue(deviceName &amp;&amp; deviceName.length &gt; 0 ? `${outcome}::${deviceName}` : outcome);
            return step;
        }
        else {
            const e = new Error(&#39;Incorrect callbacks for WebAuthn registration&#39;);
            e.name = WebAuthnOutcomeType.DataError;
            hiddenCallback?.setInputValue(`${WebAuthnOutcome.Error}::${e.name}:${e.message}`);
            throw e;
        }
    }
    /**
     * Returns an object containing the two WebAuthn callbacks.
     *
     * @param step The step that contains WebAuthn callbacks
     * @return The WebAuthn callbacks
     */
    static getCallbacks(step) {
        const hiddenCallback = this.getOutcomeCallback(step);
        const metadataCallback = this.getMetadataCallback(step);
        const textOutputCallback = this.getTextOutputCallback(step);
        const returnObj = {
            hiddenCallback,
        };
        if (metadataCallback) {
            returnObj.metadataCallback = metadataCallback;
        }
        else if (textOutputCallback) {
            returnObj.textOutputCallback = textOutputCallback;
        }
        return returnObj;
    }
    /**
     * Returns the WebAuthn metadata callback containing data to pass to the browser
     * Web Authentication API.
     *
     * @param step The step that contains WebAuthn callbacks
     * @return The metadata callback
     */
    static getMetadataCallback(step) {
        return step.getCallbacksOfType(callbackType.MetadataCallback).find((x) =&gt; {
            const cb = x.getOutputByName(&#39;data&#39;, undefined);
            // eslint-disable-next-line no-prototype-builtins
            return cb &amp;&amp; cb.hasOwnProperty(&#39;relyingPartyId&#39;);
        });
    }
    /**
     * Returns the WebAuthn hidden value callback where the outcome should be populated.
     *
     * @param step The step that contains WebAuthn callbacks
     * @return The hidden value callback
     */
    static getOutcomeCallback(step) {
        return step
            .getCallbacksOfType(callbackType.HiddenValueCallback)
            .find((x) =&gt; x.getOutputByName(&#39;id&#39;, &#39;&#39;) === &#39;webAuthnOutcome&#39;);
    }
    /**
     * Returns the WebAuthn metadata callback containing data to pass to the browser
     * Web Authentication API.
     *
     * @param step The step that contains WebAuthn callbacks
     * @return The metadata callback
     */
    static getTextOutputCallback(step) {
        return step
            .getCallbacksOfType(callbackType.TextOutputCallback)
            .find((x) =&gt; {
            const cb = x.getOutputByName(&#39;message&#39;, undefined);
            return cb &amp;&amp; cb.includes(&#39;webAuthnOutcome&#39;);
        });
    }
    /**
     * Retrieves the credential from the browser Web Authentication API.
     *
     * @param options The public key options associated with the request
     * @param mediation Optional mediation requirement passed through to `navigator.credentials.get()`
     * @param signal Optional AbortSignal passed through to `navigator.credentials.get()`
     * @return The credential
     */
    static async getAuthenticationCredential(options, mediation, signal) {
        // Feature check before we attempt registering a device
        if (!window.PublicKeyCredential) {
            const e = new Error(&#39;PublicKeyCredential not supported by this browser&#39;);
            e.name = WebAuthnOutcomeType.NotSupportedError;
            throw e;
        }
        const credential = await navigator.credentials.get({
            publicKey: options,
            ...(mediation &amp;&amp; { mediation }),
            ...(signal &amp;&amp; { signal }),
        });
        return credential;
    }
    /**
     * Converts an authentication credential into the outcome expected by OpenAM.
     *
     * @param credential The credential to convert
     * @return The outcome string
     */
    static getAuthenticationOutcome(credential) {
        if (credential === null) {
            const e = new Error(&#39;No credential generated from authentication&#39;);
            e.name = WebAuthnOutcomeType.UnknownError;
            throw e;
        }
        try {
            const clientDataJSON = arrayBufferToString(credential.response.clientDataJSON);
            const assertionResponse = credential.response;
            const authenticatorData = new Int8Array(assertionResponse.authenticatorData).toString();
            const signature = new Int8Array(assertionResponse.signature).toString();
            // Current native typing for PublicKeyCredential does not include `userHandle`
            // eslint-disable-next-line
            // @ts-ignore
            const userHandle = arrayBufferToString(credential.response.userHandle);
            let stringOutput = `${clientDataJSON}::${authenticatorData}::${signature}::${credential.id}`;
            // Check if Username is stored on device
            if (userHandle) {
                stringOutput = `${stringOutput}::${userHandle}`;
                return stringOutput;
            }
            return stringOutput;
        }
        catch {
            const e = new Error(&#39;Transforming credential object to string failed&#39;);
            e.name = WebAuthnOutcomeType.EncodingError;
            throw e;
        }
    }
    /**
     * Retrieves the credential from the browser Web Authentication API.
     *
     * @param options The public key options associated with the request
     * @return The credential
     */
    static async getRegistrationCredential(options) {
        // Feature check before we attempt registering a device
        if (!window.PublicKeyCredential) {
            const e = new Error(&#39;PublicKeyCredential not supported by this browser&#39;);
            e.name = WebAuthnOutcomeType.NotSupportedError;
            throw e;
        }
        const credential = await navigator.credentials.create({
            publicKey: options,
        });
        return credential;
    }
    /**
     * Converts a registration credential into the outcome expected by OpenAM.
     *
     * @param credential The credential to convert
     * @return The outcome string
     */
    static getRegistrationOutcome(credential) {
        if (credential === null) {
            const e = new Error(&#39;No credential generated from registration&#39;);
            e.name = WebAuthnOutcomeType.UnknownError;
            throw e;
        }
        try {
            const clientDataJSON = arrayBufferToString(credential.response.clientDataJSON);
            const attestationResponse = credential.response;
            const attestationObject = new Int8Array(attestationResponse.attestationObject).toString();
            return `${clientDataJSON}::${attestationObject}::${credential.id}`;
        }
        catch {
            const e = new Error(&#39;Transforming credential object to string failed&#39;);
            e.name = WebAuthnOutcomeType.EncodingError;
            throw e;
        }
    }
    /**
     * Converts authentication tree metadata into options required by the browser
     * Web Authentication API.
     *
     * @param metadata The metadata provided in the authentication tree MetadataCallback
     * @return The Web Authentication API request options
     */
    static createAuthenticationPublicKey(metadata) {
        const { acceptableCredentials, allowCredentials, challenge, relyingPartyId, timeout, userVerification, } = metadata;
        const rpId = parseRelyingPartyId(relyingPartyId);
        const allowCredentialsValue = parseCredentials(allowCredentials || acceptableCredentials || &#39;&#39;);
        return {
            challenge: Uint8Array.from(atob(challenge), (c) =&gt; c.charCodeAt(0)).buffer,
            timeout,
            // only add key-value pair if proper value is provided
            ...(allowCredentialsValue?.length ? { allowCredentials: allowCredentialsValue } : {}),
            ...(userVerification &amp;&amp; { userVerification }),
            ...(rpId &amp;&amp; { rpId }),
        };
    }
    /**
     * Converts authentication tree metadata into options required by the browser
     * Web Authentication API.
     *
     * @param metadata The metadata provided in the authentication tree MetadataCallback
     * @return The Web Authentication API request options
     */
    static createRegistrationPublicKey(metadata) {
        const { pubKeyCredParams: pubKeyCredParamsString } = metadata;
        const pubKeyCredParams = parsePubKeyArray(pubKeyCredParamsString);
        if (!pubKeyCredParams) {
            const e = new Error(&#39;Missing pubKeyCredParams property from registration options&#39;);
            e.name = WebAuthnOutcomeType.DataError;
            throw e;
        }
        const excludeCredentials = parseCredentials(metadata.excludeCredentials);
        const { attestationPreference, authenticatorSelection, challenge, relyingPartyId, relyingPartyName, timeout, userId, userName, displayName, } = metadata;
        const rpId = parseRelyingPartyId(relyingPartyId);
        const rp = {
            name: relyingPartyName,
            ...(rpId &amp;&amp; { id: rpId }),
        };
        return {
            attestation: attestationPreference,
            authenticatorSelection: JSON.parse(authenticatorSelection),
            challenge: Uint8Array.from(atob(challenge), (c) =&gt; c.charCodeAt(0)).buffer,
            ...(excludeCredentials.length &amp;&amp; { excludeCredentials }),
            pubKeyCredParams,
            rp,
            timeout,
            user: {
                displayName: displayName || userName,
                id: Int8Array.from(userId.split(&#39;&#39;).map((c) =&gt; c.charCodeAt(0))),
                name: displayName || userName,
            },
        };
    }
    /**
     * Creates and stores an SDK-owned {@link AbortController} for conditional mediation,
     * aborting any previous SDK-owned controller first.
     *
     * @return A new AbortController for conditional mediation.
     */
    static createAbortController() {
        this.conditionalAbortController?.abort();
        const abortController = new AbortController();
        this.conditionalAbortController = abortController;
        return abortController;
    }
}

function webauthnComponent(journeyEl, step, idx) {
  const container = document.createElement(&quot;div&quot;);
  container.id = `webauthn-container-${idx}`;
  const info = document.createElement(&quot;p&quot;);
  info.innerText = &quot;Please complete the WebAuthn challenge using your authenticator.&quot;;
  container.appendChild(info);
  journeyEl.appendChild(container);
  const webAuthnStepType = WebAuthn.getWebAuthnStepType(step);
  async function handleWebAuthn() {
    try {
      if (webAuthnStepType === WebAuthnStepType.Authentication) {
        console.log(&quot;trying authentication&quot;);
        await WebAuthn.authenticate(step);
        return true;
      }
      if (webAuthnStepType === WebAuthnStepType.Registration) {
        console.log(&quot;trying registration&quot;);
        await WebAuthn.register(step);
        return true;
      }
      return false;
    } catch {
      return false;
    }
  }
  return handleWebAuthn();
}
async function handleWebAuthnStep(journeyEl, step, callbacks, submitForm, setError) {
  const webAuthnStep = WebAuthn.getWebAuthnStepType(step);
  if (webAuthnStep === WebAuthnStepType.Authentication) {
    renderCallbacks(journeyEl, callbacks, submitForm);
    const conditionalInput = journeyEl.querySelector(
      &#39;input[autocomplete=&quot;webauthn&quot;]&#39;
    );
    conditionalInput?.focus();
    const isConditionalSupported = await WebAuthn.isConditionalMediationSupported();
    const metadataCallback = WebAuthn.getMetadataCallback(step);
    const meta = metadataCallback?.getData();
    const isConditionalMediation = meta?.mediation === &quot;conditional&quot; || meta?.conditional === true;
    if (isConditionalSupported &amp;&amp; conditionalInput &amp;&amp; isConditionalMediation) {
      const controller = new AbortController();
      void WebAuthn.authenticate(step, controller.signal).then(() =&gt; submitForm()).catch(() =&gt; {
        setError(&quot;WebAuthn failed or was cancelled. Please try again or use a different method.&quot;);
      });
      return { callbacksRendered: true, didSubmit: false };
    }
    const webAuthnSuccess = await webauthnComponent(journeyEl, step, 0);
    if (webAuthnSuccess) {
      submitForm();
      return { callbacksRendered: true, didSubmit: true };
    }
    setError(&quot;WebAuthn failed or was cancelled. Please try again or use a different method.&quot;);
    return { callbacksRendered: true, didSubmit: false };
  }
  if (webAuthnStep === WebAuthnStepType.Registration) {
    const webAuthnSuccess = await webauthnComponent(journeyEl, step, 0);
    if (webAuthnSuccess) {
      submitForm();
      return { callbacksRendered: false, didSubmit: true };
    }
    setError(&quot;WebAuthn failed or was cancelled. Please try again or use a different method.&quot;);
    return { callbacksRendered: false, didSubmit: false };
  }
  return { callbacksRendered: false, didSubmit: false };
}

const serverConfigs = {
  basic: {
    serverConfig: {
      wellknown: &quot;http://localhost:9443/am/oauth2/realms/root/.well-known/openid-configuration&quot;
    }
  },
  tenant: {
    serverConfig: {
      wellknown: &quot;https://openam-sdks.forgeblocks.com/am/oauth2/realms/root/realms/alpha/.well-known/openid-configuration&quot;
    }
  }
};

const qs = window.location.search;
const searchParams = new URLSearchParams(qs);
const config = serverConfigs[searchParams.get(&quot;clientId&quot;) || &quot;basic&quot;];
const journeyName = searchParams.get(&quot;journey&quot;) ?? &quot;UsernamePassword&quot;;
let requestMiddleware = [];
if (searchParams.get(&quot;middleware&quot;) === &quot;true&quot;) {
  requestMiddleware = [
    (req, action, next) =&gt; {
      switch (action.type) {
        case &quot;JOURNEY_START&quot;:
          req.url.searchParams.set(&quot;start-authenticate-middleware&quot;, &quot;start-authentication&quot;);
          req.headers.append(&quot;x-start-authenticate-middleware&quot;, &quot;start-authentication&quot;);
          req.headers?.set(&quot;Accept-Language&quot;, &quot;xx-XX&quot;);
          break;
        case &quot;JOURNEY_NEXT&quot;:
          req.url.searchParams.set(&quot;authenticate-middleware&quot;, &quot;authentication&quot;);
          req.headers.append(&quot;x-authenticate-middleware&quot;, &quot;authentication&quot;);
          req.headers?.set(&quot;Accept-Language&quot;, &quot;yy-YY&quot;);
          break;
      }
      next();
    },
    (req, action, next) =&gt; {
      switch (action.type) {
        case &quot;JOURNEY_TERMINATE&quot;:
          req.url.searchParams.set(&quot;end-session-middleware&quot;, &quot;end-session&quot;);
          req.headers.append(&quot;x-end-session-middleware&quot;, &quot;end-session&quot;);
          req.headers?.set(&quot;Accept-Language&quot;, &quot;zz-ZZ&quot;);
          break;
      }
      next();
    }
  ];
}
(async () =&gt; {
  const errorEl = document.getElementById(&quot;error&quot;);
  const formEl = document.getElementById(&quot;form&quot;);
  const journeyEl = document.getElementById(&quot;journey&quot;);
  let journeyClient;
  try {
    journeyClient = await journey({ config, requestMiddleware });
  } catch (error) {
    const message = error instanceof Error ? error.message : &quot;Unknown error&quot;;
    console.error(&quot;Failed to initialize journey client:&quot;, message);
    errorEl.textContent = message;
    return;
  }
  let step = await journeyClient.start({ journey: journeyName });
  function renderError() {
    if (step?.type !== &quot;LoginFailure&quot;) {
      throw new Error(&quot;Expected step to be defined and of type LoginFailure&quot;);
    }
    const error = step.payload.message;
    console.error(`Error: ${error}`);
    if (errorEl) {
      errorEl.innerHTML = `
        &lt;pre id=&quot;errorMessage&quot;&gt;${error}&lt;/pre&gt;
        `;
    }
  }
  async function renderForm() {
    journeyEl.innerHTML = &quot;&quot;;
    errorEl.textContent = &quot;&quot;;
    if (step?.type !== &quot;Step&quot;) {
      throw new Error(&quot;Expected step to be defined and of type Step&quot;);
    }
    const formName = step.getHeader();
    const header = document.createElement(&quot;h2&quot;);
    header.innerText = formName || &quot;&quot;;
    journeyEl.appendChild(header);
    const submitForm = () =&gt; formEl.requestSubmit();
    const { callbacksRendered, didSubmit } = await handleWebAuthnStep(
      journeyEl,
      step,
      step.callbacks,
      submitForm,
      (message) =&gt; {
        errorEl.textContent = message;
      }
    );
    if (didSubmit) {
      return;
    }
    const stepRendered = renderQRCodeStep(journeyEl, step) || renderRecoveryCodesStep(journeyEl, step);
    if (!stepRendered &amp;&amp; !callbacksRendered) {
      const callbacks = step.callbacks;
      renderCallbacks(journeyEl, callbacks, submitForm);
    }
    const submitBtn = document.createElement(&quot;button&quot;);
    submitBtn.type = &quot;submit&quot;;
    submitBtn.id = &quot;submitButton&quot;;
    submitBtn.innerText = &quot;Submit&quot;;
    journeyEl.appendChild(submitBtn);
  }
  function renderComplete() {
    if (step?.type !== &quot;LoginSuccess&quot;) {
      throw new Error(&quot;Expected step to be defined and of type LoginSuccess&quot;);
    }
    const session = step.getSessionToken();
    console.log(`Session Token: ${session || &quot;none&quot;}`);
    journeyEl.replaceChildren();
    const completeHeader = document.createElement(&quot;h2&quot;);
    completeHeader.id = &quot;completeHeader&quot;;
    completeHeader.innerText = &quot;Complete&quot;;
    journeyEl.appendChild(completeHeader);
    renderDeleteDevicesSection(journeyEl, () =&gt; deleteWebAuthnDevice(config));
    const sessionLabelEl = document.createElement(&quot;span&quot;);
    sessionLabelEl.id = &quot;sessionLabel&quot;;
    sessionLabelEl.innerText = &quot;Session:&quot;;
    const sessionTokenEl = document.createElement(&quot;pre&quot;);
    sessionTokenEl.id = &quot;sessionToken&quot;;
    sessionTokenEl.textContent = session || &quot;none&quot;;
    const logoutBtn = document.createElement(&quot;button&quot;);
    logoutBtn.type = &quot;button&quot;;
    logoutBtn.id = &quot;logoutButton&quot;;
    logoutBtn.innerText = &quot;Logout&quot;;
    journeyEl.appendChild(sessionLabelEl);
    journeyEl.appendChild(sessionTokenEl);
    journeyEl.appendChild(logoutBtn);
    logoutBtn.addEventListener(&quot;click&quot;, async () =&gt; {
      await journeyClient.terminate();
      console.log(&quot;Logout successful&quot;);
      step = await journeyClient.start({ journey: journeyName });
      renderForm();
    });
  }
  formEl.addEventListener(&quot;submit&quot;, async (event) =&gt; {
    event.preventDefault();
    if (step?.type !== &quot;Step&quot;) {
      throw new Error(&quot;Expected step to be defined and of type Step&quot;);
    }
    step = await journeyClient.next(step, {
      query: { noSession: searchParams.get(&quot;no-session&quot;) || &quot;false&quot; }
    });
    if (step?.type === &quot;Step&quot;) {
      console.log(&quot;Continuing journey to next step&quot;);
      renderForm();
    } else if (step?.type === &quot;LoginSuccess&quot;) {
      console.log(&quot;Journey completed successfully&quot;);
      renderComplete();
    } else if (step?.type === &quot;LoginFailure&quot;) {
      console.error(&quot;Journey failed&quot;);
      renderForm();
      renderError();
    } else {
      console.error(&quot;Unknown node status&quot;, step);
    }
  });
  if (step?.type !== &quot;LoginSuccess&quot;) {
    renderForm();
  } else {
    renderComplete();
  }
})();
">
<input type="hidden" name="project[files][dist/typescript.svg]" value="&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; aria-hidden=&quot;true&quot; role=&quot;img&quot; class=&quot;iconify iconify--logos&quot; width=&quot;32&quot; height=&quot;32&quot; preserveAspectRatio=&quot;xMidYMid meet&quot; viewBox=&quot;0 0 256 256&quot;&gt;&lt;path fill=&quot;#007ACC&quot; d=&quot;M0 128v128h256V0H0z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;#FFF&quot; d=&quot;m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;">
<input type="hidden" name="project[files][dist/vite.svg]" value="&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; aria-hidden=&quot;true&quot; role=&quot;img&quot; class=&quot;iconify iconify--logos&quot; width=&quot;31.88&quot; height=&quot;32&quot; preserveAspectRatio=&quot;xMidYMid meet&quot; viewBox=&quot;0 0 256 257&quot;&gt;&lt;defs&gt;&lt;linearGradient id=&quot;IconifyId1813088fe1fbc01fb466&quot; x1=&quot;-.828%&quot; x2=&quot;57.636%&quot; y1=&quot;7.652%&quot; y2=&quot;78.411%&quot;&gt;&lt;stop offset=&quot;0%&quot; stop-color=&quot;#41D1FF&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;100%&quot; stop-color=&quot;#BD34FE&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;linearGradient id=&quot;IconifyId1813088fe1fbc01fb467&quot; x1=&quot;43.376%&quot; x2=&quot;50.316%&quot; y1=&quot;2.242%&quot; y2=&quot;89.03%&quot;&gt;&lt;stop offset=&quot;0%&quot; stop-color=&quot;#FFEA83&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;8.333%&quot; stop-color=&quot;#FFDD35&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;100%&quot; stop-color=&quot;#FFA800&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/defs&gt;&lt;path fill=&quot;url(#IconifyId1813088fe1fbc01fb466)&quot; d=&quot;M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;url(#IconifyId1813088fe1fbc01fb467)&quot; d=&quot;M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;">
<input type="hidden" name="project[files][components/README.md]" value="# Journey App Components

This directory contains UI components for rendering different types of journey callbacks in the e2e test application. Each component follows a consistent pattern and handles the specific requirements of its callback type.

## Available Components

### Input Components

- **`attribute-input.ts`** - `AttributeInputCallback` - Handles string, number, and boolean attribute inputs with appropriate input types
- **`choice.ts`** - `ChoiceCallback` - Renders a select dropdown with available choices
- **`confirmation.ts`** - `ConfirmationCallback` - Creates radio buttons for confirmation options
- **`kba-create.ts`** - `KbaCreateCallback` - Two-field form for creating security questions and answers
- **`password.ts`** - `PasswordCallback` - Password input field
- **`text-input.ts`** - `NameCallback`, `TextInputCallback` - Generic text input component
- **`validated-password.ts`** - `ValidatedCreatePasswordCallback` - Password input with validation
- **`validated-username.ts`** - `ValidatedCreateUsernameCallback` - Username input with validation

### Output Components

- **`text-output.ts`** - `TextOutputCallback` - Displays text messages
- **`suspended-text-output.ts`** - `SuspendedTextOutputCallback` - Styled suspension message display

### Interaction Components

- **`redirect.ts`** - `RedirectCallback` - Button to trigger external redirects
- **`select-idp.ts`** - `SelectIdPCallback` - Radio buttons for identity provider selection
- **`terms-and-conditions.ts`** - `TermsAndConditionsCallback` - Terms display with acceptance checkbox

### Security Components

- **`recaptcha.ts`** - `ReCaptchaCallback` - reCAPTCHA challenge placeholder
- **`recaptcha-enterprise.ts`** - `ReCaptchaEnterpriseCallback` - reCAPTCHA Enterprise placeholder
- **`ping-protect-evaluation.ts`** - `PingOneProtectEvaluationCallback` - Risk assessment display
- **`ping-protect-initialize.ts`** - `PingOneProtectInitializeCallback` - Protection initialization

### Utility Components

- **`device-profile.ts`** - `DeviceProfileCallback` - Device profiling indicator
- **`hidden-value.ts`** - `HiddenValueCallback` - Hidden input field
- **`metadata.ts`** - `MetadataCallback` - Hidden metadata storage
- **`polling-wait.ts`** - `PollingWaitCallback` - Loading spinner with wait message

## Component Pattern

All components follow this consistent pattern:

```typescript
export default function componentName(
  journeyEl: HTMLDivElement,
  callback: CallbackType,
  idx: number,
) {
  // Create DOM elements
  // Set up event listeners
  // Append to journeyEl
}
```

### Parameters

- **`journeyEl`** - The container element to append the component to
- **`callback`** - The callback instance with data and methods
- **`idx`** - Index for generating unique IDs

### Usage Example

```typescript
import { choiceComponent } from &#39;./components/index.js&#39;;

// Render a choice callback
choiceComponent(containerDiv, choiceCallback, 0);
```

## Implementation Notes

- All components handle their own styling via inline CSS or style attributes
- Event listeners are set up to call appropriate callback methods
- Components generate unique IDs using the callback&#39;s input name or a fallback
- Error handling is implemented where appropriate
- Console logging is used for debugging and demonstration

## Component States

Some components like reCAPTCHA and PingOne Protect include simulation timeouts for demonstration purposes in the e2e testing environment. In production, these would integrate with actual third-party services.
">
<input type="hidden" name="project[files][components/attribute-input.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { AttributeInputCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function attributeInputComponent(
  journeyEl: HTMLDivElement,
  callback: AttributeInputCallback&lt;string | number | boolean&gt;,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const input = document.createElement(&#39;input&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();

  // Determine input type based on attribute type
  const attributeType = callback.getType();
  if (attributeType === &#39;BooleanAttributeInputCallback&#39;) {
    input.type = &#39;checkbox&#39;;
    input.checked = (callback.getInputValue() as boolean) || false;
  } else if (attributeType === &#39;NumberAttributeInputCallback&#39;) {
    input.type = &#39;number&#39;;
    input.value = String(callback.getInputValue() || &#39;&#39;);
  } else {
    input.type = &#39;text&#39;;
    input.value = String(callback.getInputValue() || &#39;&#39;);
  }

  input.id = collectorKey;
  input.name = collectorKey;
  input.required = callback.isRequired();

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;input&#39;, (event) =&gt; {
    const target = event.target as HTMLInputElement;
    if (attributeType === &#39;BooleanAttributeInputCallback&#39;) {
      callback.setInputValue(target.checked);
    } else if (attributeType === &#39;NumberAttributeInputCallback&#39;) {
      callback.setInputValue(Number(target.value));
    } else {
      callback.setInputValue(target.value);
    }
  });
}
">
<input type="hidden" name="project[files][components/choice.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ChoiceCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function choiceComponent(
  journeyEl: HTMLDivElement,
  callback: ChoiceCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const select = document.createElement(&#39;select&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  select.id = collectorKey;
  select.name = collectorKey;

  // Add choices as options
  const choices = callback.getChoices();
  const defaultChoice = callback.getDefaultChoice();

  choices.forEach((choice, index) =&gt; {
    const option = document.createElement(&#39;option&#39;);
    option.value = String(index);
    option.text = choice;
    option.selected = index === defaultChoice;
    select.appendChild(option);
  });

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(select);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;change&#39;, (event) =&gt; {
    const selectedIndex = Number((event.target as HTMLSelectElement).value);
    callback.setChoiceIndex(selectedIndex);
  });
}
">
<input type="hidden" name="project[files][components/confirmation.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ConfirmationCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function confirmationComponent(
  journeyEl: HTMLDivElement,
  callback: ConfirmationCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const container = document.createElement(&#39;div&#39;);

  label.innerText = callback.getPrompt();
  container.id = collectorKey;

  // Get options and default option
  const options = callback.getOptions();
  const defaultOption = callback.getDefaultOption();

  // Create radio buttons for each option
  options.forEach((option: string, index: number) =&gt; {
    const radioContainer = document.createElement(&#39;div&#39;);
    const radio = document.createElement(&#39;input&#39;);
    const radioLabel = document.createElement(&#39;label&#39;);

    radio.type = &#39;radio&#39;;
    radio.id = `${collectorKey}-${index}`;
    radio.name = collectorKey;
    radio.value = String(index);
    radio.checked = index === defaultOption;

    radioLabel.htmlFor = `${collectorKey}-${index}`;
    radioLabel.innerText = option;

    radioContainer.appendChild(radio);
    radioContainer.appendChild(radioLabel);
    container.appendChild(radioContainer);
  });

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(container);

  // Add event listener for radio button changes
  journeyEl?.querySelectorAll(`input[name=&quot;${collectorKey}&quot;]`)?.forEach((radio) =&gt; {
    radio.addEventListener(&#39;change&#39;, (event) =&gt; {
      if ((event.target as HTMLInputElement).checked) {
        const selectedIndex = Number((event.target as HTMLInputElement).value);
        callback.setOptionIndex(selectedIndex);
      }
    });
  });
}
">
<input type="hidden" name="project[files][components/delete-device.ts]" value="/*
 * Copyright (c) 2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */

export function renderDeleteDevicesSection(
  journeyEl: HTMLDivElement,
  deleteWebAuthnDevice: () =&gt; Promise&lt;string&gt;,
): void {
  const deleteWebAuthnDeviceButton = document.createElement(&#39;button&#39;);
  deleteWebAuthnDeviceButton.type = &#39;button&#39;;
  deleteWebAuthnDeviceButton.id = &#39;deleteWebAuthnDeviceButton&#39;;
  deleteWebAuthnDeviceButton.innerText = &#39;Delete Webauthn Device&#39;;

  const deviceStatus = document.createElement(&#39;pre&#39;);
  deviceStatus.id = &#39;deviceStatus&#39;;
  deviceStatus.style.minHeight = &#39;1.5em&#39;;

  journeyEl.appendChild(deleteWebAuthnDeviceButton);
  journeyEl.appendChild(deviceStatus);

  deleteWebAuthnDeviceButton.addEventListener(&#39;click&#39;, async () =&gt; {
    try {
      deviceStatus.innerText = &#39;Deleting WebAuthn device...&#39;;
      deviceStatus.innerText = await deleteWebAuthnDevice();
    } catch (error) {
      const message = error instanceof Error ? error.message : String(error);
      deviceStatus.innerText = `Delete failed: ${message}`;
    }
  });
}
">
<input type="hidden" name="project[files][components/device-profile.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import { Device } from &#39;@forgerock/journey-client/device&#39;;
import type { DeviceProfileCallback } from &#39;@forgerock/journey-client/types&#39;;

/**
 * Device Profile Component
 * Automatically collects device metadata and location data using the Device class
 */
export default function deviceProfileComponent(
  journeyEl: HTMLDivElement,
  callback: DeviceProfileCallback,
  idx: number,
  onSubmit?: () =&gt; void,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&#39;p&#39;);

  message.id = collectorKey;
  message.innerText = &#39;Collecting device profile information...&#39;;

  journeyEl?.appendChild(message);

  // Automatically trigger device profile collection
  setTimeout(async () =&gt; {
    try {
      const isLocationRequired = callback.isLocationRequired();
      const isMetadataRequired = callback.isMetadataRequired();

      console.log(&#39;Collecting device profile...&#39;, { isLocationRequired, isMetadataRequired });

      // Create device instance and collect profile
      const device = new Device();
      const profile = await device.getProfile({
        location: isLocationRequired,
        metadata: isMetadataRequired,
      });

      console.log(&#39;Device profile collected successfully&#39;);

      // Set the profile on the callback
      callback.setProfile(profile);
      message.innerText = &#39;Device profile collected successfully!&#39;;
      message.style.color = &#39;green&#39;;

      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&#39;Device profile collection failed:&#39;, error);
      const errorMessage = error instanceof Error ? error.message : &#39;Unknown error&#39;;
      message.innerText = `Collection failed: ${errorMessage}`;
      message.style.color = &#39;red&#39;;
    }
  }, 100);
}
">
<input type="hidden" name="project[files][components/hidden-value.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { HiddenValueCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function hiddenValueComponent(
  journeyEl: HTMLDivElement,
  callback: HiddenValueCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const input = document.createElement(&#39;input&#39;);

  input.type = &#39;hidden&#39;;
  input.id = collectorKey;
  input.name = collectorKey;
  input.value = String(callback.getInputValue() || &#39;&#39;);

  journeyEl?.appendChild(input);

  // Hidden value callback typically doesn&#39;t require user interaction
  // The value is usually set programmatically or by the server
}
">
<input type="hidden" name="project[files][components/index.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */

/**
 * Index file for journey-app callback components
 *
 * This file exports all the available component functions for rendering
 * journey callbacks in the e2e test application.
 */

export { default as attributeInputComponent } from &#39;./attribute-input.js&#39;;
export { default as choiceComponent } from &#39;./choice.js&#39;;
export { default as confirmationComponent } from &#39;./confirmation.js&#39;;
export { default as deviceProfileComponent } from &#39;./device-profile.js&#39;;
export { default as hiddenValueComponent } from &#39;./hidden-value.js&#39;;
export { default as kbaCreateComponent } from &#39;./kba-create.js&#39;;
export { default as metadataComponent } from &#39;./metadata.js&#39;;
export { default as passwordComponent } from &#39;./password.js&#39;;
export { default as pingProtectEvaluationComponent } from &#39;./ping-protect-evaluation.js&#39;;
export { default as pingProtectInitializeComponent } from &#39;./ping-protect-initialize.js&#39;;
export { default as pollingWaitComponent } from &#39;./polling-wait.js&#39;;
export { default as recaptchaComponent } from &#39;./recaptcha.js&#39;;
export { default as recaptchaEnterpriseComponent } from &#39;./recaptcha-enterprise.js&#39;;
export { default as redirectComponent } from &#39;./redirect.js&#39;;
export { default as selectIdpComponent } from &#39;./select-idp.js&#39;;
export { default as suspendedTextOutputComponent } from &#39;./suspended-text-output.js&#39;;
export { default as termsAndConditionsComponent } from &#39;./terms-and-conditions.js&#39;;
export { default as textInputComponent } from &#39;./text-input.js&#39;;
export { default as textOutputComponent } from &#39;./text-output.js&#39;;
export { default as validatedPasswordComponent } from &#39;./validated-password.js&#39;;
export { default as validatedUsernameComponent } from &#39;./validated-username.js&#39;;
">
<input type="hidden" name="project[files][components/kba-create.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { KbaCreateCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function kbaCreateComponent(
  journeyEl: HTMLDivElement,
  callback: KbaCreateCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const questions = callback.getPredefinedQuestions();

  container.id = collectorKey;

  // Question field
  const questionLabel = document.createElement(&#39;label&#39;);
  questionLabel.htmlFor = `${collectorKey}-question`;
  // Add index to prompt to differentiate multiple KBA callbacks
  questionLabel.innerText = callback.getPrompt() + &#39; &#39; + idx;

  // Iterate through predefined questions and create a select dropdown
  const questionInput = document.createElement(&#39;select&#39;);
  questionInput.id = `${collectorKey}-question`;

  questions.forEach((question) =&gt; {
    const option = document.createElement(&#39;option&#39;);
    option.value = question;
    option.text = question;
    questionInput.appendChild(option);
  });

  // Add option to create a question if allowed
  if (callback.isAllowedUserDefinedQuestions()) {
    const userDefinedOption = document.createElement(&#39;option&#39;);
    userDefinedOption.value = &#39;user-defined&#39;;
    userDefinedOption.text = &#39;Enter your own question&#39;;
    questionInput.appendChild(userDefinedOption);
  }

  // Answer field
  const answerLabel = document.createElement(&#39;label&#39;);
  answerLabel.htmlFor = `${collectorKey}-answer`;
  answerLabel.innerText = &#39;Answer &#39; + idx + &#39;:&#39;;

  const answerInput = document.createElement(&#39;input&#39;);
  answerInput.type = &#39;text&#39;;
  answerInput.id = `${collectorKey}-answer`;
  answerInput.placeholder = &#39;Enter your answer&#39;;

  container.appendChild(questionLabel);
  container.appendChild(questionInput);
  container.appendChild(answerLabel);
  container.appendChild(answerInput);

  journeyEl?.appendChild(container);

  // Event listeners
  questionInput.addEventListener(&#39;input&#39;, (event) =&gt; {
    const selectedQuestion = (event.target as HTMLInputElement).value;
    if (selectedQuestion === &#39;user-defined&#39;) {
      // If user-defined option is selected, prompt for custom question
      const customQuestionLabel = document.createElement(&#39;label&#39;);
      customQuestionLabel.htmlFor = `${collectorKey}-question-user-defined`;
      customQuestionLabel.innerText = &#39;Type your question &#39; + idx + &#39;:&#39;;

      const customQuestionInput = document.createElement(&#39;input&#39;);
      customQuestionInput.type = &#39;text&#39;;
      customQuestionInput.id = `${collectorKey}-question-user-defined`;
      customQuestionInput.placeholder = &#39;Type your question&#39;;

      container.lastElementChild?.before(customQuestionLabel);
      container.lastElementChild?.before(customQuestionInput);
      customQuestionInput.addEventListener(&#39;input&#39;, (e) =&gt; {
        callback.setQuestion((e.target as HTMLInputElement).value);
        console.log(&#39;Custom question &#39; + idx + &#39;:&#39;, callback.getInputValue(0));
      });
    } else {
      callback.setQuestion((event.target as HTMLInputElement).value);
      console.log(&#39;Selected question &#39; + idx + &#39;:&#39;, callback.getInputValue(0));
    }
  });

  answerInput.addEventListener(&#39;input&#39;, (event) =&gt; {
    callback.setAnswer((event.target as HTMLInputElement).value);
    console.log(&#39;Answer &#39; + idx + &#39;:&#39;, callback.getInputValue(1));
  });
}
">
<input type="hidden" name="project[files][components/metadata.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { MetadataCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function metadataComponent(
  journeyEl: HTMLDivElement,
  callback: MetadataCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;

  // Metadata callback typically doesn&#39;t render UI elements
  // It&#39;s used to pass metadata information
  const hiddenInput = document.createElement(&#39;input&#39;);
  hiddenInput.type = &#39;hidden&#39;;
  hiddenInput.id = collectorKey;
  hiddenInput.name = collectorKey;
  hiddenInput.value = JSON.stringify(callback.getData());

  journeyEl?.appendChild(hiddenInput);

  console.log(&#39;Metadata callback data:&#39;, callback.getData());
}
">
<input type="hidden" name="project[files][components/password.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { PasswordCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function passwordComponent(
  journeyEl: HTMLDivElement,
  callback: PasswordCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const input = document.createElement(&#39;input&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &#39;password&#39;;
  input.id = collectorKey;
  input.name = collectorKey;

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;input&#39;, (event) =&gt; {
    callback.setPassword((event.target as HTMLInputElement).value);
  });
}
">
<input type="hidden" name="project[files][components/ping-protect-evaluation.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { PingOneProtectEvaluationCallback } from &#39;@forgerock/journey-client/types&#39;;
import { getProtectInstance } from &#39;./ping-protect-initialize.js&#39;;

/**
 * PingOne Protect Evaluation Component
 * Automatically collects device and behavioral signals using the Protect SDK
 */
export default function pingProtectEvaluationComponent(
  journeyEl: HTMLDivElement,
  callback: PingOneProtectEvaluationCallback,
  idx: number,
  onSubmit?: () =&gt; void,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&#39;p&#39;);

  message.id = collectorKey;
  message.innerText = &#39;Evaluating risk assessment...&#39;;

  journeyEl?.appendChild(message);

  // Automatically trigger Protect data collection
  setTimeout(async () =&gt; {
    try {
      // Get the protect instance created during initialization
      const protectInstance = getProtectInstance();

      if (!protectInstance) {
        throw new Error(
          &#39;Protect instance not initialized. Initialize callback must be called first.&#39;,
        );
      }

      console.log(&#39;Collecting Protect signals...&#39;);

      // Collect device and behavioral data
      const result = await protectInstance.getData();

      // Check if result is an error object
      if (typeof result !== &#39;string&#39; &amp;&amp; &#39;error&#39; in result) {
        console.error(&#39;Error collecting Protect data:&#39;, result.error);
        callback.setClientError(result.error);
        message.innerText = `Data collection failed: ${result.error}`;
        message.style.color = &#39;red&#39;;
        return;
      }

      // Set the collected data on the callback
      console.log(&#39;Protect data collected successfully&#39;);
      callback.setData(result);
      message.innerText = &#39;Risk assessment completed successfully!&#39;;
      message.style.color = &#39;green&#39;;

      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&#39;Protect evaluation failed:&#39;, error);
      const errorMessage = error instanceof Error ? error.message : &#39;Unknown error&#39;;
      callback.setClientError(errorMessage);
      message.innerText = `Evaluation failed: ${errorMessage}`;
      message.style.color = &#39;red&#39;;
    }
  }, 100);
}
">
<input type="hidden" name="project[files][components/ping-protect-initialize.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import { protect } from &#39;@forgerock/protect&#39;;
import type { PingOneProtectInitializeCallback } from &#39;@forgerock/journey-client/types&#39;;

// Global storage for protect instance to be used by evaluation component
let protectInstance: ReturnType&lt;typeof protect&gt; | null = null;

/**
 * Gets the stored protect instance
 * @returns The protect instance or null if not initialized
 */
export function getProtectInstance() {
  return protectInstance;
}

/**
 * PingOne Protect Initialize Component
 * Automatically initializes the Protect SDK using configuration from the callback
 */
export default function pingProtectInitializeComponent(
  journeyEl: HTMLDivElement,
  callback: PingOneProtectInitializeCallback,
  idx: number,
  onSubmit?: () =&gt; void,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = document.createElement(&#39;p&#39;);

  message.id = collectorKey;
  message.innerText = &#39;Initializing PingOne Protect...&#39;;

  journeyEl?.appendChild(message);

  // Automatically trigger Protect initialization
  setTimeout(async () =&gt; {
    try {
      // Get configuration from callback
      const config = callback.getConfig();
      console.log(&#39;Protect callback config:&#39;, config);

      if (!config?.envId) {
        const error = &#39;Missing envId in Protect configuration&#39;;
        console.error(error);
        callback.setClientError(error);
        message.innerText = `Initialization failed: ${error}`;
        message.style.color = &#39;red&#39;;
        return;
      }

      console.log(&#39;Initializing Protect with envId:&#39;, config.envId);

      // Create and store protect instance
      protectInstance = protect({ envId: config.envId });
      console.log(&#39;Protect instance created&#39;);

      // Initialize the Protect SDK
      console.log(&#39;Calling protect.start()...&#39;);
      const result = await protectInstance.start();
      console.log(&#39;protect.start() result:&#39;, result);

      if (result?.error) {
        console.error(&#39;Error initializing Protect:&#39;, result.error);
        callback.setClientError(result.error);
        message.innerText = `Initialization failed: ${result.error}`;
        message.style.color = &#39;red&#39;;
        return;
      }

      console.log(&#39;Protect initialized successfully - no errors&#39;);
      message.innerText = &#39;PingOne Protect initialized successfully!&#39;;
      message.style.color = &#39;green&#39;;

      if (onSubmit) {
        setTimeout(() =&gt; onSubmit(), 500);
      }
    } catch (error) {
      console.error(&#39;Protect initialization failed:&#39;, error);
      const errorMessage = error instanceof Error ? error.message : &#39;Unknown error&#39;;
      callback.setClientError(errorMessage);
      message.innerText = `Initialization failed: ${errorMessage}`;
      message.style.color = &#39;red&#39;;
    }
  }, 100);
}
">
<input type="hidden" name="project[files][components/polling-wait.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { PollingWaitCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function pollingWaitComponent(
  journeyEl: HTMLDivElement,
  callback: PollingWaitCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const message = document.createElement(&#39;p&#39;);
  const spinner = document.createElement(&#39;div&#39;);

  container.id = collectorKey;
  message.innerText = callback.getMessage() || &#39;Please wait...&#39;;

  // Simple spinner
  spinner.style.cssText = `
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px 0;
  `;

  // Add CSS animation
  const style = document.createElement(&#39;style&#39;);
  style.textContent = `
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
  `;
  document.head.appendChild(style);

  container.appendChild(message);
  container.appendChild(spinner);
  journeyEl?.appendChild(container);

  // TODO: Use set timeout to submit for after delay
}
">
<input type="hidden" name="project[files][components/qr-code.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import { QRCode } from &#39;@forgerock/journey-client/qr-code&#39;;
import type { JourneyStep, ConfirmationCallback } from &#39;@forgerock/journey-client/types&#39;;

export function renderQRCodeStep(journeyEl: HTMLDivElement, step: JourneyStep): boolean {
  if (!QRCode.isQRCodeStep(step)) {
    return false;
  }

  const qrCodeData = QRCode.getQRCodeData(step);

  console.log(&#39;QR Code step detected via QRCode module&#39;);
  console.log(&#39;QR Code data:&#39;, JSON.stringify(qrCodeData));

  const container = document.createElement(&#39;div&#39;);
  container.id = &#39;qr-code-container&#39;;

  const message = document.createElement(&#39;p&#39;);
  message.id = &#39;qr-code-message&#39;;
  message.innerText = qrCodeData.message || &#39;Scan the QR code below&#39;;
  container.appendChild(message);

  const uriDisplay = document.createElement(&#39;div&#39;);
  uriDisplay.id = &#39;qr-code-uri&#39;;
  uriDisplay.style.cssText = `
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    margin: 10px 0;
  `;
  uriDisplay.innerText = qrCodeData.uri;
  container.appendChild(uriDisplay);

  const useType = document.createElement(&#39;p&#39;);
  useType.id = &#39;qr-code-use-type&#39;;
  useType.innerText = `Type: ${qrCodeData.use}`;
  useType.style.color = &#39;#666&#39;;
  container.appendChild(useType);

  const confirmationCallbacks =
    step.getCallbacksOfType&lt;ConfirmationCallback&gt;(&#39;ConfirmationCallback&#39;);

  if (confirmationCallbacks.length &gt; 0) {
    const confirmCb = confirmationCallbacks[0];
    const options = confirmCb.getOptions();

    const optionsContainer = document.createElement(&#39;div&#39;);
    optionsContainer.style.marginTop = &#39;10px&#39;;

    options.forEach((option, index) =&gt; {
      const label = document.createElement(&#39;label&#39;);
      label.style.display = &#39;block&#39;;
      label.style.marginBottom = &#39;5px&#39;;

      const radio = document.createElement(&#39;input&#39;);
      radio.type = &#39;radio&#39;;
      radio.name = &#39;qr-confirmation&#39;;
      radio.value = String(index);
      radio.checked = index === confirmCb.getDefaultOption();
      radio.addEventListener(&#39;change&#39;, () =&gt; {
        confirmCb.setOptionIndex(index);
      });

      if (index === confirmCb.getDefaultOption()) {
        confirmCb.setOptionIndex(index);
      }

      label.appendChild(radio);
      label.appendChild(document.createTextNode(` ${option}`));
      optionsContainer.appendChild(label);
    });

    container.appendChild(optionsContainer);
  }

  journeyEl.appendChild(container);

  return true;
}
">
<input type="hidden" name="project[files][components/recaptcha-enterprise.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ReCaptchaEnterpriseCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function recaptchaEnterpriseComponent(
  journeyEl: HTMLDivElement,
  callback: ReCaptchaEnterpriseCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const message = document.createElement(&#39;p&#39;);

  container.id = collectorKey;
  message.innerText = &#39;Please complete the reCAPTCHA Enterprise challenge&#39;;

  // Create placeholder div for reCAPTCHA Enterprise
  const recaptchaDiv = document.createElement(&#39;div&#39;);
  recaptchaDiv.id = `recaptcha-enterprise-${collectorKey}`;
  recaptchaDiv.style.cssText = `
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    background-color: #f0f8ff;
    margin: 10px 0;
  `;
  recaptchaDiv.innerText =
    &#39;reCAPTCHA Enterprise placeholder (requires reCAPTCHA Enterprise script)&#39;;

  container.appendChild(message);
  container.appendChild(recaptchaDiv);
  journeyEl?.appendChild(container);

  // In a real implementation, you would load the reCAPTCHA Enterprise script
  // and initialize the widget here
  console.log(&#39;reCAPTCHA Enterprise callback initialized&#39;);

  // TODO: Implement reCAPTCHA Enterprise integration here
}
">
<input type="hidden" name="project[files][components/recaptcha.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ReCaptchaCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function recaptchaComponent(
  journeyEl: HTMLDivElement,
  callback: ReCaptchaCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const message = document.createElement(&#39;p&#39;);

  container.id = collectorKey;
  message.innerText = &#39;Please complete the reCAPTCHA challenge&#39;;

  // Create placeholder div for reCAPTCHA
  const recaptchaDiv = document.createElement(&#39;div&#39;);
  recaptchaDiv.id = `recaptcha-${collectorKey}`;
  recaptchaDiv.style.cssText = `
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    margin: 10px 0;
  `;
  recaptchaDiv.innerText = &#39;reCAPTCHA placeholder (requires reCAPTCHA script)&#39;;

  container.appendChild(message);
  container.appendChild(recaptchaDiv);
  journeyEl?.appendChild(container);

  // In a real implementation, you would load the reCAPTCHA script
  // and initialize the widget here
  console.log(&#39;reCAPTCHA callback initialized&#39;);

  // TODO: Implement reCAPTCHA integration here
}
">
<input type="hidden" name="project[files][components/recovery-codes.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import { RecoveryCodes } from &#39;@forgerock/journey-client/recovery-codes&#39;;
import type { JourneyStep, ConfirmationCallback } from &#39;@forgerock/journey-client/types&#39;;

export function renderRecoveryCodesStep(journeyEl: HTMLDivElement, step: JourneyStep): boolean {
  if (!RecoveryCodes.isDisplayStep(step)) {
    return false;
  }

  const codes = RecoveryCodes.getCodes(step);
  const deviceName = RecoveryCodes.getDeviceName(step);

  console.log(&#39;Recovery Codes step detected via RecoveryCodes module&#39;);
  console.log(&#39;Recovery codes:&#39;, JSON.stringify(codes));
  console.log(&#39;Device name:&#39;, deviceName);

  const container = document.createElement(&#39;div&#39;);
  container.id = &#39;recovery-codes-container&#39;;

  const header = document.createElement(&#39;h3&#39;);
  header.id = &#39;recovery-codes-header&#39;;
  header.innerText = &#39;Your Recovery Codes&#39;;
  container.appendChild(header);

  const instruction = document.createElement(&#39;p&#39;);
  instruction.innerText =
    &#39;You must make a copy of these recovery codes. They cannot be displayed again.&#39;;
  instruction.style.color = &#39;#666&#39;;
  container.appendChild(instruction);

  const codesContainer = document.createElement(&#39;div&#39;);
  codesContainer.id = &#39;recovery-codes-list&#39;;
  codesContainer.style.cssText = `
    padding: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  `;

  codes.forEach((code, index) =&gt; {
    const codeEl = document.createElement(&#39;div&#39;);
    codeEl.className = &#39;recovery-code&#39;;
    codeEl.setAttribute(&#39;data-code-index&#39;, String(index));
    codeEl.innerText = code;
    codeEl.style.cssText = `
      padding: 5px 10px;
      background-color: white;
      border: 1px solid #ccc;
      border-radius: 3px;
      text-align: center;
    `;
    codesContainer.appendChild(codeEl);
  });

  container.appendChild(codesContainer);

  if (deviceName) {
    const deviceInfo = document.createElement(&#39;p&#39;);
    deviceInfo.id = &#39;recovery-codes-device&#39;;
    deviceInfo.innerText = `Device: ${deviceName}`;
    deviceInfo.style.color = &#39;#666&#39;;
    container.appendChild(deviceInfo);
  }

  const confirmationCallbacks =
    step.getCallbacksOfType&lt;ConfirmationCallback&gt;(&#39;ConfirmationCallback&#39;);

  if (confirmationCallbacks.length &gt; 0) {
    const confirmCb = confirmationCallbacks[0];
    const options = confirmCb.getOptions();

    const optionsContainer = document.createElement(&#39;div&#39;);
    optionsContainer.style.marginTop = &#39;15px&#39;;

    options.forEach((option, index) =&gt; {
      const label = document.createElement(&#39;label&#39;);
      label.style.display = &#39;block&#39;;
      label.style.marginBottom = &#39;5px&#39;;

      const radio = document.createElement(&#39;input&#39;);
      radio.type = &#39;radio&#39;;
      radio.name = &#39;recovery-confirmation&#39;;
      radio.value = String(index);
      radio.checked = index === confirmCb.getDefaultOption();
      radio.addEventListener(&#39;change&#39;, () =&gt; {
        confirmCb.setOptionIndex(index);
      });

      if (index === confirmCb.getDefaultOption()) {
        confirmCb.setOptionIndex(index);
      }

      label.appendChild(radio);
      label.appendChild(document.createTextNode(` ${option}`));
      optionsContainer.appendChild(label);
    });

    container.appendChild(optionsContainer);
  }

  journeyEl.appendChild(container);

  return true;
}
">
<input type="hidden" name="project[files][components/redirect.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { RedirectCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function redirectComponent(
  journeyEl: HTMLDivElement,
  callback: RedirectCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const message = document.createElement(&#39;p&#39;);
  const button = document.createElement(&#39;button&#39;);

  container.id = collectorKey;
  message.innerText = &#39;You will be redirected to complete authentication&#39;;
  button.innerText = &#39;Continue to External Provider&#39;;
  button.style.cssText = `
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0;
  `;

  container.appendChild(message);
  container.appendChild(button);
  journeyEl?.appendChild(container);

  button.addEventListener(&#39;click&#39;, () =&gt; {
    try {
      const redirectUrl = callback.getRedirectUrl();
      console.log(&#39;Redirecting to:&#39;, redirectUrl);
      window.location.href = redirectUrl;
    } catch (error) {
      console.error(&#39;Redirect failed:&#39;, error);
    }
  });
}
">
<input type="hidden" name="project[files][components/select-idp.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { SelectIdPCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function selectIdpComponent(
  journeyEl: HTMLDivElement,
  callback: SelectIdPCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const label = document.createElement(&#39;label&#39;);

  container.id = collectorKey;
  label.innerText = &#39;Select Identity Provider:&#39;;

  const providers = callback.getProviders();

  // Create select element for provider selection
  const select = document.createElement(&#39;select&#39;);
  select.id = collectorKey;
  select.name = collectorKey;

  // Add default option
  const defaultOption = document.createElement(&#39;option&#39;);
  defaultOption.value = &#39;&#39;;
  defaultOption.innerText = &#39;Choose a provider...&#39;;
  defaultOption.disabled = true;
  defaultOption.selected = true;
  select.appendChild(defaultOption);

  // Create option elements for each provider
  providers.forEach((provider) =&gt; {
    const option = document.createElement(&#39;option&#39;);
    option.value = provider.provider;
    option.innerText = provider.provider;
    select.appendChild(option);
  });

  container.appendChild(select);

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(container);

  // Add event listener for provider selection
  select.addEventListener(&#39;change&#39;, (event) =&gt; {
    const selectedProvider = (event.target as HTMLSelectElement).value;
    if (selectedProvider) {
      callback.setProvider(selectedProvider);
    }
  });
}
">
<input type="hidden" name="project[files][components/suspended-text-output.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { SuspendedTextOutputCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function suspendedTextOutputComponent(
  journeyEl: HTMLDivElement,
  callback: SuspendedTextOutputCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const container = document.createElement(&#39;div&#39;);
  const message = document.createElement(&#39;p&#39;);

  container.id = collectorKey;
  message.innerText =
    callback.getMessage() || &#39;Authentication is suspended. Please contact your admin.&#39;;
  message.style.cssText = `
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    margin: 10px 0;
  `;

  container.appendChild(message);
  journeyEl?.appendChild(container);

  console.log(&#39;Suspended text output callback:&#39;, callback.getMessage());
}
">
<input type="hidden" name="project[files][components/terms-and-conditions.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { TermsAndConditionsCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function termsAndConditionsComponent(
  journeyEl: HTMLDivElement,
  callback: TermsAndConditionsCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const checkbox = document.createElement(&#39;input&#39;);

  // Terms text area
  console.log(callback.getTerms);

  // Checkbox for acceptance
  checkbox.type = &#39;checkbox&#39;;
  checkbox.id = collectorKey;
  checkbox.required = true;

  label.htmlFor = collectorKey;
  label.innerText = &#39; I accept the terms and conditions&#39;;

  journeyEl.appendChild(label);
  journeyEl.appendChild(checkbox);

  checkbox.addEventListener(&#39;change&#39;, (event) =&gt; {
    const accepted = (event.target as HTMLInputElement).checked;
    callback.setAccepted(accepted);
  });
}
">
<input type="hidden" name="project[files][components/text-input.ts]" value="/*
 * Copyright (c) 2025-2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { NameCallback, TextInputCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function textComponent(
  journeyEl: HTMLDivElement,
  callback: NameCallback | TextInputCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const input = document.createElement(&#39;input&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &#39;text&#39;;
  input.id = collectorKey;
  input.name = collectorKey;

  if (callback.getType() === &#39;NameCallback&#39;) {
    input.setAttribute(&#39;autocomplete&#39;, &#39;webauthn&#39;);
  }

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;input&#39;, (event) =&gt; {
    if (callback.getType() === &#39;NameCallback&#39;) {
      (callback as NameCallback).setName((event.target as HTMLInputElement).value);
    } else {
      (callback as TextInputCallback).setInputValue((event.target as HTMLInputElement).value);
    }
  });
}
">
<input type="hidden" name="project[files][components/text-output.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { TextOutputCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function textComponent(
  journeyEl: HTMLDivElement,
  callback: TextOutputCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const message = callback.getMessage() || &#39;&#39;;
  const p = document.createElement(&#39;paragraph&#39;);

  p.innerText = message;
  p.id = collectorKey;

  console.log(message);

  journeyEl?.appendChild(p);
}
">
<input type="hidden" name="project[files][components/validated-password.ts]" value="/*
 * Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ValidatedCreatePasswordCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function validatedPasswordComponent(
  journeyEl: HTMLDivElement,
  callback: ValidatedCreatePasswordCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const input = document.createElement(&#39;input&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &#39;password&#39;;
  input.id = collectorKey;
  input.name = collectorKey;

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;input&#39;, (event) =&gt; {
    callback.setPassword((event.target as HTMLInputElement).value);
  });
}
">
<input type="hidden" name="project[files][components/validated-username.ts]" value="/**
 * Copyright (c) 2025-2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */
import type { ValidatedCreateUsernameCallback } from &#39;@forgerock/journey-client/types&#39;;

export default function validatedUsernameComponent(
  journeyEl: HTMLDivElement,
  callback: ValidatedCreateUsernameCallback,
  idx: number,
) {
  const collectorKey = callback?.payload?.input?.[0].name || `collector-${idx}`;
  const label = document.createElement(&#39;label&#39;);
  const input = document.createElement(&#39;input&#39;);

  label.htmlFor = collectorKey;
  label.innerText = callback.getPrompt();
  input.type = &#39;text&#39;;
  input.id = collectorKey;
  input.name = collectorKey;
  input.setAttribute(&#39;autocomplete&#39;, &#39;webauthn&#39;);

  journeyEl?.appendChild(label);
  journeyEl?.appendChild(input);

  journeyEl?.querySelector(`#${collectorKey}`)?.addEventListener(&#39;input&#39;, (event) =&gt; {
    callback.setName((event.target as HTMLInputElement).value);
  });
}
">
<input type="hidden" name="project[files][components/webauthn-step.ts]" value="/*
 * Copyright (c) 2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */

import type { BaseCallback, JourneyStep } from &#39;@forgerock/journey-client/types&#39;;
import { WebAuthn, WebAuthnStepType } from &#39;@forgerock/journey-client/webauthn&#39;;

import { renderCallbacks } from &#39;../callback-map.js&#39;;

type WebAuthnStepHandlerResult = {
  callbacksRendered: boolean;
  didSubmit: boolean;
};

export function webauthnComponent(journeyEl: HTMLDivElement, step: JourneyStep, idx: number) {
  const container = document.createElement(&#39;div&#39;);
  container.id = `webauthn-container-${idx}`;
  const info = document.createElement(&#39;p&#39;);
  info.innerText = &#39;Please complete the WebAuthn challenge using your authenticator.&#39;;
  container.appendChild(info);
  journeyEl.appendChild(container);

  const webAuthnStepType = WebAuthn.getWebAuthnStepType(step);

  async function handleWebAuthn(): Promise&lt;boolean&gt; {
    try {
      if (webAuthnStepType === WebAuthnStepType.Authentication) {
        console.log(&#39;trying authentication&#39;);
        await WebAuthn.authenticate(step);
        return true;
      }

      if (webAuthnStepType === WebAuthnStepType.Registration) {
        console.log(&#39;trying registration&#39;);
        await WebAuthn.register(step);
        return true;
      }
      return false;
    } catch {
      return false;
    }
  }

  return handleWebAuthn();
}

export async function handleWebAuthnStep(
  journeyEl: HTMLDivElement,
  step: JourneyStep,
  callbacks: BaseCallback[],
  submitForm: () =&gt; void,
  setError: (message: string) =&gt; void,
): Promise&lt;WebAuthnStepHandlerResult&gt; {
  const webAuthnStep = WebAuthn.getWebAuthnStepType(step);

  if (webAuthnStep === WebAuthnStepType.Authentication) {
    // For conditional mediation, we need an input with `autocomplete=&quot;webauthn&quot;` to exist.
    renderCallbacks(journeyEl, callbacks, submitForm);

    const conditionalInput = journeyEl.querySelector(
      &#39;input[autocomplete=&quot;webauthn&quot;]&#39;,
    ) as HTMLInputElement | null;
    conditionalInput?.focus();

    const isConditionalSupported = await WebAuthn.isConditionalMediationSupported();

    const metadataCallback = WebAuthn.getMetadataCallback(step);
    const meta = metadataCallback?.getData&lt;{
      mediation?: CredentialMediationRequirement;
      conditional?: boolean;
    }&gt;();
    const isConditionalMediation = meta?.mediation === &#39;conditional&#39; || meta?.conditional === true;

    if (isConditionalSupported &amp;&amp; conditionalInput &amp;&amp; isConditionalMediation) {
      const controller = new AbortController();
      void WebAuthn.authenticate(step, controller.signal)
        .then(() =&gt; submitForm())
        .catch(() =&gt; {
          setError(&#39;WebAuthn failed or was cancelled. Please try again or use a different method.&#39;);
        });

      return { callbacksRendered: true, didSubmit: false };
    }

    // Fallback to the traditional (prompted) WebAuthn flow.
    const webAuthnSuccess = await webauthnComponent(journeyEl, step, 0);
    if (webAuthnSuccess) {
      submitForm();
      return { callbacksRendered: true, didSubmit: true };
    }

    setError(&#39;WebAuthn failed or was cancelled. Please try again or use a different method.&#39;);
    return { callbacksRendered: true, didSubmit: false };
  }

  if (webAuthnStep === WebAuthnStepType.Registration) {
    // For registration, we keep the traditional (prompted) WebAuthn flow.
    const webAuthnSuccess = await webauthnComponent(journeyEl, step, 0);
    if (webAuthnSuccess) {
      submitForm();
      return { callbacksRendered: false, didSubmit: true };
    }

    setError(&#39;WebAuthn failed or was cancelled. Please try again or use a different method.&#39;);
    return { callbacksRendered: false, didSubmit: false };
  }

  return { callbacksRendered: false, didSubmit: false };
}
">
<input type="hidden" name="project[files][public/callback.html]" value="&lt;p&gt;OK&lt;/p&gt;
">
<input type="hidden" name="project[files][public/typescript.svg]" value="&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; aria-hidden=&quot;true&quot; role=&quot;img&quot; class=&quot;iconify iconify--logos&quot; width=&quot;32&quot; height=&quot;32&quot; preserveAspectRatio=&quot;xMidYMid meet&quot; viewBox=&quot;0 0 256 256&quot;&gt;&lt;path fill=&quot;#007ACC&quot; d=&quot;M0 128v128h256V0H0z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;#FFF&quot; d=&quot;m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;">
<input type="hidden" name="project[files][public/vite.svg]" value="&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; aria-hidden=&quot;true&quot; role=&quot;img&quot; class=&quot;iconify iconify--logos&quot; width=&quot;31.88&quot; height=&quot;32&quot; preserveAspectRatio=&quot;xMidYMid meet&quot; viewBox=&quot;0 0 256 257&quot;&gt;&lt;defs&gt;&lt;linearGradient id=&quot;IconifyId1813088fe1fbc01fb466&quot; x1=&quot;-.828%&quot; x2=&quot;57.636%&quot; y1=&quot;7.652%&quot; y2=&quot;78.411%&quot;&gt;&lt;stop offset=&quot;0%&quot; stop-color=&quot;#41D1FF&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;100%&quot; stop-color=&quot;#BD34FE&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;linearGradient id=&quot;IconifyId1813088fe1fbc01fb467&quot; x1=&quot;43.376%&quot; x2=&quot;50.316%&quot; y1=&quot;2.242%&quot; y2=&quot;89.03%&quot;&gt;&lt;stop offset=&quot;0%&quot; stop-color=&quot;#FFEA83&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;8.333%&quot; stop-color=&quot;#FFDD35&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;100%&quot; stop-color=&quot;#FFA800&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/defs&gt;&lt;path fill=&quot;url(#IconifyId1813088fe1fbc01fb466)&quot; d=&quot;M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;url(#IconifyId1813088fe1fbc01fb467)&quot; d=&quot;M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;">
<input type="hidden" name="project[files][services/delete-webauthn-device.ts]" value="/*
 * Copyright (c) 2026 Ping Identity Corporation. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 */

import { deviceClient as createDeviceClient } from &#39;@forgerock/device-client&#39;;
import type { WebAuthnDevice } from &#39;@forgerock/device-client/types&#39;;
import { JourneyClientConfig } from &#39;@forgerock/journey-client/types&#39;;

/**
 * Derives the AM base URL from an OIDC well-known URL.
 *
 * Example: `https://example.com/am/oauth2/alpha/.well-known/openid-configuration`
 * becomes `https://example.com/am`.
 *
 * @param wellknown The OIDC well-known URL.
 * @returns The base URL for AM (origin + path prefix before `/oauth2/`).
 */
function getBaseUrlFromWellknown(wellknown: string): string {
  const parsed = new URL(wellknown);
  const [pathWithoutOauth] = parsed.pathname.split(&#39;/oauth2/&#39;);
  return `${parsed.origin}${pathWithoutOauth}`;
}

/**
 * Derives the realm URL path from an OIDC well-known URL.
 *
 * Example: `/am/oauth2/realms/root/realms/alpha/.well-known/openid-configuration`
 * becomes `realms/root/realms/alpha`.
 */
function getRealmUrlPathFromWellknown(wellknown: string): string {
  const parsed = new URL(wellknown);
  const [, afterOauth] = parsed.pathname.split(&#39;/oauth2/&#39;);
  if (!afterOauth) {
    return &#39;realms/root&#39;;
  }

  const suffix = &#39;/.well-known/openid-configuration&#39;;
  const realmUrlPath = afterOauth.endsWith(suffix)
    ? afterOauth.slice(0, -suffix.length)
    : afterOauth.replace(/\/.well-known\/openid-configuration\/?$/, &#39;&#39;);

  return realmUrlPath.replace(/^\/+/, &#39;&#39;).replace(/\/+$/, &#39;&#39;) || &#39;realms/root&#39;;
}

/**
 * Retrieves the AM user id from the session cookie using `idFromSession`.
 *
 * Note: This relies on the browser sending the session cookie; callers should use
 * `credentials: &#39;include&#39;` and ensure AM CORS allows credentialed requests.
 */
async function getUserIdFromSession(baseUrl: string, realmUrlPath: string): Promise&lt;string | null&gt; {
  const url = `${baseUrl}/json/${realmUrlPath}/users?_action=idFromSession`;

  try {
    const response = await fetch(url, {
      method: &#39;POST&#39;,
      credentials: &#39;include&#39;,
      headers: {
        &#39;Content-Type&#39;: &#39;application/json&#39;,
        &#39;Accept-API-Version&#39;: &#39;protocol=2.1,resource=3.0&#39;,
      },
    });

    const data = await response.json();

    if (!data || typeof data !== &#39;object&#39;) {
      return null;
    }

    const id = (data as Record&lt;string, unknown&gt;).id;
    return typeof id === &#39;string&#39; &amp;&amp; id.length &gt; 0 ? id : null;
  } catch {
    return null;
  }
}

/**
 * Deletes a single WebAuthn device by matching its `credentialId`.
 *
 * This queries devices via device-client and deletes the matching device.
 */
export async function deleteWebAuthnDevice(config: JourneyClientConfig): Promise&lt;string&gt; {
  const WEBAUTHN_CREDENTIAL_ID_QUERY_PARAM = &#39;webauthnCredentialId&#39;;

  const params = new URLSearchParams(window.location.search);
  const credentialId = params.get(WEBAUTHN_CREDENTIAL_ID_QUERY_PARAM);

  if (!credentialId) {
    return &#39;No credential id found. Register a WebAuthn device first.&#39;;
  }

  const wellknown = config.serverConfig.wellknown;
  const baseUrl = getBaseUrlFromWellknown(wellknown);
  const realmUrlPath = getRealmUrlPathFromWellknown(wellknown);
  const userId = await getUserIdFromSession(baseUrl, realmUrlPath);

  if (!userId) {
    throw new Error(&#39;Failed to retrieve user id from session. Are you logged in?&#39;);
  }

  const realm = realmUrlPath.replace(/^realms\//, &#39;&#39;) || &#39;root&#39;;
  const deviceClient = createDeviceClient({
    realmPath: realm,
    serverConfig: { baseUrl },
  });

  const devices = await deviceClient.webAuthn.get({ userId });
  if (!Array.isArray(devices)) {
    throw new Error(`Failed to retrieve devices: ${String(devices.error)}`);
  }

  const device = (devices as WebAuthnDevice[]).find((d) =&gt; d.credentialId === credentialId);
  if (!device) {
    return `No WebAuthn device found matching credential id: ${credentialId}`;
  }

  const response = await deviceClient.webAuthn.delete({
    userId,
    device,
  });

  if (response &amp;&amp; typeof response === &#39;object&#39; &amp;&amp; &#39;error&#39; in response) {
    const error = (response as { error?: unknown }).error;
    throw new Error(`Failed deleting device ${device.uuid}: ${String(error)}`);
  }

  return `Deleted WebAuthn device ${device.uuid} with credential id ${credentialId} for user ${userId}.`;
}
">
<input type="hidden" name="project[files][dist/assets/main-5ERcvfSa.css]" value=":root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  box-sizing: border-box;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  max-width: 100%;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

label,
input,
button {
  display: block;
  margin: 0.5em 0;
  width: 100%;
  box-sizing: border-box;
}
input {
  height: 2.5em;
}
pre {
  text-align: left;
  margin: 1em 0;
  padding: 1em;
  background-color: #1a1a1a;
  color: #f3f4f6;
  border-radius: 8px;
  overflow-x: auto;
}

#app {
  max-width: 80%;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

#section {
  text-align: left;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}
.flow-link {
  background-color: transparent;
  text-decoration: underline;
}

.checkbox-wrapper input,
.checkbox-wrapper label {
  display: inline-block;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5em;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
">
<input type="hidden" name="project[files][dist/assets/signals-sdk-DGallF9Y.js]" value="/*
 *
 * Copyright © 2026 Ping Identity Corporation. All right reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license. See the LICENSE file for details.
 *
 */
if (typeof window !== &#39;undefined&#39;) {
    var _POSignalsEntities;
    (((function (l, f) {
        typeof l.CustomEvent != &#39;function&#39; &amp;&amp; (l.CustomEvent = f());
    }))(window, function () {
        function l(f, E) {
            E = E || { bubbles: false, cancelable: false, detail: null };
            var i = document.createEvent(&#39;CustomEvent&#39;);
            return (i.initCustomEvent(f, E.bubbles, E.cancelable, E.detail), i);
        }
        return l;
    }),
        (function () {
            var l = &#39;PING-SDK-VERSION-PLACEHOLDER&#39;, f = &#39;st-ping-div&#39;, i = /(console|auth)-(test|staging)((\w|\d|-)*)\.pingone.com/, r = /(console|auth)((\w|\d|-)*)\.test-(one|two)-pingone\.com/, a = /(console|auth)((\w|\d|-)*)\.ort-(one|two)-pingone\.com/, c = /localhost/, t = window.location.hostname;
            function n(_) {
                window[&#39;enable-logs-pingOneSignals&#39;] &amp;&amp; console.log(_);
            }
            function e(_) {
                function L(he) {
                    he = he.replace(/\r\n/g, `
`);
                    for (var Y = &#39;&#39;, ye = 0; ye &lt; he.length; ye++) {
                        var be = he.charCodeAt(ye);
                        be &lt; 128
                            ? (Y += String.fromCharCode(be))
                            : be &gt; 127 &amp;&amp; be &lt; 2048
                                ? ((Y += String.fromCharCode((be &gt;&gt; 6) | 192)),
                                    (Y += String.fromCharCode((be &amp; 63) | 128)))
                                : ((Y += String.fromCharCode((be &gt;&gt; 12) | 224)),
                                    (Y += String.fromCharCode(((be &gt;&gt; 6) &amp; 63) | 128)),
                                    (Y += String.fromCharCode((be &amp; 63) | 128)));
                    }
                    return Y;
                }
                var y = &#39;&#39;, O, M, R, k, B, D, G, N = 0, ne = &#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=&#39;;
                for (_ = L(_); N &lt; _.length;)
                    ((O = _.charCodeAt(N++)),
                        (M = _.charCodeAt(N++)),
                        (R = _.charCodeAt(N++)),
                        (k = O &gt;&gt; 2),
                        (B = ((O &amp; 3) &lt;&lt; 4) | (M &gt;&gt; 4)),
                        (D = ((M &amp; 15) &lt;&lt; 2) | (R &gt;&gt; 6)),
                        (G = R &amp; 63),
                        isNaN(M) ? (D = G = 64) : isNaN(R) &amp;&amp; (G = 64),
                        (y = y + ne.charAt(k) + ne.charAt(B) + ne.charAt(D) + ne.charAt(G)));
                return y;
            }
            function o() {
                var _ = document.getElementById(f);
                return (_ ||
                    ((_ = document.createElement(&#39;div&#39;)),
                        (_.style.border = &#39;none&#39;),
                        (_.style.position = &#39;absolute&#39;),
                        (_.style.top = &#39;-999px&#39;),
                        (_.style.left = &#39;-999px&#39;),
                        (_.style.width = &#39;0&#39;),
                        (_.style.height = &#39;0&#39;),
                        (_.style.visibility = &#39;hidden&#39;),
                        (_.style.overflow = &#39;hidden&#39;),
                        (_.id = f),
                        document.body.appendChild(_),
                        _));
            }
            function s(_) {
                document.readyState !== &#39;loading&#39; ? _() : document.addEventListener(&#39;DOMContentLoaded&#39;, _);
            }
            function x(_) {
                s(function () {
                    if (_) {
                        var L = o();
                        ((window._pingOneSignalsToken = getComputedStyle(L, &#39;::after&#39;).content.replace(/[&#39;&quot;]+/g, &#39;&#39;)),
                            document.dispatchEvent(new CustomEvent(&#39;PingOneSignalsTokenReadyEvent&#39;)));
                    }
                    var y = _ ? &#39;success&#39; : &#39;failure&#39;;
                    n(&#39;Finished - &#39; + y);
                });
            }
            function m(_, L) {
                for (var y = [], O = 0; O &lt; _.length; O++) {
                    var M = _.charCodeAt(O) ^ L.charCodeAt(O % L.length);
                    y.push(String.fromCharCode(M));
                }
                return y.join(&#39;&#39;);
            }
            function p(_) {
                var L = { sdkVersion: l, platform: navigator.platform || &#39;&#39; }, y = &#39;dkiBm42&#39;, O = encodeURIComponent(e(m(JSON.stringify(L), y))), M = document.createElement(&#39;link&#39;);
                ((M.type = &#39;text/css&#39;),
                    (M.rel = &#39;stylesheet&#39;),
                    (M.href = &#39;https://&#39; + _ + &#39;/signals/sdk/pong.css?body=&#39; + O + &#39;&amp;e=2&#39;));
                var R = document.head || document.getElementsByTagName(&#39;head&#39;)[0];
                (R.appendChild(M),
                    (M.onload = function () {
                        x(true);
                    }),
                    (M.onerror = function () {
                        x(false);
                    }));
            }
            var I = document.querySelector(&#39;script[data-pingOneSignalsSkipToken]&#39;);
            if (I &amp;&amp; I.getAttribute(&#39;data-pingOneSignalsSkipToken&#39;) === &#39;true&#39;) {
                ((window._pingOneSignalsToken = &#39;skipped_token_&#39; + new Date().getTime()),
                    s(function () {
                        document.dispatchEvent(new CustomEvent(&#39;PingOneSignalsTokenSkippedEvent&#39;));
                    }));
                return;
            }
            window._pingOneSignalsToken ||
                (window._pingOneSignalsToken = &#39;uninitialized_token_&#39; + new Date().getTime());
            var g = window._pingOneSignalsCustomHost, v = g || &#39;apps.test-one-pingone.com&#39;, A = g || &#39;apps.ort-one-pingone.com&#39;, S = g || &#39;apps.pingone.com&#39;, d = g || (c.test(t) || r.test(t) || i.test(t) ? v : a.test(t) ? A : S);
            p(d);
        })(),
        (function (l) {
            (l._POSignalsEntities || (l._POSignalsEntities = {}),
                l._pingOneSignals &amp;&amp; console.warn(&#39;PingOne Signals script was imported multiple times&#39;));
        })(window),
        (function (l, f) {
            f(l);
        })(window, function (l) {
            function f(m) {
                var p = this.constructor;
                return this.then(function (I) {
                    return p.resolve(m()).then(function () {
                        return I;
                    });
                }, function (I) {
                    return p.resolve(m()).then(function () {
                        return p.reject(I);
                    });
                });
            }
            var E = setTimeout;
            function i(m) {
                return !!(m &amp;&amp; typeof m.length != &#39;undefined&#39;);
            }
            function r() { }
            function a(m, p) {
                return function () {
                    m.apply(p, arguments);
                };
            }
            function c(m) {
                if (!(this instanceof c))
                    throw new TypeError(&#39;Promises must be constructed via new&#39;);
                if (typeof m != &#39;function&#39;)
                    throw new TypeError(&#39;not a function&#39;);
                ((this._state = 0),
                    (this._handled = false),
                    (this._value = void 0),
                    (this._deferreds = []),
                    x(m, this));
            }
            function t(m, p) {
                for (; m._state === 3;)
                    m = m._value;
                if (m._state === 0) {
                    m._deferreds.push(p);
                    return;
                }
                ((m._handled = true),
                    c._immediateFn(function () {
                        var I = m._state === 1 ? p.onFulfilled : p.onRejected;
                        if (I === null) {
                            (m._state === 1 ? n : e)(p.promise, m._value);
                            return;
                        }
                        var g;
                        try {
                            g = I(m._value);
                        }
                        catch (v) {
                            e(p.promise, v);
                            return;
                        }
                        n(p.promise, g);
                    }));
            }
            function n(m, p) {
                try {
                    if (p === m)
                        throw new TypeError(&#39;A promise cannot be resolved with itself.&#39;);
                    if (p &amp;&amp; (typeof p == &#39;object&#39; || typeof p == &#39;function&#39;)) {
                        var I = p.then;
                        if (p instanceof c) {
                            ((m._state = 3), (m._value = p), o(m));
                            return;
                        }
                        else if (typeof I == &#39;function&#39;) {
                            x(a(I, p), m);
                            return;
                        }
                    }
                    ((m._state = 1), (m._value = p), o(m));
                }
                catch (g) {
                    e(m, g);
                }
            }
            function e(m, p) {
                ((m._state = 2), (m._value = p), o(m));
            }
            function o(m) {
                m._state === 2 &amp;&amp;
                    m._deferreds.length === 0 &amp;&amp;
                    c._immediateFn(function () {
                        m._handled || c._unhandledRejectionFn(m._value);
                    });
                for (var p = 0, I = m._deferreds.length; p &lt; I; p++)
                    t(m, m._deferreds[p]);
                m._deferreds = null;
            }
            function s(m, p, I) {
                ((this.onFulfilled = typeof m == &#39;function&#39; ? m : null),
                    (this.onRejected = typeof p == &#39;function&#39; ? p : null),
                    (this.promise = I));
            }
            function x(m, p) {
                var I = false;
                try {
                    m(function (g) {
                        I || ((I = !0), n(p, g));
                    }, function (g) {
                        I || ((I = !0), e(p, g));
                    });
                }
                catch (g) {
                    if (I)
                        return;
                    ((I = true), e(p, g));
                }
            }
            ((c.prototype.catch = function (m) {
                return this.then(null, m);
            }),
                (c.prototype.then = function (m, p) {
                    var I = new this.constructor(r);
                    return (t(this, new s(m, p, I)), I);
                }),
                (c.prototype.finally = f),
                (c.all = function (m) {
                    return new c(function (p, I) {
                        if (!i(m))
                            return I(new TypeError(&#39;Promise.all accepts an array&#39;));
                        var g = Array.prototype.slice.call(m);
                        if (g.length === 0)
                            return p([]);
                        var v = g.length;
                        function A(d, _) {
                            try {
                                if (_ &amp;&amp; (typeof _ == &#39;object&#39; || typeof _ == &#39;function&#39;)) {
                                    var L = _.then;
                                    if (typeof L == &#39;function&#39;) {
                                        L.call(_, function (y) {
                                            A(d, y);
                                        }, I);
                                        return;
                                    }
                                }
                                ((g[d] = _), --v === 0 &amp;&amp; p(g));
                            }
                            catch (y) {
                                I(y);
                            }
                        }
                        for (var S = 0; S &lt; g.length; S++)
                            A(S, g[S]);
                    });
                }),
                (c.resolve = function (m) {
                    return m &amp;&amp; typeof m == &#39;object&#39; &amp;&amp; m.constructor === c
                        ? m
                        : new c(function (p) {
                            p(m);
                        });
                }),
                (c.reject = function (m) {
                    return new c(function (p, I) {
                        I(m);
                    });
                }),
                (c.race = function (m) {
                    return new c(function (p, I) {
                        if (!i(m))
                            return I(new TypeError(&#39;Promise.race accepts an array&#39;));
                        for (var g = 0, v = m.length; g &lt; v; g++)
                            c.resolve(m[g]).then(p, I);
                    });
                }),
                (c._immediateFn =
                    (typeof setImmediate == &#39;function&#39; &amp;&amp;
                        function (m) {
                            setImmediate(m);
                        }) ||
                        function (m) {
                            E(m, 0);
                        }),
                (c._unhandledRejectionFn = function (p) {
                    typeof console != &#39;undefined&#39; &amp;&amp;
                        console &amp;&amp;
                        console.warn(&#39;Possible Unhandled Promise Rejection:&#39;, p);
                }),
                typeof l.Promise != &#39;function&#39;
                    ? (l.Promise = c)
                    : l.Promise.prototype.finally || (l.Promise.prototype.finally = f));
        }),
        (function (l, f) {
            l.PromiseQueue = f();
        })(_POSignalsEntities || (_POSignalsEntities = {}), function () {
            var l = function () { }, f = function (i) {
                return i &amp;&amp; typeof i.then == &#39;function&#39;
                    ? i
                    : new Promise(function (r) {
                        r(i);
                    });
            };
            function E(i, r, a) {
                ((this.options = a = a || {}),
                    (this.pendingPromises = 0),
                    (this.maxPendingPromises = typeof i != &#39;undefined&#39; ? i : 1 / 0),
                    (this.maxQueuedPromises = typeof r != &#39;undefined&#39; ? r : 1 / 0),
                    (this.queue = []));
            }
            return ((E.prototype.add = function (i) {
                var r = this;
                return new Promise(function (a, c, t) {
                    if (r.queue.length &gt;= r.maxQueuedPromises) {
                        c(new Error(&#39;Queue limit reached&#39;));
                        return;
                    }
                    (r.queue.push({ promiseGenerator: i, resolve: a, reject: c, notify: t || l }),
                        r._dequeue());
                });
            }),
                (E.prototype.getPendingLength = function () {
                    return this.pendingPromises;
                }),
                (E.prototype.getQueueLength = function () {
                    return this.queue.length;
                }),
                (E.prototype._dequeue = function () {
                    var i = this;
                    if (this.pendingPromises &gt;= this.maxPendingPromises)
                        return false;
                    var r = this.queue.shift();
                    if (!r)
                        return (this.options.onEmpty &amp;&amp; this.options.onEmpty(), false);
                    try {
                        (this.pendingPromises++,
                            f(r.promiseGenerator()).then(function (a) {
                                (i.pendingPromises--, r.resolve(a), i._dequeue());
                            }, function (a) {
                                (i.pendingPromises--, r.reject(a), i._dequeue());
                            }, function (a) {
                                r.notify(a);
                            }));
                    }
                    catch (a) {
                        (i.pendingPromises--, r.reject(a), i._dequeue());
                    }
                    return true;
                }),
                E);
        }));
    (((function (l) {
        var f = &#39;input is invalid type&#39;, E = !l.JS_SHA256_NO_ARRAY_BUFFER &amp;&amp; typeof ArrayBuffer != &#39;undefined&#39;, i = &#39;0123456789abcdef&#39;.split(&#39;&#39;), r = [-2147483648, 8388608, 32768, 128], a = [24, 16, 8, 0], c = [
            1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748,
            2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206,
            2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122,
            1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891,
            3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700,
            1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771,
            3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877,
            958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452,
            2361852424, 2428436474, 2756734187, 3204031479, 3329325298,
        ], t = [&#39;hex&#39;, &#39;array&#39;, &#39;digest&#39;, &#39;arrayBuffer&#39;], n = [];
        ((l.JS_SHA256_NO_NODE_JS || !Array.isArray) &amp;&amp;
            (Array.isArray = function (g) {
                return Object.prototype.toString.call(g) === &#39;[object Array]&#39;;
            }),
            E &amp;&amp;
                (l.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) &amp;&amp;
                (ArrayBuffer.isView = function (g) {
                    return typeof g == &#39;object&#39; &amp;&amp; g.buffer &amp;&amp; g.buffer.constructor === ArrayBuffer;
                }));
        var e = function (g, v) {
            return function (A) {
                return new m(v, true).update(A)[g]();
            };
        }, o = function (g) {
            var v = e(&#39;hex&#39;, g);
            ((v.create = function () {
                return new m(g);
            }),
                (v.update = function (d) {
                    return v.create().update(d);
                }));
            for (var A = 0; A &lt; t.length; ++A) {
                var S = t[A];
                v[S] = e(S, g);
            }
            return v;
        }, s = function (g, v) {
            return function (A, S) {
                return new p(A, v, true).update(S)[g]();
            };
        }, x = function (g) {
            var v = s(&#39;hex&#39;, g);
            ((v.create = function (d) {
                return new p(d, g);
            }),
                (v.update = function (d, _) {
                    return v.create(d).update(_);
                }));
            for (var A = 0; A &lt; t.length; ++A) {
                var S = t[A];
                v[S] = s(S, g);
            }
            return v;
        };
        function m(g, v) {
            (v
                ? ((n[0] =
                    n[16] =
                        n[1] =
                            n[2] =
                                n[3] =
                                    n[4] =
                                        n[5] =
                                            n[6] =
                                                n[7] =
                                                    n[8] =
                                                        n[9] =
                                                            n[10] =
                                                                n[11] =
                                                                    n[12] =
                                                                        n[13] =
                                                                            n[14] =
                                                                                n[15] =
                                                                                    0),
                    (this.blocks = n))
                : (this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
                g
                    ? ((this.h0 = 3238371032),
                        (this.h1 = 914150663),
                        (this.h2 = 812702999),
                        (this.h3 = 4144912697),
                        (this.h4 = 4290775857),
                        (this.h5 = 1750603025),
                        (this.h6 = 1694076839),
                        (this.h7 = 3204075428))
                    : ((this.h0 = 1779033703),
                        (this.h1 = 3144134277),
                        (this.h2 = 1013904242),
                        (this.h3 = 2773480762),
                        (this.h4 = 1359893119),
                        (this.h5 = 2600822924),
                        (this.h6 = 528734635),
                        (this.h7 = 1541459225)),
                (this.block = this.start = this.bytes = this.hBytes = 0),
                (this.finalized = this.hashed = false),
                (this.first = true),
                (this.is224 = g));
        }
        ((m.prototype.update = function (g) {
            if (!this.finalized) {
                var v, A = typeof g;
                if (A !== &#39;string&#39;) {
                    if (A === &#39;object&#39;) {
                        if (g === null)
                            throw new Error(f);
                        if (E &amp;&amp; g.constructor === ArrayBuffer)
                            g = new Uint8Array(g);
                        else if (!Array.isArray(g) &amp;&amp; (!E || !ArrayBuffer.isView(g)))
                            throw new Error(f);
                    }
                    else
                        throw new Error(f);
                    v = true;
                }
                for (var S, d = 0, _, L = g.length, y = this.blocks; d &lt; L;) {
                    if ((this.hashed &amp;&amp;
                        ((this.hashed = false),
                            (y[0] = this.block),
                            (y[16] =
                                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] =
                                                                                            0)),
                        v))
                        for (_ = this.start; d &lt; L &amp;&amp; _ &lt; 64; ++d)
                            y[_ &gt;&gt; 2] |= g[d] &lt;&lt; a[_++ &amp; 3];
                    else
                        for (_ = this.start; d &lt; L &amp;&amp; _ &lt; 64; ++d)
                            ((S = g.charCodeAt(d)),
                                S &lt; 128
                                    ? (y[_ &gt;&gt; 2] |= S &lt;&lt; a[_++ &amp; 3])
                                    : S &lt; 2048
                                        ? ((y[_ &gt;&gt; 2] |= (192 | (S &gt;&gt; 6)) &lt;&lt; a[_++ &amp; 3]),
                                            (y[_ &gt;&gt; 2] |= (128 | (S &amp; 63)) &lt;&lt; a[_++ &amp; 3]))
                                        : S &lt; 55296 || S &gt;= 57344
                                            ? ((y[_ &gt;&gt; 2] |= (224 | (S &gt;&gt; 12)) &lt;&lt; a[_++ &amp; 3]),
                                                (y[_ &gt;&gt; 2] |= (128 | ((S &gt;&gt; 6) &amp; 63)) &lt;&lt; a[_++ &amp; 3]),
                                                (y[_ &gt;&gt; 2] |= (128 | (S &amp; 63)) &lt;&lt; a[_++ &amp; 3]))
                                            : ((S = 65536 + (((S &amp; 1023) &lt;&lt; 10) | (g.charCodeAt(++d) &amp; 1023))),
                                                (y[_ &gt;&gt; 2] |= (240 | (S &gt;&gt; 18)) &lt;&lt; a[_++ &amp; 3]),
                                                (y[_ &gt;&gt; 2] |= (128 | ((S &gt;&gt; 12) &amp; 63)) &lt;&lt; a[_++ &amp; 3]),
                                                (y[_ &gt;&gt; 2] |= (128 | ((S &gt;&gt; 6) &amp; 63)) &lt;&lt; a[_++ &amp; 3]),
                                                (y[_ &gt;&gt; 2] |= (128 | (S &amp; 63)) &lt;&lt; a[_++ &amp; 3])));
                    ((this.lastByteIndex = _),
                        (this.bytes += _ - this.start),
                        _ &gt;= 64
                            ? ((this.block = y[16]), (this.start = _ - 64), this.hash(), (this.hashed = true))
                            : (this.start = _));
                }
                return (this.bytes &gt; 4294967295 &amp;&amp;
                    ((this.hBytes += (this.bytes / 4294967296) &lt;&lt; 0),
                        (this.bytes = this.bytes % 4294967296)),
                    this);
            }
        }),
            (m.prototype.finalize = function () {
                if (!this.finalized) {
                    this.finalized = true;
                    var g = this.blocks, v = this.lastByteIndex;
                    ((g[16] = this.block),
                        (g[v &gt;&gt; 2] |= r[v &amp; 3]),
                        (this.block = g[16]),
                        v &gt;= 56 &amp;&amp;
                            (this.hashed || this.hash(),
                                (g[0] = this.block),
                                (g[16] =
                                    g[1] =
                                        g[2] =
                                            g[3] =
                                                g[4] =
                                                    g[5] =
                                                        g[6] =
                                                            g[7] =
                                                                g[8] =
                                                                    g[9] =
                                                                        g[10] =
                                                                            g[11] =
                                                                                g[12] =
                                                                                    g[13] =
                                                                                        g[14] =
                                                                                            g[15] =
                                                                                                0)),
                        (g[14] = (this.hBytes &lt;&lt; 3) | (this.bytes &gt;&gt;&gt; 29)),
                        (g[15] = this.bytes &lt;&lt; 3),
                        this.hash());
                }
            }),
            (m.prototype.hash = function () {
                var g = this.h0, v = this.h1, A = this.h2, S = this.h3, d = this.h4, _ = this.h5, L = this.h6, y = this.h7, O = this.blocks, M, R, k, B, D, G, N, ne, he, Y, ye;
                for (M = 16; M &lt; 64; ++M)
                    ((D = O[M - 15]),
                        (R = ((D &gt;&gt;&gt; 7) | (D &lt;&lt; 25)) ^ ((D &gt;&gt;&gt; 18) | (D &lt;&lt; 14)) ^ (D &gt;&gt;&gt; 3)),
                        (D = O[M - 2]),
                        (k = ((D &gt;&gt;&gt; 17) | (D &lt;&lt; 15)) ^ ((D &gt;&gt;&gt; 19) | (D &lt;&lt; 13)) ^ (D &gt;&gt;&gt; 10)),
                        (O[M] = (O[M - 16] + R + O[M - 7] + k) &lt;&lt; 0));
                for (ye = v &amp; A, M = 0; M &lt; 64; M += 4)
                    (this.first
                        ? (this.is224
                            ? ((ne = 300032),
                                (D = O[0] - 1413257819),
                                (y = (D - 150054599) &lt;&lt; 0),
                                (S = (D + 24177077) &lt;&lt; 0))
                            : ((ne = 704751109),
                                (D = O[0] - 210244248),
                                (y = (D - 1521486534) &lt;&lt; 0),
                                (S = (D + 143694565) &lt;&lt; 0)),
                            (this.first = false))
                        : ((R = ((g &gt;&gt;&gt; 2) | (g &lt;&lt; 30)) ^ ((g &gt;&gt;&gt; 13) | (g &lt;&lt; 19)) ^ ((g &gt;&gt;&gt; 22) | (g &lt;&lt; 10))),
                            (k = ((d &gt;&gt;&gt; 6) | (d &lt;&lt; 26)) ^ ((d &gt;&gt;&gt; 11) | (d &lt;&lt; 21)) ^ ((d &gt;&gt;&gt; 25) | (d &lt;&lt; 7))),
                            (ne = g &amp; v),
                            (B = ne ^ (g &amp; A) ^ ye),
                            (N = (d &amp; _) ^ (~d &amp; L)),
                            (D = y + k + N + c[M] + O[M]),
                            (G = R + B),
                            (y = (S + D) &lt;&lt; 0),
                            (S = (D + G) &lt;&lt; 0)),
                        (R = ((S &gt;&gt;&gt; 2) | (S &lt;&lt; 30)) ^ ((S &gt;&gt;&gt; 13) | (S &lt;&lt; 19)) ^ ((S &gt;&gt;&gt; 22) | (S &lt;&lt; 10))),
                        (k = ((y &gt;&gt;&gt; 6) | (y &lt;&lt; 26)) ^ ((y &gt;&gt;&gt; 11) | (y &lt;&lt; 21)) ^ ((y &gt;&gt;&gt; 25) | (y &lt;&lt; 7))),
                        (he = S &amp; g),
                        (B = he ^ (S &amp; v) ^ ne),
                        (N = (y &amp; d) ^ (~y &amp; _)),
                        (D = L + k + N + c[M + 1] + O[M + 1]),
                        (G = R + B),
                        (L = (A + D) &lt;&lt; 0),
                        (A = (D + G) &lt;&lt; 0),
                        (R = ((A &gt;&gt;&gt; 2) | (A &lt;&lt; 30)) ^ ((A &gt;&gt;&gt; 13) | (A &lt;&lt; 19)) ^ ((A &gt;&gt;&gt; 22) | (A &lt;&lt; 10))),
                        (k = ((L &gt;&gt;&gt; 6) | (L &lt;&lt; 26)) ^ ((L &gt;&gt;&gt; 11) | (L &lt;&lt; 21)) ^ ((L &gt;&gt;&gt; 25) | (L &lt;&lt; 7))),
                        (Y = A &amp; S),
                        (B = Y ^ (A &amp; g) ^ he),
                        (N = (L &amp; y) ^ (~L &amp; d)),
                        (D = _ + k + N + c[M + 2] + O[M + 2]),
                        (G = R + B),
                        (_ = (v + D) &lt;&lt; 0),
                        (v = (D + G) &lt;&lt; 0),
                        (R = ((v &gt;&gt;&gt; 2) | (v &lt;&lt; 30)) ^ ((v &gt;&gt;&gt; 13) | (v &lt;&lt; 19)) ^ ((v &gt;&gt;&gt; 22) | (v &lt;&lt; 10))),
                        (k = ((_ &gt;&gt;&gt; 6) | (_ &lt;&lt; 26)) ^ ((_ &gt;&gt;&gt; 11) | (_ &lt;&lt; 21)) ^ ((_ &gt;&gt;&gt; 25) | (_ &lt;&lt; 7))),
                        (ye = v &amp; A),
                        (B = ye ^ (v &amp; S) ^ Y),
                        (N = (_ &amp; L) ^ (~_ &amp; y)),
                        (D = d + k + N + c[M + 3] + O[M + 3]),
                        (G = R + B),
                        (d = (g + D) &lt;&lt; 0),
                        (g = (D + G) &lt;&lt; 0));
                ((this.h0 = (this.h0 + g) &lt;&lt; 0),
                    (this.h1 = (this.h1 + v) &lt;&lt; 0),
                    (this.h2 = (this.h2 + A) &lt;&lt; 0),
                    (this.h3 = (this.h3 + S) &lt;&lt; 0),
                    (this.h4 = (this.h4 + d) &lt;&lt; 0),
                    (this.h5 = (this.h5 + _) &lt;&lt; 0),
                    (this.h6 = (this.h6 + L) &lt;&lt; 0),
                    (this.h7 = (this.h7 + y) &lt;&lt; 0));
            }),
            (m.prototype.hex = function () {
                this.finalize();
                var g = this.h0, v = this.h1, A = this.h2, S = this.h3, d = this.h4, _ = this.h5, L = this.h6, y = this.h7, O = i[(g &gt;&gt; 28) &amp; 15] +
                    i[(g &gt;&gt; 24) &amp; 15] +
                    i[(g &gt;&gt; 20) &amp; 15] +
                    i[(g &gt;&gt; 16) &amp; 15] +
                    i[(g &gt;&gt; 12) &amp; 15] +
                    i[(g &gt;&gt; 8) &amp; 15] +
                    i[(g &gt;&gt; 4) &amp; 15] +
                    i[g &amp; 15] +
                    i[(v &gt;&gt; 28) &amp; 15] +
                    i[(v &gt;&gt; 24) &amp; 15] +
                    i[(v &gt;&gt; 20) &amp; 15] +
                    i[(v &gt;&gt; 16) &amp; 15] +
                    i[(v &gt;&gt; 12) &amp; 15] +
                    i[(v &gt;&gt; 8) &amp; 15] +
                    i[(v &gt;&gt; 4) &amp; 15] +
                    i[v &amp; 15] +
                    i[(A &gt;&gt; 28) &amp; 15] +
                    i[(A &gt;&gt; 24) &amp; 15] +
                    i[(A &gt;&gt; 20) &amp; 15] +
                    i[(A &gt;&gt; 16) &amp; 15] +
                    i[(A &gt;&gt; 12) &amp; 15] +
                    i[(A &gt;&gt; 8) &amp; 15] +
                    i[(A &gt;&gt; 4) &amp; 15] +
                    i[A &amp; 15] +
                    i[(S &gt;&gt; 28) &amp; 15] +
                    i[(S &gt;&gt; 24) &amp; 15] +
                    i[(S &gt;&gt; 20) &amp; 15] +
                    i[(S &gt;&gt; 16) &amp; 15] +
                    i[(S &gt;&gt; 12) &amp; 15] +
                    i[(S &gt;&gt; 8) &amp; 15] +
                    i[(S &gt;&gt; 4) &amp; 15] +
                    i[S &amp; 15] +
                    i[(d &gt;&gt; 28) &amp; 15] +
                    i[(d &gt;&gt; 24) &amp; 15] +
                    i[(d &gt;&gt; 20) &amp; 15] +
                    i[(d &gt;&gt; 16) &amp; 15] +
                    i[(d &gt;&gt; 12) &amp; 15] +
                    i[(d &gt;&gt; 8) &amp; 15] +
                    i[(d &gt;&gt; 4) &amp; 15] +
                    i[d &amp; 15] +
                    i[(_ &gt;&gt; 28) &amp; 15] +
                    i[(_ &gt;&gt; 24) &amp; 15] +
                    i[(_ &gt;&gt; 20) &amp; 15] +
                    i[(_ &gt;&gt; 16) &amp; 15] +
                    i[(_ &gt;&gt; 12) &amp; 15] +
                    i[(_ &gt;&gt; 8) &amp; 15] +
                    i[(_ &gt;&gt; 4) &amp; 15] +
                    i[_ &amp; 15] +
                    i[(L &gt;&gt; 28) &amp; 15] +
                    i[(L &gt;&gt; 24) &amp; 15] +
                    i[(L &gt;&gt; 20) &amp; 15] +
                    i[(L &gt;&gt; 16) &amp; 15] +
                    i[(L &gt;&gt; 12) &amp; 15] +
                    i[(L &gt;&gt; 8) &amp; 15] +
                    i[(L &gt;&gt; 4) &amp; 15] +
                    i[L &amp; 15];
                return (this.is224 ||
                    (O +=
                        i[(y &gt;&gt; 28) &amp; 15] +
                            i[(y &gt;&gt; 24) &amp; 15] +
                            i[(y &gt;&gt; 20) &amp; 15] +
                            i[(y &gt;&gt; 16) &amp; 15] +
                            i[(y &gt;&gt; 12) &amp; 15] +
                            i[(y &gt;&gt; 8) &amp; 15] +
                            i[(y &gt;&gt; 4) &amp; 15] +
                            i[y &amp; 15]),
                    O);
            }),
            (m.prototype.toString = m.prototype.hex),
            (m.prototype.digest = function () {
                this.finalize();
                var g = this.h0, v = this.h1, A = this.h2, S = this.h3, d = this.h4, _ = this.h5, L = this.h6, y = this.h7, O = [
                    (g &gt;&gt; 24) &amp; 255,
                    (g &gt;&gt; 16) &amp; 255,
                    (g &gt;&gt; 8) &amp; 255,
                    g &amp; 255,
                    (v &gt;&gt; 24) &amp; 255,
                    (v &gt;&gt; 16) &amp; 255,
                    (v &gt;&gt; 8) &amp; 255,
                    v &amp; 255,
                    (A &gt;&gt; 24) &amp; 255,
                    (A &gt;&gt; 16) &amp; 255,
                    (A &gt;&gt; 8) &amp; 255,
                    A &amp; 255,
                    (S &gt;&gt; 24) &amp; 255,
                    (S &gt;&gt; 16) &amp; 255,
                    (S &gt;&gt; 8) &amp; 255,
                    S &amp; 255,
                    (d &gt;&gt; 24) &amp; 255,
                    (d &gt;&gt; 16) &amp; 255,
                    (d &gt;&gt; 8) &amp; 255,
                    d &amp; 255,
                    (_ &gt;&gt; 24) &amp; 255,
                    (_ &gt;&gt; 16) &amp; 255,
                    (_ &gt;&gt; 8) &amp; 255,
                    _ &amp; 255,
                    (L &gt;&gt; 24) &amp; 255,
                    (L &gt;&gt; 16) &amp; 255,
                    (L &gt;&gt; 8) &amp; 255,
                    L &amp; 255,
                ];
                return (this.is224 || O.push((y &gt;&gt; 24) &amp; 255, (y &gt;&gt; 16) &amp; 255, (y &gt;&gt; 8) &amp; 255, y &amp; 255), O);
            }),
            (m.prototype.array = m.prototype.digest),
            (m.prototype.arrayBuffer = function () {
                this.finalize();
                var g = new ArrayBuffer(this.is224 ? 28 : 32), v = new DataView(g);
                return (v.setUint32(0, this.h0),
                    v.setUint32(4, this.h1),
                    v.setUint32(8, this.h2),
                    v.setUint32(12, this.h3),
                    v.setUint32(16, this.h4),
                    v.setUint32(20, this.h5),
                    v.setUint32(24, this.h6),
                    this.is224 || v.setUint32(28, this.h7),
                    g);
            }));
        function p(g, v, A) {
            var S, d = typeof g;
            if (d === &#39;string&#39;) {
                var _ = [], L = g.length, y = 0, O;
                for (S = 0; S &lt; L; ++S)
                    ((O = g.charCodeAt(S)),
                        O &lt; 128
                            ? (_[y++] = O)
                            : O &lt; 2048
                                ? ((_[y++] = 192 | (O &gt;&gt; 6)), (_[y++] = 128 | (O &amp; 63)))
                                : O &lt; 55296 || O &gt;= 57344
                                    ? ((_[y++] = 224 | (O &gt;&gt; 12)),
                                        (_[y++] = 128 | ((O &gt;&gt; 6) &amp; 63)),
                                        (_[y++] = 128 | (O &amp; 63)))
                                    : ((O = 65536 + (((O &amp; 1023) &lt;&lt; 10) | (g.charCodeAt(++S) &amp; 1023))),
                                        (_[y++] = 240 | (O &gt;&gt; 18)),
                                        (_[y++] = 128 | ((O &gt;&gt; 12) &amp; 63)),
                                        (_[y++] = 128 | ((O &gt;&gt; 6) &amp; 63)),
                                        (_[y++] = 128 | (O &amp; 63))));
                g = _;
            }
            else if (d === &#39;object&#39;) {
                if (g === null)
                    throw new Error(f);
                if (E &amp;&amp; g.constructor === ArrayBuffer)
                    g = new Uint8Array(g);
                else if (!Array.isArray(g) &amp;&amp; (!E || !ArrayBuffer.isView(g)))
                    throw new Error(f);
            }
            else
                throw new Error(f);
            g.length &gt; 64 &amp;&amp; (g = new m(v, true).update(g).array());
            var M = [], R = [];
            for (S = 0; S &lt; 64; ++S) {
                var k = g[S] || 0;
                ((M[S] = 92 ^ k), (R[S] = 54 ^ k));
            }
            (m.call(this, v, A),
                this.update(R),
                (this.oKeyPad = M),
                (this.inner = true),
                (this.sharedMemory = A));
        }
        ((p.prototype = new m()),
            (p.prototype.finalize = function () {
                if ((m.prototype.finalize.call(this), this.inner)) {
                    this.inner = false;
                    var g = this.array();
                    (m.call(this, this.is224, this.sharedMemory),
                        this.update(this.oKeyPad),
                        this.update(g),
                        m.prototype.finalize.call(this));
                }
            }));
        var I = o();
        ((I.sha256 = I),
            (I.sha224 = o(true)),
            (I.sha256.hmac = x()),
            (I.sha224.hmac = x(true)),
            (l.sha256 = I.sha256),
            (l.sha224 = I.sha224));
    }))(_POSignalsEntities || (_POSignalsEntities = {})),
        (function (l) {
            l.FingerprintJS = (function (f) {
                var E = &#39;5.0.1&#39;;
                function i(h, w) {
                    return new Promise((C) =&gt; setTimeout(C, h, w));
                }
                function r() {
                    return new Promise((h) =&gt; {
                        const w = new MessageChannel();
                        ((w.port1.onmessage = () =&gt; h()), w.port2.postMessage(null));
                    });
                }
                function a(h, w = 1 / 0) {
                    const { requestIdleCallback: C } = window;
                    return C
                        ? new Promise((U) =&gt; C.call(window, () =&gt; U(), { timeout: w }))
                        : i(Math.min(h, w));
                }
                function c(h) {
                    return !!h &amp;&amp; typeof h.then == &#39;function&#39;;
                }
                function t(h, w) {
                    try {
                        const C = h();
                        c(C)
                            ? C.then((U) =&gt; w(!0, U), (U) =&gt; w(!1, U))
                            : w(!0, C);
                    }
                    catch (C) {
                        w(false, C);
                    }
                }
                async function n(h, w, C = 16) {
                    const U = Array(h.length);
                    let K = Date.now();
                    for (let ie = 0; ie &lt; h.length; ++ie) {
                        U[ie] = w(h[ie], ie);
                        const q = Date.now();
                        q &gt;= K + C &amp;&amp; ((K = q), await r());
                    }
                    return U;
                }
                function e(h) {
                    return (h.then(void 0, () =&gt; { }), h);
                }
                function o(h, w) {
                    for (let C = 0, U = h.length; C &lt; U; ++C)
                        if (h[C] === w)
                            return true;
                    return false;
                }
                function s(h, w) {
                    return !o(h, w);
                }
                function x(h) {
                    return parseInt(h);
                }
                function m(h) {
                    return parseFloat(h);
                }
                function p(h, w) {
                    return typeof h == &#39;number&#39; &amp;&amp; isNaN(h) ? w : h;
                }
                function I(h) {
                    return h.reduce((w, C) =&gt; w + (C ? 1 : 0), 0);
                }
                function g(h, w = 1) {
                    if (Math.abs(w) &gt;= 1)
                        return Math.round(h / w) * w;
                    {
                        const C = 1 / w;
                        return Math.round(h * C) / C;
                    }
                }
                function v(h) {
                    var w, C;
                    const U = `Unexpected syntax &#39;${h}&#39;`, K = /^\s*([a-z-]*)(.*)$/i.exec(h), ie = K[1] || void 0, q = {}, Q = /([.:#][\w-]+|\[.+?\])/gi, oe = (xe, J) =&gt; {
                        ((q[xe] = q[xe] || []), q[xe].push(J));
                    };
                    for (;;) {
                        const xe = Q.exec(K[2]);
                        if (!xe)
                            break;
                        const J = xe[0];
                        switch (J[0]) {
                            case &#39;.&#39;:
                                oe(&#39;class&#39;, J.slice(1));
                                break;
                            case &#39;#&#39;:
                                oe(&#39;id&#39;, J.slice(1));
                                break;
                            case &#39;[&#39;: {
                                const z = /^\[([\w-]+)([~|^$*]?=(&quot;(.*?)&quot;|([\w-]+)))?(\s+[is])?\]$/.exec(J);
                                if (z)
                                    oe(z[1], (C = (w = z[4]) !== null &amp;&amp; w !== void 0 ? w : z[5]) !== null &amp;&amp; C !== void 0
                                        ? C
                                        : &#39;&#39;);
                                else
                                    throw new Error(U);
                                break;
                            }
                            default:
                                throw new Error(U);
                        }
                    }
                    return [ie, q];
                }
                function A(h) {
                    const w = new Uint8Array(h.length);
                    for (let C = 0; C &lt; h.length; C++) {
                        const U = h.charCodeAt(C);
                        if (U &gt; 127)
                            return new TextEncoder().encode(h);
                        w[C] = U;
                    }
                    return w;
                }
                function S(h, w) {
                    const C = h[0] &gt;&gt;&gt; 16, U = h[0] &amp; 65535, K = h[1] &gt;&gt;&gt; 16, ie = h[1] &amp; 65535, q = w[0] &gt;&gt;&gt; 16, Q = w[0] &amp; 65535, oe = w[1] &gt;&gt;&gt; 16, xe = w[1] &amp; 65535;
                    let J = 0, z = 0, De = 0, we = 0;
                    ((we += ie + xe),
                        (De += we &gt;&gt;&gt; 16),
                        (we &amp;= 65535),
                        (De += K + oe),
                        (z += De &gt;&gt;&gt; 16),
                        (De &amp;= 65535),
                        (z += U + Q),
                        (J += z &gt;&gt;&gt; 16),
                        (z &amp;= 65535),
                        (J += C + q),
                        (J &amp;= 65535),
                        (h[0] = (J &lt;&lt; 16) | z),
                        (h[1] = (De &lt;&lt; 16) | we));
                }
                function d(h, w) {
                    const C = h[0] &gt;&gt;&gt; 16, U = h[0] &amp; 65535, K = h[1] &gt;&gt;&gt; 16, ie = h[1] &amp; 65535, q = w[0] &gt;&gt;&gt; 16, Q = w[0] &amp; 65535, oe = w[1] &gt;&gt;&gt; 16, xe = w[1] &amp; 65535;
                    let J = 0, z = 0, De = 0, we = 0;
                    ((we += ie * xe),
                        (De += we &gt;&gt;&gt; 16),
                        (we &amp;= 65535),
                        (De += K * xe),
                        (z += De &gt;&gt;&gt; 16),
                        (De &amp;= 65535),
                        (De += ie * oe),
                        (z += De &gt;&gt;&gt; 16),
                        (De &amp;= 65535),
                        (z += U * xe),
                        (J += z &gt;&gt;&gt; 16),
                        (z &amp;= 65535),
                        (z += K * oe),
                        (J += z &gt;&gt;&gt; 16),
                        (z &amp;= 65535),
                        (z += ie * Q),
                        (J += z &gt;&gt;&gt; 16),
                        (z &amp;= 65535),
                        (J += C * xe + U * oe + K * Q + ie * q),
                        (J &amp;= 65535),
                        (h[0] = (J &lt;&lt; 16) | z),
                        (h[1] = (De &lt;&lt; 16) | we));
                }
                function _(h, w) {
                    const C = h[0];
                    ((w %= 64),
                        w === 32
                            ? ((h[0] = h[1]), (h[1] = C))
                            : w &lt; 32
                                ? ((h[0] = (C &lt;&lt; w) | (h[1] &gt;&gt;&gt; (32 - w))), (h[1] = (h[1] &lt;&lt; w) | (C &gt;&gt;&gt; (32 - w))))
                                : ((w -= 32),
                                    (h[0] = (h[1] &lt;&lt; w) | (C &gt;&gt;&gt; (32 - w))),
                                    (h[1] = (C &lt;&lt; w) | (h[1] &gt;&gt;&gt; (32 - w)))));
                }
                function L(h, w) {
                    ((w %= 64),
                        w !== 0 &amp;&amp;
                            (w &lt; 32
                                ? ((h[0] = h[1] &gt;&gt;&gt; (32 - w)), (h[1] = h[1] &lt;&lt; w))
                                : ((h[0] = h[1] &lt;&lt; (w - 32)), (h[1] = 0))));
                }
                function y(h, w) {
                    ((h[0] ^= w[0]), (h[1] ^= w[1]));
                }
                const O = [4283543511, 3981806797], M = [3301882366, 444984403];
                function R(h) {
                    const w = [0, h[0] &gt;&gt;&gt; 1];
                    (y(h, w), d(h, O), (w[1] = h[0] &gt;&gt;&gt; 1), y(h, w), d(h, M), (w[1] = h[0] &gt;&gt;&gt; 1), y(h, w));
                }
                const k = [2277735313, 289559509], B = [1291169091, 658871167], D = [0, 5], G = [0, 1390208809], N = [0, 944331445];
                function ne(h, w) {
                    const C = A(h);
                    w = w || 0;
                    const U = [0, C.length], K = U[1] % 16, ie = U[1] - K, q = [0, w], Q = [0, w], oe = [0, 0], xe = [0, 0];
                    let J;
                    for (J = 0; J &lt; ie; J = J + 16)
                        ((oe[0] = C[J + 4] | (C[J + 5] &lt;&lt; 8) | (C[J + 6] &lt;&lt; 16) | (C[J + 7] &lt;&lt; 24)),
                            (oe[1] = C[J] | (C[J + 1] &lt;&lt; 8) | (C[J + 2] &lt;&lt; 16) | (C[J + 3] &lt;&lt; 24)),
                            (xe[0] = C[J + 12] | (C[J + 13] &lt;&lt; 8) | (C[J + 14] &lt;&lt; 16) | (C[J + 15] &lt;&lt; 24)),
                            (xe[1] = C[J + 8] | (C[J + 9] &lt;&lt; 8) | (C[J + 10] &lt;&lt; 16) | (C[J + 11] &lt;&lt; 24)),
                            d(oe, k),
                            _(oe, 31),
                            d(oe, B),
                            y(q, oe),
                            _(q, 27),
                            S(q, Q),
                            d(q, D),
                            S(q, G),
                            d(xe, B),
                            _(xe, 33),
                            d(xe, k),
                            y(Q, xe),
                            _(Q, 31),
                            S(Q, q),
                            d(Q, D),
                            S(Q, N));
                    ((oe[0] = 0), (oe[1] = 0), (xe[0] = 0), (xe[1] = 0));
                    const z = [0, 0];
                    switch (K) {
                        case 15:
                            ((z[1] = C[J + 14]), L(z, 48), y(xe, z));
                        case 14:
                            ((z[1] = C[J + 13]), L(z, 40), y(xe, z));
                        case 13:
                            ((z[1] = C[J + 12]), L(z, 32), y(xe, z));
                        case 12:
                            ((z[1] = C[J + 11]), L(z, 24), y(xe, z));
                        case 11:
                            ((z[1] = C[J + 10]), L(z, 16), y(xe, z));
                        case 10:
                            ((z[1] = C[J + 9]), L(z, 8), y(xe, z));
                        case 9:
                            ((z[1] = C[J + 8]), y(xe, z), d(xe, B), _(xe, 33), d(xe, k), y(Q, xe));
                        case 8:
                            ((z[1] = C[J + 7]), L(z, 56), y(oe, z));
                        case 7:
                            ((z[1] = C[J + 6]), L(z, 48), y(oe, z));
                        case 6:
                            ((z[1] = C[J + 5]), L(z, 40), y(oe, z));
                        case 5:
                            ((z[1] = C[J + 4]), L(z, 32), y(oe, z));
                        case 4:
                            ((z[1] = C[J + 3]), L(z, 24), y(oe, z));
                        case 3:
                            ((z[1] = C[J + 2]), L(z, 16), y(oe, z));
                        case 2:
                            ((z[1] = C[J + 1]), L(z, 8), y(oe, z));
                        case 1:
                            ((z[1] = C[J]), y(oe, z), d(oe, k), _(oe, 31), d(oe, B), y(q, oe));
                    }
                    return (y(q, U),
                        y(Q, U),
                        S(q, Q),
                        S(Q, q),
                        R(q),
                        R(Q),
                        S(q, Q),
                        S(Q, q),
                        (&#39;00000000&#39; + (q[0] &gt;&gt;&gt; 0).toString(16)).slice(-8) +
                            (&#39;00000000&#39; + (q[1] &gt;&gt;&gt; 0).toString(16)).slice(-8) +
                            (&#39;00000000&#39; + (Q[0] &gt;&gt;&gt; 0).toString(16)).slice(-8) +
                            (&#39;00000000&#39; + (Q[1] &gt;&gt;&gt; 0).toString(16)).slice(-8));
                }
                function he(h) {
                    var w;
                    return {
                        name: h.name,
                        message: h.message,
                        stack: (w = h.stack) === null || w === void 0
                            ? void 0
                            : w.split(`
`),
                        ...h,
                    };
                }
                function Y(h) {
                    return /^function\s.*?\{\s*\[native code]\s*}$/.test(String(h));
                }
                function ye(h) {
                    return typeof h != &#39;function&#39;;
                }
                function be(h, w) {
                    const C = e(new Promise((U) =&gt; {
                        const K = Date.now();
                        t(h.bind(null, w), (...ie) =&gt; {
                            const q = Date.now() - K;
                            if (!ie[0])
                                return U(() =&gt; ({ error: ie[1], duration: q }));
                            const Q = ie[1];
                            if (ye(Q))
                                return U(() =&gt; ({ value: Q, duration: q }));
                            U(() =&gt; new Promise((oe) =&gt; {
                                const xe = Date.now();
                                t(Q, (...J) =&gt; {
                                    const z = q + Date.now() - xe;
                                    if (!J[0])
                                        return oe({ error: J[1], duration: z });
                                    oe({ value: J[1], duration: z });
                                });
                            }));
                        });
                    }));
                    return function () {
                        return C.then((K) =&gt; K());
                    };
                }
                function Ne(h, w, C, U) {
                    const K = Object.keys(h).filter((q) =&gt; s(C, q)), ie = e(n(K, (q) =&gt; be(h[q], w), U));
                    return async function () {
                        const Q = await ie, oe = await n(Q, (z) =&gt; e(z()), U), xe = await Promise.all(oe), J = {};
                        for (let z = 0; z &lt; K.length; ++z)
                            J[K[z]] = xe[z];
                        return J;
                    };
                }
                function P(h, w) {
                    const C = (U) =&gt; ye(U)
                        ? w(U)
                        : () =&gt; {
                            const K = U();
                            return c(K) ? K.then(w) : w(K);
                        };
                    return (U) =&gt; {
                        const K = h(U);
                        return c(K) ? K.then(C) : C(K);
                    };
                }
                function X() {
                    const h = window, w = navigator;
                    return (I([
                        &#39;MSCSSMatrix&#39; in h,
                        &#39;msSetImmediate&#39; in h,
                        &#39;msIndexedDB&#39; in h,
                        &#39;msMaxTouchPoints&#39; in w,
                        &#39;msPointerEnabled&#39; in w,
                    ]) &gt;= 4);
                }
                function re() {
                    const h = window, w = navigator;
                    return (I([
                        &#39;msWriteProfilerMark&#39; in h,
                        &#39;MSStream&#39; in h,
                        &#39;msLaunchUri&#39; in w,
                        &#39;msSaveBlob&#39; in w,
                    ]) &gt;= 3 &amp;&amp; !X());
                }
                function ae() {
                    const h = window, w = navigator;
                    return (I([
                        &#39;webkitPersistentStorage&#39; in w,
                        &#39;webkitTemporaryStorage&#39; in w,
                        (w.vendor || &#39;&#39;).indexOf(&#39;Google&#39;) === 0,
                        &#39;webkitResolveLocalFileSystemURL&#39; in h,
                        &#39;BatteryManager&#39; in h,
                        &#39;webkitMediaStream&#39; in h,
                        &#39;webkitSpeechGrammar&#39; in h,
                    ]) &gt;= 5);
                }
                function se() {
                    const h = window, w = navigator;
                    return (I([
                        &#39;ApplePayError&#39; in h,
                        &#39;CSSPrimitiveValue&#39; in h,
                        &#39;Counter&#39; in h,
                        w.vendor.indexOf(&#39;Apple&#39;) === 0,
                        &#39;RGBColor&#39; in h,
                        &#39;WebKitMediaKeys&#39; in h,
                    ]) &gt;= 4);
                }
                function Ae() {
                    const h = window, { HTMLElement: w, Document: C } = h;
                    return (I([
                        &#39;safari&#39; in h,
                        !(&#39;ongestureend&#39; in h),
                        !(&#39;TouchEvent&#39; in h),
                        !(&#39;orientation&#39; in h),
                        w &amp;&amp; !(&#39;autocapitalize&#39; in w.prototype),
                        C &amp;&amp; &#39;pointerLockElement&#39; in C.prototype,
                    ]) &gt;= 4);
                }
                function Ie() {
                    const h = window;
                    return Y(h.print) &amp;&amp; String(h.browser) === &#39;[object WebPageNamespace]&#39;;
                }
                function Fe() {
                    var h, w;
                    const C = window;
                    return (I([
                        &#39;buildID&#39; in navigator,
                        &#39;MozAppearance&#39; in
                            ((w =
                                (h = document.documentElement) === null || h === void 0 ? void 0 : h.style) !==
                                null &amp;&amp; w !== void 0
                                ? w
                                : {}),
                        &#39;onmozfullscreenchange&#39; in C,
                        &#39;mozInnerScreenX&#39; in C,
                        &#39;CSSMozDocumentRule&#39; in C,
                        &#39;CanvasCaptureMediaStream&#39; in C,
                    ]) &gt;= 4);
                }
                function ze() {
                    const h = window;
                    return (I([
                        !(&#39;MediaSettingsRange&#39; in h),
                        &#39;RTCEncodedAudioFrame&#39; in h,
                        &#39;&#39; + h.Intl == &#39;[object Intl]&#39;,
                        &#39;&#39; + h.Reflect == &#39;[object Reflect]&#39;,
                    ]) &gt;= 3);
                }
                function Oe() {
                    const h = window, { URLPattern: w } = h;
                    return (I([
                        &#39;union&#39; in Set.prototype,
                        &#39;Iterator&#39; in h,
                        w &amp;&amp; &#39;hasRegExpGroups&#39; in w.prototype,
                        &#39;RGB8&#39; in WebGLRenderingContext.prototype,
                    ]) &gt;= 3);
                }
                function Re() {
                    const h = window;
                    return (I([
                        &#39;DOMRectList&#39; in h,
                        &#39;RTCPeerConnectionIceEvent&#39; in h,
                        &#39;SVGGeometryElement&#39; in h,
                        &#39;ontransitioncancel&#39; in h,
                    ]) &gt;= 3);
                }
                function He() {
                    const h = window, w = navigator, { CSS: C, HTMLButtonElement: U } = h;
                    return (I([
                        !(&#39;getStorageUpdates&#39; in w),
                        U &amp;&amp; &#39;popover&#39; in U.prototype,
                        &#39;CSSCounterStyleRule&#39; in h,
                        C.supports(&#39;font-size-adjust: ex-height 0.5&#39;),
                        C.supports(&#39;text-transform: full-width&#39;),
                    ]) &gt;= 4);
                }
                function je() {
                    if (navigator.platform === &#39;iPad&#39;)
                        return true;
                    const h = screen, w = h.width / h.height;
                    return (I([
                        &#39;MediaSource&#39; in window,
                        !!Element.prototype.webkitRequestFullscreen,
                        w &gt; 0.65 &amp;&amp; w &lt; 1.53,
                    ]) &gt;= 2);
                }
                function dt() {
                    const h = document;
                    return (h.fullscreenElement ||
                        h.msFullscreenElement ||
                        h.mozFullScreenElement ||
                        h.webkitFullscreenElement ||
                        null);
                }
                function Je() {
                    const h = document;
                    return (h.exitFullscreen ||
                        h.msExitFullscreen ||
                        h.mozCancelFullScreen ||
                        h.webkitExitFullscreen).call(h);
                }
                function We() {
                    const h = ae(), w = Fe(), C = window, U = navigator, K = &#39;connection&#39;;
                    return h
                        ? I([
                            !(&#39;SharedWorker&#39; in C),
                            U[K] &amp;&amp; &#39;ontypechange&#39; in U[K],
                            !(&#39;sinkId&#39; in new Audio()),
                        ]) &gt;= 2
                        : w
                            ? I([
                                &#39;onorientationchange&#39; in C,
                                &#39;orientation&#39; in C,
                                /android/i.test(U.appVersion),
                            ]) &gt;= 2
                            : false;
                }
                function Ze() {
                    const h = navigator, w = window, C = Audio.prototype, { visualViewport: U } = w;
                    return (I([
                        &#39;srLatency&#39; in C,
                        &#39;srChannelCount&#39; in C,
                        &#39;devicePosture&#39; in h,
                        U &amp;&amp; &#39;segments&#39; in U,
                        &#39;getTextInformation&#39; in Image.prototype,
                    ]) &gt;= 3);
                }
                function _e() {
                    return Qe() ? -4 : Be();
                }
                function Be() {
                    const h = window, w = h.OfflineAudioContext || h.webkitOfflineAudioContext;
                    if (!w)
                        return -2;
                    if (Ve())
                        return -1;
                    const C = 4500, U = 5e3, K = new w(1, U, 44100), ie = K.createOscillator();
                    ((ie.type = &#39;triangle&#39;), (ie.frequency.value = 1e4));
                    const q = K.createDynamicsCompressor();
                    ((q.threshold.value = -50),
                        (q.knee.value = 40),
                        (q.ratio.value = 12),
                        (q.attack.value = 0),
                        (q.release.value = 0.25),
                        ie.connect(q),
                        q.connect(K.destination),
                        ie.start(0));
                    const [Q, oe] = $e(K), xe = e(Q.then((J) =&gt; et(J.getChannelData(0).subarray(C)), (J) =&gt; {
                        if (J.name === &#39;timeout&#39; || J.name === &#39;suspended&#39;)
                            return -3;
                        throw J;
                    }));
                    return () =&gt; (oe(), xe);
                }
                function Ve() {
                    return se() &amp;&amp; !Ae() &amp;&amp; !Re();
                }
                function Qe() {
                    return (se() &amp;&amp; He() &amp;&amp; Ie()) || (ae() &amp;&amp; Ze() &amp;&amp; Oe());
                }
                function $e(h) {
                    let ie = () =&gt; { };
                    return [
                        new Promise((Q, oe) =&gt; {
                            let xe = false, J = 0, z = 0;
                            h.oncomplete = (ke) =&gt; Q(ke.renderedBuffer);
                            const De = () =&gt; {
                                setTimeout(() =&gt; oe(qe(&#39;timeout&#39;)), Math.min(500, z + 5e3 - Date.now()));
                            }, we = () =&gt; {
                                try {
                                    const ke = h.startRendering();
                                    switch ((c(ke) &amp;&amp; e(ke), h.state)) {
                                        case &#39;running&#39;:
                                            ((z = Date.now()), xe &amp;&amp; De());
                                            break;
                                        case &#39;suspended&#39;:
                                            (document.hidden || J++,
                                                xe &amp;&amp; J &gt;= 3 ? oe(qe(&#39;suspended&#39;)) : setTimeout(we, 500));
                                            break;
                                    }
                                }
                                catch (ke) {
                                    oe(ke);
                                }
                            };
                            (we(),
                                (ie = () =&gt; {
                                    xe || ((xe = true), z &gt; 0 &amp;&amp; De());
                                }));
                        }),
                        ie,
                    ];
                }
                function et(h) {
                    let w = 0;
                    for (let C = 0; C &lt; h.length; ++C)
                        w += Math.abs(h[C]);
                    return w;
                }
                function qe(h) {
                    const w = new Error(h);
                    return ((w.name = h), w);
                }
                async function Ke(h, w, C = 50) {
                    var U, K, ie;
                    const q = document;
                    for (; !q.body;)
                        await i(C);
                    const Q = q.createElement(&#39;iframe&#39;);
                    try {
                        for (await new Promise((oe, xe) =&gt; {
                            let J = !1;
                            const z = () =&gt; {
                                ((J = !0), oe());
                            }, De = (Ye) =&gt; {
                                ((J = !0), xe(Ye));
                            };
                            ((Q.onload = z), (Q.onerror = De));
                            const { style: we } = Q;
                            (we.setProperty(&#39;display&#39;, &#39;block&#39;, &#39;important&#39;),
                                (we.position = &#39;absolute&#39;),
                                (we.top = &#39;0&#39;),
                                (we.left = &#39;0&#39;),
                                (we.visibility = &#39;hidden&#39;),
                                w &amp;&amp; (&#39;srcdoc&#39; in Q) ? (Q.srcdoc = w) : (Q.src = &#39;about:blank&#39;),
                                q.body.appendChild(Q));
                            const ke = () =&gt; {
                                var Ye, Lt;
                                J ||
                                    (((Lt =
                                        (Ye = Q.contentWindow) === null || Ye === void 0 ? void 0 : Ye.document) ===
                                        null || Lt === void 0
                                        ? void 0
                                        : Lt.readyState) === &#39;complete&#39;
                                        ? z()
                                        : setTimeout(ke, 10));
                            };
                            ke();
                        }); !(!((K = (U = Q.contentWindow) === null || U === void 0 ? void 0 : U.document) ===
                            null || K === void 0) &amp;&amp; K.body);)
                            await i(C);
                        return await h(Q, Q.contentWindow);
                    }
                    finally {
                        (ie = Q.parentNode) === null || ie === void 0 || ie.removeChild(Q);
                    }
                }
                function b(h) {
                    const [w, C] = v(h), U = document.createElement(w != null ? w : &#39;div&#39;);
                    for (const K of Object.keys(C)) {
                        const ie = C[K].join(&#39; &#39;);
                        K === &#39;style&#39; ? V(U.style, ie) : U.setAttribute(K, ie);
                    }
                    return U;
                }
                function V(h, w) {
                    for (const C of w.split(&#39;;&#39;)) {
                        const U = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(C);
                        if (U) {
                            const [, K, ie, , q] = U;
                            h.setProperty(K, ie, q || &#39;&#39;);
                        }
                    }
                }
                function j() {
                    let h = window;
                    for (;;) {
                        const w = h.parent;
                        if (!w || w === h)
                            return false;
                        try {
                            if (w.location.origin !== h.location.origin)
                                return !0;
                        }
                        catch (C) {
                            if (C instanceof Error &amp;&amp; C.name === &#39;SecurityError&#39;)
                                return true;
                            throw C;
                        }
                        h = w;
                    }
                }
                const W = &#39;mmMwWLliI0O&amp;1&#39;, $ = &#39;48px&#39;, ee = [&#39;monospace&#39;, &#39;sans-serif&#39;, &#39;serif&#39;], me = [
                    &#39;sans-serif-thin&#39;,
                    &#39;ARNO PRO&#39;,
                    &#39;Agency FB&#39;,
                    &#39;Arabic Typesetting&#39;,
                    &#39;Arial Unicode MS&#39;,
                    &#39;AvantGarde Bk BT&#39;,
                    &#39;BankGothic Md BT&#39;,
                    &#39;Batang&#39;,
                    &#39;Bitstream Vera Sans Mono&#39;,
                    &#39;Calibri&#39;,
                    &#39;Century&#39;,
                    &#39;Century Gothic&#39;,
                    &#39;Clarendon&#39;,
                    &#39;EUROSTILE&#39;,
                    &#39;Franklin Gothic&#39;,
                    &#39;Futura Bk BT&#39;,
                    &#39;Futura Md BT&#39;,
                    &#39;GOTHAM&#39;,
                    &#39;Gill Sans&#39;,
                    &#39;HELV&#39;,
                    &#39;Haettenschweiler&#39;,
                    &#39;Helvetica Neue&#39;,
                    &#39;Humanst521 BT&#39;,
                    &#39;Leelawadee&#39;,
                    &#39;Letter Gothic&#39;,
                    &#39;Levenim MT&#39;,
                    &#39;Lucida Bright&#39;,
                    &#39;Lucida Sans&#39;,
                    &#39;Menlo&#39;,
                    &#39;MS Mincho&#39;,
                    &#39;MS Outlook&#39;,
                    &#39;MS Reference Specialty&#39;,
                    &#39;MS UI Gothic&#39;,
                    &#39;MT Extra&#39;,
                    &#39;MYRIAD PRO&#39;,
                    &#39;Marlett&#39;,
                    &#39;Meiryo UI&#39;,
                    &#39;Microsoft Uighur&#39;,
                    &#39;Minion Pro&#39;,
                    &#39;Monotype Corsiva&#39;,
                    &#39;PMingLiU&#39;,
                    &#39;Pristina&#39;,
                    &#39;SCRIPTINA&#39;,
                    &#39;Segoe UI Light&#39;,
                    &#39;Serifa&#39;,
                    &#39;SimHei&#39;,
                    &#39;Small Fonts&#39;,
                    &#39;Staccato222 BT&#39;,
                    &#39;TRAJAN PRO&#39;,
                    &#39;Univers CE 55 Medium&#39;,
                    &#39;Vrinda&#39;,
                    &#39;ZWAdobeF&#39;,
                ];
                function Se() {
                    return Ke(async (h, { document: w }) =&gt; {
                        const C = w.body;
                        C.style.fontSize = $;
                        const U = w.createElement(&#39;div&#39;);
                        U.style.setProperty(&#39;visibility&#39;, &#39;hidden&#39;, &#39;important&#39;);
                        const K = {}, ie = {}, q = (we) =&gt; {
                            const ke = w.createElement(&#39;span&#39;), { style: Ye } = ke;
                            return ((Ye.position = &#39;absolute&#39;),
                                (Ye.top = &#39;0&#39;),
                                (Ye.left = &#39;0&#39;),
                                (Ye.fontFamily = we),
                                (ke.textContent = W),
                                U.appendChild(ke),
                                ke);
                        }, Q = (we, ke) =&gt; q(`&#39;${we}&#39;,${ke}`), oe = () =&gt; ee.map(q), xe = () =&gt; {
                            const we = {};
                            for (const ke of me)
                                we[ke] = ee.map((Ye) =&gt; Q(ke, Ye));
                            return we;
                        }, J = (we) =&gt; ee.some((ke, Ye) =&gt; we[Ye].offsetWidth !== K[ke] || we[Ye].offsetHeight !== ie[ke]), z = oe(), De = xe();
                        C.appendChild(U);
                        for (let we = 0; we &lt; ee.length; we++)
                            ((K[ee[we]] = z[we].offsetWidth), (ie[ee[we]] = z[we].offsetHeight));
                        return me.filter((we) =&gt; J(De[we]));
                    });
                }
                function u() {
                    const h = navigator.plugins;
                    if (!h)
                        return;
                    const w = [];
                    for (let C = 0; C &lt; h.length; ++C) {
                        const U = h[C];
                        if (!U)
                            continue;
                        const K = [];
                        for (let ie = 0; ie &lt; U.length; ++ie) {
                            const q = U[ie];
                            K.push({ type: q.type, suffixes: q.suffixes });
                        }
                        w.push({ name: U.name, description: U.description, mimeTypes: K });
                    }
                    return w;
                }
                function F() {
                    return H(tt());
                }
                function H(h) {
                    let w = false, C, U;
                    const [K, ie] = T();
                    return (te(K, ie)
                        ? ((w = ce(ie)), h ? (C = U = &#39;skipped&#39;) : ([C, U] = le(K, ie)))
                        : (C = U = &#39;unsupported&#39;),
                        { winding: w, geometry: C, text: U });
                }
                function T() {
                    const h = document.createElement(&#39;canvas&#39;);
                    return ((h.width = 1), (h.height = 1), [h, h.getContext(&#39;2d&#39;)]);
                }
                function te(h, w) {
                    return !!(w &amp;&amp; h.toDataURL);
                }
                function ce(h) {
                    return (h.rect(0, 0, 10, 10), h.rect(2, 2, 6, 6), !h.isPointInPath(5, 5, &#39;evenodd&#39;));
                }
                function le(h, w) {
                    fe(h, w);
                    const C = ve(h), U = ve(h);
                    return C !== U ? [&#39;unstable&#39;, &#39;unstable&#39;] : (Ge(h, w), [ve(h), C]);
                }
                function fe(h, w) {
                    ((h.width = 240),
                        (h.height = 60),
                        (w.textBaseline = &#39;alphabetic&#39;),
                        (w.fillStyle = &#39;#f60&#39;),
                        w.fillRect(100, 1, 62, 20),
                        (w.fillStyle = &#39;#069&#39;),
                        (w.font = &#39;11pt &quot;Times New Roman&quot;&#39;));
                    const C = &#39;Cwm fjordbank gly \u{1F603}&#39;;
                    (w.fillText(C, 2, 15),
                        (w.fillStyle = &#39;rgba(102, 204, 0, 0.2)&#39;),
                        (w.font = &#39;18pt Arial&#39;),
                        w.fillText(C, 4, 45));
                }
                function Ge(h, w) {
                    ((h.width = 122), (h.height = 110), (w.globalCompositeOperation = &#39;multiply&#39;));
                    for (const [C, U, K] of [
                        [&#39;#f2f&#39;, 40, 40],
                        [&#39;#2ff&#39;, 80, 40],
                        [&#39;#ff2&#39;, 60, 80],
                    ])
                        ((w.fillStyle = C),
                            w.beginPath(),
                            w.arc(U, K, 40, 0, Math.PI * 2, true),
                            w.closePath(),
                            w.fill());
                    ((w.fillStyle = &#39;#f9c&#39;),
                        w.arc(60, 60, 60, 0, Math.PI * 2, true),
                        w.arc(60, 60, 20, 0, Math.PI * 2, true),
                        w.fill(&#39;evenodd&#39;));
                }
                function ve(h) {
                    return h.toDataURL();
                }
                function tt() {
                    return se() &amp;&amp; He() &amp;&amp; Ie();
                }
                function ft() {
                    const h = navigator;
                    let w = 0, C;
                    h.maxTouchPoints !== void 0
                        ? (w = x(h.maxTouchPoints))
                        : h.msMaxTouchPoints !== void 0 &amp;&amp; (w = h.msMaxTouchPoints);
                    try {
                        (document.createEvent(&#39;TouchEvent&#39;), (C = !0));
                    }
                    catch {
                        C = false;
                    }
                    const U = &#39;ontouchstart&#39; in window;
                    return { maxTouchPoints: w, touchEvent: C, touchStart: U };
                }
                function ut() {
                    return navigator.oscpu;
                }
                function ht() {
                    const h = navigator, w = [], C = h.language || h.userLanguage || h.browserLanguage || h.systemLanguage;
                    if ((C !== void 0 &amp;&amp; w.push([C]), Array.isArray(h.languages)))
                        (ae() &amp;&amp; ze()) || w.push(h.languages);
                    else if (typeof h.languages == &#39;string&#39;) {
                        const U = h.languages;
                        U &amp;&amp; w.push(U.split(&#39;,&#39;));
                    }
                    return w;
                }
                function nt() {
                    return window.screen.colorDepth;
                }
                function It() {
                    return p(m(navigator.deviceMemory), void 0);
                }
                function it() {
                    if (!(se() &amp;&amp; He() &amp;&amp; Ie()))
                        return _t();
                }
                function _t() {
                    const h = screen, w = (U) =&gt; p(x(U), null), C = [w(h.width), w(h.height)];
                    return (C.sort().reverse(), C);
                }
                const rt = 2500, gt = 10;
                let lt, xt;
                function Tt() {
                    if (xt !== void 0)
                        return;
                    const h = () =&gt; {
                        const w = bt();
                        vt(w) ? (xt = setTimeout(h, rt)) : ((lt = w), (xt = void 0));
                    };
                    h();
                }
                function at() {
                    return (Tt(),
                        async () =&gt; {
                            let h = bt();
                            if (vt(h)) {
                                if (lt)
                                    return [...lt];
                                dt() &amp;&amp; (await Je(), (h = bt()));
                            }
                            return (vt(h) || (lt = h), h);
                        });
                }
                function Ct() {
                    if (se() &amp;&amp; He() &amp;&amp; Ie())
                        return () =&gt; Promise.resolve(void 0);
                    const h = at();
                    return async () =&gt; {
                        const w = await h(), C = (U) =&gt; (U === null ? null : g(U, gt));
                        return [C(w[0]), C(w[1]), C(w[2]), C(w[3])];
                    };
                }
                function bt() {
                    const h = screen;
                    return [
                        p(m(h.availTop), null),
                        p(m(h.width) - m(h.availWidth) - p(m(h.availLeft), 0), null),
                        p(m(h.height) - m(h.availHeight) - p(m(h.availTop), 0), null),
                        p(m(h.availLeft), null),
                    ];
                }
                function vt(h) {
                    for (let w = 0; w &lt; 4; ++w)
                        if (h[w])
                            return false;
                    return true;
                }
                function wt() {
                    return p(x(navigator.hardwareConcurrency), void 0);
                }
                function Ut() {
                    var h;
                    const w = (h = window.Intl) === null || h === void 0 ? void 0 : h.DateTimeFormat;
                    if (w) {
                        const U = new w().resolvedOptions().timeZone;
                        if (U)
                            return U;
                    }
                    const C = -Mt();
                    return `UTC${C &gt;= 0 ? &#39;+&#39; : &#39;&#39;}${C}`;
                }
                function Mt() {
                    const h = new Date().getFullYear();
                    return Math.max(m(new Date(h, 0, 1).getTimezoneOffset()), m(new Date(h, 6, 1).getTimezoneOffset()));
                }
                function Ot() {
                    try {
                        return !!window.sessionStorage;
                    }
                    catch {
                        return true;
                    }
                }
                function st() {
                    try {
                        return !!window.localStorage;
                    }
                    catch {
                        return true;
                    }
                }
                function Z() {
                    if (!(X() || re()))
                        try {
                            return !!window.indexedDB;
                        }
                        catch {
                            return true;
                        }
                }
                function de() {
                    return !!window.openDatabase;
                }
                function ue() {
                    return navigator.cpuClass;
                }
                function Te() {
                    const { platform: h } = navigator;
                    return h === &#39;MacIntel&#39; &amp;&amp; se() &amp;&amp; !Ae() ? (je() ? &#39;iPad&#39; : &#39;iPhone&#39;) : h;
                }
                function pe() {
                    return navigator.vendor || &#39;&#39;;
                }
                function Me() {
                    const h = [];
                    for (const w of [
                        &#39;chrome&#39;,
                        &#39;safari&#39;,
                        &#39;__crWeb&#39;,
                        &#39;__gCrWeb&#39;,
                        &#39;yandex&#39;,
                        &#39;__yb&#39;,
                        &#39;__ybro&#39;,
                        &#39;__firefox__&#39;,
                        &#39;__edgeTrackingPreventionStatistics&#39;,
                        &#39;webkit&#39;,
                        &#39;oprt&#39;,
                        &#39;samsungAr&#39;,
                        &#39;ucweb&#39;,
                        &#39;UCShellJava&#39;,
                        &#39;puffinDevice&#39;,
                    ]) {
                        const C = window[w];
                        C &amp;&amp; typeof C == &#39;object&#39; &amp;&amp; h.push(w);
                    }
                    return h.sort();
                }
                function ge() {
                    const h = document;
                    try {
                        h.cookie = &#39;cookietest=1; SameSite=Strict;&#39;;
                        const w = h.cookie.indexOf(&#39;cookietest=&#39;) !== -1;
                        return ((h.cookie = &#39;cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT&#39;),
                            w);
                    }
                    catch {
                        return false;
                    }
                }
                function Le() {
                    const h = atob;
                    return {
                        abpIndo: [
                            &#39;#Iklan-Melayang&#39;,
                            &#39;#Kolom-Iklan-728&#39;,
                            &#39;#SidebarIklan-wrapper&#39;,
                            &#39;[title=&quot;ALIENBOLA&quot; i]&#39;,
                            h(&#39;I0JveC1CYW5uZXItYWRz&#39;),
                        ],
                        abpvn: [
                            &#39;.quangcao&#39;,
                            &#39;#mobileCatfish&#39;,
                            h(&#39;LmNsb3NlLWFkcw==&#39;),
                            &#39;[id^=&quot;bn_bottom_fixed_&quot;]&#39;,
                            &#39;#pmadv&#39;,
                        ],
                        adBlockFinland: [
                            &#39;.mainostila&#39;,
                            h(&#39;LnNwb25zb3JpdA==&#39;),
                            &#39;.ylamainos&#39;,
                            h(&#39;YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd&#39;),
                        ],
                        adBlockPersian: [
                            &#39;#navbar_notice_50&#39;,
                            &#39;.kadr&#39;,
                            &#39;TABLE[width=&quot;140px&quot;]&#39;,
                            &#39;#divAgahi&#39;,
                            h(&#39;YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd&#39;),
                        ],
                        adBlockWarningRemoval: [
                            &#39;#adblock-honeypot&#39;,
                            &#39;.adblocker-root&#39;,
                            &#39;.wp_adblock_detect&#39;,
                            h(&#39;LmhlYWRlci1ibG9ja2VkLWFk&#39;),
                            h(&#39;I2FkX2Jsb2NrZXI=&#39;),
                        ],
                        adGuardAnnoyances: [
                            &#39;.hs-sosyal&#39;,
                            &#39;#cookieconsentdiv&#39;,
                            &#39;div[class^=&quot;app_gdpr&quot;]&#39;,
                            &#39;.as-oil&#39;,
                            &#39;[data-cypress=&quot;soft-push-notification-modal&quot;]&#39;,
                        ],
                        adGuardBase: [
                            &#39;.BetterJsPopOverlay&#39;,
                            h(&#39;I2FkXzMwMFgyNTA=&#39;),
                            h(&#39;I2Jhbm5lcmZsb2F0MjI=&#39;),
                            h(&#39;I2NhbXBhaWduLWJhbm5lcg==&#39;),
                            h(&#39;I0FkLUNvbnRlbnQ=&#39;),
                        ],
                        adGuardChinese: [
                            h(&#39;LlppX2FkX2FfSA==&#39;),
                            h(&#39;YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd&#39;),
                            &#39;#widget-quan&#39;,
                            h(&#39;YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd&#39;),
                            h(&#39;YVtocmVmKj0iLjE5NTZobC5jb20vIl0=&#39;),
                        ],
                        adGuardFrench: [
                            &#39;#pavePub&#39;,
                            h(&#39;LmFkLWRlc2t0b3AtcmVjdGFuZ2xl&#39;),
                            &#39;.mobile_adhesion&#39;,
                            &#39;.widgetadv&#39;,
                            h(&#39;LmFkc19iYW4=&#39;),
                        ],
                        adGuardGerman: [&#39;aside[data-portal-id=&quot;leaderboard&quot;]&#39;],
                        adGuardJapanese: [
                            &#39;#kauli_yad_1&#39;,
                            h(&#39;YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0=&#39;),
                            h(&#39;Ll9wb3BJbl9pbmZpbml0ZV9hZA==&#39;),
                            h(&#39;LmFkZ29vZ2xl&#39;),
                            h(&#39;Ll9faXNib29zdFJldHVybkFk&#39;),
                        ],
                        adGuardMobile: [
                            h(&#39;YW1wLWF1dG8tYWRz&#39;),
                            h(&#39;LmFtcF9hZA==&#39;),
                            &#39;amp-embed[type=&quot;24smi&quot;]&#39;,
                            &#39;#mgid_iframe1&#39;,
                            h(&#39;I2FkX2ludmlld19hcmVh&#39;),
                        ],
                        adGuardRussian: [
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0=&#39;),
                            h(&#39;LnJlY2xhbWE=&#39;),
                            &#39;div[id^=&quot;smi2adblock&quot;]&#39;,
                            h(&#39;ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd&#39;),
                            &#39;#psyduckpockeball&#39;,
                        ],
                        adGuardSocial: [
                            h(&#39;YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0=&#39;),
                            h(&#39;YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0=&#39;),
                            &#39;.etsy-tweet&#39;,
                            &#39;#inlineShare&#39;,
                            &#39;.popup-social&#39;,
                        ],
                        adGuardSpanishPortuguese: [
                            &#39;#barraPublicidade&#39;,
                            &#39;#Publicidade&#39;,
                            &#39;#publiEspecial&#39;,
                            &#39;#queTooltip&#39;,
                            &#39;.cnt-publi&#39;,
                        ],
                        adGuardTrackingProtection: [
                            &#39;#qoo-counter&#39;,
                            h(&#39;YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ==&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0=&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ==&#39;),
                            &#39;#top100counter&#39;,
                        ],
                        adGuardTurkish: [
                            &#39;#backkapat&#39;,
                            h(&#39;I3Jla2xhbWk=&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0=&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==&#39;),
                        ],
                        bulgarian: [
                            h(&#39;dGQjZnJlZW5ldF90YWJsZV9hZHM=&#39;),
                            &#39;#ea_intext_div&#39;,
                            &#39;.lapni-pop-over&#39;,
                            &#39;#xenium_hot_offers&#39;,
                        ],
                        easyList: [
                            &#39;.yb-floorad&#39;,
                            h(&#39;LndpZGdldF9wb19hZHNfd2lkZ2V0&#39;),
                            h(&#39;LnRyYWZmaWNqdW5reS1hZA==&#39;),
                            &#39;.textad_headline&#39;,
                            h(&#39;LnNwb25zb3JlZC10ZXh0LWxpbmtz&#39;),
                        ],
                        easyListChina: [
                            h(&#39;LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ==&#39;),
                            h(&#39;LmZyb250cGFnZUFkdk0=&#39;),
                            &#39;#taotaole&#39;,
                            &#39;#aafoot.top_box&#39;,
                            &#39;.cfa_popup&#39;,
                        ],
                        easyListCookie: [
                            &#39;.ezmob-footer&#39;,
                            &#39;.cc-CookieWarning&#39;,
                            &#39;[data-cookie-number]&#39;,
                            h(&#39;LmF3LWNvb2tpZS1iYW5uZXI=&#39;),
                            &#39;.sygnal24-gdpr-modal-wrap&#39;,
                        ],
                        easyListCzechSlovak: [
                            &#39;#onlajny-stickers&#39;,
                            h(&#39;I3Jla2xhbW5pLWJveA==&#39;),
                            h(&#39;LnJla2xhbWEtbWVnYWJvYXJk&#39;),
                            &#39;.sklik&#39;,
                            h(&#39;W2lkXj0ic2tsaWtSZWtsYW1hIl0=&#39;),
                        ],
                        easyListDutch: [
                            h(&#39;I2FkdmVydGVudGll&#39;),
                            h(&#39;I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw==&#39;),
                            &#39;.adstekst&#39;,
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0=&#39;),
                            &#39;#semilo-lrectangle&#39;,
                        ],
                        easyListGermany: [
                            &#39;#SSpotIMPopSlider&#39;,
                            h(&#39;LnNwb25zb3JsaW5rZ3J1ZW4=&#39;),
                            h(&#39;I3dlcmJ1bmdza3k=&#39;),
                            h(&#39;I3Jla2xhbWUtcmVjaHRzLW1pdHRl&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=&#39;),
                        ],
                        easyListItaly: [
                            h(&#39;LmJveF9hZHZfYW5udW5jaQ==&#39;),
                            &#39;.sb-box-pubbliredazionale&#39;,
                            h(&#39;YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==&#39;),
                        ],
                        easyListLithuania: [
                            h(&#39;LnJla2xhbW9zX3RhcnBhcw==&#39;),
                            h(&#39;LnJla2xhbW9zX251b3JvZG9z&#39;),
                            h(&#39;aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd&#39;),
                            h(&#39;aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd&#39;),
                            h(&#39;aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd&#39;),
                        ],
                        estonian: [h(&#39;QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==&#39;)],
                        fanboyAnnoyances: [
                            &#39;#ac-lre-player&#39;,
                            &#39;.navigate-to-top&#39;,
                            &#39;#subscribe_popup&#39;,
                            &#39;.newsletter_holder&#39;,
                            &#39;#back-top&#39;,
                        ],
                        fanboyAntiFacebook: [&#39;.util-bar-module-firefly-visible&#39;],
                        fanboyEnhancedTrackers: [
                            &#39;.open.pushModal&#39;,
                            &#39;#issuem-leaky-paywall-articles-zero-remaining-nag&#39;,
                            &#39;#sovrn_container&#39;,
                            &#39;div[class$=&quot;-hide&quot;][zoompage-fontsize][style=&quot;display: block;&quot;]&#39;,
                            &#39;.BlockNag__Card&#39;,
                        ],
                        fanboySocial: [
                            &#39;#FollowUs&#39;,
                            &#39;#meteored_share&#39;,
                            &#39;#social_follow&#39;,
                            &#39;.article-sharer&#39;,
                            &#39;.community__social-desc&#39;,
                        ],
                        frellwitSwedish: [
                            h(&#39;YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ==&#39;),
                            h(&#39;YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ==&#39;),
                            &#39;article.category-samarbete&#39;,
                            h(&#39;ZGl2LmhvbGlkQWRz&#39;),
                            &#39;ul.adsmodern&#39;,
                        ],
                        greekAdBlock: [
                            h(&#39;QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd&#39;),
                            h(&#39;QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ==&#39;),
                            h(&#39;QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd&#39;),
                            &#39;DIV.agores300&#39;,
                            &#39;TABLE.advright&#39;,
                        ],
                        hungarian: [
                            &#39;#cemp_doboz&#39;,
                            &#39;.optimonk-iframe-container&#39;,
                            h(&#39;LmFkX19tYWlu&#39;),
                            h(&#39;W2NsYXNzKj0iR29vZ2xlQWRzIl0=&#39;),
                            &#39;#hirdetesek_box&#39;,
                        ],
                        iDontCareAboutCookies: [
                            &#39;.alert-info[data-block-track*=&quot;CookieNotice&quot;]&#39;,
                            &#39;.ModuleTemplateCookieIndicator&#39;,
                            &#39;.o--cookies--container&#39;,
                            &#39;#cookies-policy-sticky&#39;,
                            &#39;#stickyCookieBar&#39;,
                        ],
                        icelandicAbp: [h(&#39;QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==&#39;)],
                        latvian: [
                            h(&#39;YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0=&#39;),
                            h(&#39;YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==&#39;),
                        ],
                        listKr: [
                            h(&#39;YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0=&#39;),
                            h(&#39;I2xpdmVyZUFkV3JhcHBlcg==&#39;),
                            h(&#39;YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ==&#39;),
                            h(&#39;aW5zLmZhc3R2aWV3LWFk&#39;),
                            &#39;.revenue_unit_item.dable&#39;,
                        ],
                        listeAr: [
                            h(&#39;LmdlbWluaUxCMUFk&#39;),
                            &#39;.right-and-left-sponsers&#39;,
                            h(&#39;YVtocmVmKj0iLmFmbGFtLmluZm8iXQ==&#39;),
                            h(&#39;YVtocmVmKj0iYm9vcmFxLm9yZyJd&#39;),
                            h(&#39;YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd&#39;),
                        ],
                        listeFr: [
                            h(&#39;YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ==&#39;),
                            h(&#39;I2FkY29udGFpbmVyX3JlY2hlcmNoZQ==&#39;),
                            h(&#39;YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0=&#39;),
                            &#39;.site-pub-interstitiel&#39;,
                            &#39;div[id^=&quot;crt-&quot;][data-criteo-id]&#39;,
                        ],
                        officialPolish: [
                            &#39;#ceneo-placeholder-ceneo-12&#39;,
                            h(&#39;W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ==&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ==&#39;),
                            h(&#39;ZGl2I3NrYXBpZWNfYWQ=&#39;),
                        ],
                        ro: [
                            h(&#39;YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0=&#39;),
                            h(&#39;YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd&#39;),
                            &#39;a[href^=&quot;/url/&quot;]&#39;,
                        ],
                        ruAd: [
                            h(&#39;YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd&#39;),
                            h(&#39;YVtocmVmKj0iLy91dGltZy5ydS8iXQ==&#39;),
                            h(&#39;YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0=&#39;),
                            &#39;#pgeldiz&#39;,
                            &#39;.yandex-rtb-block&#39;,
                        ],
                        thaiAds: [
                            &#39;a[href*=macau-uta-popup]&#39;,
                            h(&#39;I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA==&#39;),
                            h(&#39;LmFkczMwMHM=&#39;),
                            &#39;.bumq&#39;,
                            &#39;.img-kosana&#39;,
                        ],
                        webAnnoyancesUltralist: [
                            &#39;#mod-social-share-2&#39;,
                            &#39;#social-tools&#39;,
                            h(&#39;LmN0cGwtZnVsbGJhbm5lcg==&#39;),
                            &#39;.zergnet-recommend&#39;,
                            &#39;.yt.btn-link.btn-md.btn&#39;,
                        ],
                    };
                }
                async function Ee({ debug: h } = {}) {
                    if (!Pe())
                        return;
                    const w = Le(), C = Object.keys(w), U = [].concat(...C.map((q) =&gt; w[q])), K = await ot(U);
                    h &amp;&amp; mt(w, K);
                    const ie = C.filter((q) =&gt; {
                        const Q = w[q];
                        return I(Q.map((xe) =&gt; K[xe])) &gt; Q.length * 0.6;
                    });
                    return (ie.sort(), ie);
                }
                function Pe() {
                    return se() || We();
                }
                async function ot(h) {
                    var w;
                    const C = document, U = C.createElement(&#39;div&#39;), K = new Array(h.length), ie = {};
                    ct(U);
                    for (let q = 0; q &lt; h.length; ++q) {
                        const Q = b(h[q]);
                        Q.tagName === &#39;DIALOG&#39; &amp;&amp; Q.show();
                        const oe = C.createElement(&#39;div&#39;);
                        (ct(oe), oe.appendChild(Q), U.appendChild(oe), (K[q] = Q));
                    }
                    for (; !C.body;)
                        await i(50);
                    C.body.appendChild(U);
                    try {
                        for (let q = 0; q &lt; h.length; ++q)
                            K[q].offsetParent || (ie[h[q]] = !0);
                    }
                    finally {
                        (w = U.parentNode) === null || w === void 0 || w.removeChild(U);
                    }
                    return ie;
                }
                function ct(h) {
                    (h.style.setProperty(&#39;visibility&#39;, &#39;hidden&#39;, &#39;important&#39;),
                        h.style.setProperty(&#39;display&#39;, &#39;block&#39;, &#39;important&#39;));
                }
                function mt(h, w) {
                    let C = &#39;DOM blockers debug:\n```&#39;;
                    for (const U of Object.keys(h)) {
                        C += `
${U}:`;
                        for (const K of h[U])
                            C += `
  ${w[K] ? &#39;\u{1F6AB}&#39; : &#39;\u27A1\uFE0F&#39;} ${K}`;
                    }
                    console.log(`${C}
\`\`\``);
                }
                function yt() {
                    for (const h of [&#39;rec2020&#39;, &#39;p3&#39;, &#39;srgb&#39;])
                        if (matchMedia(`(color-gamut: ${h})`).matches)
                            return h;
                }
                function Dt() {
                    if (Et(&#39;inverted&#39;))
                        return true;
                    if (Et(&#39;none&#39;))
                        return false;
                }
                function Et(h) {
                    return matchMedia(`(inverted-colors: ${h})`).matches;
                }
                function At() {
                    if (Rt(&#39;active&#39;))
                        return true;
                    if (Rt(&#39;none&#39;))
                        return false;
                }
                function Rt(h) {
                    return matchMedia(`(forced-colors: ${h})`).matches;
                }
                const pt = 100;
                function kt() {
                    if (matchMedia(&#39;(min-monochrome: 0)&#39;).matches) {
                        for (let h = 0; h &lt;= pt; ++h)
                            if (matchMedia(`(max-monochrome: ${h})`).matches)
                                return h;
                        throw new Error(&#39;Too high value&#39;);
                    }
                }
                function $t() {
                    if (St(&#39;no-preference&#39;))
                        return 0;
                    if (St(&#39;high&#39;) || St(&#39;more&#39;))
                        return 1;
                    if (St(&#39;low&#39;) || St(&#39;less&#39;))
                        return -1;
                    if (St(&#39;forced&#39;))
                        return 10;
                }
                function St(h) {
                    return matchMedia(`(prefers-contrast: ${h})`).matches;
                }
                function Qt() {
                    if (Ht(&#39;reduce&#39;))
                        return true;
                    if (Ht(&#39;no-preference&#39;))
                        return false;
                }
                function Ht(h) {
                    return matchMedia(`(prefers-reduced-motion: ${h})`).matches;
                }
                function en() {
                    if (Vt(&#39;reduce&#39;))
                        return true;
                    if (Vt(&#39;no-preference&#39;))
                        return false;
                }
                function Vt(h) {
                    return matchMedia(`(prefers-reduced-transparency: ${h})`).matches;
                }
                function tn() {
                    if (Gt(&#39;high&#39;))
                        return true;
                    if (Gt(&#39;standard&#39;))
                        return false;
                }
                function Gt(h) {
                    return matchMedia(`(dynamic-range: ${h})`).matches;
                }
                const Ce = Math, Xe = () =&gt; 0;
                function nn() {
                    const h = Ce.acos || Xe, w = Ce.acosh || Xe, C = Ce.asin || Xe, U = Ce.asinh || Xe, K = Ce.atanh || Xe, ie = Ce.atan || Xe, q = Ce.sin || Xe, Q = Ce.sinh || Xe, oe = Ce.cos || Xe, xe = Ce.cosh || Xe, J = Ce.tan || Xe, z = Ce.tanh || Xe, De = Ce.exp || Xe, we = Ce.expm1 || Xe, ke = Ce.log1p || Xe, Ye = (Ue) =&gt; Ce.pow(Ce.PI, Ue), Lt = (Ue) =&gt; Ce.log(Ue + Ce.sqrt(Ue * Ue - 1)), Nn = (Ue) =&gt; Ce.log(Ue + Ce.sqrt(Ue * Ue + 1)), Fn = (Ue) =&gt; Ce.log((1 + Ue) / (1 - Ue)) / 2, Pn = (Ue) =&gt; Ce.exp(Ue) - 1 / Ce.exp(Ue) / 2, Bn = (Ue) =&gt; (Ce.exp(Ue) + 1 / Ce.exp(Ue)) / 2, Hn = (Ue) =&gt; Ce.exp(Ue) - 1, Vn = (Ue) =&gt; (Ce.exp(2 * Ue) - 1) / (Ce.exp(2 * Ue) + 1), Gn = (Ue) =&gt; Ce.log(1 + Ue);
                    return {
                        acos: h(0.12312423423423424),
                        acosh: w(1e308),
                        acoshPf: Lt(1e154),
                        asin: C(0.12312423423423424),
                        asinh: U(1),
                        asinhPf: Nn(1),
                        atanh: K(0.5),
                        atanhPf: Fn(0.5),
                        atan: ie(0.5),
                        sin: q(-1e300),
                        sinh: Q(1),
                        sinhPf: Pn(1),
                        cos: oe(10.000000000123),
                        cosh: xe(1),
                        coshPf: Bn(1),
                        tan: J(-1e300),
                        tanh: z(1),
                        tanhPf: Vn(1),
                        exp: De(1),
                        expm1: we(1),
                        expm1Pf: Hn(1),
                        log1p: ke(10),
                        log1pPf: Gn(10),
                        powPI: Ye(-100),
                    };
                }
                const rn = &#39;mmMwWLliI0fiflO&amp;1&#39;, Nt = {
                    default: [],
                    apple: [{ font: &#39;-apple-system-body&#39; }],
                    serif: [{ fontFamily: &#39;serif&#39; }],
                    sans: [{ fontFamily: &#39;sans-serif&#39; }],
                    mono: [{ fontFamily: &#39;monospace&#39; }],
                    min: [{ fontSize: &#39;1px&#39; }],
                    system: [{ fontFamily: &#39;system-ui&#39; }],
                };
                function an() {
                    return sn((h, w) =&gt; {
                        const C = {}, U = {};
                        for (const K of Object.keys(Nt)) {
                            const [ie = {}, q = rn] = Nt[K], Q = h.createElement(&#39;span&#39;);
                            ((Q.textContent = q), (Q.style.whiteSpace = &#39;nowrap&#39;));
                            for (const oe of Object.keys(ie)) {
                                const xe = ie[oe];
                                xe !== void 0 &amp;&amp; (Q.style[oe] = xe);
                            }
                            ((C[K] = Q), w.append(h.createElement(&#39;br&#39;), Q));
                        }
                        for (const K of Object.keys(Nt))
                            U[K] = C[K].getBoundingClientRect().width;
                        return U;
                    });
                }
                function sn(h, w = 4e3) {
                    return Ke((C, U) =&gt; {
                        const K = U.document, ie = K.body, q = ie.style;
                        ((q.width = `${w}px`),
                            (q.webkitTextSizeAdjust = q.textSizeAdjust = &#39;none&#39;),
                            ae()
                                ? (ie.style.zoom = `${1 / U.devicePixelRatio}`)
                                : se() &amp;&amp; (ie.style.zoom = &#39;reset&#39;));
                        const Q = K.createElement(&#39;div&#39;);
                        return ((Q.textContent = [...Array((w / 20) &lt;&lt; 0)].map(() =&gt; &#39;word&#39;).join(&#39; &#39;)),
                            ie.appendChild(Q),
                            h(K, ie));
                    }, &#39;&lt;!doctype html&gt;&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;&#39;);
                }
                function on() {
                    return navigator.pdfViewerEnabled;
                }
                function cn() {
                    const h = new Float32Array(1), w = new Uint8Array(h.buffer);
                    return ((h[0] = 1 / 0), (h[0] = h[0] - h[0]), w[3]);
                }
                function ln() {
                    const { ApplePaySession: h } = window;
                    if (typeof (h == null ? void 0 : h.canMakePayments) != &#39;function&#39;)
                        return -1;
                    if (dn())
                        return -3;
                    try {
                        return h.canMakePayments() ? 1 : 0;
                    }
                    catch (w) {
                        return un(w);
                    }
                }
                const dn = j;
                function un(h) {
                    if (h instanceof Error &amp;&amp;
                        h.name === &#39;InvalidAccessError&#39; &amp;&amp;
                        /\bfrom\b.*\binsecure\b/i.test(h.message))
                        return -2;
                    throw h;
                }
                function hn() {
                    var h;
                    const w = document.createElement(&#39;a&#39;), C = (h = w.attributionSourceId) !== null &amp;&amp; h !== void 0 ? h : w.attributionsourceid;
                    return C === void 0 ? void 0 : String(C);
                }
                const Wt = -1, zt = -2, xn = new Set([
                    10752, 2849, 2884, 2885, 2886, 2928, 2929, 2930, 2931, 2932, 2960, 2961, 2962, 2963,
                    2964, 2965, 2966, 2967, 2968, 2978, 3024, 3042, 3088, 3089, 3106, 3107, 32773, 32777,
                    32777, 32823, 32824, 32936, 32937, 32938, 32939, 32968, 32969, 32970, 32971, 3317,
                    33170, 3333, 3379, 3386, 33901, 33902, 34016, 34024, 34076, 3408, 3410, 3411, 3412,
                    3413, 3414, 3415, 34467, 34816, 34817, 34818, 34819, 34877, 34921, 34930, 35660, 35661,
                    35724, 35738, 35739, 36003, 36004, 36005, 36347, 36348, 36349, 37440, 37441, 37443,
                    7936, 7937, 7938,
                ]), fn = new Set([34047, 35723, 36063, 34852, 34853, 34854, 34229, 36392, 36795, 38449]), gn = [&#39;FRAGMENT_SHADER&#39;, &#39;VERTEX_SHADER&#39;], mn = [&#39;LOW_FLOAT&#39;, &#39;MEDIUM_FLOAT&#39;, &#39;HIGH_FLOAT&#39;, &#39;LOW_INT&#39;, &#39;MEDIUM_INT&#39;, &#39;HIGH_INT&#39;], Kt = &#39;WEBGL_debug_renderer_info&#39;, pn = &#39;WEBGL_polygon_mode&#39;;
                function _n({ cache: h }) {
                    var w, C, U, K, ie, q;
                    const Q = Ft(h);
                    if (!Q)
                        return Wt;
                    if (!jt(Q))
                        return zt;
                    const oe = Xt() ? null : Q.getExtension(Kt);
                    return {
                        version: ((w = Q.getParameter(Q.VERSION)) === null || w === void 0 ? void 0 : w.toString()) ||
                            &#39;&#39;,
                        vendor: ((C = Q.getParameter(Q.VENDOR)) === null || C === void 0 ? void 0 : C.toString()) ||
                            &#39;&#39;,
                        vendorUnmasked: oe
                            ? (U = Q.getParameter(oe.UNMASKED_VENDOR_WEBGL)) === null || U === void 0
                                ? void 0
                                : U.toString()
                            : &#39;&#39;,
                        renderer: ((K = Q.getParameter(Q.RENDERER)) === null || K === void 0 ? void 0 : K.toString()) ||
                            &#39;&#39;,
                        rendererUnmasked: oe
                            ? (ie = Q.getParameter(oe.UNMASKED_RENDERER_WEBGL)) === null || ie === void 0
                                ? void 0
                                : ie.toString()
                            : &#39;&#39;,
                        shadingLanguageVersion: ((q = Q.getParameter(Q.SHADING_LANGUAGE_VERSION)) === null || q === void 0
                            ? void 0
                            : q.toString()) || &#39;&#39;,
                    };
                }
                function bn({ cache: h }) {
                    const w = Ft(h);
                    if (!w)
                        return Wt;
                    if (!jt(w))
                        return zt;
                    const C = w.getSupportedExtensions(), U = w.getContextAttributes(), K = [], ie = [], q = [], Q = [], oe = [];
                    if (U)
                        for (const J of Object.keys(U))
                            ie.push(`${J}=${U[J]}`);
                    const xe = Yt(w);
                    for (const J of xe) {
                        const z = w[J];
                        q.push(`${J}=${z}${xn.has(z) ? `=${w.getParameter(z)}` : &#39;&#39;}`);
                    }
                    if (C)
                        for (const J of C) {
                            if ((J === Kt &amp;&amp; Xt()) || (J === pn &amp;&amp; yn()))
                                continue;
                            const z = w.getExtension(J);
                            if (!z) {
                                K.push(J);
                                continue;
                            }
                            for (const De of Yt(z)) {
                                const we = z[De];
                                Q.push(`${De}=${we}${fn.has(we) ? `=${w.getParameter(we)}` : &#39;&#39;}`);
                            }
                        }
                    for (const J of gn)
                        for (const z of mn) {
                            const De = vn(w, J, z);
                            oe.push(`${J}.${z}=${De.join(&#39;,&#39;)}`);
                        }
                    return (Q.sort(),
                        q.sort(),
                        {
                            contextAttributes: ie,
                            parameters: q,
                            shaderPrecisions: oe,
                            extensions: C,
                            extensionParameters: Q,
                            unsupportedExtensions: K,
                        });
                }
                function Ft(h) {
                    if (h.webgl)
                        return h.webgl.context;
                    const w = document.createElement(&#39;canvas&#39;);
                    let C;
                    w.addEventListener(&#39;webglCreateContextError&#39;, () =&gt; (C = void 0));
                    for (const U of [&#39;webgl&#39;, &#39;experimental-webgl&#39;]) {
                        try {
                            C = w.getContext(U);
                        }
                        catch { }
                        if (C)
                            break;
                    }
                    return ((h.webgl = { context: C }), C);
                }
                function vn(h, w, C) {
                    const U = h.getShaderPrecisionFormat(h[w], h[C]);
                    return U ? [U.rangeMin, U.rangeMax, U.precision] : [];
                }
                function Yt(h) {
                    return Object.keys(h.__proto__).filter(wn);
                }
                function wn(h) {
                    return typeof h == &#39;string&#39; &amp;&amp; !h.match(/[^A-Z0-9_x]/);
                }
                function Xt() {
                    return Fe();
                }
                function yn() {
                    return ae() || se();
                }
                function jt(h) {
                    return typeof h.getParameter == &#39;function&#39;;
                }
                function En() {
                    if (!(We() || se()))
                        return -2;
                    if (!window.AudioContext)
                        return -1;
                    const w = new AudioContext().baseLatency;
                    return w == null ? -1 : isFinite(w) ? w : -3;
                }
                function Sn() {
                    if (!window.Intl)
                        return -1;
                    const h = window.Intl.DateTimeFormat;
                    if (!h)
                        return -2;
                    const w = h().resolvedOptions().locale;
                    return !w &amp;&amp; w !== &#39;&#39; ? -3 : w;
                }
                const Jt = {
                    fonts: Se,
                    domBlockers: Ee,
                    fontPreferences: an,
                    audio: _e,
                    screenFrame: Ct,
                    canvas: F,
                    osCpu: ut,
                    languages: ht,
                    colorDepth: nt,
                    deviceMemory: It,
                    screenResolution: it,
                    hardwareConcurrency: wt,
                    timezone: Ut,
                    sessionStorage: Ot,
                    localStorage: st,
                    indexedDB: Z,
                    openDatabase: de,
                    cpuClass: ue,
                    platform: Te,
                    plugins: u,
                    touchSupport: ft,
                    vendor: pe,
                    vendorFlavors: Me,
                    cookiesEnabled: ge,
                    colorGamut: yt,
                    invertedColors: Dt,
                    forcedColors: At,
                    monochrome: kt,
                    contrast: $t,
                    reducedMotion: Qt,
                    reducedTransparency: en,
                    hdr: tn,
                    math: nn,
                    pdfViewerEnabled: on,
                    architecture: cn,
                    applePay: ln,
                    privateClickMeasurement: hn,
                    audioBaseLatency: En,
                    dateTimeLocale: Sn,
                    webGlBasics: _n,
                    webGlExtensions: bn,
                };
                function In(h) {
                    return Ne(Jt, h, []);
                }
                const Tn = &#39;$ if upgrade to Pro: https://fpjs.dev/pro&#39;;
                function An(h) {
                    const w = Ln(h), C = Cn(w);
                    return { score: w, comment: Tn.replace(/\$/g, `${C}`) };
                }
                function Ln(h) {
                    if (We())
                        return 0.4;
                    if (se())
                        return Ae() &amp;&amp; !(He() &amp;&amp; Ie()) ? 0.5 : 0.3;
                    const w = &#39;value&#39; in h.platform ? h.platform.value : &#39;&#39;;
                    return /^Win/.test(w) ? 0.6 : /^Mac/.test(w) ? 0.5 : 0.7;
                }
                function Cn(h) {
                    return g(0.99 + 0.01 * h, 1e-4);
                }
                function Mn(h) {
                    let w = &#39;&#39;;
                    for (const C of Object.keys(h).sort()) {
                        const U = h[C], K = &#39;error&#39; in U ? &#39;error&#39; : JSON.stringify(U.value);
                        w += `${w ? &#39;|&#39; : &#39;&#39;}${C.replace(/([:|\\])/g, &#39;\\$1&#39;)}:${K}`;
                    }
                    return w;
                }
                function Pt(h) {
                    return JSON.stringify(h, (w, C) =&gt; (C instanceof Error ? he(C) : C), 2);
                }
                function Bt(h) {
                    return ne(Mn(h));
                }
                function On(h) {
                    let w;
                    const C = An(h);
                    return {
                        get visitorId() {
                            return (w === void 0 &amp;&amp; (w = Bt(this.components)), w);
                        },
                        set visitorId(U) {
                            w = U;
                        },
                        confidence: C,
                        components: h,
                        version: E,
                    };
                }
                function qt(h = 50) {
                    return a(h, h * 2);
                }
                function Dn(h, w) {
                    const C = Date.now();
                    return {
                        async get(U) {
                            const K = Date.now(), ie = await h(), q = On(ie);
                            return ((w || (U != null &amp;&amp; U.debug)) &amp;&amp;
                                console.log(`Copy the text below to get the debug data:

\`\`\`
version: ${q.version}
userAgent: ${navigator.userAgent}
timeBetweenLoadAndGet: ${K - C}
visitorId: ${q.visitorId}
components: ${Pt(ie)}
\`\`\``),
                                q);
                        },
                    };
                }
                function Rn() {
                    if (!(window.__fpjs_d_m || Math.random() &gt;= 0.001))
                        try {
                            const h = new XMLHttpRequest();
                            (h.open(&#39;get&#39;, `https://m1.openfpcdn.io/fingerprintjs/v${E}/npm-monitoring`, !0),
                                h.send());
                        }
                        catch (h) {
                            console.error(h);
                        }
                }
                async function Zt(h = {}) {
                    var w;
                    (!((w = h.monitoring) !== null &amp;&amp; w !== void 0) || w) &amp;&amp; Rn();
                    const { delayFallback: C, debug: U } = h;
                    await qt(C);
                    const K = In({ cache: {}, debug: U });
                    return Dn(K, U);
                }
                var Un = { load: Zt, hashComponents: Bt, componentsToDebugString: Pt };
                const kn = ne;
                return ((f.componentsToDebugString = Pt),
                    (f.default = Un),
                    (f.getFullscreenElement = dt),
                    (f.getUnstableAudioFingerprint = Be),
                    (f.getUnstableCanvasFingerprint = H),
                    (f.getUnstableScreenFrame = at),
                    (f.getUnstableScreenResolution = _t),
                    (f.getWebGLContext = Ft),
                    (f.hashComponents = Bt),
                    (f.isAndroid = We),
                    (f.isChromium = ae),
                    (f.isDesktopWebKit = Ae),
                    (f.isEdgeHTML = re),
                    (f.isGecko = Fe),
                    (f.isSamsungInternet = Ze),
                    (f.isTrident = X),
                    (f.isWebKit = se),
                    (f.load = Zt),
                    (f.loadSources = Ne),
                    (f.murmurX64Hash128 = kn),
                    (f.prepareForSources = qt),
                    (f.sources = Jt),
                    (f.transformSource = P),
                    (f.withIframe = Ke),
                    Object.defineProperty(f, &#39;__esModule&#39;, { value: true }),
                    f);
            })({});
        })(_POSignalsEntities || (_POSignalsEntities = {})),
        (function (l) {
            l.BroprintJS = (function (f) {
                const E = function (t, n = 0) {
                    let e = 3735928559 ^ n, o = 1103547991 ^ n;
                    for (let s = 0, x; s &lt; t.length; s++)
                        ((x = t.charCodeAt(s)),
                            (e = Math.imul(e ^ x, 2654435761)),
                            (o = Math.imul(o ^ x, 1597334677)));
                    return ((e = Math.imul(e ^ (e &gt;&gt;&gt; 16), 2246822507) ^ Math.imul(o ^ (o &gt;&gt;&gt; 13), 3266489909)),
                        (o = Math.imul(o ^ (o &gt;&gt;&gt; 16), 2246822507) ^ Math.imul(e ^ (e &gt;&gt;&gt; 13), 3266489909)),
                        4294967296 * (2097151 &amp; o) + (e &gt;&gt;&gt; 0));
                }, i = () =&gt; {
                    const t = document.createElement(&#39;canvas&#39;);
                    return !!(t.getContext &amp;&amp; t.getContext(&#39;2d&#39;));
                }, r = () =&gt; {
                    if (!i())
                        return &#39;canvas not supported&#39;;
                    var t = document.createElement(&#39;canvas&#39;), n = t.getContext(&#39;2d&#39;), e = &#39;BroPrint.65@345876&#39;;
                    return ((n.textBaseline = &#39;top&#39;),
                        (n.font = &quot;14px &#39;Arial&#39;&quot;),
                        (n.textBaseline = &#39;alphabetic&#39;),
                        (n.fillStyle = &#39;#f60&#39;),
                        n.fillRect(125, 1, 62, 20),
                        (n.fillStyle = &#39;#069&#39;),
                        n.fillText(e, 2, 15),
                        (n.fillStyle = &#39;rgba(102, 204, 0, 0.7)&#39;),
                        n.fillText(e, 4, 17),
                        t.toDataURL());
                }, a = (function () {
                    let t = null, n = null, e = null, o = null, s = null, x = null;
                    function m(_, L = false) {
                        x = _;
                        try {
                            (p(),
                                e.connect(o),
                                o.connect(t.destination),
                                e.start(0),
                                t.startRendering(),
                                (t.oncomplete = S));
                        }
                        catch (y) {
                            if (L)
                                throw y;
                        }
                    }
                    function p() {
                        (I(), (n = t.currentTime), g(), v());
                    }
                    function I() {
                        let _ = window.OfflineAudioContext || window.webkitOfflineAudioContext;
                        t = new _(1, 44100, 44100);
                    }
                    function g() {
                        ((e = t.createOscillator()),
                            (e.type = &#39;triangle&#39;),
                            e.frequency.setValueAtTime(1e4, n));
                    }
                    function v() {
                        ((o = t.createDynamicsCompressor()),
                            A(&#39;threshold&#39;, -50),
                            A(&#39;knee&#39;, 40),
                            A(&#39;ratio&#39;, 12),
                            A(&#39;reduction&#39;, -20),
                            A(&#39;attack&#39;, 0),
                            A(&#39;release&#39;, 0.25));
                    }
                    function A(_, L) {
                        o[_] !== void 0 &amp;&amp;
                            typeof o[_].setValueAtTime == &#39;function&#39; &amp;&amp;
                            o[_].setValueAtTime(L, t.currentTime);
                    }
                    function S(_) {
                        (d(_), o.disconnect());
                    }
                    function d(_) {
                        let L = null;
                        for (var y = 4500; 5e3 &gt; y; y++) {
                            var O = _.renderedBuffer.getChannelData(0)[y];
                            L += Math.abs(O);
                        }
                        if (((s = L.toString()), typeof x == &#39;function&#39;))
                            return x(s);
                    }
                    return { run: m };
                })();
                function c() {
                    const t = new Promise((n, e) =&gt; {
                        a.run(function (o) {
                            n(o);
                        });
                    });
                    return new Promise((n, e) =&gt; {
                        t.then(async (o) =&gt; {
                            let s = &#39;&#39;;
                            (navigator.brave &amp;&amp; (await navigator.brave.isBrave()),
                                (s = window.btoa(o) + r()),
                                n(E(s, 0)));
                        }).catch(() =&gt; {
                            try {
                                n(E(r()).toString());
                            }
                            catch {
                                e(&#39;Failed to generate the finger print of this browser&#39;);
                            }
                        });
                    });
                }
                return ((f.getCurrentBrowserFingerPrint = c),
                    Object.defineProperty(f, &#39;__esModule&#39;, { value: true }),
                    f);
            })({});
        })(_POSignalsEntities || (_POSignalsEntities = {})),
        (function (l, f) {
            f(l);
        })(_POSignalsEntities || (_POSignalsEntities = {}), function (l) {
            var f, E, i = function (O, M) {
                var R = typeof Symbol == &#39;function&#39; &amp;&amp; O[Symbol.iterator];
                if (!R)
                    return O;
                var k, B, D = R.call(O), G = [];
                try {
                    for (; (M === void 0 || M-- &gt; 0) &amp;&amp; !(k = D.next()).done;)
                        G.push(k.value);
                }
                catch (N) {
                    B = { error: N };
                }
                finally {
                    try {
                        k &amp;&amp; !k.done &amp;&amp; (R = D.return) &amp;&amp; R.call(D);
                    }
                    finally {
                        if (B)
                            throw B.error;
                    }
                }
                return G;
            }, r = function (O, M, R) {
                if (arguments.length === 2)
                    for (var k, B = 0, D = M.length; B &lt; D; B++)
                        (!k &amp;&amp; B in M) || (k || (k = Array.prototype.slice.call(M, 0, B)), (k[B] = M[B]));
                return O.concat(k || Array.prototype.slice.call(M));
            }, a = new WeakMap(), c = new WeakMap(), t = new WeakMap(), n = new WeakMap(), e = new WeakMap(), o = {
                get: function (O, M, R) {
                    if (O instanceof IDBTransaction) {
                        if (M === &#39;done&#39;)
                            return c.get(O);
                        if (M === &#39;objectStoreNames&#39;)
                            return O.objectStoreNames || t.get(O);
                        if (M === &#39;store&#39;)
                            return R.objectStoreNames[1] ? void 0 : R.objectStore(R.objectStoreNames[0]);
                    }
                    return m(O[M]);
                },
                set: function (O, M, R) {
                    return ((O[M] = R), true);
                },
                has: function (O, M) {
                    return (O instanceof IDBTransaction &amp;&amp; (M === &#39;done&#39; || M === &#39;store&#39;)) || M in O;
                },
            };
            function s(O) {
                return O !== IDBDatabase.prototype.transaction ||
                    &#39;objectStoreNames&#39; in IDBTransaction.prototype
                    ? (E ||
                        (E = [
                            IDBCursor.prototype.advance,
                            IDBCursor.prototype.continue,
                            IDBCursor.prototype.continuePrimaryKey,
                        ])).includes(O)
                        ? function () {
                            for (var M = [], R = 0; R &lt; arguments.length; R++)
                                M[R] = arguments[R];
                            return (O.apply(p(this), M), m(a.get(this)));
                        }
                        : function () {
                            for (var M = [], R = 0; R &lt; arguments.length; R++)
                                M[R] = arguments[R];
                            return m(O.apply(p(this), M));
                        }
                    : function (M) {
                        for (var R = [], k = 1; k &lt; arguments.length; k++)
                            R[k - 1] = arguments[k];
                        var B = O.call.apply(O, r([p(this), M], i(R), false));
                        return (t.set(B, M.sort ? M.sort() : [M]), m(B));
                    };
            }
            function x(O) {
                return typeof O == &#39;function&#39;
                    ? s(O)
                    : (O instanceof IDBTransaction &amp;&amp;
                        (function (R) {
                            if (!c.has(R)) {
                                var k = new Promise(function (B, D) {
                                    var G = function () {
                                        (R.removeEventListener(&#39;complete&#39;, N),
                                            R.removeEventListener(&#39;error&#39;, ne),
                                            R.removeEventListener(&#39;abort&#39;, ne));
                                    }, N = function () {
                                        (B(), G());
                                    }, ne = function () {
                                        (D(R.error || new DOMException(&#39;AbortError&#39;, &#39;AbortError&#39;)), G());
                                    };
                                    (R.addEventListener(&#39;complete&#39;, N),
                                        R.addEventListener(&#39;error&#39;, ne),
                                        R.addEventListener(&#39;abort&#39;, ne));
                                });
                                c.set(R, k);
                            }
                        })(O),
                        (M = O),
                        (f || (f = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])).some(function (R) {
                            return M instanceof R;
                        })
                            ? new Proxy(O, o)
                            : O);
                var M;
            }
            function m(O) {
                if (O instanceof IDBRequest)
                    return ((M = O),
                        (R = new Promise(function (B, D) {
                            var G = function () {
                                (M.removeEventListener(&#39;success&#39;, N), M.removeEventListener(&#39;error&#39;, ne));
                            }, N = function () {
                                (B(m(M.result)), G());
                            }, ne = function () {
                                (D(M.error), G());
                            };
                            (M.addEventListener(&#39;success&#39;, N), M.addEventListener(&#39;error&#39;, ne));
                        }))
                            .then(function (B) {
                            B instanceof IDBCursor &amp;&amp; a.set(B, M);
                        })
                            .catch(function () { }),
                        e.set(R, M),
                        R);
                var M, R;
                if (n.has(O))
                    return n.get(O);
                var k = x(O);
                return (k !== O &amp;&amp; (n.set(O, k), e.set(k, O)), k);
            }
            var p = function (O) {
                return e.get(O);
            }, I = function () {
                return ((I =
                    Object.assign ||
                        function (O) {
                            for (var M, R = 1, k = arguments.length; R &lt; k; R++)
                                for (var B in (M = arguments[R]))
                                    Object.prototype.hasOwnProperty.call(M, B) &amp;&amp; (O[B] = M[B]);
                            return O;
                        }),
                    I.apply(this, arguments));
            }, g = function (O, M, R, k) {
                return new (R || (R = Promise))(function (B, D) {
                    function G(he) {
                        try {
                            ne(k.next(he));
                        }
                        catch (Y) {
                            D(Y);
                        }
                    }
                    function N(he) {
                        try {
                            ne(k.throw(he));
                        }
                        catch (Y) {
                            D(Y);
                        }
                    }
                    function ne(he) {
                        var Y;
                        he.done
                            ? B(he.value)
                            : ((Y = he.value),
                                Y instanceof R
                                    ? Y
                                    : new R(function (ye) {
                                        ye(Y);
                                    })).then(G, N);
                    }
                    ne((k = k.apply(O, [])).next());
                });
            }, v = function (O, M) {
                var R, k, B, D, G = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; B[0])
                            throw B[1];
                        return B[1];
                    },
                    trys: [],
                    ops: [],
                };
                return ((D = { next: N(0), throw: N(1), return: N(2) }),
                    typeof Symbol == &#39;function&#39; &amp;&amp;
                        (D[Symbol.iterator] = function () {
                            return this;
                        }),
                    D);
                function N(ne) {
                    return function (he) {
                        return (function (Y) {
                            if (R)
                                throw new TypeError(&#39;Generator is already executing.&#39;);
                            for (; G;)
                                try {
                                    if (((R = 1),
                                        k &amp;&amp;
                                            (B =
                                                2 &amp; Y[0]
                                                    ? k.return
                                                    : Y[0]
                                                        ? k.throw || ((B = k.return) &amp;&amp; B.call(k), 0)
                                                        : k.next) &amp;&amp;
                                            !(B = B.call(k, Y[1])).done))
                                        return B;
                                    switch (((k = 0), B &amp;&amp; (Y = [2 &amp; Y[0], B.value]), Y[0])) {
                                        case 0:
                                        case 1:
                                            B = Y;
                                            break;
                                        case 4:
                                            return (G.label++, { value: Y[1], done: !1 });
                                        case 5:
                                            (G.label++, (k = Y[1]), (Y = [0]));
                                            continue;
                                        case 7:
                                            ((Y = G.ops.pop()), G.trys.pop());
                                            continue;
                                        default:
                                            if (((B = G.trys),
                                                !((B = B.length &gt; 0 &amp;&amp; B[B.length - 1]) || (Y[0] !== 6 &amp;&amp; Y[0] !== 2)))) {
                                                G = 0;
                                                continue;
                                            }
                                            if (Y[0] === 3 &amp;&amp; (!B || (Y[1] &gt; B[0] &amp;&amp; Y[1] &lt; B[3]))) {
                                                G.label = Y[1];
                                                break;
                                            }
                                            if (Y[0] === 6 &amp;&amp; G.label &lt; B[1]) {
                                                ((G.label = B[1]), (B = Y));
                                                break;
                                            }
                                            if (B &amp;&amp; G.label &lt; B[2]) {
                                                ((G.label = B[2]), G.ops.push(Y));
                                                break;
                                            }
                                            (B[2] &amp;&amp; G.ops.pop(), G.trys.pop());
                                            continue;
                                    }
                                    Y = M.call(O, G);
                                }
                                catch (ye) {
                                    ((Y = [6, ye]), (k = 0));
                                }
                                finally {
                                    R = B = 0;
                                }
                            if (5 &amp; Y[0])
                                throw Y[1];
                            return { value: Y[0] ? Y[1] : void 0, done: true };
                        })([ne, he]);
                    };
                }
            }, A = function (O, M) {
                var R = typeof Symbol == &#39;function&#39; &amp;&amp; O[Symbol.iterator];
                if (!R)
                    return O;
                var k, B, D = R.call(O), G = [];
                try {
                    for (; (M === void 0 || M-- &gt; 0) &amp;&amp; !(k = D.next()).done;)
                        G.push(k.value);
                }
                catch (N) {
                    B = { error: N };
                }
                finally {
                    try {
                        k &amp;&amp; !k.done &amp;&amp; (R = D.return) &amp;&amp; R.call(D);
                    }
                    finally {
                        if (B)
                            throw B.error;
                    }
                }
                return G;
            }, S = function (O, M, R) {
                if (arguments.length === 2)
                    for (var k, B = 0, D = M.length; B &lt; D; B++)
                        (!k &amp;&amp; B in M) || (k || (k = Array.prototype.slice.call(M, 0, B)), (k[B] = M[B]));
                return O.concat(k || Array.prototype.slice.call(M));
            }, d = [&#39;get&#39;, &#39;getKey&#39;, &#39;getAll&#39;, &#39;getAllKeys&#39;, &#39;count&#39;], _ = [&#39;put&#39;, &#39;add&#39;, &#39;delete&#39;, &#39;clear&#39;], L = new Map();
            function y(O, M) {
                if (O instanceof IDBDatabase &amp;&amp; !(M in O) &amp;&amp; typeof M == &#39;string&#39;) {
                    if (L.get(M))
                        return L.get(M);
                    var R = M.replace(/FromIndex$/, &#39;&#39;), k = M !== R, B = _.includes(R);
                    if (R in (k ? IDBIndex : IDBObjectStore).prototype &amp;&amp; (B || d.includes(R))) {
                        var D = function (G) {
                            for (var N = [], ne = 1; ne &lt; arguments.length; ne++)
                                N[ne - 1] = arguments[ne];
                            return g(this, void 0, void 0, function () {
                                var he, Y, ye;
                                return v(this, function (be) {
                                    switch (be.label) {
                                        case 0:
                                            return ((he = this.transaction(G, B ? &#39;readwrite&#39; : &#39;readonly&#39;)),
                                                (Y = he.store),
                                                k &amp;&amp; (Y = Y.index(N.shift())),
                                                [4, Promise.all([(ye = Y)[R].apply(ye, S([], A(N), false)), B &amp;&amp; he.done])]);
                                        case 1:
                                            return [2, be.sent()[0]];
                                    }
                                });
                            });
                        };
                        return (L.set(M, D), D);
                    }
                }
            }
            ((o = (function (O) {
                return I(I({}, O), {
                    get: function (M, R, k) {
                        return y(M, R) || O.get(M, R, k);
                    },
                    has: function (M, R) {
                        return !!y(M, R) || O.has(M, R);
                    },
                });
            })(o)),
                (l.deleteDB = function (O, M) {
                    var R = (M === void 0 ? {} : M).blocked, k = indexedDB.deleteDatabase(O);
                    return (R &amp;&amp;
                        k.addEventListener(&#39;blocked&#39;, function (B) {
                            return R(B.oldVersion, B);
                        }),
                        m(k).then(function () { }));
                }),
                (l.openDB = function (O, M, R) {
                    var k = R === void 0 ? {} : R, B = k.blocked, D = k.upgrade, G = k.blocking, N = k.terminated, ne = indexedDB.open(O, M), he = m(ne);
                    return (D &amp;&amp;
                        ne.addEventListener(&#39;upgradeneeded&#39;, function (Y) {
                            D(m(ne.result), Y.oldVersion, Y.newVersion, m(ne.transaction), Y);
                        }),
                        B &amp;&amp;
                            ne.addEventListener(&#39;blocked&#39;, function (Y) {
                                return B(Y.oldVersion, Y.newVersion, Y);
                            }),
                        he
                            .then(function (Y) {
                            (N &amp;&amp;
                                Y.addEventListener(&#39;close&#39;, function () {
                                    return N();
                                }),
                                G &amp;&amp;
                                    Y.addEventListener(&#39;versionchange&#39;, function (ye) {
                                        return G(ye.oldVersion, ye.newVersion, ye);
                                    }));
                        })
                            .catch(function () { }),
                        he);
                }),
                (l.unwrap = p),
                (l.wrap = m));
        }),
        (function () {
            typeof Object.assign != &#39;function&#39; &amp;&amp;
                Object.defineProperty(Object, &#39;assign&#39;, {
                    value: function (f, E) {
                        if (f == null)
                            throw new TypeError(&#39;Cannot convert undefined or null to object&#39;);
                        for (var i = Object(f), r = 1; r &lt; arguments.length; r++) {
                            var a = arguments[r];
                            if (a != null)
                                for (var c in a)
                                    Object.prototype.hasOwnProperty.call(a, c) &amp;&amp; (i[c] = a[c]);
                        }
                        return i;
                    },
                    writable: true,
                    configurable: true,
                });
        })(),
        Array.from ||
            (Array.from = (function () {
                var l = Object.prototype.toString, f = function (a) {
                    return typeof a == &#39;function&#39; || l.call(a) === &#39;[object Function]&#39;;
                }, E = function (a) {
                    var c = Number(a);
                    return isNaN(c)
                        ? 0
                        : c === 0 || !isFinite(c)
                            ? c
                            : (c &gt; 0 ? 1 : -1) * Math.floor(Math.abs(c));
                }, i = Math.pow(2, 53) - 1, r = function (a) {
                    var c = E(a);
                    return Math.min(Math.max(c, 0), i);
                };
                return function (c) {
                    var t = this, n = Object(c);
                    if (c == null)
                        throw new TypeError(&#39;Array.from requires an array-like object - not null or undefined&#39;);
                    var e = arguments.length &gt; 1 ? arguments[1] : void 0, o;
                    if (typeof e != &#39;undefined&#39;) {
                        if (!f(e))
                            throw new TypeError(&#39;Array.from: when provided, the second argument must be a function&#39;);
                        arguments.length &gt; 2 &amp;&amp; (o = arguments[2]);
                    }
                    for (var s = r(n.length), x = f(t) ? Object(new t(s)) : new Array(s), m = 0, p; m &lt; s;)
                        ((p = n[m]),
                            e ? (x[m] = typeof o == &#39;undefined&#39; ? e(p, m) : e.call(o, p, m)) : (x[m] = p),
                            (m += 1));
                    return ((x.length = s), x);
                };
            })()),
        (function () {
            String.prototype.endsWith ||
                (String.prototype.endsWith = function (l, f) {
                    return ((f === void 0 || f &gt; this.length) &amp;&amp; (f = this.length),
                        this.substring(f - l.length, f) === l);
                });
        })(),
        (function () {
            Promise.allSettled =
                Promise.allSettled ||
                    function (l) {
                        return Promise.all(l.map(function (f) {
                            return f
                                .then(function (E) {
                                return { status: &#39;fulfilled&#39;, value: E };
                            })
                                .catch(function (E) {
                                return { status: &#39;rejected&#39;, reason: E };
                            });
                        }));
                    };
        })(),
        (function (l, f) {
            var E = &#39;2.0.2&#39;, i = 500, r = &#39;user-agent&#39;, a = &#39;&#39;, c = &#39;?&#39;, t = &#39;function&#39;, n = &#39;undefined&#39;, e = &#39;object&#39;, o = &#39;string&#39;, s = &#39;browser&#39;, x = &#39;cpu&#39;, m = &#39;device&#39;, p = &#39;engine&#39;, I = &#39;os&#39;, g = &#39;result&#39;, v = &#39;name&#39;, A = &#39;type&#39;, S = &#39;vendor&#39;, d = &#39;version&#39;, _ = &#39;architecture&#39;, L = &#39;major&#39;, y = &#39;model&#39;, O = &#39;console&#39;, M = &#39;mobile&#39;, R = &#39;tablet&#39;, k = &#39;smarttv&#39;, B = &#39;wearable&#39;, D = &#39;xr&#39;, G = &#39;embedded&#39;, N = &#39;inapp&#39;, ne = &#39;brands&#39;, he = &#39;formFactors&#39;, Y = &#39;fullVersionList&#39;, ye = &#39;platform&#39;, be = &#39;platformVersion&#39;, Ne = &#39;bitness&#39;, P = &#39;sec-ch-ua&#39;, X = P + &#39;-full-version-list&#39;, re = P + &#39;-arch&#39;, ae = P + &#39;-&#39; + Ne, se = P + &#39;-form-factors&#39;, Ae = P + &#39;-&#39; + M, Ie = P + &#39;-&#39; + y, Fe = P + &#39;-&#39; + ye, ze = Fe + &#39;-version&#39;, Oe = [ne, Y, M, y, ye, be, _, he, Ne], Re = &#39;Amazon&#39;, He = &#39;Apple&#39;, je = &#39;ASUS&#39;, dt = &#39;BlackBerry&#39;, Je = &#39;Google&#39;, We = &#39;Huawei&#39;, Ze = &#39;Lenovo&#39;, _e = &#39;Honor&#39;, Be = &#39;LG&#39;, Ve = &#39;Microsoft&#39;, Qe = &#39;Motorola&#39;, $e = &#39;Nvidia&#39;, et = &#39;OnePlus&#39;, qe = &#39;OPPO&#39;, Ke = &#39;Samsung&#39;, b = &#39;Sharp&#39;, V = &#39;Sony&#39;, j = &#39;Xiaomi&#39;, W = &#39;Zebra&#39;, $ = &#39;Chrome&#39;, ee = &#39;Chromium&#39;, me = &#39;Chromecast&#39;, Se = &#39;Edge&#39;, u = &#39;Firefox&#39;, F = &#39;Opera&#39;, H = &#39;Facebook&#39;, T = &#39;Sogou&#39;, te = &#39;Mobile &#39;, ce = &#39; Browser&#39;, le = &#39;Windows&#39;, fe = typeof window !== n, Ge = fe &amp;&amp; window.navigator ? window.navigator : f, ve = Ge &amp;&amp; Ge.userAgentData ? Ge.userAgentData : f, tt = function (Z, de) {
                var ue = {}, Te = de;
                if (!ht(de)) {
                    Te = {};
                    for (var pe in de)
                        for (var Me in de[pe])
                            Te[Me] = de[pe][Me].concat(Te[Me] ? Te[Me] : []);
                }
                for (var ge in Z)
                    ue[ge] = Te[ge] &amp;&amp; Te[ge].length % 2 === 0 ? Te[ge].concat(Z[ge]) : Z[ge];
                return ue;
            }, ft = function (Z) {
                for (var de = {}, ue = 0; ue &lt; Z.length; ue++)
                    de[Z[ue].toUpperCase()] = Z[ue];
                return de;
            }, ut = function (Z, de) {
                if (typeof Z === e &amp;&amp; Z.length &gt; 0) {
                    for (var ue in Z)
                        if (it(Z[ue]) == it(de))
                            return true;
                    return false;
                }
                return nt(Z) ? it(de).indexOf(it(Z)) !== -1 : false;
            }, ht = function (Z, de) {
                for (var ue in Z)
                    return /^(browser|cpu|device|engine|os)$/.test(ue) || (de ? ht(Z[ue]) : false);
            }, nt = function (Z) {
                return typeof Z === o;
            }, It = function (Z) {
                if (!Z)
                    return f;
                for (var de = [], ue = gt(/\\?\&quot;/g, Z).split(&#39;,&#39;), Te = 0; Te &lt; ue.length; Te++)
                    if (ue[Te].indexOf(&#39;;&#39;) &gt; -1) {
                        var pe = xt(ue[Te]).split(&#39;;v=&#39;);
                        de[Te] = { brand: pe[0], version: pe[1] };
                    }
                    else
                        de[Te] = xt(ue[Te]);
                return de;
            }, it = function (Z) {
                return nt(Z) ? Z.toLowerCase() : Z;
            }, _t = function (Z) {
                return nt(Z) ? gt(/[^\d\.]/g, Z).split(&#39;.&#39;)[0] : f;
            }, rt = function (Z) {
                for (var de in Z) {
                    var ue = Z[de];
                    typeof ue == e &amp;&amp; ue.length == 2 ? (this[ue[0]] = ue[1]) : (this[ue] = f);
                }
                return this;
            }, gt = function (Z, de) {
                return nt(de) ? de.replace(Z, a) : de;
            }, lt = function (Z) {
                return gt(/\\?\&quot;/g, Z);
            }, xt = function (Z, de) {
                if (nt(Z))
                    return ((Z = gt(/^\s\s*/, Z)), typeof de === n ? Z : Z.substring(0, i));
            }, Tt = function (Z, de) {
                if (!(!Z || !de))
                    for (var ue = 0, Te, pe, Me, ge, Le, Ee; ue &lt; de.length &amp;&amp; !Le;) {
                        var Pe = de[ue], ot = de[ue + 1];
                        for (Te = pe = 0; Te &lt; Pe.length &amp;&amp; !Le &amp;&amp; Pe[Te];)
                            if (((Le = Pe[Te++].exec(Z)), Le))
                                for (Me = 0; Me &lt; ot.length; Me++)
                                    ((Ee = Le[++pe]),
                                        (ge = ot[Me]),
                                        typeof ge === e &amp;&amp; ge.length &gt; 0
                                            ? ge.length === 2
                                                ? typeof ge[1] == t
                                                    ? (this[ge[0]] = ge[1].call(this, Ee))
                                                    : (this[ge[0]] = ge[1])
                                                : ge.length === 3
                                                    ? typeof ge[1] === t &amp;&amp; !(ge[1].exec &amp;&amp; ge[1].test)
                                                        ? (this[ge[0]] = Ee ? ge[1].call(this, Ee, ge[2]) : f)
                                                        : (this[ge[0]] = Ee ? Ee.replace(ge[1], ge[2]) : f)
                                                    : ge.length === 4 &amp;&amp;
                                                        (this[ge[0]] = Ee ? ge[3].call(this, Ee.replace(ge[1], ge[2])) : f)
                                            : (this[ge] = Ee || f));
                        ue += 2;
                    }
            }, at = function (Z, de) {
                for (var ue in de)
                    if (typeof de[ue] === e &amp;&amp; de[ue].length &gt; 0) {
                        for (var Te = 0; Te &lt; de[ue].length; Te++)
                            if (ut(de[ue][Te], Z))
                                return ue === c ? f : ue;
                    }
                    else if (ut(de[ue], Z))
                        return ue === c ? f : ue;
                return de.hasOwnProperty(&#39;*&#39;) ? de[&#39;*&#39;] : Z;
            }, Ct = {
                ME: &#39;4.90&#39;,
                &#39;NT 3.11&#39;: &#39;NT3.51&#39;,
                &#39;NT 4.0&#39;: &#39;NT4.0&#39;,
                2e3: &#39;NT 5.0&#39;,
                XP: [&#39;NT 5.1&#39;, &#39;NT 5.2&#39;],
                Vista: &#39;NT 6.0&#39;,
                7: &#39;NT 6.1&#39;,
                8: &#39;NT 6.2&#39;,
                8.1: &#39;NT 6.3&#39;,
                10: [&#39;NT 6.4&#39;, &#39;NT 10.0&#39;],
                RT: &#39;ARM&#39;,
            }, bt = {
                embedded: &#39;Automotive&#39;,
                mobile: &#39;Mobile&#39;,
                tablet: [&#39;Tablet&#39;, &#39;EInk&#39;],
                smarttv: &#39;TV&#39;,
                wearable: &#39;Watch&#39;,
                xr: [&#39;VR&#39;, &#39;XR&#39;],
                &#39;?&#39;: [&#39;Desktop&#39;, &#39;Unknown&#39;],
                &#39;*&#39;: f,
            }, vt = {
                browser: [
                    [/\b(?:crmo|crios)\/([\w\.]+)/i],
                    [d, [v, te + &#39;Chrome&#39;]],
                    [/edg(?:e|ios|a)?\/([\w\.]+)/i],
                    [d, [v, &#39;Edge&#39;]],
                    [
                        /(opera mini)\/([-\w\.]+)/i,
                        /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
                        /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i,
                    ],
                    [v, d],
                    [/opios[\/ ]+([\w\.]+)/i],
                    [d, [v, F + &#39; Mini&#39;]],
                    [/\bop(?:rg)?x\/([\w\.]+)/i],
                    [d, [v, F + &#39; GX&#39;]],
                    [/\bopr\/([\w\.]+)/i],
                    [d, [v, F]],
                    [/\bb[a]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],
                    [d, [v, &#39;Baidu&#39;]],
                    [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],
                    [d, [v, &#39;Maxthon&#39;]],
                    [
                        /(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,
                    ],
                    [v, d],
                    [/quark(?:pc)?\/([-\w\.]+)/i],
                    [d, [v, &#39;Quark&#39;]],
                    [/\bddg\/([\w\.]+)/i],
                    [d, [v, &#39;DuckDuckGo&#39;]],
                    [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],
                    [d, [v, &#39;UCBrowser&#39;]],
                    [
                        /microm.+\bqbcore\/([\w\.]+)/i,
                        /\bqbcore\/([\w\.]+).+microm/i,
                        /micromessenger\/([\w\.]+)/i,
                    ],
                    [d, [v, &#39;WeChat&#39;]],
                    [/konqueror\/([\w\.]+)/i],
                    [d, [v, &#39;Konqueror&#39;]],
                    [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],
                    [d, [v, &#39;IE&#39;]],
                    [/ya(?:search)?browser\/([\w\.]+)/i],
                    [d, [v, &#39;Yandex&#39;]],
                    [/slbrowser\/([\w\.]+)/i],
                    [d, [v, &#39;Smart &#39; + Ze + ce]],
                    [/(avast|avg)\/([\w\.]+)/i],
                    [[v, /(.+)/, &#39;$1 Secure&#39; + ce], d],
                    [/\bfocus\/([\w\.]+)/i],
                    [d, [v, u + &#39; Focus&#39;]],
                    [/\bopt\/([\w\.]+)/i],
                    [d, [v, F + &#39; Touch&#39;]],
                    [/coc_coc\w+\/([\w\.]+)/i],
                    [d, [v, &#39;Coc Coc&#39;]],
                    [/dolfin\/([\w\.]+)/i],
                    [d, [v, &#39;Dolphin&#39;]],
                    [/coast\/([\w\.]+)/i],
                    [d, [v, F + &#39; Coast&#39;]],
                    [/miuibrowser\/([\w\.]+)/i],
                    [d, [v, &#39;MIUI&#39; + ce]],
                    [/fxios\/([\w\.-]+)/i],
                    [d, [v, te + u]],
                    [/\bqihoobrowser\/?([\w\.]*)/i],
                    [d, [v, &#39;360&#39;]],
                    [/\b(qq)\/([\w\.]+)/i],
                    [[v, /(.+)/, &#39;$1Browser&#39;], d],
                    [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],
                    [[v, /(.+)/, &#39;$1&#39; + ce], d],
                    [/samsungbrowser\/([\w\.]+)/i],
                    [d, [v, Ke + &#39; Internet&#39;]],
                    [/metasr[\/ ]?([\d\.]+)/i],
                    [d, [v, T + &#39; Explorer&#39;]],
                    [/(sogou)mo\w+\/([\d\.]+)/i],
                    [[v, T + &#39; Mobile&#39;], d],
                    [
                        /(electron)\/([\w\.]+) safari/i,
                        /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
                        /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i,
                    ],
                    [v, d],
                    [/(lbbrowser|rekonq)/i],
                    [v],
                    [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i],
                    [d, v],
                    [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
                    [[v, H], d, [A, N]],
                    [
                        /(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,
                        /(instagram|snapchat)[\/ ]([-\w\.]+)/i,
                    ],
                    [v, d, [A, N]],
                    [/\bgsa\/([\w\.]+) .*safari\//i],
                    [d, [v, &#39;GSA&#39;], [A, N]],
                    [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],
                    [d, [v, &#39;TikTok&#39;], [A, N]],
                    [/\[(linkedin)app\]/i],
                    [v, [A, N]],
                    [/(chromium)[\/ ]([-\w\.]+)/i],
                    [v, d],
                    [/headlesschrome(?:\/([\w\.]+)| )/i],
                    [d, [v, $ + &#39; Headless&#39;]],
                    [/ wv\).+(chrome)\/([\w\.]+)/i],
                    [[v, $ + &#39; WebView&#39;], d],
                    [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],
                    [d, [v, &#39;Android&#39; + ce]],
                    [/chrome\/([\w\.]+) mobile/i],
                    [d, [v, te + &#39;Chrome&#39;]],
                    [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],
                    [v, d],
                    [/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],
                    [d, [v, te + &#39;Safari&#39;]],
                    [/iphone .*mobile(?:\/\w+ | ?)safari/i],
                    [[v, te + &#39;Safari&#39;]],
                    [/version\/([\w\.\,]+) .*(safari)/i],
                    [d, v],
                    [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
                    [v, [d, &#39;1&#39;]],
                    [/(webkit|khtml)\/([\w\.]+)/i],
                    [v, d],
                    [/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],
                    [[v, te + u], d],
                    [/(navigator|netscape\d?)\/([-\w\.]+)/i],
                    [[v, &#39;Netscape&#39;], d],
                    [/(wolvic|librewolf)\/([\w\.]+)/i],
                    [v, d],
                    [/mobile vr; rv:([\w\.]+)\).+firefox/i],
                    [d, [v, u + &#39; Reality&#39;]],
                    [
                        /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,
                    ],
                    [v, [d, /_/g, &#39;.&#39;]],
                    [/(cobalt)\/([\w\.]+)/i],
                    [v, [d, /[^\d\.]+./, a]],
                ],
                cpu: [
                    [/\b((amd|x|x86[-_]?|wow|win)64)\b/i],
                    [[_, &#39;amd64&#39;]],
                    [/(ia32(?=;))/i, /\b((i[346]|x)86)(pc)?\b/i],
                    [[_, &#39;ia32&#39;]],
                    [/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],
                    [[_, &#39;arm64&#39;]],
                    [/\b(arm(v[67])?ht?n?[fl]p?)\b/i],
                    [[_, &#39;armhf&#39;]],
                    [/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],
                    [[_, &#39;arm&#39;]],
                    [/((ppc|powerpc)(64)?)( mac|;|\))/i],
                    [[_, /ower/, a, it]],
                    [/ sun4\w[;\)]/i],
                    [[_, &#39;sparc&#39;]],
                    [
                        /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,
                    ],
                    [[_, it]],
                ],
                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],
                    [y, [S, Ke], [A, R]],
                    [
                        /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
                        /samsung[- ]((?!sm-[lr])[-\w]+)/i,
                        /sec-(sgh\w+)/i,
                    ],
                    [y, [S, Ke], [A, M]],
                    [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
                    [y, [S, He], [A, M]],
                    [
                        /\((ipad);[-\w\),; ]+apple/i,
                        /applecoremedia\/[\w\.]+ \((ipad)/i,
                        /\b(ipad)\d\d?,\d\d?[;\]].+ios/i,
                    ],
                    [y, [S, He], [A, R]],
                    [/(macintosh);/i],
                    [y, [S, He]],
                    [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
                    [y, [S, b], [A, M]],
                    [
                        /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i,
                    ],
                    [y, [S, _e], [A, R]],
                    [/honor([-\w ]+)[;\)]/i],
                    [y, [S, _e], [A, M]],
                    [
                        /\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,
                    ],
                    [y, [S, We], [A, R]],
                    [
                        /(?:huawei)([-\w ]+)[;\)]/i,
                        /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i,
                    ],
                    [y, [S, We], [A, M]],
                    [
                        /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
                        /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i,
                    ],
                    [
                        [y, /_/g, &#39; &#39;],
                        [S, j],
                        [A, R],
                    ],
                    [
                        /\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,
                    ],
                    [
                        [y, /_/g, &#39; &#39;],
                        [S, j],
                        [A, M],
                    ],
                    [
                        /; (\w+) bui.+ oppo/i,
                        /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i,
                    ],
                    [y, [S, qe], [A, M]],
                    [/\b(opd2(\d{3}a?))(?: bui|\))/i],
                    [y, [S, at, { OnePlus: [&#39;304&#39;, &#39;403&#39;, &#39;203&#39;], &#39;*&#39;: qe }], [A, R]],
                    [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i],
                    [y, [S, &#39;Vivo&#39;], [A, M]],
                    [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],
                    [y, [S, &#39;Realme&#39;], [A, M]],
                    [
                        /\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,
                    ],
                    [y, [S, Qe], [A, M]],
                    [/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
                    [y, [S, Qe], [A, R]],
                    [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
                    [y, [S, Be], [A, R]],
                    [
                        /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
                        /\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
                        /\blg-?([\d\w]+) bui/i,
                    ],
                    [y, [S, Be], [A, M]],
                    [
                        /(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,
                    ],
                    [y, [S, Ze], [A, R]],
                    [/(nokia) (t[12][01])/i],
                    [S, y, [A, R]],
                    [/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i, /nokia[-_ ]?(([-\w\. ]*))/i],
                    [
                        [y, /_/g, &#39; &#39;],
                        [A, M],
                        [S, &#39;Nokia&#39;],
                    ],
                    [/(pixel (c|tablet))\b/i],
                    [y, [S, Je], [A, R]],
                    [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],
                    [y, [S, Je], [A, M]],
                    [
                        /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,
                    ],
                    [y, [S, V], [A, M]],
                    [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i],
                    [
                        [y, &#39;Xperia Tablet&#39;],
                        [S, V],
                        [A, R],
                    ],
                    [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],
                    [y, [S, et], [A, M]],
                    [
                        /(alexa)webm/i,
                        /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
                        /(kf[a-z]+)( bui|\)).+silk\//i,
                    ],
                    [y, [S, Re], [A, R]],
                    [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],
                    [
                        [y, /(.+)/g, &#39;Fire Phone $1&#39;],
                        [S, Re],
                        [A, M],
                    ],
                    [/(playbook);[-\w\),; ]+(rim)/i],
                    [y, S, [A, R]],
                    [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
                    [y, [S, dt], [A, M]],
                    [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],
                    [y, [S, je], [A, R]],
                    [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
                    [y, [S, je], [A, M]],
                    [/(nexus 9)/i],
                    [y, [S, &#39;HTC&#39;], [A, R]],
                    [
                        /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
                        /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
                        /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i,
                    ],
                    [S, [y, /_/g, &#39; &#39;], [A, M]],
                    [
                        /tcl (xess p17aa)/i,
                        /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i,
                    ],
                    [y, [S, &#39;TCL&#39;], [A, R]],
                    [
                        /droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i,
                    ],
                    [y, [S, &#39;TCL&#39;], [A, M]],
                    [/(itel) ((\w+))/i],
                    [[S, it], y, [A, at, { tablet: [&#39;p10001l&#39;, &#39;w7001&#39;], &#39;*&#39;: &#39;mobile&#39; }]],
                    [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],
                    [y, [S, &#39;Acer&#39;], [A, R]],
                    [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i],
                    [y, [S, &#39;Meizu&#39;], [A, M]],
                    [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],
                    [y, [S, &#39;Ulefone&#39;], [A, M]],
                    [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i],
                    [y, [S, &#39;Energizer&#39;], [A, M]],
                    [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],
                    [y, [S, &#39;Cat&#39;], [A, M]],
                    [/((?:new )?andromax[\w- ]+)(?: bui|\))/i],
                    [y, [S, &#39;Smartfren&#39;], [A, M]],
                    [/droid.+; (a(?:015|06[35]|142p?))/i],
                    [y, [S, &#39;Nothing&#39;], [A, M]],
                    [/(imo) (tab \w+)/i, /(infinix) (x1101b?)/i],
                    [S, y, [A, R]],
                    [
                        /(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,
                    ],
                    [S, y, [A, M]],
                    [
                        /(kobo)\s(ereader|touch)/i,
                        /(archos) (gamepad2?)/i,
                        /(hp).+(touchpad(?!.+tablet)|tablet)/i,
                        /(kindle)\/([\w\.]+)/i,
                    ],
                    [S, y, [A, R]],
                    [/(surface duo)/i],
                    [y, [S, Ve], [A, R]],
                    [/droid [\d\.]+; (fp\du?)(?: b|\))/i],
                    [y, [S, &#39;Fairphone&#39;], [A, M]],
                    [/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],
                    [y, [S, $e], [A, R]],
                    [/(sprint) (\w+)/i],
                    [S, y, [A, M]],
                    [/(kin\.[onetw]{3})/i],
                    [
                        [y, /\./g, &#39; &#39;],
                        [S, Ve],
                        [A, M],
                    ],
                    [/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
                    [y, [S, W], [A, R]],
                    [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
                    [y, [S, W], [A, M]],
                    [/smart-tv.+(samsung)/i],
                    [S, [A, k]],
                    [/hbbtv.+maple;(\d+)/i],
                    [
                        [y, /^/, &#39;SmartTV&#39;],
                        [S, Ke],
                        [A, k],
                    ],
                    [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],
                    [
                        [S, Be],
                        [A, k],
                    ],
                    [/(apple) ?tv/i],
                    [S, [y, He + &#39; TV&#39;], [A, k]],
                    [/crkey.*devicetype\/chromecast/i],
                    [
                        [y, me + &#39; Third Generation&#39;],
                        [S, Je],
                        [A, k],
                    ],
                    [/crkey.*devicetype\/([^/]*)/i],
                    [
                        [y, /^/, &#39;Chromecast &#39;],
                        [S, Je],
                        [A, k],
                    ],
                    [/fuchsia.*crkey/i],
                    [
                        [y, me + &#39; Nest Hub&#39;],
                        [S, Je],
                        [A, k],
                    ],
                    [/crkey/i],
                    [
                        [y, me],
                        [S, Je],
                        [A, k],
                    ],
                    [/droid.+aft(\w+)( bui|\))/i],
                    [y, [S, Re], [A, k]],
                    [/(shield \w+ tv)/i],
                    [y, [S, $e], [A, k]],
                    [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
                    [y, [S, b], [A, k]],
                    [/(bravia[\w ]+)( bui|\))/i],
                    [y, [S, V], [A, k]],
                    [/(mi(tv|box)-?\w+) bui/i],
                    [y, [S, j], [A, k]],
                    [/Hbbtv.*(technisat) (.*);/i],
                    [S, y, [A, k]],
                    [
                        /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
                        /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i,
                    ],
                    [
                        [S, xt],
                        [y, xt],
                        [A, k],
                    ],
                    [/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],
                    [y, [A, k]],
                    [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
                    [[A, k]],
                    [/(ouya)/i, /(nintendo) (\w+)/i],
                    [S, y, [A, O]],
                    [/droid.+; (shield)( bui|\))/i],
                    [y, [S, $e], [A, O]],
                    [/(playstation \w+)/i],
                    [y, [S, V], [A, O]],
                    [/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
                    [y, [S, Ve], [A, O]],
                    [/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],
                    [y, [S, Ke], [A, B]],
                    [/((pebble))app/i, /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],
                    [S, y, [A, B]],
                    [/(ow(?:19|20)?we?[1-3]{1,3})/i],
                    [y, [S, qe], [A, B]],
                    [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],
                    [y, [S, He], [A, B]],
                    [/(opwwe\d{3})/i],
                    [y, [S, et], [A, B]],
                    [/(moto 360)/i],
                    [y, [S, Qe], [A, B]],
                    [/(smartwatch 3)/i],
                    [y, [S, V], [A, B]],
                    [/(g watch r)/i],
                    [y, [S, Be], [A, B]],
                    [/droid.+; (wt63?0{2,3})\)/i],
                    [y, [S, W], [A, B]],
                    [/droid.+; (glass) \d/i],
                    [y, [S, Je], [A, D]],
                    [/(pico) (4|neo3(?: link|pro)?)/i],
                    [S, y, [A, D]],
                    [/; (quest( \d| pro)?)/i],
                    [y, [S, H], [A, D]],
                    [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
                    [S, [A, G]],
                    [/(aeobc)\b/i],
                    [y, [S, Re], [A, G]],
                    [/(homepod).+mac os/i],
                    [y, [S, He], [A, G]],
                    [/windows iot/i],
                    [[A, G]],
                    [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],
                    [y, [A, at, { mobile: &#39;Mobile&#39;, xr: &#39;VR&#39;, &#39;*&#39;: R }]],
                    [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],
                    [[A, R]],
                    [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],
                    [[A, M]],
                    [/droid .+?; ([\w\. -]+)( bui|\))/i],
                    [y, [S, &#39;Generic&#39;]],
                ],
                engine: [
                    [/windows.+ edge\/([\w\.]+)/i],
                    [d, [v, Se + &#39;HTML&#39;]],
                    [/(arkweb)\/([\w\.]+)/i],
                    [v, d],
                    [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
                    [d, [v, &#39;Blink&#39;]],
                    [
                        /(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,
                    ],
                    [v, d],
                    [/ladybird\//i],
                    [[v, &#39;LibWeb&#39;]],
                    [/rv\:([\w\.]{1,9})\b.+(gecko)/i],
                    [d, v],
                ],
                os: [
                    [/microsoft (windows) (vista|xp)/i],
                    [v, d],
                    [/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],
                    [v, [d, at, Ct]],
                    [
                        /windows nt 6\.2; (arm)/i,
                        /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
                        /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i,
                    ],
                    [
                        [d, at, Ct],
                        [v, le],
                    ],
                    [
                        /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
                        /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
                        /cfnetwork\/.+darwin/i,
                    ],
                    [
                        [d, /_/g, &#39;.&#39;],
                        [v, &#39;iOS&#39;],
                    ],
                    [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
                    [
                        [v, &#39;macOS&#39;],
                        [d, /_/g, &#39;.&#39;],
                    ],
                    [/android ([\d\.]+).*crkey/i],
                    [d, [v, me + &#39; Android&#39;]],
                    [/fuchsia.*crkey\/([\d\.]+)/i],
                    [d, [v, me + &#39; Fuchsia&#39;]],
                    [/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],
                    [d, [v, me + &#39; SmartSpeaker&#39;]],
                    [/linux.*crkey\/([\d\.]+)/i],
                    [d, [v, me + &#39; Linux&#39;]],
                    [/crkey\/([\d\.]+)/i],
                    [d, [v, me]],
                    [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],
                    [d, v],
                    [/(ubuntu) ([\w\.]+) like android/i],
                    [[v, /(.+)/, &#39;$1 Touch&#39;], d],
                    [
                        /(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i,
                    ],
                    [v, d],
                    [/\(bb(10);/i],
                    [d, [v, dt]],
                    [/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],
                    [d, [v, &#39;Symbian&#39;]],
                    [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],
                    [d, [v, u + &#39; OS&#39;]],
                    [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],
                    [d, [v, &#39;webOS&#39;]],
                    [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],
                    [d, [v, &#39;watchOS&#39;]],
                    [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
                    [[v, &#39;Chrome OS&#39;], d],
                    [
                        /panasonic;(viera)/i,
                        /(netrange)mmh/i,
                        /(nettv)\/(\d+\.[\w\.]+)/i,
                        /(nintendo|playstation) (\w+)/i,
                        /(xbox); +xbox ([^\);]+)/i,
                        /(pico) .+os([\w\.]+)/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,
                    ],
                    [v, d],
                    [/(sunos) ?([\w\.\d]*)/i],
                    [[v, &#39;Solaris&#39;], d],
                    [
                        /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
                        /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
                        /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
                        /(unix) ?([\w\.]*)/i,
                    ],
                    [v, d],
                ],
            }, wt = (function () {
                var Z = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
                return (rt.call(Z.init, [
                    [s, [v, d, L, A]],
                    [x, [_]],
                    [m, [A, y, S]],
                    [p, [v, d]],
                    [I, [v, d]],
                ]),
                    rt.call(Z.isIgnore, [
                        [s, [d, L]],
                        [p, [d]],
                        [I, [d]],
                    ]),
                    rt.call(Z.isIgnoreRgx, [
                        [s, / ?browser$/i],
                        [I, / ?os$/i],
                    ]),
                    rt.call(Z.toString, [
                        [s, [v, d]],
                        [x, [_]],
                        [m, [S, y]],
                        [p, [v, d]],
                        [I, [v, d]],
                    ]),
                    Z);
            })(), Ut = function (Z, de) {
                var ue = wt.init[de], Te = wt.isIgnore[de] || 0, pe = wt.isIgnoreRgx[de] || 0, Me = wt.toString[de] || 0;
                function ge() {
                    rt.call(this, ue);
                }
                return ((ge.prototype.getItem = function () {
                    return Z;
                }),
                    (ge.prototype.withClientHints = function () {
                        return ve
                            ? ve.getHighEntropyValues(Oe).then(function (Le) {
                                return Z.setCH(new Mt(Le, false)).parseCH().get();
                            })
                            : Z.parseCH().get();
                    }),
                    (ge.prototype.withFeatureCheck = function () {
                        return Z.detectFeature().get();
                    }),
                    de != g &amp;&amp;
                        ((ge.prototype.is = function (Le) {
                            var Ee = false;
                            for (var Pe in this)
                                if (this.hasOwnProperty(Pe) &amp;&amp;
                                    !ut(Te, Pe) &amp;&amp;
                                    it(pe ? gt(pe, this[Pe]) : this[Pe]) == it(pe ? gt(pe, Le) : Le)) {
                                    if (((Ee = true), Le != n))
                                        break;
                                }
                                else if (Le == n &amp;&amp; Ee) {
                                    Ee = !Ee;
                                    break;
                                }
                            return Ee;
                        }),
                            (ge.prototype.toString = function () {
                                var Le = a;
                                for (var Ee in Me)
                                    typeof this[Me[Ee]] !== n &amp;&amp; (Le += (Le ? &#39; &#39; : a) + this[Me[Ee]]);
                                return Le || n;
                            })),
                    ve ||
                        (ge.prototype.then = function (Le) {
                            var Ee = this, Pe = function () {
                                for (var ct in Ee)
                                    Ee.hasOwnProperty(ct) &amp;&amp; (this[ct] = Ee[ct]);
                            };
                            Pe.prototype = { is: ge.prototype.is, toString: ge.prototype.toString };
                            var ot = new Pe();
                            return (Le(ot), ot);
                        }),
                    new ge());
            };
            function Mt(Z, de) {
                if (((Z = Z || {}), rt.call(this, Oe), de))
                    rt.call(this, [
                        [ne, It(Z[P])],
                        [Y, It(Z[X])],
                        [M, /\?1/.test(Z[Ae])],
                        [y, lt(Z[Ie])],
                        [ye, lt(Z[Fe])],
                        [be, lt(Z[ze])],
                        [_, lt(Z[re])],
                        [he, It(Z[se])],
                        [Ne, lt(Z[ae])],
                    ]);
                else
                    for (var ue in Z)
                        this.hasOwnProperty(ue) &amp;&amp; typeof Z[ue] !== n &amp;&amp; (this[ue] = Z[ue]);
            }
            function Ot(Z, de, ue, Te) {
                return ((this.get = function (pe) {
                    return pe ? (this.data.hasOwnProperty(pe) ? this.data[pe] : f) : this.data;
                }),
                    (this.set = function (pe, Me) {
                        return ((this.data[pe] = Me), this);
                    }),
                    (this.setCH = function (pe) {
                        return ((this.uaCH = pe), this);
                    }),
                    (this.detectFeature = function () {
                        if (Ge &amp;&amp; Ge.userAgent == this.ua)
                            switch (this.itemType) {
                                case s:
                                    Ge.brave &amp;&amp; typeof Ge.brave.isBrave == t &amp;&amp; this.set(v, &#39;Brave&#39;);
                                    break;
                                case m:
                                    (!this.get(A) &amp;&amp; ve &amp;&amp; ve[M] &amp;&amp; this.set(A, M),
                                        this.get(y) == &#39;Macintosh&#39; &amp;&amp;
                                            Ge &amp;&amp;
                                            typeof Ge.standalone !== n &amp;&amp;
                                            Ge.maxTouchPoints &amp;&amp;
                                            Ge.maxTouchPoints &gt; 2 &amp;&amp;
                                            this.set(y, &#39;iPad&#39;).set(A, R));
                                    break;
                                case I:
                                    !this.get(v) &amp;&amp; ve &amp;&amp; ve[ye] &amp;&amp; this.set(v, ve[ye]);
                                    break;
                                case g:
                                    var pe = this.data, Me = function (ge) {
                                        return pe[ge].getItem().detectFeature().get();
                                    };
                                    this.set(s, Me(s)).set(x, Me(x)).set(m, Me(m)).set(p, Me(p)).set(I, Me(I));
                            }
                        return this;
                    }),
                    (this.parseUA = function () {
                        return (this.itemType != g &amp;&amp; Tt.call(this.data, this.ua, this.rgxMap),
                            this.itemType == s &amp;&amp; this.set(L, _t(this.get(d))),
                            this);
                    }),
                    (this.parseCH = function () {
                        var pe = this.uaCH, Me = this.rgxMap;
                        switch (this.itemType) {
                            case s:
                            case p:
                                var ge = pe[Y] || pe[ne], Le;
                                if (ge)
                                    for (var Ee in ge) {
                                        var Pe = ge[Ee].brand || ge[Ee], ot = ge[Ee].version;
                                        (this.itemType == s &amp;&amp;
                                            !/not.a.brand/i.test(Pe) &amp;&amp;
                                            (!Le || (/chrom/i.test(Le) &amp;&amp; Pe != ee)) &amp;&amp;
                                            ((Pe = at(Pe, {
                                                Chrome: &#39;Google Chrome&#39;,
                                                Edge: &#39;Microsoft Edge&#39;,
                                                &#39;Chrome WebView&#39;: &#39;Android WebView&#39;,
                                                &#39;Chrome Headless&#39;: &#39;HeadlessChrome&#39;,
                                            })),
                                                this.set(v, Pe).set(d, ot).set(L, _t(ot)),
                                                (Le = Pe)),
                                            this.itemType == p &amp;&amp; Pe == ee &amp;&amp; this.set(d, ot));
                                    }
                                break;
                            case x:
                                var ct = pe[_];
                                ct &amp;&amp; (ct &amp;&amp; pe[Ne] == &#39;64&#39; &amp;&amp; (ct += &#39;64&#39;), Tt.call(this.data, ct + &#39;;&#39;, Me));
                                break;
                            case m:
                                if ((pe[M] &amp;&amp; this.set(A, M),
                                    pe[y] &amp;&amp; (this.set(y, pe[y]), !this.get(A) || !this.get(S)))) {
                                    var mt = {};
                                    (Tt.call(mt, &#39;droid 9; &#39; + pe[y] + &#39;)&#39;, Me),
                                        !this.get(A) &amp;&amp; mt.type &amp;&amp; this.set(A, mt.type),
                                        !this.get(S) &amp;&amp; mt.vendor &amp;&amp; this.set(S, mt.vendor));
                                }
                                if (pe[he]) {
                                    var yt;
                                    if (typeof pe[he] != &#39;string&#39;)
                                        for (var Dt = 0; !yt &amp;&amp; Dt &lt; pe[he].length;)
                                            yt = at(pe[he][Dt++], bt);
                                    else
                                        yt = at(pe[he], bt);
                                    this.set(A, yt);
                                }
                                break;
                            case I:
                                var Et = pe[ye];
                                if (Et) {
                                    var At = pe[be];
                                    (Et == le &amp;&amp; (At = parseInt(_t(At), 10) &gt;= 13 ? &#39;11&#39; : &#39;10&#39;),
                                        this.set(v, Et).set(d, At));
                                }
                                this.get(v) == le &amp;&amp; pe[y] == &#39;Xbox&#39; &amp;&amp; this.set(v, &#39;Xbox&#39;).set(d, f);
                                break;
                            case g:
                                var Rt = this.data, pt = function (kt) {
                                    return Rt[kt].getItem().setCH(pe).parseCH().get();
                                };
                                this.set(s, pt(s)).set(x, pt(x)).set(m, pt(m)).set(p, pt(p)).set(I, pt(I));
                        }
                        return this;
                    }),
                    rt.call(this, [
                        [&#39;itemType&#39;, Z],
                        [&#39;ua&#39;, de],
                        [&#39;uaCH&#39;, Te],
                        [&#39;rgxMap&#39;, ue],
                        [&#39;data&#39;, Ut(this, Z)],
                    ]),
                    this);
            }
            function st(Z, de, ue) {
                if ((typeof Z === e
                    ? (ht(Z, true) ? (typeof de === e &amp;&amp; (ue = de), (de = Z)) : ((ue = Z), (de = f)), (Z = f))
                    : typeof Z === o &amp;&amp; !ht(de, true) &amp;&amp; ((ue = de), (de = f)),
                    ue &amp;&amp; typeof ue.append === t)) {
                    var Te = {};
                    (ue.forEach(function (Ee, Pe) {
                        Te[Pe] = Ee;
                    }),
                        (ue = Te));
                }
                if (!(this instanceof st))
                    return new st(Z, de, ue).getResult();
                var pe = typeof Z === o ? Z : ue &amp;&amp; ue[r] ? ue[r] : Ge &amp;&amp; Ge.userAgent ? Ge.userAgent : a, Me = new Mt(ue, true), ge = de ? tt(vt, de) : vt, Le = function (Ee) {
                    return Ee == g
                        ? function () {
                            return new Ot(Ee, pe, ge, Me)
                                .set(&#39;ua&#39;, pe)
                                .set(s, this.getBrowser())
                                .set(x, this.getCPU())
                                .set(m, this.getDevice())
                                .set(p, this.getEngine())
                                .set(I, this.getOS())
                                .get();
                        }
                        : function () {
                            return new Ot(Ee, pe, ge[Ee], Me).parseUA().get();
                        };
                };
                return (rt
                    .call(this, [
                    [&#39;getBrowser&#39;, Le(s)],
                    [&#39;getCPU&#39;, Le(x)],
                    [&#39;getDevice&#39;, Le(m)],
                    [&#39;getEngine&#39;, Le(p)],
                    [&#39;getOS&#39;, Le(I)],
                    [&#39;getResult&#39;, Le(g)],
                    [
                        &#39;getUA&#39;,
                        function () {
                            return pe;
                        },
                    ],
                    [
                        &#39;setUA&#39;,
                        function (Ee) {
                            return (nt(Ee) &amp;&amp; (pe = Ee.length &gt; i ? xt(Ee, i) : Ee), this);
                        },
                    ],
                ])
                    .setUA(pe),
                    this);
            }
            ((st.VERSION = E),
                (st.BROWSER = ft([v, d, L, A])),
                (st.CPU = ft([_])),
                (st.DEVICE = ft([y, S, A, O, M, k, R, B, G])),
                (st.ENGINE = st.OS = ft([v, d])),
                (l.UAParser = st));
        })(_POSignalsEntities || (_POSignalsEntities = {})),
        ((_POSignalsEntities || (_POSignalsEntities = {})).evaluateModernizr = function () {
            (function (l, f, E, i) {
                function r(P, X) {
                    return typeof P === X;
                }
                function a() {
                    return typeof E.createElement != &#39;function&#39;
                        ? E.createElement(arguments[0])
                        : y
                            ? E.createElementNS.call(E, &#39;http://www.w3.org/2000/svg&#39;, arguments[0])
                            : E.createElement.apply(E, arguments);
                }
                function c(P, X) {
                    return !!~(&#39;&#39; + P).indexOf(X);
                }
                function t() {
                    var P = E.body;
                    return (P || ((P = a(y ? &#39;svg&#39; : &#39;body&#39;)), (P.fake = true)), P);
                }
                function n(P, X, re, ae) {
                    var se, Ae, Ie, Fe, ze = &#39;modernizr&#39;, Oe = a(&#39;div&#39;), Re = t();
                    if (parseInt(re, 10))
                        for (; re--;)
                            ((Ie = a(&#39;div&#39;)), (Ie.id = ze + (re + 1)), Oe.appendChild(Ie));
                    return ((se = a(&#39;style&#39;)),
                        (se.type = &#39;text/css&#39;),
                        (se.id = &#39;s&#39; + ze),
                        (Re.fake ? Re : Oe).appendChild(se),
                        Re.appendChild(Oe),
                        se.styleSheet ? (se.styleSheet.cssText = P) : se.appendChild(E.createTextNode(P)),
                        (Oe.id = ze),
                        Re.fake &amp;&amp;
                            ((Re.style.background = &#39;&#39;),
                                (Re.style.overflow = &#39;hidden&#39;),
                                (Fe = L.style.overflow),
                                (L.style.overflow = &#39;hidden&#39;),
                                L.appendChild(Re)),
                        (Ae = X(Oe, P)),
                        Re.fake &amp;&amp; Re.parentNode
                            ? (Re.parentNode.removeChild(Re), (L.style.overflow = Fe), L.offsetHeight)
                            : Oe.parentNode.removeChild(Oe),
                        !!Ae);
                }
                function e(P) {
                    return P.replace(/([A-Z])/g, function (X, re) {
                        return &#39;-&#39; + re.toLowerCase();
                    }).replace(/^ms-/, &#39;-ms-&#39;);
                }
                function o(P, X, re) {
                    var ae;
                    if (&#39;getComputedStyle&#39; in f) {
                        ae = getComputedStyle.call(f, P, X);
                        var se = f.console;
                        if (ae !== null)
                            (ae = ae.getPropertyValue(re));
                        else if (se) {
                            var Ae = se.error ? &#39;error&#39; : &#39;log&#39;;
                            se[Ae].call(se, &#39;getComputedStyle returning null, its possible modernizr test results are inaccurate&#39;);
                        }
                    }
                    else
                        ae = P.currentStyle &amp;&amp; P.currentStyle[re];
                    return ae;
                }
                function s(P, X) {
                    var re = P.length;
                    if (f &amp;&amp; f.CSS &amp;&amp; &#39;supports&#39; in f.CSS) {
                        for (; re--;)
                            if (f.CSS.supports(e(P[re]), X))
                                return true;
                        return false;
                    }
                    if (&#39;CSSSupportsRule&#39; in f) {
                        for (var ae = []; re--;)
                            ae.push(&#39;(&#39; + e(P[re]) + &#39;:&#39; + X + &#39;)&#39;);
                        return ((ae = ae.join(&#39; or &#39;)),
                            n(&#39;@supports (&#39; + ae + &#39;) { #modernizr { position: absolute; } }&#39;, function (se) {
                                return o(se, null, &#39;position&#39;) === &#39;absolute&#39;;
                            }));
                    }
                    return i;
                }
                function x(P) {
                    return P.replace(/([a-z])-([a-z])/g, function (X, re, ae) {
                        return re + ae.toUpperCase();
                    }).replace(/^-/, &#39;&#39;);
                }
                function m(P, X, re, ae) {
                    function se() {
                        Ie &amp;&amp; (delete B.style, delete B.modElem);
                    }
                    if (((ae = !r(ae, &#39;undefined&#39;) &amp;&amp; ae), !r(re, &#39;undefined&#39;))) {
                        var Ae = s(P, re);
                        if (!r(Ae, &#39;undefined&#39;))
                            return Ae;
                    }
                    for (var Ie, Fe, ze, Oe, Re, He = [&#39;modernizr&#39;, &#39;tspan&#39;, &#39;samp&#39;]; !B.style &amp;&amp; He.length;)
                        ((Ie = true), (B.modElem = a(He.shift())), (B.style = B.modElem.style));
                    for (ze = P.length, Fe = 0; Fe &lt; ze; Fe++)
                        if (((Oe = P[Fe]), (Re = B.style[Oe]), c(Oe, &#39;-&#39;) &amp;&amp; (Oe = x(Oe)), B.style[Oe] !== i)) {
                            if (ae || r(re, &#39;undefined&#39;))
                                return (se(), X !== &#39;pfx&#39; || Oe);
                            try {
                                B.style[Oe] = re;
                            }
                            catch { }
                            if (B.style[Oe] !== Re)
                                return (se(), X !== &#39;pfx&#39; || Oe);
                        }
                    return (se(), false);
                }
                function p(P, X) {
                    return function () {
                        return P.apply(X, arguments);
                    };
                }
                function I(P, X, re) {
                    var ae;
                    for (var se in P)
                        if (P[se] in X)
                            return re === false ? P[se] : ((ae = X[P[se]]), r(ae, &#39;function&#39;) ? p(ae, re || X) : ae);
                    return false;
                }
                function g(P, X, re, ae, se) {
                    var Ae = P.charAt(0).toUpperCase() + P.slice(1), Ie = (P + &#39; &#39; + R.join(Ae + &#39; &#39;) + Ae).split(&#39; &#39;);
                    return r(X, &#39;string&#39;) || r(X, &#39;undefined&#39;)
                        ? m(Ie, X, ae, se)
                        : ((Ie = (P + &#39; &#39; + D.join(Ae + &#39; &#39;) + Ae).split(&#39; &#39;)), I(Ie, X, re));
                }
                function v(P, X, re) {
                    return g(P, i, i, X, re);
                }
                var A = [], S = {
                    _version: &#39;3.13.0&#39;,
                    _config: { classPrefix: &#39;&#39;, enableClasses: true, enableJSClass: true, usePrefixes: true },
                    _q: [],
                    on: function (P, X) {
                        var re = this;
                        setTimeout(function () {
                            X(re[P]);
                        }, 0);
                    },
                    addTest: function (P, X, re) {
                        A.push({ name: P, fn: X, options: re });
                    },
                    addAsyncTest: function (P) {
                        A.push({ name: null, fn: P });
                    },
                }, d = function () { };
                ((d.prototype = S), (d = new d()));
                var _ = [], L = E.documentElement, y = L.nodeName.toLowerCase() === &#39;svg&#39;, O = (function () {
                    function P(re, ae) {
                        var se;
                        return (!!re &amp;&amp;
                            ((ae &amp;&amp; typeof ae != &#39;string&#39;) || (ae = a(ae || &#39;div&#39;)),
                                (re = &#39;on&#39; + re),
                                (se = re in ae),
                                !se &amp;&amp;
                                    X &amp;&amp;
                                    (ae.setAttribute || (ae = a(&#39;div&#39;)),
                                        ae.setAttribute(re, &#39;&#39;),
                                        (se = typeof ae[re] == &#39;function&#39;),
                                        ae[re] !== i &amp;&amp; (ae[re] = i),
                                        ae.removeAttribute(re)),
                                se));
                    }
                    var X = !(&#39;onblur&#39; in L);
                    return P;
                })();
                ((S.hasEvent = O),
                    d.addTest(&#39;ambientlight&#39;, O(&#39;devicelight&#39;, f)),
                    d.addTest(&#39;applicationcache&#39;, &#39;applicationCache&#39; in f),
                    (function () {
                        var P = a(&#39;audio&#39;);
                        d.addTest(&#39;audio&#39;, function () {
                            var X = false;
                            try {
                                ((X = !!P.canPlayType), X &amp;&amp; (X = new Boolean(X)));
                            }
                            catch { }
                            return X;
                        });
                        try {
                            P.canPlayType &amp;&amp;
                                (d.addTest(&#39;audio.ogg&#39;, P.canPlayType(&#39;audio/ogg; codecs=&quot;vorbis&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;audio.mp3&#39;, P.canPlayType(&#39;audio/mpeg; codecs=&quot;mp3&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;audio.opus&#39;, P.canPlayType(&#39;audio/ogg; codecs=&quot;opus&quot;&#39;) ||
                                        P.canPlayType(&#39;audio/webm; codecs=&quot;opus&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;audio.wav&#39;, P.canPlayType(&#39;audio/wav; codecs=&quot;1&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;audio.m4a&#39;, (P.canPlayType(&#39;audio/x-m4a;&#39;) || P.canPlayType(&#39;audio/aac;&#39;)).replace(/^no$/, &#39;&#39;)));
                        }
                        catch { }
                    })());
                var M = &#39;Moz O ms Webkit&#39;, R = S._config.usePrefixes ? M.split(&#39; &#39;) : [];
                S._cssomPrefixes = R;
                var k = { elem: a(&#39;modernizr&#39;) };
                d._q.push(function () {
                    delete k.elem;
                });
                var B = { style: k.elem.style };
                d._q.unshift(function () {
                    delete B.style;
                });
                var D = S._config.usePrefixes ? M.toLowerCase().split(&#39; &#39;) : [];
                ((S._domPrefixes = D), (S.testAllProps = g));
                var G = function (P) {
                    var X, re = Y.length, ae = f.CSSRule;
                    if (ae === void 0)
                        return i;
                    if (!P)
                        return false;
                    if (((P = P.replace(/^@/, &#39;&#39;)), (X = P.replace(/-/g, &#39;_&#39;).toUpperCase() + &#39;_RULE&#39;) in ae))
                        return &#39;@&#39; + P;
                    for (var se = 0; se &lt; re; se++) {
                        var Ae = Y[se];
                        if (Ae.toUpperCase() + &#39;_&#39; + X in ae)
                            return &#39;@-&#39; + Ae.toLowerCase() + &#39;-&#39; + P;
                    }
                    return false;
                };
                S.atRule = G;
                var N = (S.prefixed = function (P, X, re) {
                    return P.indexOf(&#39;@&#39;) === 0
                        ? G(P)
                        : (P.indexOf(&#39;-&#39;) !== -1 &amp;&amp; (P = x(P)), X ? g(P, X, re) : g(P, &#39;pfx&#39;));
                });
                (d.addTest(&#39;batteryapi&#39;, !!N(&#39;battery&#39;, navigator) || !!N(&#39;getBattery&#39;, navigator), {
                    aliases: [&#39;battery-api&#39;],
                }),
                    d.addTest(&#39;blobconstructor&#39;, function () {
                        try {
                            return !!new Blob();
                        }
                        catch {
                            return false;
                        }
                    }, { aliases: [&#39;blob-constructor&#39;] }),
                    d.addTest(&#39;contextmenu&#39;, &#39;contextMenu&#39; in L &amp;&amp; &#39;HTMLMenuItemElement&#39; in f),
                    d.addTest(&#39;cors&#39;, &#39;XMLHttpRequest&#39; in f &amp;&amp; &#39;withCredentials&#39; in new XMLHttpRequest()));
                var ne = N(&#39;crypto&#39;, f);
                (d.addTest(&#39;crypto&#39;, !!N(&#39;subtle&#39;, ne)),
                    d.addTest(&#39;customelements&#39;, &#39;customElements&#39; in f),
                    d.addTest(&#39;customprotocolhandler&#39;, function () {
                        if (!navigator.registerProtocolHandler)
                            return false;
                        try {
                            navigator.registerProtocolHandler(&#39;thisShouldFail&#39;);
                        }
                        catch (P) {
                            return P instanceof TypeError;
                        }
                        return false;
                    }),
                    d.addTest(&#39;customevent&#39;, &#39;CustomEvent&#39; in f &amp;&amp; typeof f.CustomEvent == &#39;function&#39;),
                    d.addTest(&#39;dart&#39;, !!N(&#39;startDart&#39;, navigator)),
                    d.addTest(&#39;dataview&#39;, typeof DataView != &#39;undefined&#39; &amp;&amp; &#39;getFloat64&#39; in DataView.prototype),
                    d.addTest(&#39;eventlistener&#39;, &#39;addEventListener&#39; in f),
                    d.addTest(&#39;forcetouch&#39;, function () {
                        return (!!O(N(&#39;mouseforcewillbegin&#39;, f, false), f) &amp;&amp;
                            MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN &amp;&amp;
                            MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN);
                    }),
                    d.addTest(&#39;fullscreen&#39;, !(!N(&#39;exitFullscreen&#39;, E, false) &amp;&amp; !N(&#39;cancelFullScreen&#39;, E, false))),
                    d.addTest(&#39;gamepads&#39;, !!N(&#39;getGamepads&#39;, navigator)),
                    d.addTest(&#39;geolocation&#39;, &#39;geolocation&#39; in navigator),
                    d.addTest(&#39;ie8compat&#39;, !f.addEventListener &amp;&amp; !!E.documentMode &amp;&amp; E.documentMode === 7),
                    d.addTest(&#39;intl&#39;, !!N(&#39;Intl&#39;, f)),
                    d.addTest(&#39;json&#39;, &#39;JSON&#39; in f &amp;&amp; &#39;parse&#39; in JSON &amp;&amp; &#39;stringify&#39; in JSON),
                    (S.testAllProps = v),
                    d.addTest(&#39;ligatures&#39;, v(&#39;fontFeatureSettings&#39;, &#39;&quot;liga&quot; 1&#39;)),
                    d.addTest(&#39;messagechannel&#39;, &#39;MessageChannel&#39; in f),
                    d.addTest(&#39;notification&#39;, function () {
                        if (!f.Notification || !f.Notification.requestPermission)
                            return false;
                        if (f.Notification.permission === &#39;granted&#39;)
                            return true;
                        try {
                            new f.Notification(&#39;&#39;);
                        }
                        catch (P) {
                            if (P.name === &#39;TypeError&#39;)
                                return false;
                        }
                        return true;
                    }),
                    d.addTest(&#39;pagevisibility&#39;, !!N(&#39;hidden&#39;, E, false)),
                    d.addTest(&#39;performance&#39;, !!N(&#39;performance&#39;, f)));
                var he = [&#39;&#39;].concat(D);
                ((S._domPrefixesAll = he),
                    d.addTest(&#39;pointerevents&#39;, function () {
                        for (var P = 0, X = he.length; P &lt; X; P++)
                            if (O(he[P] + &#39;pointerdown&#39;))
                                return true;
                        return false;
                    }),
                    d.addTest(&#39;pointerlock&#39;, !!N(&#39;exitPointerLock&#39;, E)),
                    d.addTest(&#39;queryselector&#39;, &#39;querySelector&#39; in E &amp;&amp; &#39;querySelectorAll&#39; in E),
                    d.addTest(&#39;quotamanagement&#39;, function () {
                        var P = N(&#39;temporaryStorage&#39;, navigator), X = N(&#39;persistentStorage&#39;, navigator);
                        return !(!P || !X);
                    }),
                    d.addTest(&#39;requestanimationframe&#39;, !!N(&#39;requestAnimationFrame&#39;, f), { aliases: [&#39;raf&#39;] }),
                    d.addTest(&#39;serviceworker&#39;, &#39;serviceWorker&#39; in navigator));
                var Y = S._config.usePrefixes ? &#39; -webkit- -moz- -o- -ms- &#39;.split(&#39; &#39;) : [&#39;&#39;, &#39;&#39;];
                S._prefixes = Y;
                var ye = (function () {
                    var P = f.matchMedia || f.msMatchMedia;
                    return P
                        ? function (X) {
                            var re = P(X);
                            return (re &amp;&amp; re.matches) || false;
                        }
                        : function (X) {
                            var re = false;
                            return (n(&#39;@media &#39; + X + &#39; { #modernizr { position: absolute; } }&#39;, function (ae) {
                                re = o(ae, null, &#39;position&#39;) === &#39;absolute&#39;;
                            }),
                                re);
                        };
                })();
                ((S.mq = ye),
                    d.addTest(&#39;touchevents&#39;, function () {
                        if (&#39;ontouchstart&#39; in f ||
                            f.TouchEvent ||
                            (f.DocumentTouch &amp;&amp; E instanceof DocumentTouch))
                            return true;
                        var P = [&#39;(&#39;, Y.join(&#39;touch-enabled),(&#39;), &#39;heartz&#39;, &#39;)&#39;].join(&#39;&#39;);
                        return ye(P);
                    }),
                    d.addTest(&#39;typedarrays&#39;, &#39;ArrayBuffer&#39; in f),
                    d.addTest(&#39;vibrate&#39;, !!N(&#39;vibrate&#39;, navigator)),
                    (function () {
                        var P = a(&#39;video&#39;);
                        d.addTest(&#39;video&#39;, function () {
                            var X = false;
                            try {
                                ((X = !!P.canPlayType), X &amp;&amp; (X = new Boolean(X)));
                            }
                            catch { }
                            return X;
                        });
                        try {
                            P.canPlayType &amp;&amp;
                                (d.addTest(&#39;video.ogg&#39;, P.canPlayType(&#39;video/ogg; codecs=&quot;theora&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.h264&#39;, P.canPlayType(&#39;video/mp4; codecs=&quot;avc1.42E01E&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.h265&#39;, P.canPlayType(&#39;video/mp4; codecs=&quot;hev1&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.webm&#39;, P.canPlayType(&#39;video/webm; codecs=&quot;vp8, vorbis&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.vp9&#39;, P.canPlayType(&#39;video/webm; codecs=&quot;vp9&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.hls&#39;, P.canPlayType(&#39;application/x-mpegURL; codecs=&quot;avc1.42E01E&quot;&#39;).replace(/^no$/, &#39;&#39;)),
                                    d.addTest(&#39;video.av1&#39;, P.canPlayType(&#39;video/mp4; codecs=&quot;av01&quot;&#39;).replace(/^no$/, &#39;&#39;)));
                        }
                        catch { }
                    })(),
                    d.addTest(&#39;webgl&#39;, function () {
                        return &#39;WebGLRenderingContext&#39; in f;
                    }));
                var be = false;
                try {
                    be = &#39;WebSocket&#39; in f &amp;&amp; f.WebSocket.CLOSING === 2;
                }
                catch { }
                (d.addTest(&#39;websockets&#39;, be),
                    d.addTest(&#39;xdomainrequest&#39;, &#39;XDomainRequest&#39; in f),
                    d.addTest(&#39;matchmedia&#39;, !!N(&#39;matchMedia&#39;, f)),
                    (function () {
                        var P, X, re, ae, se, Ae, Ie;
                        for (var Fe in A)
                            if (A.hasOwnProperty(Fe)) {
                                if (((P = []),
                                    (X = A[Fe]),
                                    X.name &amp;&amp;
                                        (P.push(X.name.toLowerCase()),
                                            X.options &amp;&amp; X.options.aliases &amp;&amp; X.options.aliases.length)))
                                    for (re = 0; re &lt; X.options.aliases.length; re++)
                                        P.push(X.options.aliases[re].toLowerCase());
                                for (ae = r(X.fn, &#39;function&#39;) ? X.fn() : X.fn, se = 0; se &lt; P.length; se++)
                                    ((Ae = P[se]),
                                        (Ie = Ae.split(&#39;.&#39;)),
                                        Ie.length === 1
                                            ? (d[Ie[0]] = ae)
                                            : ((d[Ie[0]] &amp;&amp; (!d[Ie[0]] || d[Ie[0]] instanceof Boolean)) ||
                                                (d[Ie[0]] = new Boolean(d[Ie[0]])),
                                                (d[Ie[0]][Ie[1]] = ae)),
                                        _.push((ae ? &#39;&#39; : &#39;no-&#39;) + Ie.join(&#39;-&#39;)));
                            }
                    })(),
                    delete S.addTest,
                    delete S.addAsyncTest);
                for (var Ne = 0; Ne &lt; d._q.length; Ne++)
                    d._q[Ne]();
                l.Modernizr = d;
            })(_POSignalsEntities || (_POSignalsEntities = {}), window, document);
        }),
        (function (l) {
            l.AiaSignals = (function (f) {
                var E = [
                    { name: &#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, value: false, error: null },
                    { name: &#39;FILE_INJECT_JS_FOUND&#39;, value: false, error: null },
                    { name: &#39;FILE_CONTENT_JS_FOUND&#39;, value: false, error: null },
                    { name: &#39;WINDOW_GLOBAL_KEY_FOUND&#39;, value: false, error: null },
                ], i = { webAuthn: 1e3, manus: 5e3, anchor: 5e3, skyvern: 5e3, detect: 1e4 };
                function r(x) {
                    for (var m = 0; m &lt; E.length; m++)
                        if (E[m].name === x)
                            return E[m];
                    return null;
                }
                function a(x, m) {
                    var p = r(x);
                    p &amp;&amp; ((p.value = m), (p.error = null));
                }
                function c(x, m, p) {
                    var I = r(x);
                    I &amp;&amp; ((I.value = m), (I.error = p));
                }
                function t() {
                    return new Promise(function (x) {
                        var m = setTimeout(function () {
                            x(E);
                        }, i.detect);
                        n()
                            .then(function (p) {
                            var I = r(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;);
                            if (I &amp;&amp; I.value) {
                                (clearTimeout(m), x(E));
                                return;
                            }
                            for (var g = [
                                e().then(function (d) {
                                    return { key: &#39;manus&#39;, result: d };
                                }),
                                o().then(function (d) {
                                    return { key: &#39;anchor&#39;, result: d };
                                }),
                                s().then(function (d) {
                                    return { key: &#39;skyvern&#39;, result: d };
                                }),
                            ], v = 0, A = function () {
                                (v++, v === g.length &amp;&amp; (clearTimeout(m), x(E)));
                            }, S = 0; S &lt; g.length; S++)
                                (function (d) {
                                    d.then(A).catch(function () {
                                        A();
                                    });
                                })(g[S]);
                        })
                            .catch(function () {
                            (clearTimeout(m), x(E));
                        });
                    });
                }
                function n() {
                    return new Promise(function (x) {
                        var m = i.webAuthn, p = setTimeout(function () {
                            (c(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, false, 1004), x(E));
                        }, m);
                        try {
                            window.PublicKeyCredential &amp;&amp;
                                typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable == &#39;function&#39;
                                ? PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
                                    .then(function (I) {
                                    (clearTimeout(p),
                                        I
                                            ? a(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, !0)
                                            : c(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, !1, 1001),
                                        x(E));
                                })
                                    .catch(function () {
                                    (clearTimeout(p),
                                        c(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, !1, 1002),
                                        x(E));
                                })
                                : (clearTimeout(p),
                                    c(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, !1, 1003),
                                    x(E));
                        }
                        catch {
                            (clearTimeout(p),
                                c(&#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;, false, 1002),
                                x(E));
                        }
                    });
                }
                function e() {
                    return new Promise(function (x) {
                        var m = i.manus, p;
                        function I() {
                            (clearTimeout(p), a(&#39;FILE_CONTENT_JS_FOUND&#39;, true), x(E));
                        }
                        function g() {
                            (c(&#39;FILE_CONTENT_JS_FOUND&#39;, false, 2001), x(E));
                        }
                        var v = document.createElement(&#39;script&#39;);
                        ((v.src = &#39;chrome-extension://mljmkmodkfigdopcpgboaalildgijkoc/content.ts.js&#39;),
                            (v.onload = I),
                            (v.onerror = function () {
                                (clearTimeout(p), c(&#39;FILE_CONTENT_JS_FOUND&#39;, false, 2002), x(E));
                            }),
                            document.getElementsByTagName(&#39;head&#39;)[0].appendChild(v),
                            (p = setTimeout(g, m)));
                    });
                }
                function o() {
                    return new Promise(function (x) {
                        var m = i.anchor, p;
                        function I() {
                            (clearTimeout(p), a(&#39;FILE_INJECT_JS_FOUND&#39;, true), x(E));
                        }
                        function g() {
                            (c(&#39;FILE_INJECT_JS_FOUND&#39;, false, 4001), x(E));
                        }
                        var v = document.createElement(&#39;script&#39;);
                        ((v.src = &#39;chrome-extension://bppehibnhionalpjigdjdilknbljaeai/inject.js&#39;),
                            (v.onload = I),
                            (v.onerror = function () {
                                (clearTimeout(p), c(&#39;FILE_INJECT_JS_FOUND&#39;, false, 4002), x(E));
                            }),
                            document.getElementsByTagName(&#39;head&#39;)[0].appendChild(v),
                            (p = setTimeout(g, m)));
                    });
                }
                function s() {
                    return new Promise(function (x) {
                        var m = i.skyvern, p = 1e3, I = 0;
                        function g() {
                            if (window.globalDomDepthMap ||
                                window.GlobalEnableAllTextualElements ||
                                window.globalObserverForDOMIncrement ||
                                window.globalListnerFlag ||
                                window.globalDomDepthMap ||
                                window.globalOneTimeIncrementElements ||
                                window.globalHoverStylesMap ||
                                window.globalParsedElementCounter) {
                                (a(&#39;WINDOW_GLOBAL_KEY_FOUND&#39;, true), x(E));
                                return;
                            }
                            for (var v in window)
                                if (typeof v == &#39;string&#39;) {
                                    var A = v.toLowerCase();
                                    if (A.indexOf(&#39;skyvern&#39;) !== -1 &amp;&amp; v !== &#39;isSkyvern&#39;) {
                                        (a(&#39;WINDOW_GLOBAL_KEY_FOUND&#39;, true), x(E));
                                        return;
                                    }
                                }
                            ((I += p),
                                I &gt;= m ? (c(&#39;WINDOW_GLOBAL_KEY_FOUND&#39;, false, 5002), x(E)) : setTimeout(g, p));
                        }
                        document.readyState === &#39;loading&#39;
                            ? document.addEventListener(&#39;DOMContentLoaded&#39;, g)
                            : g();
                    });
                }
                return ((f.detect = t),
                    (f.checkWebAuthnPlatformSupport = n),
                    (f.isManus = e),
                    (f.isAnchor = o),
                    (f.isSkyvern = s),
                    Object.defineProperty(f, &#39;__esModule&#39;, { value: true }),
                    f);
            })({});
        })(typeof _POSignalsEntities != &#39;undefined&#39; ? _POSignalsEntities : (_POSignalsEntities = {})),
        (function (l) {
            (_POSignalsEntities || (_POSignalsEntities = {})).pako = l();
        })(function () {
            return (function l(f, E, i) {
                function r(t, n) {
                    if (!E[t]) {
                        if (!f[t]) {
                            var e = typeof require == &#39;function&#39; &amp;&amp; require;
                            if (!n &amp;&amp; e)
                                return e(t, true);
                            if (a)
                                return a(t, true);
                            var o = new Error(&quot;Cannot find module &#39;&quot; + t + &quot;&#39;&quot;);
                            throw ((o.code = &#39;MODULE_NOT_FOUND&#39;), o);
                        }
                        var s = (E[t] = { exports: {} });
                        f[t][0].call(s.exports, function (x) {
                            var m = f[t][1][x];
                            return r(m || x);
                        }, s, s.exports, l, f, E, i);
                    }
                    return E[t].exports;
                }
                for (var a = typeof require == &#39;function&#39; &amp;&amp; require, c = 0; c &lt; i.length; c++)
                    r(i[c]);
                return r;
            })({
                1: [
                    function (l, f, E) {
                        function i(t, n) {
                            return Object.prototype.hasOwnProperty.call(t, n);
                        }
                        var r = typeof Uint8Array != &#39;undefined&#39; &amp;&amp;
                            typeof Uint16Array != &#39;undefined&#39; &amp;&amp;
                            typeof Int32Array != &#39;undefined&#39;;
                        ((E.assign = function (t) {
                            for (var n = Array.prototype.slice.call(arguments, 1); n.length;) {
                                var e = n.shift();
                                if (e) {
                                    if (typeof e != &#39;object&#39;)
                                        throw new TypeError(e + &#39;must be non-object&#39;);
                                    for (var o in e)
                                        i(e, o) &amp;&amp; (t[o] = e[o]);
                                }
                            }
                            return t;
                        }),
                            (E.shrinkBuf = function (t, n) {
                                return t.length === n ? t : t.subarray ? t.subarray(0, n) : ((t.length = n), t);
                            }));
                        var a = {
                            arraySet: function (t, n, e, o, s) {
                                if (n.subarray &amp;&amp; t.subarray)
                                    t.set(n.subarray(e, e + o), s);
                                else
                                    for (var x = 0; x &lt; o; x++)
                                        t[s + x] = n[e + x];
                            },
                            flattenChunks: function (t) {
                                var n, e, o, s, x, m;
                                for (o = 0, n = 0, e = t.length; n &lt; e; n++)
                                    o += t[n].length;
                                for (m = new Uint8Array(o), s = 0, n = 0, e = t.length; n &lt; e; n++)
                                    ((x = t[n]), m.set(x, s), (s += x.length));
                                return m;
                            },
                        }, c = {
                            arraySet: function (t, n, e, o, s) {
                                for (var x = 0; x &lt; o; x++)
                                    t[s + x] = n[e + x];
                            },
                            flattenChunks: function (t) {
                                return [].concat.apply([], t);
                            },
                        };
                        ((E.setTyped = function (t) {
                            t
                                ? ((E.Buf8 = Uint8Array),
                                    (E.Buf16 = Uint16Array),
                                    (E.Buf32 = Int32Array),
                                    E.assign(E, a))
                                : ((E.Buf8 = Array), (E.Buf16 = Array), (E.Buf32 = Array), E.assign(E, c));
                        }),
                            E.setTyped(r));
                    },
                    {},
                ],
                2: [
                    function (l, f, E) {
                        function i(e, o) {
                            if (o &lt; 65537 &amp;&amp; ((e.subarray &amp;&amp; c) || (!e.subarray &amp;&amp; a)))
                                return String.fromCharCode.apply(null, r.shrinkBuf(e, o));
                            for (var s = &#39;&#39;, x = 0; x &lt; o; x++)
                                s += String.fromCharCode(e[x]);
                            return s;
                        }
                        var r = l(&#39;./common&#39;), a = true, c = true;
                        try {
                            String.fromCharCode.apply(null, [0]);
                        }
                        catch {
                            a = false;
                        }
                        try {
                            String.fromCharCode.apply(null, new Uint8Array(1));
                        }
                        catch {
                            c = false;
                        }
                        for (var t = new r.Buf8(256), n = 0; n &lt; 256; n++)
                            t[n] = n &gt;= 252 ? 6 : n &gt;= 248 ? 5 : n &gt;= 240 ? 4 : n &gt;= 224 ? 3 : n &gt;= 192 ? 2 : 1;
                        ((t[254] = t[254] = 1),
                            (E.string2buf = function (e) {
                                var o, s, x, m, p, I = e.length, g = 0;
                                for (m = 0; m &lt; I; m++)
                                    ((64512 &amp; (s = e.charCodeAt(m))) == 55296 &amp;&amp;
                                        m + 1 &lt; I &amp;&amp;
                                        (64512 &amp; (x = e.charCodeAt(m + 1))) == 56320 &amp;&amp;
                                        ((s = 65536 + ((s - 55296) &lt;&lt; 10) + (x - 56320)), m++),
                                        (g += s &lt; 128 ? 1 : s &lt; 2048 ? 2 : s &lt; 65536 ? 3 : 4));
                                for (o = new r.Buf8(g), p = 0, m = 0; p &lt; g; m++)
                                    ((64512 &amp; (s = e.charCodeAt(m))) == 55296 &amp;&amp;
                                        m + 1 &lt; I &amp;&amp;
                                        (64512 &amp; (x = e.charCodeAt(m + 1))) == 56320 &amp;&amp;
                                        ((s = 65536 + ((s - 55296) &lt;&lt; 10) + (x - 56320)), m++),
                                        s &lt; 128
                                            ? (o[p++] = s)
                                            : s &lt; 2048
                                                ? ((o[p++] = 192 | (s &gt;&gt;&gt; 6)), (o[p++] = 128 | (63 &amp; s)))
                                                : s &lt; 65536
                                                    ? ((o[p++] = 224 | (s &gt;&gt;&gt; 12)),
                                                        (o[p++] = 128 | ((s &gt;&gt;&gt; 6) &amp; 63)),
                                                        (o[p++] = 128 | (63 &amp; s)))
                                                    : ((o[p++] = 240 | (s &gt;&gt;&gt; 18)),
                                                        (o[p++] = 128 | ((s &gt;&gt;&gt; 12) &amp; 63)),
                                                        (o[p++] = 128 | ((s &gt;&gt;&gt; 6) &amp; 63)),
                                                        (o[p++] = 128 | (63 &amp; s))));
                                return o;
                            }),
                            (E.buf2binstring = function (e) {
                                return i(e, e.length);
                            }),
                            (E.binstring2buf = function (e) {
                                for (var o = new r.Buf8(e.length), s = 0, x = o.length; s &lt; x; s++)
                                    o[s] = e.charCodeAt(s);
                                return o;
                            }),
                            (E.buf2string = function (e, o) {
                                var s, x, m, p, I = o || e.length, g = new Array(2 * I);
                                for (x = 0, s = 0; s &lt; I;)
                                    if ((m = e[s++]) &lt; 128)
                                        g[x++] = m;
                                    else if ((p = t[m]) &gt; 4)
                                        ((g[x++] = 65533), (s += p - 1));
                                    else {
                                        for (m &amp;= p === 2 ? 31 : p === 3 ? 15 : 7; p &gt; 1 &amp;&amp; s &lt; I;)
                                            ((m = (m &lt;&lt; 6) | (63 &amp; e[s++])), p--);
                                        p &gt; 1
                                            ? (g[x++] = 65533)
                                            : m &lt; 65536
                                                ? (g[x++] = m)
                                                : ((m -= 65536),
                                                    (g[x++] = 55296 | ((m &gt;&gt; 10) &amp; 1023)),
                                                    (g[x++] = 56320 | (1023 &amp; m)));
                                    }
                                return i(g, x);
                            }),
                            (E.utf8border = function (e, o) {
                                var s;
                                for ((o = o || e.length) &gt; e.length &amp;&amp; (o = e.length), s = o - 1; s &gt;= 0 &amp;&amp; (192 &amp; e[s]) == 128;)
                                    s--;
                                return s &lt; 0 || s === 0 ? o : s + t[e[s]] &gt; o ? s : o;
                            }));
                    },
                    { &#39;./common&#39;: 1 },
                ],
                3: [
                    function (l, f, E) {
                        f.exports = function (i, r, a, c) {
                            for (var t = (65535 &amp; i) | 0, n = ((i &gt;&gt;&gt; 16) &amp; 65535) | 0, e = 0; a !== 0;) {
                                a -= e = a &gt; 2e3 ? 2e3 : a;
                                do
                                    n = (n + (t = (t + r[c++]) | 0)) | 0;
                                while (--e);
                                ((t %= 65521), (n %= 65521));
                            }
                            return t | (n &lt;&lt; 16) | 0;
                        };
                    },
                    {},
                ],
                4: [
                    function (l, f, E) {
                        var i = (function () {
                            for (var r, a = [], c = 0; c &lt; 256; c++) {
                                r = c;
                                for (var t = 0; t &lt; 8; t++)
                                    r = 1 &amp; r ? 3988292384 ^ (r &gt;&gt;&gt; 1) : r &gt;&gt;&gt; 1;
                                a[c] = r;
                            }
                            return a;
                        })();
                        f.exports = function (r, a, c, t) {
                            var n = i, e = t + c;
                            r ^= -1;
                            for (var o = t; o &lt; e; o++)
                                r = (r &gt;&gt;&gt; 8) ^ n[255 &amp; (r ^ a[o])];
                            return -1 ^ r;
                        };
                    },
                    {},
                ],
                5: [
                    function (l, f, E) {
                        function i(u, F) {
                            return ((u.msg = B[F]), F);
                        }
                        function r(u) {
                            return (u &lt;&lt; 1) - (u &gt; 4 ? 9 : 0);
                        }
                        function a(u) {
                            for (var F = u.length; --F &gt;= 0;)
                                u[F] = 0;
                        }
                        function c(u) {
                            var F = u.state, H = F.pending;
                            (H &gt; u.avail_out &amp;&amp; (H = u.avail_out),
                                H !== 0 &amp;&amp;
                                    (O.arraySet(u.output, F.pending_buf, F.pending_out, H, u.next_out),
                                        (u.next_out += H),
                                        (F.pending_out += H),
                                        (u.total_out += H),
                                        (u.avail_out -= H),
                                        (F.pending -= H),
                                        F.pending === 0 &amp;&amp; (F.pending_out = 0)));
                        }
                        function t(u, F) {
                            (M._tr_flush_block(u, u.block_start &gt;= 0 ? u.block_start : -1, u.strstart - u.block_start, F),
                                (u.block_start = u.strstart),
                                c(u.strm));
                        }
                        function n(u, F) {
                            u.pending_buf[u.pending++] = F;
                        }
                        function e(u, F) {
                            ((u.pending_buf[u.pending++] = (F &gt;&gt;&gt; 8) &amp; 255),
                                (u.pending_buf[u.pending++] = 255 &amp; F));
                        }
                        function o(u, F, H, T) {
                            var te = u.avail_in;
                            return (te &gt; T &amp;&amp; (te = T),
                                te === 0
                                    ? 0
                                    : ((u.avail_in -= te),
                                        O.arraySet(F, u.input, u.next_in, te, H),
                                        u.state.wrap === 1
                                            ? (u.adler = R(u.adler, F, te, H))
                                            : u.state.wrap === 2 &amp;&amp; (u.adler = k(u.adler, F, te, H)),
                                        (u.next_in += te),
                                        (u.total_in += te),
                                        te));
                        }
                        function s(u, F) {
                            var H, T, te = u.max_chain_length, ce = u.strstart, le = u.prev_length, fe = u.nice_match, Ge = u.strstart &gt; u.w_size - Ve ? u.strstart - (u.w_size - Ve) : 0, ve = u.window, tt = u.w_mask, ft = u.prev, ut = u.strstart + Be, ht = ve[ce + le - 1], nt = ve[ce + le];
                            (u.prev_length &gt;= u.good_match &amp;&amp; (te &gt;&gt;= 2),
                                fe &gt; u.lookahead &amp;&amp; (fe = u.lookahead));
                            do
                                if (((H = F),
                                    ve[H + le] === nt &amp;&amp;
                                        ve[H + le - 1] === ht &amp;&amp;
                                        ve[H] === ve[ce] &amp;&amp;
                                        ve[++H] === ve[ce + 1])) {
                                    ((ce += 2), H++);
                                    do
                                        ;
                                    while (ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ve[++ce] === ve[++H] &amp;&amp;
                                        ce &lt; ut);
                                    if (((T = Be - (ut - ce)), (ce = ut - Be), T &gt; le)) {
                                        if (((u.match_start = F), (le = T), T &gt;= fe))
                                            break;
                                        ((ht = ve[ce + le - 1]), (nt = ve[ce + le]));
                                    }
                                }
                            while ((F = ft[F &amp; tt]) &gt; Ge &amp;&amp; --te != 0);
                            return le &lt;= u.lookahead ? le : u.lookahead;
                        }
                        function x(u) {
                            var F, H, T, te, ce, le = u.w_size;
                            do {
                                if (((te = u.window_size - u.lookahead - u.strstart), u.strstart &gt;= le + (le - Ve))) {
                                    (O.arraySet(u.window, u.window, le, le, 0),
                                        (u.match_start -= le),
                                        (u.strstart -= le),
                                        (u.block_start -= le),
                                        (F = H = u.hash_size));
                                    do
                                        ((T = u.head[--F]), (u.head[F] = T &gt;= le ? T - le : 0));
                                    while (--H);
                                    F = H = le;
                                    do
                                        ((T = u.prev[--F]), (u.prev[F] = T &gt;= le ? T - le : 0));
                                    while (--H);
                                    te += le;
                                }
                                if (u.strm.avail_in === 0)
                                    break;
                                if (((H = o(u.strm, u.window, u.strstart + u.lookahead, te)),
                                    (u.lookahead += H),
                                    u.lookahead + u.insert &gt;= _e))
                                    for (ce = u.strstart - u.insert,
                                        u.ins_h = u.window[ce],
                                        u.ins_h = ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[ce + 1]) &amp; u.hash_mask; u.insert &amp;&amp;
                                        ((u.ins_h =
                                            ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[ce + _e - 1]) &amp; u.hash_mask),
                                            (u.prev[ce &amp; u.w_mask] = u.head[u.ins_h]),
                                            (u.head[u.ins_h] = ce),
                                            ce++,
                                            u.insert--,
                                            !(u.lookahead + u.insert &lt; _e));)
                                        ;
                            } while (u.lookahead &lt; Ve &amp;&amp; u.strm.avail_in !== 0);
                        }
                        function m(u, F) {
                            for (var H, T;;) {
                                if (u.lookahead &lt; Ve) {
                                    if ((x(u), u.lookahead &lt; Ve &amp;&amp; F === D))
                                        return W;
                                    if (u.lookahead === 0)
                                        break;
                                }
                                if (((H = 0),
                                    u.lookahead &gt;= _e &amp;&amp;
                                        ((u.ins_h =
                                            ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[u.strstart + _e - 1]) &amp; u.hash_mask),
                                            (H = u.prev[u.strstart &amp; u.w_mask] = u.head[u.ins_h]),
                                            (u.head[u.ins_h] = u.strstart)),
                                    H !== 0 &amp;&amp; u.strstart - H &lt;= u.w_size - Ve &amp;&amp; (u.match_length = s(u, H)),
                                    u.match_length &gt;= _e))
                                    if (((T = M._tr_tally(u, u.strstart - u.match_start, u.match_length - _e)),
                                        (u.lookahead -= u.match_length),
                                        u.match_length &lt;= u.max_lazy_match &amp;&amp; u.lookahead &gt;= _e)) {
                                        u.match_length--;
                                        do
                                            (u.strstart++,
                                                (u.ins_h =
                                                    ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[u.strstart + _e - 1]) &amp;
                                                        u.hash_mask),
                                                (H = u.prev[u.strstart &amp; u.w_mask] = u.head[u.ins_h]),
                                                (u.head[u.ins_h] = u.strstart));
                                        while (--u.match_length != 0);
                                        u.strstart++;
                                    }
                                    else
                                        ((u.strstart += u.match_length),
                                            (u.match_length = 0),
                                            (u.ins_h = u.window[u.strstart]),
                                            (u.ins_h =
                                                ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[u.strstart + 1]) &amp; u.hash_mask));
                                else
                                    ((T = M._tr_tally(u, 0, u.window[u.strstart])), u.lookahead--, u.strstart++);
                                if (T &amp;&amp; (t(u, false), u.strm.avail_out === 0))
                                    return W;
                            }
                            return ((u.insert = u.strstart &lt; _e - 1 ? u.strstart : _e - 1),
                                F === ne
                                    ? (t(u, true), u.strm.avail_out === 0 ? ee : me)
                                    : u.last_lit &amp;&amp; (t(u, false), u.strm.avail_out === 0)
                                        ? W
                                        : $);
                        }
                        function p(u, F) {
                            for (var H, T, te;;) {
                                if (u.lookahead &lt; Ve) {
                                    if ((x(u), u.lookahead &lt; Ve &amp;&amp; F === D))
                                        return W;
                                    if (u.lookahead === 0)
                                        break;
                                }
                                if (((H = 0),
                                    u.lookahead &gt;= _e &amp;&amp;
                                        ((u.ins_h =
                                            ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[u.strstart + _e - 1]) &amp; u.hash_mask),
                                            (H = u.prev[u.strstart &amp; u.w_mask] = u.head[u.ins_h]),
                                            (u.head[u.ins_h] = u.strstart)),
                                    (u.prev_length = u.match_length),
                                    (u.prev_match = u.match_start),
                                    (u.match_length = _e - 1),
                                    H !== 0 &amp;&amp;
                                        u.prev_length &lt; u.max_lazy_match &amp;&amp;
                                        u.strstart - H &lt;= u.w_size - Ve &amp;&amp;
                                        ((u.match_length = s(u, H)),
                                            u.match_length &lt;= 5 &amp;&amp;
                                                (u.strategy === re ||
                                                    (u.match_length === _e &amp;&amp; u.strstart - u.match_start &gt; 4096)) &amp;&amp;
                                                (u.match_length = _e - 1)),
                                    u.prev_length &gt;= _e &amp;&amp; u.match_length &lt;= u.prev_length)) {
                                    ((te = u.strstart + u.lookahead - _e),
                                        (T = M._tr_tally(u, u.strstart - 1 - u.prev_match, u.prev_length - _e)),
                                        (u.lookahead -= u.prev_length - 1),
                                        (u.prev_length -= 2));
                                    do
                                        ++u.strstart &lt;= te &amp;&amp;
                                            ((u.ins_h =
                                                ((u.ins_h &lt;&lt; u.hash_shift) ^ u.window[u.strstart + _e - 1]) &amp;
                                                    u.hash_mask),
                                                (H = u.prev[u.strstart &amp; u.w_mask] = u.head[u.ins_h]),
                                                (u.head[u.ins_h] = u.strstart));
                                    while (--u.prev_length != 0);
                                    if (((u.match_available = 0),
                                        (u.match_length = _e - 1),
                                        u.strstart++,
                                        T &amp;&amp; (t(u, false), u.strm.avail_out === 0)))
                                        return W;
                                }
                                else if (u.match_available) {
                                    if (((T = M._tr_tally(u, 0, u.window[u.strstart - 1])) &amp;&amp; t(u, false),
                                        u.strstart++,
                                        u.lookahead--,
                                        u.strm.avail_out === 0))
                                        return W;
                                }
                                else
                                    ((u.match_available = 1), u.strstart++, u.lookahead--);
                            }
                            return (u.match_available &amp;&amp;
                                ((T = M._tr_tally(u, 0, u.window[u.strstart - 1])), (u.match_available = 0)),
                                (u.insert = u.strstart &lt; _e - 1 ? u.strstart : _e - 1),
                                F === ne
                                    ? (t(u, true), u.strm.avail_out === 0 ? ee : me)
                                    : u.last_lit &amp;&amp; (t(u, false), u.strm.avail_out === 0)
                                        ? W
                                        : $);
                        }
                        function I(u, F) {
                            for (var H, T, te, ce, le = u.window;;) {
                                if (u.lookahead &lt;= Be) {
                                    if ((x(u), u.lookahead &lt;= Be &amp;&amp; F === D))
                                        return W;
                                    if (u.lookahead === 0)
                                        break;
                                }
                                if (((u.match_length = 0),
                                    u.lookahead &gt;= _e &amp;&amp;
                                        u.strstart &gt; 0 &amp;&amp;
                                        ((te = u.strstart - 1),
                                            (T = le[te]) === le[++te] &amp;&amp; T === le[++te] &amp;&amp; T === le[++te]))) {
                                    ce = u.strstart + Be;
                                    do
                                        ;
                                    while (T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        T === le[++te] &amp;&amp;
                                        te &lt; ce);
                                    ((u.match_length = Be - (ce - te)),
                                        u.match_length &gt; u.lookahead &amp;&amp; (u.match_length = u.lookahead));
                                }
                                if ((u.match_length &gt;= _e
                                    ? ((H = M._tr_tally(u, 1, u.match_length - _e)),
                                        (u.lookahead -= u.match_length),
                                        (u.strstart += u.match_length),
                                        (u.match_length = 0))
                                    : ((H = M._tr_tally(u, 0, u.window[u.strstart])),
                                        u.lookahead--,
                                        u.strstart++),
                                    H &amp;&amp; (t(u, false), u.strm.avail_out === 0)))
                                    return W;
                            }
                            return ((u.insert = 0),
                                F === ne
                                    ? (t(u, true), u.strm.avail_out === 0 ? ee : me)
                                    : u.last_lit &amp;&amp; (t(u, false), u.strm.avail_out === 0)
                                        ? W
                                        : $);
                        }
                        function g(u, F) {
                            for (var H;;) {
                                if (u.lookahead === 0 &amp;&amp; (x(u), u.lookahead === 0)) {
                                    if (F === D)
                                        return W;
                                    break;
                                }
                                if (((u.match_length = 0),
                                    (H = M._tr_tally(u, 0, u.window[u.strstart])),
                                    u.lookahead--,
                                    u.strstart++,
                                    H &amp;&amp; (t(u, false), u.strm.avail_out === 0)))
                                    return W;
                            }
                            return ((u.insert = 0),
                                F === ne
                                    ? (t(u, true), u.strm.avail_out === 0 ? ee : me)
                                    : u.last_lit &amp;&amp; (t(u, false), u.strm.avail_out === 0)
                                        ? W
                                        : $);
                        }
                        function v(u, F, H, T, te) {
                            ((this.good_length = u),
                                (this.max_lazy = F),
                                (this.nice_length = H),
                                (this.max_chain = T),
                                (this.func = te));
                        }
                        function A(u) {
                            ((u.window_size = 2 * u.w_size),
                                a(u.head),
                                (u.max_lazy_match = y[u.level].max_lazy),
                                (u.good_match = y[u.level].good_length),
                                (u.nice_match = y[u.level].nice_length),
                                (u.max_chain_length = y[u.level].max_chain),
                                (u.strstart = 0),
                                (u.block_start = 0),
                                (u.lookahead = 0),
                                (u.insert = 0),
                                (u.match_length = u.prev_length = _e - 1),
                                (u.match_available = 0),
                                (u.ins_h = 0));
                        }
                        function S() {
                            ((this.strm = null),
                                (this.status = 0),
                                (this.pending_buf = null),
                                (this.pending_buf_size = 0),
                                (this.pending_out = 0),
                                (this.pending = 0),
                                (this.wrap = 0),
                                (this.gzhead = null),
                                (this.gzindex = 0),
                                (this.method = ze),
                                (this.last_flush = -1),
                                (this.w_size = 0),
                                (this.w_bits = 0),
                                (this.w_mask = 0),
                                (this.window = null),
                                (this.window_size = 0),
                                (this.prev = null),
                                (this.head = null),
                                (this.ins_h = 0),
                                (this.hash_size = 0),
                                (this.hash_bits = 0),
                                (this.hash_mask = 0),
                                (this.hash_shift = 0),
                                (this.block_start = 0),
                                (this.match_length = 0),
                                (this.prev_match = 0),
                                (this.match_available = 0),
                                (this.strstart = 0),
                                (this.match_start = 0),
                                (this.lookahead = 0),
                                (this.prev_length = 0),
                                (this.max_chain_length = 0),
                                (this.max_lazy_match = 0),
                                (this.level = 0),
                                (this.strategy = 0),
                                (this.good_match = 0),
                                (this.nice_match = 0),
                                (this.dyn_ltree = new O.Buf16(2 * We)),
                                (this.dyn_dtree = new O.Buf16(2 * (2 * dt + 1))),
                                (this.bl_tree = new O.Buf16(2 * (2 * Je + 1))),
                                a(this.dyn_ltree),
                                a(this.dyn_dtree),
                                a(this.bl_tree),
                                (this.l_desc = null),
                                (this.d_desc = null),
                                (this.bl_desc = null),
                                (this.bl_count = new O.Buf16(Ze + 1)),
                                (this.heap = new O.Buf16(2 * je + 1)),
                                a(this.heap),
                                (this.heap_len = 0),
                                (this.heap_max = 0),
                                (this.depth = new O.Buf16(2 * je + 1)),
                                a(this.depth),
                                (this.l_buf = 0),
                                (this.lit_bufsize = 0),
                                (this.last_lit = 0),
                                (this.d_buf = 0),
                                (this.opt_len = 0),
                                (this.static_len = 0),
                                (this.matches = 0),
                                (this.insert = 0),
                                (this.bi_buf = 0),
                                (this.bi_valid = 0));
                        }
                        function d(u) {
                            var F;
                            return u &amp;&amp; u.state
                                ? ((u.total_in = u.total_out = 0),
                                    (u.data_type = Fe),
                                    (F = u.state),
                                    (F.pending = 0),
                                    (F.pending_out = 0),
                                    F.wrap &lt; 0 &amp;&amp; (F.wrap = -F.wrap),
                                    (F.status = F.wrap ? $e : V),
                                    (u.adler = F.wrap === 2 ? 0 : 1),
                                    (F.last_flush = D),
                                    M._tr_init(F),
                                    Y)
                                : i(u, be);
                        }
                        function _(u) {
                            var F = d(u);
                            return (F === Y &amp;&amp; A(u.state), F);
                        }
                        function L(u, F, H, T, te, ce) {
                            if (!u)
                                return be;
                            var le = 1;
                            if ((F === X &amp;&amp; (F = 6),
                                T &lt; 0 ? ((le = 0), (T = -T)) : T &gt; 15 &amp;&amp; ((le = 2), (T -= 16)),
                                te &lt; 1 ||
                                    te &gt; Oe ||
                                    H !== ze ||
                                    T &lt; 8 ||
                                    T &gt; 15 ||
                                    F &lt; 0 ||
                                    F &gt; 9 ||
                                    ce &lt; 0 ||
                                    ce &gt; Ae))
                                return i(u, be);
                            T === 8 &amp;&amp; (T = 9);
                            var fe = new S();
                            return ((u.state = fe),
                                (fe.strm = u),
                                (fe.wrap = le),
                                (fe.gzhead = null),
                                (fe.w_bits = T),
                                (fe.w_size = 1 &lt;&lt; fe.w_bits),
                                (fe.w_mask = fe.w_size - 1),
                                (fe.hash_bits = te + 7),
                                (fe.hash_size = 1 &lt;&lt; fe.hash_bits),
                                (fe.hash_mask = fe.hash_size - 1),
                                (fe.hash_shift = ~~((fe.hash_bits + _e - 1) / _e)),
                                (fe.window = new O.Buf8(2 * fe.w_size)),
                                (fe.head = new O.Buf16(fe.hash_size)),
                                (fe.prev = new O.Buf16(fe.w_size)),
                                (fe.lit_bufsize = 1 &lt;&lt; (te + 6)),
                                (fe.pending_buf_size = 4 * fe.lit_bufsize),
                                (fe.pending_buf = new O.Buf8(fe.pending_buf_size)),
                                (fe.d_buf = 1 * fe.lit_bufsize),
                                (fe.l_buf = 3 * fe.lit_bufsize),
                                (fe.level = F),
                                (fe.strategy = ce),
                                (fe.method = H),
                                _(u));
                        }
                        var y, O = l(&#39;../utils/common&#39;), M = l(&#39;./trees&#39;), R = l(&#39;./adler32&#39;), k = l(&#39;./crc32&#39;), B = l(&#39;./messages&#39;), D = 0, G = 1, N = 3, ne = 4, he = 5, Y = 0, ye = 1, be = -2, Ne = -3, P = -5, X = -1, re = 1, ae = 2, se = 3, Ae = 4, Ie = 0, Fe = 2, ze = 8, Oe = 9, Re = 15, He = 8, je = 286, dt = 30, Je = 19, We = 2 * je + 1, Ze = 15, _e = 3, Be = 258, Ve = Be + _e + 1, Qe = 32, $e = 42, et = 69, qe = 73, Ke = 91, b = 103, V = 113, j = 666, W = 1, $ = 2, ee = 3, me = 4, Se = 3;
                        ((y = [
                            new v(0, 0, 0, 0, function (u, F) {
                                var H = 65535;
                                for (H &gt; u.pending_buf_size - 5 &amp;&amp; (H = u.pending_buf_size - 5);;) {
                                    if (u.lookahead &lt;= 1) {
                                        if ((x(u), u.lookahead === 0 &amp;&amp; F === D))
                                            return W;
                                        if (u.lookahead === 0)
                                            break;
                                    }
                                    ((u.strstart += u.lookahead), (u.lookahead = 0));
                                    var T = u.block_start + H;
                                    if (((u.strstart === 0 || u.strstart &gt;= T) &amp;&amp;
                                        ((u.lookahead = u.strstart - T),
                                            (u.strstart = T),
                                            t(u, false),
                                            u.strm.avail_out === 0)) ||
                                        (u.strstart - u.block_start &gt;= u.w_size - Ve &amp;&amp;
                                            (t(u, false), u.strm.avail_out === 0)))
                                        return W;
                                }
                                return ((u.insert = 0),
                                    F === ne
                                        ? (t(u, true), u.strm.avail_out === 0 ? ee : me)
                                        : (u.strstart &gt; u.block_start &amp;&amp; (t(u, false), u.strm.avail_out), W));
                            }),
                            new v(4, 4, 8, 4, m),
                            new v(4, 5, 16, 8, m),
                            new v(4, 6, 32, 32, m),
                            new v(4, 4, 16, 16, p),
                            new v(8, 16, 32, 32, p),
                            new v(8, 16, 128, 128, p),
                            new v(8, 32, 128, 256, p),
                            new v(32, 128, 258, 1024, p),
                            new v(32, 258, 258, 4096, p),
                        ]),
                            (E.deflateInit = function (u, F) {
                                return L(u, F, ze, Re, He, Ie);
                            }),
                            (E.deflateInit2 = L),
                            (E.deflateReset = _),
                            (E.deflateResetKeep = d),
                            (E.deflateSetHeader = function (u, F) {
                                return u &amp;&amp; u.state ? (u.state.wrap !== 2 ? be : ((u.state.gzhead = F), Y)) : be;
                            }),
                            (E.deflate = function (u, F) {
                                var H, T, te, ce;
                                if (!u || !u.state || F &gt; he || F &lt; 0)
                                    return u ? i(u, be) : be;
                                if (((T = u.state),
                                    !u.output || (!u.input &amp;&amp; u.avail_in !== 0) || (T.status === j &amp;&amp; F !== ne)))
                                    return i(u, u.avail_out === 0 ? P : be);
                                if (((T.strm = u), (H = T.last_flush), (T.last_flush = F), T.status === $e))
                                    if (T.wrap === 2)
                                        ((u.adler = 0),
                                            n(T, 31),
                                            n(T, 139),
                                            n(T, 8),
                                            T.gzhead
                                                ? (n(T, (T.gzhead.text ? 1 : 0) +
                                                    (T.gzhead.hcrc ? 2 : 0) +
                                                    (T.gzhead.extra ? 4 : 0) +
                                                    (T.gzhead.name ? 8 : 0) +
                                                    (T.gzhead.comment ? 16 : 0)),
                                                    n(T, 255 &amp; T.gzhead.time),
                                                    n(T, (T.gzhead.time &gt;&gt; 8) &amp; 255),
                                                    n(T, (T.gzhead.time &gt;&gt; 16) &amp; 255),
                                                    n(T, (T.gzhead.time &gt;&gt; 24) &amp; 255),
                                                    n(T, T.level === 9 ? 2 : T.strategy &gt;= ae || T.level &lt; 2 ? 4 : 0),
                                                    n(T, 255 &amp; T.gzhead.os),
                                                    T.gzhead.extra &amp;&amp;
                                                        T.gzhead.extra.length &amp;&amp;
                                                        (n(T, 255 &amp; T.gzhead.extra.length),
                                                            n(T, (T.gzhead.extra.length &gt;&gt; 8) &amp; 255)),
                                                    T.gzhead.hcrc &amp;&amp; (u.adler = k(u.adler, T.pending_buf, T.pending, 0)),
                                                    (T.gzindex = 0),
                                                    (T.status = et))
                                                : (n(T, 0),
                                                    n(T, 0),
                                                    n(T, 0),
                                                    n(T, 0),
                                                    n(T, 0),
                                                    n(T, T.level === 9 ? 2 : T.strategy &gt;= ae || T.level &lt; 2 ? 4 : 0),
                                                    n(T, Se),
                                                    (T.status = V)));
                                    else {
                                        var le = (ze + ((T.w_bits - 8) &lt;&lt; 4)) &lt;&lt; 8;
                                        ((le |=
                                            (T.strategy &gt;= ae || T.level &lt; 2
                                                ? 0
                                                : T.level &lt; 6
                                                    ? 1
                                                    : T.level === 6
                                                        ? 2
                                                        : 3) &lt;&lt; 6),
                                            T.strstart !== 0 &amp;&amp; (le |= Qe),
                                            (le += 31 - (le % 31)),
                                            (T.status = V),
                                            e(T, le),
                                            T.strstart !== 0 &amp;&amp; (e(T, u.adler &gt;&gt;&gt; 16), e(T, 65535 &amp; u.adler)),
                                            (u.adler = 1));
                                    }
                                if (T.status === et)
                                    if (T.gzhead.extra) {
                                        for (te = T.pending; T.gzindex &lt; (65535 &amp; T.gzhead.extra.length) &amp;&amp;
                                            (T.pending !== T.pending_buf_size ||
                                                (T.gzhead.hcrc &amp;&amp;
                                                    T.pending &gt; te &amp;&amp;
                                                    (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                                    c(u),
                                                    (te = T.pending),
                                                    T.pending !== T.pending_buf_size));)
                                            (n(T, 255 &amp; T.gzhead.extra[T.gzindex]), T.gzindex++);
                                        (T.gzhead.hcrc &amp;&amp;
                                            T.pending &gt; te &amp;&amp;
                                            (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                            T.gzindex === T.gzhead.extra.length &amp;&amp; ((T.gzindex = 0), (T.status = qe)));
                                    }
                                    else
                                        T.status = qe;
                                if (T.status === qe)
                                    if (T.gzhead.name) {
                                        te = T.pending;
                                        do {
                                            if (T.pending === T.pending_buf_size &amp;&amp;
                                                (T.gzhead.hcrc &amp;&amp;
                                                    T.pending &gt; te &amp;&amp;
                                                    (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                                    c(u),
                                                    (te = T.pending),
                                                    T.pending === T.pending_buf_size)) {
                                                ce = 1;
                                                break;
                                            }
                                            ((ce =
                                                T.gzindex &lt; T.gzhead.name.length
                                                    ? 255 &amp; T.gzhead.name.charCodeAt(T.gzindex++)
                                                    : 0),
                                                n(T, ce));
                                        } while (ce !== 0);
                                        (T.gzhead.hcrc &amp;&amp;
                                            T.pending &gt; te &amp;&amp;
                                            (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                            ce === 0 &amp;&amp; ((T.gzindex = 0), (T.status = Ke)));
                                    }
                                    else
                                        T.status = Ke;
                                if (T.status === Ke)
                                    if (T.gzhead.comment) {
                                        te = T.pending;
                                        do {
                                            if (T.pending === T.pending_buf_size &amp;&amp;
                                                (T.gzhead.hcrc &amp;&amp;
                                                    T.pending &gt; te &amp;&amp;
                                                    (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                                    c(u),
                                                    (te = T.pending),
                                                    T.pending === T.pending_buf_size)) {
                                                ce = 1;
                                                break;
                                            }
                                            ((ce =
                                                T.gzindex &lt; T.gzhead.comment.length
                                                    ? 255 &amp; T.gzhead.comment.charCodeAt(T.gzindex++)
                                                    : 0),
                                                n(T, ce));
                                        } while (ce !== 0);
                                        (T.gzhead.hcrc &amp;&amp;
                                            T.pending &gt; te &amp;&amp;
                                            (u.adler = k(u.adler, T.pending_buf, T.pending - te, te)),
                                            ce === 0 &amp;&amp; (T.status = b));
                                    }
                                    else
                                        T.status = b;
                                if ((T.status === b &amp;&amp;
                                    (T.gzhead.hcrc
                                        ? (T.pending + 2 &gt; T.pending_buf_size &amp;&amp; c(u),
                                            T.pending + 2 &lt;= T.pending_buf_size &amp;&amp;
                                                (n(T, 255 &amp; u.adler),
                                                    n(T, (u.adler &gt;&gt; 8) &amp; 255),
                                                    (u.adler = 0),
                                                    (T.status = V)))
                                        : (T.status = V)),
                                    T.pending !== 0)) {
                                    if ((c(u), u.avail_out === 0))
                                        return ((T.last_flush = -1), Y);
                                }
                                else if (u.avail_in === 0 &amp;&amp; r(F) &lt;= r(H) &amp;&amp; F !== ne)
                                    return i(u, P);
                                if (T.status === j &amp;&amp; u.avail_in !== 0)
                                    return i(u, P);
                                if (u.avail_in !== 0 || T.lookahead !== 0 || (F !== D &amp;&amp; T.status !== j)) {
                                    var fe = T.strategy === ae
                                        ? g(T, F)
                                        : T.strategy === se
                                            ? I(T, F)
                                            : y[T.level].func(T, F);
                                    if (((fe !== ee &amp;&amp; fe !== me) || (T.status = j), fe === W || fe === ee))
                                        return (u.avail_out === 0 &amp;&amp; (T.last_flush = -1), Y);
                                    if (fe === $ &amp;&amp;
                                        (F === G
                                            ? M._tr_align(T)
                                            : F !== he &amp;&amp;
                                                (M._tr_stored_block(T, 0, 0, false),
                                                    F === N &amp;&amp;
                                                        (a(T.head),
                                                            T.lookahead === 0 &amp;&amp;
                                                                ((T.strstart = 0), (T.block_start = 0), (T.insert = 0)))),
                                            c(u),
                                            u.avail_out === 0))
                                        return ((T.last_flush = -1), Y);
                                }
                                return F !== ne
                                    ? Y
                                    : T.wrap &lt;= 0
                                        ? ye
                                        : (T.wrap === 2
                                            ? (n(T, 255 &amp; u.adler),
                                                n(T, (u.adler &gt;&gt; 8) &amp; 255),
                                                n(T, (u.adler &gt;&gt; 16) &amp; 255),
                                                n(T, (u.adler &gt;&gt; 24) &amp; 255),
                                                n(T, 255 &amp; u.total_in),
                                                n(T, (u.total_in &gt;&gt; 8) &amp; 255),
                                                n(T, (u.total_in &gt;&gt; 16) &amp; 255),
                                                n(T, (u.total_in &gt;&gt; 24) &amp; 255))
                                            : (e(T, u.adler &gt;&gt;&gt; 16), e(T, 65535 &amp; u.adler)),
                                            c(u),
                                            T.wrap &gt; 0 &amp;&amp; (T.wrap = -T.wrap),
                                            T.pending !== 0 ? Y : ye);
                            }),
                            (E.deflateEnd = function (u) {
                                var F;
                                return u &amp;&amp; u.state
                                    ? (F = u.state.status) !== $e &amp;&amp;
                                        F !== et &amp;&amp;
                                        F !== qe &amp;&amp;
                                        F !== Ke &amp;&amp;
                                        F !== b &amp;&amp;
                                        F !== V &amp;&amp;
                                        F !== j
                                        ? i(u, be)
                                        : ((u.state = null), F === V ? i(u, Ne) : Y)
                                    : be;
                            }),
                            (E.deflateSetDictionary = function (u, F) {
                                var H, T, te, ce, le, fe, Ge, ve, tt = F.length;
                                if (!u ||
                                    !u.state ||
                                    ((H = u.state),
                                        (ce = H.wrap) === 2 || (ce === 1 &amp;&amp; H.status !== $e) || H.lookahead))
                                    return be;
                                for (ce === 1 &amp;&amp; (u.adler = R(u.adler, F, tt, 0)),
                                    H.wrap = 0,
                                    tt &gt;= H.w_size &amp;&amp;
                                        (ce === 0 &amp;&amp;
                                            (a(H.head), (H.strstart = 0), (H.block_start = 0), (H.insert = 0)),
                                            (ve = new O.Buf8(H.w_size)),
                                            O.arraySet(ve, F, tt - H.w_size, H.w_size, 0),
                                            (F = ve),
                                            (tt = H.w_size)),
                                    le = u.avail_in,
                                    fe = u.next_in,
                                    Ge = u.input,
                                    u.avail_in = tt,
                                    u.next_in = 0,
                                    u.input = F,
                                    x(H); H.lookahead &gt;= _e;) {
                                    ((T = H.strstart), (te = H.lookahead - (_e - 1)));
                                    do
                                        ((H.ins_h = ((H.ins_h &lt;&lt; H.hash_shift) ^ H.window[T + _e - 1]) &amp; H.hash_mask),
                                            (H.prev[T &amp; H.w_mask] = H.head[H.ins_h]),
                                            (H.head[H.ins_h] = T),
                                            T++);
                                    while (--te);
                                    ((H.strstart = T), (H.lookahead = _e - 1), x(H));
                                }
                                return ((H.strstart += H.lookahead),
                                    (H.block_start = H.strstart),
                                    (H.insert = H.lookahead),
                                    (H.lookahead = 0),
                                    (H.match_length = H.prev_length = _e - 1),
                                    (H.match_available = 0),
                                    (u.next_in = fe),
                                    (u.input = Ge),
                                    (u.avail_in = le),
                                    (H.wrap = ce),
                                    Y);
                            }),
                            (E.deflateInfo = &#39;pako deflate (from Nodeca project)&#39;));
                    },
                    { &#39;../utils/common&#39;: 1, &#39;./adler32&#39;: 3, &#39;./crc32&#39;: 4, &#39;./messages&#39;: 6, &#39;./trees&#39;: 7 },
                ],
                6: [
                    function (l, f, E) {
                        f.exports = {
                            2: &#39;need dictionary&#39;,
                            1: &#39;stream end&#39;,
                            0: &#39;&#39;,
                            &#39;-1&#39;: &#39;file error&#39;,
                            &#39;-2&#39;: &#39;stream error&#39;,
                            &#39;-3&#39;: &#39;data error&#39;,
                            &#39;-4&#39;: &#39;insufficient memory&#39;,
                            &#39;-5&#39;: &#39;buffer error&#39;,
                            &#39;-6&#39;: &#39;incompatible version&#39;,
                        };
                    },
                    {},
                ],
                7: [
                    function (l, f, E) {
                        function i(b) {
                            for (var V = b.length; --V &gt;= 0;)
                                b[V] = 0;
                        }
                        function r(b, V, j, W, $) {
                            ((this.static_tree = b),
                                (this.extra_bits = V),
                                (this.extra_base = j),
                                (this.elems = W),
                                (this.max_length = $),
                                (this.has_stree = b &amp;&amp; b.length));
                        }
                        function a(b, V) {
                            ((this.dyn_tree = b), (this.max_code = 0), (this.stat_desc = V));
                        }
                        function c(b) {
                            return b &lt; 256 ? _e[b] : _e[256 + (b &gt;&gt;&gt; 7)];
                        }
                        function t(b, V) {
                            ((b.pending_buf[b.pending++] = 255 &amp; V),
                                (b.pending_buf[b.pending++] = (V &gt;&gt;&gt; 8) &amp; 255));
                        }
                        function n(b, V, j) {
                            b.bi_valid &gt; Ae - j
                                ? ((b.bi_buf |= (V &lt;&lt; b.bi_valid) &amp; 65535),
                                    t(b, b.bi_buf),
                                    (b.bi_buf = V &gt;&gt; (Ae - b.bi_valid)),
                                    (b.bi_valid += j - Ae))
                                : ((b.bi_buf |= (V &lt;&lt; b.bi_valid) &amp; 65535), (b.bi_valid += j));
                        }
                        function e(b, V, j) {
                            n(b, j[2 * V], j[2 * V + 1]);
                        }
                        function o(b, V) {
                            var j = 0;
                            do
                                ((j |= 1 &amp; b), (b &gt;&gt;&gt;= 1), (j &lt;&lt;= 1));
                            while (--V &gt; 0);
                            return j &gt;&gt;&gt; 1;
                        }
                        function s(b) {
                            b.bi_valid === 16
                                ? (t(b, b.bi_buf), (b.bi_buf = 0), (b.bi_valid = 0))
                                : b.bi_valid &gt;= 8 &amp;&amp;
                                    ((b.pending_buf[b.pending++] = 255 &amp; b.bi_buf),
                                        (b.bi_buf &gt;&gt;= 8),
                                        (b.bi_valid -= 8));
                        }
                        function x(b, V) {
                            var j, W, $, ee, me, Se, u = V.dyn_tree, F = V.max_code, H = V.stat_desc.static_tree, T = V.stat_desc.has_stree, te = V.stat_desc.extra_bits, ce = V.stat_desc.extra_base, le = V.stat_desc.max_length, fe = 0;
                            for (ee = 0; ee &lt;= se; ee++)
                                b.bl_count[ee] = 0;
                            for (u[2 * b.heap[b.heap_max] + 1] = 0, j = b.heap_max + 1; j &lt; ae; j++)
                                ((ee = u[2 * u[2 * (W = b.heap[j]) + 1] + 1] + 1) &gt; le &amp;&amp; ((ee = le), fe++),
                                    (u[2 * W + 1] = ee),
                                    W &gt; F ||
                                        (b.bl_count[ee]++,
                                            (me = 0),
                                            W &gt;= ce &amp;&amp; (me = te[W - ce]),
                                            (Se = u[2 * W]),
                                            (b.opt_len += Se * (ee + me)),
                                            T &amp;&amp; (b.static_len += Se * (H[2 * W + 1] + me))));
                            if (fe !== 0) {
                                do {
                                    for (ee = le - 1; b.bl_count[ee] === 0;)
                                        ee--;
                                    (b.bl_count[ee]--, (b.bl_count[ee + 1] += 2), b.bl_count[le]--, (fe -= 2));
                                } while (fe &gt; 0);
                                for (ee = le; ee !== 0; ee--)
                                    for (W = b.bl_count[ee]; W !== 0;)
                                        ($ = b.heap[--j]) &gt; F ||
                                            (u[2 * $ + 1] !== ee &amp;&amp;
                                                ((b.opt_len += (ee - u[2 * $ + 1]) * u[2 * $]), (u[2 * $ + 1] = ee)),
                                                W--);
                            }
                        }
                        function m(b, V, j) {
                            var W, $, ee = new Array(se + 1), me = 0;
                            for (W = 1; W &lt;= se; W++)
                                ee[W] = me = (me + j[W - 1]) &lt;&lt; 1;
                            for ($ = 0; $ &lt;= V; $++) {
                                var Se = b[2 * $ + 1];
                                Se !== 0 &amp;&amp; (b[2 * $] = o(ee[Se]++, Se));
                            }
                        }
                        function p() {
                            var b, V, j, W, $, ee = new Array(se + 1);
                            for (j = 0, W = 0; W &lt; be - 1; W++)
                                for (Ve[W] = j, b = 0; b &lt; 1 &lt;&lt; He[W]; b++)
                                    Be[j++] = W;
                            for (Be[j - 1] = W, $ = 0, W = 0; W &lt; 16; W++)
                                for (Qe[W] = $, b = 0; b &lt; 1 &lt;&lt; je[W]; b++)
                                    _e[$++] = W;
                            for ($ &gt;&gt;= 7; W &lt; X; W++)
                                for (Qe[W] = $ &lt;&lt; 7, b = 0; b &lt; 1 &lt;&lt; (je[W] - 7); b++)
                                    _e[256 + $++] = W;
                            for (V = 0; V &lt;= se; V++)
                                ee[V] = 0;
                            for (b = 0; b &lt;= 143;)
                                ((We[2 * b + 1] = 8), b++, ee[8]++);
                            for (; b &lt;= 255;)
                                ((We[2 * b + 1] = 9), b++, ee[9]++);
                            for (; b &lt;= 279;)
                                ((We[2 * b + 1] = 7), b++, ee[7]++);
                            for (; b &lt;= 287;)
                                ((We[2 * b + 1] = 8), b++, ee[8]++);
                            for (m(We, P + 1, ee), b = 0; b &lt; X; b++)
                                ((Ze[2 * b + 1] = 5), (Ze[2 * b] = o(b, 5)));
                            (($e = new r(We, He, Ne + 1, P, se)),
                                (et = new r(Ze, je, 0, X, se)),
                                (qe = new r(new Array(0), dt, 0, re, Ie)));
                        }
                        function I(b) {
                            var V;
                            for (V = 0; V &lt; P; V++)
                                b.dyn_ltree[2 * V] = 0;
                            for (V = 0; V &lt; X; V++)
                                b.dyn_dtree[2 * V] = 0;
                            for (V = 0; V &lt; re; V++)
                                b.bl_tree[2 * V] = 0;
                            ((b.dyn_ltree[2 * Fe] = 1),
                                (b.opt_len = b.static_len = 0),
                                (b.last_lit = b.matches = 0));
                        }
                        function g(b) {
                            (b.bi_valid &gt; 8
                                ? t(b, b.bi_buf)
                                : b.bi_valid &gt; 0 &amp;&amp; (b.pending_buf[b.pending++] = b.bi_buf),
                                (b.bi_buf = 0),
                                (b.bi_valid = 0));
                        }
                        function v(b, V, j, W) {
                            (g(b),
                                (t(b, j), t(b, ~j)),
                                B.arraySet(b.pending_buf, b.window, V, j, b.pending),
                                (b.pending += j));
                        }
                        function A(b, V, j, W) {
                            var $ = 2 * V, ee = 2 * j;
                            return b[$] &lt; b[ee] || (b[$] === b[ee] &amp;&amp; W[V] &lt;= W[j]);
                        }
                        function S(b, V, j) {
                            for (var W = b.heap[j], $ = j &lt;&lt; 1; $ &lt;= b.heap_len &amp;&amp;
                                ($ &lt; b.heap_len &amp;&amp; A(V, b.heap[$ + 1], b.heap[$], b.depth) &amp;&amp; $++,
                                    !A(V, W, b.heap[$], b.depth));)
                                ((b.heap[j] = b.heap[$]), (j = $), ($ &lt;&lt;= 1));
                            b.heap[j] = W;
                        }
                        function d(b, V, j) {
                            var W, $, ee, me, Se = 0;
                            if (b.last_lit !== 0)
                                do
                                    ((W =
                                        (b.pending_buf[b.d_buf + 2 * Se] &lt;&lt; 8) | b.pending_buf[b.d_buf + 2 * Se + 1]),
                                        ($ = b.pending_buf[b.l_buf + Se]),
                                        Se++,
                                        W === 0
                                            ? e(b, $, V)
                                            : (e(b, (ee = Be[$]) + Ne + 1, V),
                                                (me = He[ee]) !== 0 &amp;&amp; n(b, ($ -= Ve[ee]), me),
                                                e(b, (ee = c(--W)), j),
                                                (me = je[ee]) !== 0 &amp;&amp; n(b, (W -= Qe[ee]), me)));
                                while (Se &lt; b.last_lit);
                            e(b, Fe, V);
                        }
                        function _(b, V) {
                            var j, W, $, ee = V.dyn_tree, me = V.stat_desc.static_tree, Se = V.stat_desc.has_stree, u = V.stat_desc.elems, F = -1;
                            for (b.heap_len = 0, b.heap_max = ae, j = 0; j &lt; u; j++)
                                ee[2 * j] !== 0
                                    ? ((b.heap[++b.heap_len] = F = j), (b.depth[j] = 0))
                                    : (ee[2 * j + 1] = 0);
                            for (; b.heap_len &lt; 2;)
                                ((ee[2 * ($ = b.heap[++b.heap_len] = F &lt; 2 ? ++F : 0)] = 1),
                                    (b.depth[$] = 0),
                                    b.opt_len--,
                                    Se &amp;&amp; (b.static_len -= me[2 * $ + 1]));
                            for (V.max_code = F, j = b.heap_len &gt;&gt; 1; j &gt;= 1; j--)
                                S(b, ee, j);
                            $ = u;
                            do
                                ((j = b.heap[1]),
                                    (b.heap[1] = b.heap[b.heap_len--]),
                                    S(b, ee, 1),
                                    (W = b.heap[1]),
                                    (b.heap[--b.heap_max] = j),
                                    (b.heap[--b.heap_max] = W),
                                    (ee[2 * $] = ee[2 * j] + ee[2 * W]),
                                    (b.depth[$] = (b.depth[j] &gt;= b.depth[W] ? b.depth[j] : b.depth[W]) + 1),
                                    (ee[2 * j + 1] = ee[2 * W + 1] = $),
                                    (b.heap[1] = $++),
                                    S(b, ee, 1));
                            while (b.heap_len &gt;= 2);
                            ((b.heap[--b.heap_max] = b.heap[1]), x(b, V), m(ee, F, b.bl_count));
                        }
                        function L(b, V, j) {
                            var W, $, ee = -1, me = V[1], Se = 0, u = 7, F = 4;
                            for (me === 0 &amp;&amp; ((u = 138), (F = 3)), V[2 * (j + 1) + 1] = 65535, W = 0; W &lt;= j; W++)
                                (($ = me),
                                    (me = V[2 * (W + 1) + 1]),
                                    (++Se &lt; u &amp;&amp; $ === me) ||
                                        (Se &lt; F
                                            ? (b.bl_tree[2 * $] += Se)
                                            : $ !== 0
                                                ? ($ !== ee &amp;&amp; b.bl_tree[2 * $]++, b.bl_tree[2 * ze]++)
                                                : Se &lt;= 10
                                                    ? b.bl_tree[2 * Oe]++
                                                    : b.bl_tree[2 * Re]++,
                                            (Se = 0),
                                            (ee = $),
                                            me === 0
                                                ? ((u = 138), (F = 3))
                                                : $ === me
                                                    ? ((u = 6), (F = 3))
                                                    : ((u = 7), (F = 4))));
                        }
                        function y(b, V, j) {
                            var W, $, ee = -1, me = V[1], Se = 0, u = 7, F = 4;
                            for (me === 0 &amp;&amp; ((u = 138), (F = 3)), W = 0; W &lt;= j; W++)
                                if ((($ = me), (me = V[2 * (W + 1) + 1]), !(++Se &lt; u &amp;&amp; $ === me))) {
                                    if (Se &lt; F)
                                        do
                                            e(b, $, b.bl_tree);
                                        while (--Se != 0);
                                    else
                                        $ !== 0
                                            ? ($ !== ee &amp;&amp; (e(b, $, b.bl_tree), Se--),
                                                e(b, ze, b.bl_tree),
                                                n(b, Se - 3, 2))
                                            : Se &lt;= 10
                                                ? (e(b, Oe, b.bl_tree), n(b, Se - 3, 3))
                                                : (e(b, Re, b.bl_tree), n(b, Se - 11, 7));
                                    ((Se = 0),
                                        (ee = $),
                                        me === 0
                                            ? ((u = 138), (F = 3))
                                            : $ === me
                                                ? ((u = 6), (F = 3))
                                                : ((u = 7), (F = 4)));
                                }
                        }
                        function O(b) {
                            var V;
                            for (L(b, b.dyn_ltree, b.l_desc.max_code),
                                L(b, b.dyn_dtree, b.d_desc.max_code),
                                _(b, b.bl_desc),
                                V = re - 1; V &gt;= 3 &amp;&amp; b.bl_tree[2 * Je[V] + 1] === 0; V--)
                                ;
                            return ((b.opt_len += 3 * (V + 1) + 5 + 5 + 4), V);
                        }
                        function M(b, V, j, W) {
                            var $;
                            for (n(b, V - 257, 5), n(b, j - 1, 5), n(b, W - 4, 4), $ = 0; $ &lt; W; $++)
                                n(b, b.bl_tree[2 * Je[$] + 1], 3);
                            (y(b, b.dyn_ltree, V - 1), y(b, b.dyn_dtree, j - 1));
                        }
                        function R(b) {
                            var V, j = 4093624447;
                            for (V = 0; V &lt;= 31; V++, j &gt;&gt;&gt;= 1)
                                if (1 &amp; j &amp;&amp; b.dyn_ltree[2 * V] !== 0)
                                    return G;
                            if (b.dyn_ltree[18] !== 0 || b.dyn_ltree[20] !== 0 || b.dyn_ltree[26] !== 0)
                                return N;
                            for (V = 32; V &lt; Ne; V++)
                                if (b.dyn_ltree[2 * V] !== 0)
                                    return N;
                            return G;
                        }
                        function k(b, V, j, W) {
                            (n(b, (he &lt;&lt; 1) + (W ? 1 : 0), 3), v(b, V, j));
                        }
                        var B = l(&#39;../utils/common&#39;), D = 4, G = 0, N = 1, ne = 2, he = 0, Y = 1, ye = 2, be = 29, Ne = 256, P = Ne + 1 + be, X = 30, re = 19, ae = 2 * P + 1, se = 15, Ae = 16, Ie = 7, Fe = 256, ze = 16, Oe = 17, Re = 18, He = [
                            0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5,
                            5, 0,
                        ], je = [
                            0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
                            12, 12, 13, 13,
                        ], dt = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], Je = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], We = new Array(2 * (P + 2));
                        i(We);
                        var Ze = new Array(2 * X);
                        i(Ze);
                        var _e = new Array(512);
                        i(_e);
                        var Be = new Array(256);
                        i(Be);
                        var Ve = new Array(be);
                        i(Ve);
                        var Qe = new Array(X);
                        i(Qe);
                        var $e, et, qe, Ke = false;
                        ((E._tr_init = function (b) {
                            (Ke || (p(), (Ke = true)),
                                (b.l_desc = new a(b.dyn_ltree, $e)),
                                (b.d_desc = new a(b.dyn_dtree, et)),
                                (b.bl_desc = new a(b.bl_tree, qe)),
                                (b.bi_buf = 0),
                                (b.bi_valid = 0),
                                I(b));
                        }),
                            (E._tr_stored_block = k),
                            (E._tr_flush_block = function (b, V, j, W) {
                                var $, ee, me = 0;
                                (b.level &gt; 0
                                    ? (b.strm.data_type === ne &amp;&amp; (b.strm.data_type = R(b)),
                                        _(b, b.l_desc),
                                        _(b, b.d_desc),
                                        (me = O(b)),
                                        ($ = (b.opt_len + 3 + 7) &gt;&gt;&gt; 3),
                                        (ee = (b.static_len + 3 + 7) &gt;&gt;&gt; 3) &lt;= $ &amp;&amp; ($ = ee))
                                    : ($ = ee = j + 5),
                                    j + 4 &lt;= $ &amp;&amp; V !== -1
                                        ? k(b, V, j, W)
                                        : b.strategy === D || ee === $
                                            ? (n(b, (Y &lt;&lt; 1) + (W ? 1 : 0), 3), d(b, We, Ze))
                                            : (n(b, (ye &lt;&lt; 1) + (W ? 1 : 0), 3),
                                                M(b, b.l_desc.max_code + 1, b.d_desc.max_code + 1, me + 1),
                                                d(b, b.dyn_ltree, b.dyn_dtree)),
                                    I(b),
                                    W &amp;&amp; g(b));
                            }),
                            (E._tr_tally = function (b, V, j) {
                                return ((b.pending_buf[b.d_buf + 2 * b.last_lit] = (V &gt;&gt;&gt; 8) &amp; 255),
                                    (b.pending_buf[b.d_buf + 2 * b.last_lit + 1] = 255 &amp; V),
                                    (b.pending_buf[b.l_buf + b.last_lit] = 255 &amp; j),
                                    b.last_lit++,
                                    V === 0
                                        ? b.dyn_ltree[2 * j]++
                                        : (b.matches++,
                                            V--,
                                            b.dyn_ltree[2 * (Be[j] + Ne + 1)]++,
                                            b.dyn_dtree[2 * c(V)]++),
                                    b.last_lit === b.lit_bufsize - 1);
                            }),
                            (E._tr_align = function (b) {
                                (n(b, Y &lt;&lt; 1, 3), e(b, Fe, We), s(b));
                            }));
                    },
                    { &#39;../utils/common&#39;: 1 },
                ],
                8: [
                    function (l, f, E) {
                        f.exports = function () {
                            ((this.input = null),
                                (this.next_in = 0),
                                (this.avail_in = 0),
                                (this.total_in = 0),
                                (this.output = null),
                                (this.next_out = 0),
                                (this.avail_out = 0),
                                (this.total_out = 0),
                                (this.msg = &#39;&#39;),
                                (this.state = null),
                                (this.data_type = 2),
                                (this.adler = 0));
                        };
                    },
                    {},
                ],
                &#39;/lib/deflate.js&#39;: [
                    function (l, f, E) {
                        function i(I) {
                            if (!(this instanceof i))
                                return new i(I);
                            this.options = c.assign({
                                level: x,
                                method: p,
                                chunkSize: 16384,
                                windowBits: 15,
                                memLevel: 8,
                                strategy: m,
                                to: &#39;&#39;,
                            }, I || {});
                            var g = this.options;
                            (g.raw &amp;&amp; g.windowBits &gt; 0
                                ? (g.windowBits = -g.windowBits)
                                : g.gzip &amp;&amp; g.windowBits &gt; 0 &amp;&amp; g.windowBits &lt; 16 &amp;&amp; (g.windowBits += 16),
                                (this.err = 0),
                                (this.msg = &#39;&#39;),
                                (this.ended = false),
                                (this.chunks = []),
                                (this.strm = new e()),
                                (this.strm.avail_out = 0));
                            var v = a.deflateInit2(this.strm, g.level, g.method, g.windowBits, g.memLevel, g.strategy);
                            if (v !== s)
                                throw new Error(n[v]);
                            if ((g.header &amp;&amp; a.deflateSetHeader(this.strm, g.header), g.dictionary)) {
                                var A;
                                if (((A =
                                    typeof g.dictionary == &#39;string&#39;
                                        ? t.string2buf(g.dictionary)
                                        : o.call(g.dictionary) === &#39;[object ArrayBuffer]&#39;
                                            ? new Uint8Array(g.dictionary)
                                            : g.dictionary),
                                    (v = a.deflateSetDictionary(this.strm, A)) !== s))
                                    throw new Error(n[v]);
                                this._dict_set = true;
                            }
                        }
                        function r(I, g) {
                            var v = new i(g);
                            if ((v.push(I, true), v.err))
                                throw v.msg || n[v.err];
                            return v.result;
                        }
                        var a = l(&#39;./zlib/deflate&#39;), c = l(&#39;./utils/common&#39;), t = l(&#39;./utils/strings&#39;), n = l(&#39;./zlib/messages&#39;), e = l(&#39;./zlib/zstream&#39;), o = Object.prototype.toString, s = 0, x = -1, m = 0, p = 8;
                        ((i.prototype.push = function (I, g) {
                            var v, A, S = this.strm, d = this.options.chunkSize;
                            if (this.ended)
                                return false;
                            ((A = g === ~~g ? g : g === true ? 4 : 0),
                                typeof I == &#39;string&#39;
                                    ? (S.input = t.string2buf(I))
                                    : o.call(I) === &#39;[object ArrayBuffer]&#39;
                                        ? (S.input = new Uint8Array(I))
                                        : (S.input = I),
                                (S.next_in = 0),
                                (S.avail_in = S.input.length));
                            do {
                                if ((S.avail_out === 0 &amp;&amp;
                                    ((S.output = new c.Buf8(d)), (S.next_out = 0), (S.avail_out = d)),
                                    (v = a.deflate(S, A)) !== 1 &amp;&amp; v !== s))
                                    return (this.onEnd(v), (this.ended = true), false);
                                (S.avail_out !== 0 &amp;&amp; (S.avail_in !== 0 || (A !== 4 &amp;&amp; A !== 2))) ||
                                    (this.options.to === &#39;string&#39;
                                        ? this.onData(t.buf2binstring(c.shrinkBuf(S.output, S.next_out)))
                                        : this.onData(c.shrinkBuf(S.output, S.next_out)));
                            } while ((S.avail_in &gt; 0 || S.avail_out === 0) &amp;&amp; v !== 1);
                            return A === 4
                                ? ((v = a.deflateEnd(this.strm)), this.onEnd(v), (this.ended = true), v === s)
                                : A !== 2 || (this.onEnd(s), (S.avail_out = 0), true);
                        }),
                            (i.prototype.onData = function (I) {
                                this.chunks.push(I);
                            }),
                            (i.prototype.onEnd = function (I) {
                                (I === s &amp;&amp;
                                    (this.options.to === &#39;string&#39;
                                        ? (this.result = this.chunks.join(&#39;&#39;))
                                        : (this.result = c.flattenChunks(this.chunks))),
                                    (this.chunks = []),
                                    (this.err = I),
                                    (this.msg = this.strm.msg));
                            }),
                            (E.Deflate = i),
                            (E.deflate = r),
                            (E.deflateRaw = function (I, g) {
                                return ((g = g || {}), (g.raw = true), r(I, g));
                            }),
                            (E.gzip = function (I, g) {
                                return ((g = g || {}), (g.gzip = true), r(I, g));
                            }));
                    },
                    {
                        &#39;./utils/common&#39;: 1,
                        &#39;./utils/strings&#39;: 2,
                        &#39;./zlib/deflate&#39;: 5,
                        &#39;./zlib/messages&#39;: 6,
                        &#39;./zlib/zstream&#39;: 8,
                    },
                ],
            }, {}, [])(&#39;/lib/deflate.js&#39;);
        }));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                constructor() {
                    ((this._isIphoneOrIPad = false),
                        (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) &amp;&amp;
                            (this._isIphoneOrIPad = true),
                        this.initUAParser());
                }
                get userAgentData() {
                    return this._userAgentData;
                }
                get deviceType() {
                    return (this._deviceType ||
                        (E.Util.isMobile
                            ? (this._deviceType = this.mobileType || this.desktopType || i.UNKNOWN_DEVICE_TYPE)
                            : (this._deviceType =
                                this.desktopType || this.mobileType || i.UNKNOWN_DEVICE_TYPE)),
                        this._deviceType);
                }
                get isIphoneOrIPad() {
                    return this._isIphoneOrIPad;
                }
                get browserName() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.browser &amp;&amp;
                        this._userAgentData.browser.name
                        ? this._userAgentData.browser.name.trim()
                        : &#39;&#39;;
                }
                get browserVersion() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.browser &amp;&amp;
                        this._userAgentData.browser.version
                        ? this._userAgentData.browser.version.trim()
                        : &#39;&#39;;
                }
                get browserMajor() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.browser &amp;&amp;
                        this._userAgentData.browser.major
                        ? this._userAgentData.browser.major.trim()
                        : &#39;&#39;;
                }
                get browserType() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.browser &amp;&amp;
                        this._userAgentData.browser.type
                        ? this._userAgentData.browser.type.trim()
                        : &#39;&#39;;
                }
                get osName() {
                    return this._userAgentData &amp;&amp; this._userAgentData.os &amp;&amp; this._userAgentData.os.name
                        ? this._userAgentData.os.name.trim()
                        : &#39;&#39;;
                }
                get osVersion() {
                    return this._userAgentData &amp;&amp; this._userAgentData.os &amp;&amp; this._userAgentData.os.version
                        ? this._userAgentData.os.version.trim()
                        : &#39;&#39;;
                }
                get deviceCategory() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.device &amp;&amp;
                        this._userAgentData.device.type
                        ? this._userAgentData.device.type.trim()
                        : &#39;&#39;;
                }
                get engineName() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.engine &amp;&amp;
                        this._userAgentData.engine.name
                        ? this._userAgentData.engine.name.trim()
                        : &#39;&#39;;
                }
                get engineVersion() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.engine &amp;&amp;
                        this._userAgentData.engine.version
                        ? this._userAgentData.engine.version.trim()
                        : &#39;&#39;;
                }
                get cpuArchitecture() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.cpu &amp;&amp;
                        this._userAgentData.cpu.architecture
                        ? this._userAgentData.cpu.architecture.trim()
                        : &#39;&#39;;
                }
                get deviceModel() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.device &amp;&amp;
                        this._userAgentData.device.model
                        ? this._userAgentData.device.model.trim()
                        : &#39;&#39;;
                }
                get deviceVendor() {
                    return this._userAgentData &amp;&amp;
                        this._userAgentData.device &amp;&amp;
                        this._userAgentData.device.vendor
                        ? this._userAgentData.device.vendor.trim()
                        : &#39;&#39;;
                }
                get desktopType() {
                    let a = this.browserName;
                    this.browserVersion &amp;&amp; (a = a + `(${this.browserVersion})`);
                    let c = this.osName;
                    this.osVersion &amp;&amp; (c = c + `(${this.osVersion})`);
                    const t = a &amp;&amp; c ? `${a}-${c}` : a || c;
                    return t ? t.trim() : &#39;&#39;;
                }
                get mobileType() {
                    const a = this.deviceModel, c = this.deviceVendor, t = a &amp;&amp; c ? `${a} ${c}` : a || c;
                    return t ? t.trim() : &#39;&#39;;
                }
                initUAParser() {
                    try {
                        const a = new l.UAParser();
                        (a.setUA(navigator.userAgent), (this._userAgentData = a.getResult()));
                    }
                    catch (a) {
                        E.Logger.warn(&#39;UAParser failure&#39;, a);
                    }
                }
            }
            ((i.UNKNOWN_DEVICE_TYPE = &#39;unknown&#39;), (E.BrowserInfo = i));
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                static get CLIENT_VERSION() {
                    return &#39;5.6.9w&#39;;
                }
                static get SALT() {
                    return &#39;ST8irbd3bB&#39;;
                }
                static get TAB_UUID_KEY() {
                    return &#39;pos_tid&#39;;
                }
                static get OPS_KEY() {
                    return &#39;pos_ops&#39;;
                }
                static get DEVICE_ID_KEY() {
                    return &#39;SecuredTouchDeviceId&#39;;
                }
                static get DEVICE_ID_CREATED_AT() {
                    return &#39;pos_dca&#39;;
                }
                static get LAST_DEVICE_KEY_RESYNC() {
                    return &#39;DeviceRefreshDate&#39;;
                }
                static get CAPTURED_KEYBOARD_INTERACTIONS() {
                    return &#39;pos_cki&#39;;
                }
                static get CAPTURED_MOUSE_INTERACTIONS() {
                    return &#39;pos_cmi&#39;;
                }
                static get CAPTURED_GESTURES() {
                    return &#39;pos_cg&#39;;
                }
                static get CAPTURED_INDIRECT() {
                    return &#39;pos_cie&#39;;
                }
                static get CAPTURED_TAGS() {
                    return &#39;pos_ct&#39;;
                }
                static get CAPTURED_MOUSE_INTERACTIONS_SUMMARY() {
                    return &#39;pos_mdp&#39;;
                }
                static get KEYBOARD_INTERACTIONS_COUNT() {
                    return &#39;pos_kic&#39;;
                }
                static get MOUSE_INTERACTIONS_COUNT() {
                    return &#39;pos_mic&#39;;
                }
                static get GESTURES_COUNT() {
                    return &#39;pos_gc&#39;;
                }
                static get EVENT_COUNTERS() {
                    return &#39;pos_ec&#39;;
                }
                static get PINGID_AGENT_DEFAULT_PORT() {
                    return 9400;
                }
                static get PINGID_AGENT_DEFAULT_TIMEOUT() {
                    return 1e3;
                }
                static get MOUSE_EVENT_COUNTERS() {
                    return &#39;pos_mec&#39;;
                }
                static get KEYBOARD_EVENT_COUNTERS() {
                    return &#39;pos_kec&#39;;
                }
                static get TOUCH_EVENT_COUNTERS() {
                    return &#39;pos_tec&#39;;
                }
                static get INDIRECT_EVENT_COUNTERS() {
                    return &#39;pos_iec&#39;;
                }
                static get GeoDataKey() {
                    return &#39;pos_geo&#39;;
                }
            }
            E.Constants = i;
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                constructor(a = &#39;ECDSA&#39;, c = [&#39;sign&#39;, &#39;verify&#39;], t = &#39;SHA-256&#39;) {
                    if (((this.signingKeyType = a),
                        (this.keyUsage = c),
                        (this.algorithm = t),
                        (this._crypto = window.crypto || window.msCrypto),
                        !this._crypto || !this._crypto.subtle))
                        throw new Error(&#39;Cryptography API not supported in this browser&#39;);
                }
                hexDecode(a) {
                    let c = &#39;&#39;;
                    for (let t = 0; t &lt; a.length; t += 2)
                        c += String.fromCharCode(parseInt(a.substr(t, 2), 16));
                    return c;
                }
                async generateKeys() {
                    return this._crypto.subtle.generateKey({ name: this.signingKeyType, namedCurve: &#39;P-256&#39; }, false, this.keyUsage);
                }
                async exportPublicKey(a) {
                    const c = await this._crypto.subtle.exportKey(&#39;spki&#39;, a.publicKey), t = E.Util.ab2str(c), n = btoa(t), e = this.hexDecode(&#39;2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a&#39;), o = this.hexDecode(&#39;0a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d&#39;), s = `${e}${n}${o}`;
                    return (E.Logger.debug(&#39;Exported base64 pub key: &#39;, s), s);
                }
                async exportPublicKeyJwk(a) {
                    return await window.crypto.subtle.exportKey(&#39;jwk&#39;, a.publicKey);
                }
                async exportPrivateKey(a) {
                    const c = await this._crypto.subtle.exportKey(&#39;pkcs8&#39;, a.privateKey), t = E.Util.ab2str(c), n = btoa(t), e = this.hexDecode(&#39;2d2d2d2d2d424547494e2050524956415445204b45592d2d2d2d2d0a&#39;), o = this.hexDecode(&#39;0a2d2d2d2d2d454e442050524956415445204b45592d2d2d2d2d&#39;), s = `${e}${n}${o}`;
                    return (E.Logger.debug(&#39;Exported base64 pem:&#39;, s), s);
                }
                async signJWT(a, c, t = 0, n, e) {
                    const s = { alg: &#39;ES256&#39;, typ: &#39;JWT&#39;, jwk: await this.exportPublicKeyJwk(c), kid: e }, x = { deviceAttributesSerialized: a, iat: Math.floor(n / 1e3) };
                    if (!c.privateKey)
                        throw new Error(&#39;Require key&#39;);
                    if (s.alg !== &#39;ES256&#39; &amp;&amp; s.typ !== &#39;JWT&#39;)
                        throw new Error(&#39;jwt-encode only support the ES256 algorithm and the JWT type of hash&#39;);
                    const m = E.Util.encode(s), p = E.Util.encode(x), I = `${m}.${p}`, g = E.Util.string2buf(I), v = await this._crypto.subtle.sign({ name: this.signingKeyType, hash: this.algorithm }, c.privateKey, g), A = E.Util.base64url(btoa(E.Util.ab2str(v)));
                    return (E.Logger.debug(&#39;Signed JWT: &#39;, `${I}.${A}`), `${I}.${A}`);
                }
                async verifyJwtToken(a, c) {
                    const [t, n, e] = a.split(&#39;.&#39;), o = E.Util.parseJwt(t);
                    if (o.alg !== &#39;ES256&#39; &amp;&amp; o.typ !== &#39;JWT&#39;)
                        throw new Error(&#39;JWT header supports only ES256 algorithm and the JWT type of hash&#39;);
                    E.Util.parseJwt(n); const x = Uint8Array.from(atob(e.replace(/-/g, &#39;+&#39;).replace(/_/g, &#39;/&#39;)), (I) =&gt; I.charCodeAt(0)), m = E.Util.string2buf(`${t}.${n}`);
                    return await this._crypto.subtle.verify({ name: this.signingKeyType, hash: this.algorithm }, c, x, m);
                }
            }
            E.CryptoOperator = i;
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                static get isLogEnabled() {
                    return this._isLogEnabled || window[&#39;enable-logs-pingOneSignals&#39;];
                }
                static set isLogEnabled(a) {
                    this._isLogEnabled = a;
                }
                static debug(a, ...c) {
                    ((a = `${i.TAG} ${a}`),
                        i.isLogEnabled &amp;&amp;
                            (c &amp;&amp; c.length &gt; 0
                                ? console.debug
                                    ? console.debug(a, c)
                                    : console.log(a, c)
                                : console.debug
                                    ? console.debug(a)
                                    : console.log(a)));
                }
                static error(a, ...c) {
                    ((a = `${i.TAG} ${a}`),
                        i.isLogEnabled &amp;&amp; (c &amp;&amp; c.length &gt; 0 ? console.error(a, c) : console.error(a)));
                }
                static warn(a, ...c) {
                    ((a = `${i.TAG} ${a}`),
                        i.isLogEnabled &amp;&amp; (c &amp;&amp; c.length &gt; 0 ? console.warn(a, c) : console.warn(a)));
                }
                static info(a, ...c) {
                    ((a = `${i.TAG} ${a}`),
                        i.isLogEnabled &amp;&amp; (c &amp;&amp; c.length &gt; 0 ? console.info(a, c) : console.info(a)));
                }
            }
            ((i.TAG = &#39;[SignalsSDK]&#39;), (E.Logger = i));
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                static get INITIALIZATION_ERROR() {
                    return &#39;INITIALIZATION_ERROR&#39;;
                }
                static get UNEXPECTED_ERROR() {
                    return &#39;UNEXPECTED_ERROR&#39;;
                }
            }
            E.POErrorCodes = i;
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    const Browser = {
        115: &#39;115&#39;,
        2345: &#39;2345&#39;,
        360: &#39;360&#39;,
        ALIPAY: &#39;Alipay&#39;,
        AMAYA: &#39;Amaya&#39;,
        ANDROID: &#39;Android Browser&#39;,
        ARORA: &#39;Arora&#39;,
        AVANT: &#39;Avant&#39;,
        AVAST: &#39;Avast Secure Browser&#39;,
        AVG: &#39;AVG Secure Browser&#39;,
        BAIDU: &#39;Baidu Browser&#39;,
        BASILISK: &#39;Basilisk&#39;,
        BLAZER: &#39;Blazer&#39;,
        BOLT: &#39;Bolt&#39;,
        BOWSER: &#39;Bowser&#39;,
        BRAVE: &#39;Brave&#39;,
        CAMINO: &#39;Camino&#39;,
        CHIMERA: &#39;Chimera&#39;,
        CHROME: &#39;Chrome&#39;,
        CHROME_HEADLESS: &#39;Chrome Headless&#39;,
        CHROME_MOBILE: &#39;Mobile Chrome&#39;,
        CHROME_WEBVIEW: &#39;Chrome WebView&#39;,
        CHROMIUM: &#39;Chromium&#39;,
        COBALT: &#39;Cobalt&#39;,
        COC_COC: &#39;Coc Coc&#39;,
        CONKEROR: &#39;Conkeror&#39;,
        DAUM: &#39;Daum&#39;,
        DILLO: &#39;Dillo&#39;,
        DOLPHIN: &#39;Dolphin&#39;,
        DORIS: &#39;Doris&#39;,
        DRAGON: &#39;Dragon&#39;,
        DUCKDUCKGO: &#39;DuckDuckGo&#39;,
        EDGE: &#39;Edge&#39;,
        EPIPHANY: &#39;Epiphany&#39;,
        FACEBOOK: &#39;Facebook&#39;,
        FALKON: &#39;Falkon&#39;,
        FIREBIRD: &#39;Firebird&#39;,
        FIREFOX: &#39;Firefox&#39;,
        FIREFOX_FOCUS: &#39;Firefox Focus&#39;,
        FIREFOX_MOBILE: &#39;Mobile Firefox&#39;,
        FIREFOX_REALITY: &#39;Firefox Reality&#39;,
        FENNEC: &#39;Fennec&#39;,
        FLOCK: &#39;Flock&#39;,
        FLOW: &#39;Flow&#39;,
        GO: &#39;GoBrowser&#39;,
        GOOGLE_SEARCH: &#39;GSA&#39;,
        HELIO: &#39;Helio&#39;,
        HEYTAP: &#39;HeyTap&#39;,
        HONOR: &#39;Honor&#39;,
        HUAWEI: &#39;Huawei Browser&#39;,
        ICAB: &#39;iCab&#39;,
        ICE: &#39;ICE Browser&#39;,
        ICEAPE: &#39;IceApe&#39;,
        ICECAT: &#39;IceCat&#39;,
        ICEDRAGON: &#39;IceDragon&#39;,
        ICEWEASEL: &#39;IceWeasel&#39;,
        IE: &#39;IE&#39;,
        INSTAGRAM: &#39;Instagram&#39;,
        IRIDIUM: &#39;Iridium&#39;,
        IRON: &#39;Iron&#39;,
        JASMINE: &#39;Jasmine&#39;,
        KONQUEROR: &#39;Konqueror&#39;,
        KAKAO: &#39;KakaoTalk&#39;,
        KHTML: &#39;KHTML&#39;,
        K_MELEON: &#39;K-Meleon&#39;,
        KLAR: &#39;Klar&#39;,
        KLARNA: &#39;Klarna&#39;,
        KINDLE: &#39;Kindle&#39;,
        LENOVO: &#39;Smart Lenovo Browser&#39;,
        LADYBIRD: &#39;Ladybird&#39;,
        LIBREWOLF: &#39;LibreWolf&#39;,
        LIEBAO: &#39;LBBROWSER&#39;,
        LINE: &#39;Line&#39;,
        LINKEDIN: &#39;LinkedIn&#39;,
        LINKS: &#39;Links&#39;,
        LUNASCAPE: &#39;Lunascape&#39;,
        LYNX: &#39;Lynx&#39;,
        MAEMO: &#39;Maemo Browser&#39;,
        MAXTHON: &#39;Maxthon&#39;,
        MIDORI: &#39;Midori&#39;,
        MINIMO: &#39;Minimo&#39;,
        MIUI: &#39;MIUI Browser&#39;,
        MOZILLA: &#39;Mozilla&#39;,
        MOSAIC: &#39;Mosaic&#39;,
        NAVER: &#39;Naver&#39;,
        NETFRONT: &#39;NetFront&#39;,
        NETSCAPE: &#39;Netscape&#39;,
        NETSURF: &#39;Netsurf&#39;,
        NOKIA: &#39;Nokia Browser&#39;,
        OBIGO: &#39;Obigo&#39;,
        OCULUS: &#39;Oculus Browser&#39;,
        OMNIWEB: &#39;OmniWeb&#39;,
        OPERA: &#39;Opera&#39;,
        OPERA_COAST: &#39;Opera Coast&#39;,
        OPERA_GX: &#39;Opera GX&#39;,
        OPERA_MINI: &#39;Opera Mini&#39;,
        OPERA_MOBI: &#39;Opera Mobi&#39;,
        OPERA_TABLET: &#39;Opera Tablet&#39;,
        OPERA_TOUCH: &#39;Opera Touch&#39;,
        OVI: &#39;OviBrowser&#39;,
        PALEMOON: &#39;PaleMoon&#39;,
        PHANTOMJS: &#39;PhantomJS&#39;,
        PHOENIX: &#39;Phoenix&#39;,
        PICOBROWSER: &#39;Pico Browser&#39;,
        POLARIS: &#39;Polaris&#39;,
        PUFFIN: &#39;Puffin&#39;,
        QQ: &#39;QQBrowser&#39;,
        QQ_LITE: &#39;QQBrowserLite&#39;,
        QUARK: &#39;Quark&#39;,
        QUPZILLA: &#39;QupZilla&#39;,
        REKONQ: &#39;rekonq&#39;,
        ROCKMELT: &#39;Rockmelt&#39;,
        SAFARI: &#39;Safari&#39;,
        SAFARI_MOBILE: &#39;Mobile Safari&#39;,
        SAILFISH: &#39;Sailfish Browser&#39;,
        SAMSUNG: &#39;Samsung Internet&#39;,
        SEAMONKEY: &#39;SeaMonkey&#39;,
        SILK: &#39;Silk&#39;,
        SKYFIRE: &#39;Skyfire&#39;,
        SLEIPNIR: &#39;Sleipnir&#39;,
        SLIMBOAT: &#39;SlimBoat&#39;,
        SLIMBROWSER: &#39;SlimBrowser&#39;,
        SLIMJET: &#39;Slimjet&#39;,
        SNAPCHAT: &#39;Snapchat&#39;,
        SOGOU_EXPLORER: &#39;Sogou Explorer&#39;,
        SOGOU_MOBILE: &#39;Sogou Mobile&#39;,
        SWIFTFOX: &#39;Swiftfox&#39;,
        TESLA: &#39;Tesla&#39;,
        TIKTOK: &#39;TikTok&#39;,
        TIZEN: &#39;Tizen Browser&#39;,
        TWITTER: &#39;Twitter&#39;,
        UC: &#39;UCBrowser&#39;,
        UP: &#39;UP.Browser&#39;,
        VIVALDI: &#39;Vivaldi&#39;,
        VIVO: &#39;Vivo Browser&#39;,
        W3M: &#39;w3m&#39;,
        WATERFOX: &#39;Waterfox&#39;,
        WEBKIT: &#39;WebKit&#39;,
        WECHAT: &#39;WeChat&#39;,
        WEIBO: &#39;Weibo&#39;,
        WHALE: &#39;Whale&#39;,
        WOLVIC: &#39;Wolvic&#39;,
        YANDEX: &#39;Yandex&#39;,
    }, BrowserType = {
        CRAWLER: &#39;crawler&#39;,
        CLI: &#39;cli&#39;,
        EMAIL: &#39;email&#39;,
        FETCHER: &#39;fetcher&#39;,
        INAPP: &#39;inapp&#39;,
        MEDIAPLAYER: &#39;mediaplayer&#39;,
        LIBRARY: &#39;library&#39;,
    }, CPU = {
        &#39;68K&#39;: &#39;68k&#39;,
        ARM: &#39;arm&#39;,
        ARM_64: &#39;arm64&#39;,
        ARM_HF: &#39;armhf&#39;,
        AVR: &#39;avr&#39;,
        AVR_32: &#39;avr32&#39;,
        IA64: &#39;ia64&#39;,
        IRIX: &#39;irix&#39;,
        IRIX_64: &#39;irix64&#39;,
        MIPS: &#39;mips&#39;,
        MIPS_64: &#39;mips64&#39;,
        PA_RISC: &#39;pa-risc&#39;,
        PPC: &#39;ppc&#39;,
        SPARC: &#39;sparc&#39;,
        SPARC_64: &#39;sparc64&#39;,
        X86: &#39;ia32&#39;,
        X86_64: &#39;amd64&#39;,
    }, Device = {
        CONSOLE: &#39;console&#39;,
        DESKTOP: &#39;desktop&#39;,
        EMBEDDED: &#39;embedded&#39;,
        MOBILE: &#39;mobile&#39;,
        SMARTTV: &#39;smarttv&#39;,
        TABLET: &#39;tablet&#39;,
        WEARABLE: &#39;wearable&#39;,
        XR: &#39;xr&#39;,
    }, Vendor = {
        ACER: &#39;Acer&#39;,
        ADVAN: &#39;Advan&#39;,
        ALCATEL: &#39;Alcatel&#39;,
        APPLE: &#39;Apple&#39;,
        AMAZON: &#39;Amazon&#39;,
        ARCHOS: &#39;Archos&#39;,
        ASUS: &#39;ASUS&#39;,
        ATT: &#39;AT&amp;T&#39;,
        BENQ: &#39;BenQ&#39;,
        BLACKBERRY: &#39;BlackBerry&#39;,
        CAT: &#39;Cat&#39;,
        DELL: &#39;Dell&#39;,
        ENERGIZER: &#39;Energizer&#39;,
        ESSENTIAL: &#39;Essential&#39;,
        FACEBOOK: &#39;Facebook&#39;,
        FAIRPHONE: &#39;Fairphone&#39;,
        GEEKSPHONE: &#39;GeeksPhone&#39;,
        GENERIC: &#39;Generic&#39;,
        GOOGLE: &#39;Google&#39;,
        HMD: &#39;HMD&#39;,
        HP: &#39;HP&#39;,
        HTC: &#39;HTC&#39;,
        HUAWEI: &#39;Huawei&#39;,
        IMO: &#39;IMO&#39;,
        INFINIX: &#39;Infinix&#39;,
        ITEL: &#39;itel&#39;,
        JOLLA: &#39;Jolla&#39;,
        KOBO: &#39;Kobo&#39;,
        LENOVO: &#39;Lenovo&#39;,
        LG: &#39;LG&#39;,
        MEIZU: &#39;Meizu&#39;,
        MICROMAX: &#39;Micromax&#39;,
        MICROSOFT: &#39;Microsoft&#39;,
        MOTOROLA: &#39;Motorola&#39;,
        NEXIAN: &#39;Nexian&#39;,
        NINTENDO: &#39;Nintendo&#39;,
        NOKIA: &#39;Nokia&#39;,
        NOTHING: &#39;Nothing&#39;,
        NVIDIA: &#39;Nvidia&#39;,
        ONEPLUS: &#39;OnePlus&#39;,
        OPPO: &#39;OPPO&#39;,
        OUYA: &#39;Ouya&#39;,
        PALM: &#39;Palm&#39;,
        PANASONIC: &#39;Panasonic&#39;,
        PEBBLE: &#39;Pebble&#39;,
        PICO: &#39;Pico&#39;,
        POLYTRON: &#39;Polytron&#39;,
        REALME: &#39;Realme&#39;,
        RIM: &#39;RIM&#39;,
        ROKU: &#39;Roku&#39;,
        SAMSUNG: &#39;Samsung&#39;,
        SHARP: &#39;Sharp&#39;,
        SIEMENS: &#39;Siemens&#39;,
        SMARTFREN: &#39;Smartfren&#39;,
        SONY: &#39;Sony&#39;,
        SPRINT: &#39;Sprint&#39;,
        TCL: &#39;TCL&#39;,
        TECHNISAT: &#39;TechniSAT&#39;,
        TECNO: &#39;Tecno&#39;,
        TESLA: &#39;Tesla&#39;,
        ULEFONE: &#39;Ulefone&#39;,
        VIVO: &#39;Vivo&#39;,
        VODAFONE: &#39;Vodafone&#39;,
        XBOX: &#39;Xbox&#39;,
        XIAOMI: &#39;Xiaomi&#39;,
        ZEBRA: &#39;Zebra&#39;,
        ZTE: &#39;ZTE&#39;,
    }, Engine = {
        AMAYA: &#39;Amaya&#39;,
        ARKWEB: &#39;ArkWeb&#39;,
        BLINK: &#39;Blink&#39;,
        EDGEHTML: &#39;EdgeHTML&#39;,
        FLOW: &#39;Flow&#39;,
        GECKO: &#39;Gecko&#39;,
        GOANNA: &#39;Goanna&#39;,
        ICAB: &#39;iCab&#39;,
        KHTML: &#39;KHTML&#39;,
        LIBWEB: &#39;LibWeb&#39;,
        LINKS: &#39;Links&#39;,
        LYNX: &#39;Lynx&#39;,
        NETFRONT: &#39;NetFront&#39;,
        NETSURF: &#39;NetSurf&#39;,
        PRESTO: &#39;Presto&#39;,
        SERVO: &#39;Servo&#39;,
        TASMAN: &#39;Tasman&#39;,
        TRIDENT: &#39;Trident&#39;,
        W3M: &#39;w3m&#39;,
        WEBKIT: &#39;WebKit&#39;,
    }, UAParserEnumOS = {
        AIX: &#39;AIX&#39;,
        AMIGA_OS: &#39;Amiga OS&#39;,
        ANDROID: &#39;Android&#39;,
        ANDROID_X86: &#39;Android-x86&#39;,
        ARCH: &#39;Arch&#39;,
        BADA: &#39;Bada&#39;,
        BEOS: &#39;BeOS&#39;,
        BLACKBERRY: &#39;BlackBerry&#39;,
        CENTOS: &#39;CentOS&#39;,
        CHROME_OS: &#39;Chrome OS&#39;,
        CHROMECAST: &#39;Chromecast&#39;,
        CHROMECAST_ANDROID: &#39;Chromecast Android&#39;,
        CHROMECAST_FUCHSIA: &#39;Chromecast Fuchsia&#39;,
        CHROMECAST_LINUX: &#39;Chromecast Linux&#39;,
        CHROMECAST_SMARTSPEAKER: &#39;Chromecast SmartSpeaker&#39;,
        CONTIKI: &#39;Contiki&#39;,
        DEBIAN: &#39;Debian&#39;,
        DEEPIN: &#39;Deepin&#39;,
        DRAGONFLY: &#39;DragonFly&#39;,
        ELEMENTARY_OS: &#39;elementary OS&#39;,
        FEDORA: &#39;Fedora&#39;,
        FIREFOX_OS: &#39;Firefox OS&#39;,
        FREEBSD: &#39;FreeBSD&#39;,
        FUCHSIA: &#39;Fuchsia&#39;,
        GENTOO: &#39;Gentoo&#39;,
        GHOSTBSD: &#39;GhostBSD&#39;,
        GNU: &#39;GNU&#39;,
        HAIKU: &#39;Haiku&#39;,
        HARMONYOS: &#39;HarmonyOS&#39;,
        HP_UX: &#39;HP-UX&#39;,
        HURD: &#39;Hurd&#39;,
        IOS: &#39;iOS&#39;,
        JOLI: &#39;Joli&#39;,
        KAIOS: &#39;KaiOS&#39;,
        KUBUNTU: &#39;Kubuntu&#39;,
        LINPUS: &#39;Linpus&#39;,
        LINSPIRE: &#39;Linspire&#39;,
        LINUX: &#39;Linux&#39;,
        MACOS: &#39;macOS&#39;,
        MAEMO: &#39;Maemo&#39;,
        MAGEIA: &#39;Mageia&#39;,
        MANDRIVA: &#39;Mandriva&#39;,
        MANJARO: &#39;Manjaro&#39;,
        MEEGO: &#39;MeeGo&#39;,
        MINIX: &#39;Minix&#39;,
        MINT: &#39;Mint&#39;,
        MORPH_OS: &#39;Morph OS&#39;,
        NETBSD: &#39;NetBSD&#39;,
        NETRANGE: &#39;NetRange&#39;,
        NETTV: &#39;NetTV&#39;,
        NINTENDO: &#39;Nintendo&#39;,
        OPENHARMONY: &#39;OpenHarmony&#39;,
        OPENBSD: &#39;OpenBSD&#39;,
        OPENVMS: &#39;OpenVMS&#39;,
        OS2: &#39;OS/2&#39;,
        PALM: &#39;Palm&#39;,
        PC_BSD: &#39;PC-BSD&#39;,
        PCLINUXOS: &#39;PCLinuxOS&#39;,
        PICO: &#39;Pico&#39;,
        PLAN9: &#39;Plan9&#39;,
        PLAYSTATION: &#39;PlayStation&#39;,
        QNX: &#39;QNX&#39;,
        RASPBIAN: &#39;Raspbian&#39;,
        REDHAT: &#39;RedHat&#39;,
        RIM_TABLET_OS: &#39;RIM Tablet OS&#39;,
        RISC_OS: &#39;RISC OS&#39;,
        SABAYON: &#39;Sabayon&#39;,
        SAILFISH: &#39;Sailfish&#39;,
        SERENITYOS: &#39;SerenityOS&#39;,
        SERIES40: &#39;Series40&#39;,
        SLACKWARE: &#39;Slackware&#39;,
        SOLARIS: &#39;Solaris&#39;,
        SUSE: &#39;SUSE&#39;,
        SYMBIAN: &#39;Symbian&#39;,
        TIZEN: &#39;Tizen&#39;,
        UBUNTU: &#39;Ubuntu&#39;,
        UBUNTU_TOUCH: &#39;Ubuntu Touch&#39;,
        UNIX: &#39;Unix&#39;,
        VECTORLINUX: &#39;VectorLinux&#39;,
        WATCHOS: &#39;watchOS&#39;,
        WEBOS: &#39;WebOS&#39;,
        WINDOWS: &#39;Windows&#39;,
        WINDOWS_IOT: &#39;Windows IoT&#39;,
        WINDOWS_MOBILE: &#39;Windows Mobile&#39;,
        WINDOWS_PHONE: &#39;Windows Phone&#39;,
        XBOX: &#39;Xbox&#39;,
        ZENWALK: &#39;Zenwalk&#39;,
    };
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                static get Browser() {
                    return Browser;
                }
                static get BrowserType() {
                    return BrowserType;
                }
                static get CPU() {
                    return CPU;
                }
                static get Device() {
                    return Device;
                }
                static get Vendor() {
                    return Vendor;
                }
                static get Engine() {
                    return Engine;
                }
                static get UAParserEnumOS() {
                    return UAParserEnumOS;
                }
            }
            E.UAParserEnums = i;
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                static get isMobile() {
                    let a = false;
                    return ((function (c) {
                        (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(c) ||
                            /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(c.substr(0, 4))) &amp;&amp;
                            (a = true);
                    })(navigator.userAgent || navigator.vendor || window.opera),
                        a);
                }
                static newGuid() {
                    return &#39;xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx&#39;.replace(/[xy]/g, function (a) {
                        const c = (Math.random() * 16) | 0;
                        return (a === &#39;x&#39; ? c : (c &amp; 3) | 8).toString(16);
                    });
                }
                static ieFix() {
                    let a;
                    (navigator.userAgent.indexOf(&#39;MSIE&#39;) != -1
                        ? (a = /MSIE (\d+\.\d+);/)
                        : (a = /Trident.*rv[ :]*(\d+\.\d+)/),
                        a.test(navigator.userAgent) &amp;&amp;
                            (document.body.setAttribute(&#39;style&#39;, &#39;-ms-touch-action:none;&#39;),
                                (document.body.style.touchAction = &#39;none&#39;),
                                (document.body.style.msTouchAction = &#39;none&#39;)));
                }
                static now() {
                    const a = window.performance || {};
                    return ((a.now = (function () {
                        return (a.now ||
                            a.webkitNow ||
                            a.msNow ||
                            a.oNow ||
                            a.mozNow ||
                            function () {
                                return new Date().getTime();
                            });
                    })()),
                        a.now());
                }
                static base64Uint8Array(a) {
                    const c = &#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&#39;;
                    let t, n = a.length, e = &#39;&#39;;
                    for (t = 0; t &lt; n; t += 3)
                        ((e += c[a[t] &gt;&gt; 2]),
                            (e += c[((a[t] &amp; 3) &lt;&lt; 4) | (a[t + 1] &gt;&gt; 4)]),
                            (e += c[((a[t + 1] &amp; 15) &lt;&lt; 2) | (a[t + 2] &gt;&gt; 6)]),
                            (e += c[a[t + 2] &amp; 63]));
                    return (n % 3 === 2
                        ? (e = e.substring(0, e.length - 1) + &#39;=&#39;)
                        : n % 3 === 1 &amp;&amp; (e = e.substring(0, e.length - 2) + &#39;==&#39;),
                        e);
                }
                static string2buf(a) {
                    if (typeof TextEncoder == &#39;function&#39; &amp;&amp; TextEncoder.prototype.encode)
                        return new TextEncoder().encode(a);
                    let c, t, n, e, o, s = a.length, x = 0;
                    for (e = 0; e &lt; s; e++)
                        ((t = a.charCodeAt(e)),
                            (t &amp; 64512) === 55296 &amp;&amp;
                                e + 1 &lt; s &amp;&amp;
                                ((n = a.charCodeAt(e + 1)),
                                    (n &amp; 64512) === 56320 &amp;&amp; ((t = 65536 + ((t - 55296) &lt;&lt; 10) + (n - 56320)), e++)),
                            (x += t &lt; 128 ? 1 : t &lt; 2048 ? 2 : t &lt; 65536 ? 3 : 4));
                    for (c = new Uint8Array(x), o = 0, e = 0; o &lt; x; e++)
                        ((t = a.charCodeAt(e)),
                            (t &amp; 64512) === 55296 &amp;&amp;
                                e + 1 &lt; s &amp;&amp;
                                ((n = a.charCodeAt(e + 1)),
                                    (n &amp; 64512) === 56320 &amp;&amp; ((t = 65536 + ((t - 55296) &lt;&lt; 10) + (n - 56320)), e++)),
                            t &lt; 128
                                ? (c[o++] = t)
                                : t &lt; 2048
                                    ? ((c[o++] = 192 | (t &gt;&gt;&gt; 6)), (c[o++] = 128 | (t &amp; 63)))
                                    : t &lt; 65536
                                        ? ((c[o++] = 224 | (t &gt;&gt;&gt; 12)),
                                            (c[o++] = 128 | ((t &gt;&gt;&gt; 6) &amp; 63)),
                                            (c[o++] = 128 | (t &amp; 63)))
                                        : ((c[o++] = 240 | (t &gt;&gt;&gt; 18)),
                                            (c[o++] = 128 | ((t &gt;&gt;&gt; 12) &amp; 63)),
                                            (c[o++] = 128 | ((t &gt;&gt;&gt; 6) &amp; 63)),
                                            (c[o++] = 128 | (t &amp; 63))));
                    return c;
                }
                static utf8Encode(a) {
                    a = a.replace(/\r\n/g, `
`);
                    let c = &#39;&#39;;
                    for (let t = 0; t &lt; a.length; t++) {
                        const n = a.charCodeAt(t);
                        n &lt; 128
                            ? (c += String.fromCharCode(n))
                            : n &gt; 127 &amp;&amp; n &lt; 2048
                                ? ((c += String.fromCharCode((n &gt;&gt; 6) | 192)),
                                    (c += String.fromCharCode((n &amp; 63) | 128)))
                                : ((c += String.fromCharCode((n &gt;&gt; 12) | 224)),
                                    (c += String.fromCharCode(((n &gt;&gt; 6) &amp; 63) | 128)),
                                    (c += String.fromCharCode((n &amp; 63) | 128)));
                    }
                    return c;
                }
                static hash(a) {
                    let c = i.hashCache.get(a);
                    return (c || ((c = l.sha256(a + E.Constants.SALT)), i.hashCache.set(a, c)), c);
                }
                static hashMini(a) {
                    const c = `${JSON.stringify(a)}`;
                    let t, n, e = 2166136261;
                    for (t = 0, n = c.length; t &lt; n; t++)
                        e = (Math.imul(31, e) + c.charCodeAt(t)) | 0;
                    return (&#39;0000000&#39; + (e &gt;&gt;&gt; 0).toString(16)).substr(-8);
                }
                static hashCode(a) {
                    let c = 0, t = a ? a.length : 0, n = 0;
                    if (t &gt; 0)
                        for (; n &lt; t;)
                            c = ((c &lt;&lt; 5) - c + a.charCodeAt(n++)) | 0;
                    return c;
                }
                static mod(a, c) {
                    return ((i.hashCode(a) % c) + c) % c;
                }
                static isEmail(a) {
                    try {
                        return (a &amp;&amp;
                            /^(([^&lt;&gt;()\[\]\\.,;:\s@&quot;]+(\.[^&lt;&gt;()\[\]\\.,;:\s@&quot;]+)*)|(&quot;.+&quot;))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a.toLowerCase()));
                    }
                    catch (c) {
                        return (E.Logger.warn(&#39;isEmail function failed to parse string&#39;, c), false);
                    }
                }
                static getEmailDomain(a) {
                    return i.isEmail(a) ? a.substring(a.lastIndexOf(&#39;@&#39;) + 1) : &#39;&#39;;
                }
                static extendPrimitiveValues(a, c, t) {
                    const n = i.allKeys(c);
                    let e = 0;
                    for (; e &lt; n.length;)
                        (!i.isObject(c[n[e]]) &amp;&amp; (!t || (t &amp;&amp; a[n[e]] === void 0)) &amp;&amp; (a[n[e]] = c[n[e]]), e++);
                    return a;
                }
                static flatten(a) {
                    const c = {};
                    return (i.dive(&#39;&#39;, a, c), c);
                }
                static isFunction(a) {
                    return a &amp;&amp; typeof a == &#39;function&#39;;
                }
                static isPassiveSupported() {
                    let a = false;
                    const c = function () { };
                    try {
                        const t = {
                            get passive() {
                                return ((a = !0), !0);
                            },
                        };
                        (window.addEventListener(&#39;test&#39;, c, t), window.removeEventListener(&#39;test&#39;, c, !1));
                    }
                    catch {
                        a = false;
                    }
                    return a;
                }
                static getAttribute(a, c) {
                    try {
                        if (a &amp;&amp; typeof a.getAttribute == &#39;function&#39;)
                            return a.getAttribute(c) || &#39;&#39;;
                    }
                    catch { }
                    return &#39;&#39;;
                }
                static createInvisibleElement(a) {
                    try {
                        const c = document.createElement(a);
                        return ((c.style.display = &#39;none&#39;),
                            (c.style.border = &#39;none&#39;),
                            (c.style.position = &#39;absolute&#39;),
                            (c.style.top = &#39;-999px&#39;),
                            (c.style.left = &#39;-999px&#39;),
                            (c.style.width = &#39;0&#39;),
                            (c.style.height = &#39;0&#39;),
                            (c.style.visibility = &#39;hidden&#39;),
                            c);
                    }
                    catch (c) {
                        return (E.Logger.warn(&#39;Failed to create element&#39;, c), null);
                    }
                }
                static values(a) {
                    const c = i.allKeys(a), t = c.length, n = Array(t);
                    for (let e = 0; e &lt; t; e++)
                        n[e] = a[c[e]];
                    return n;
                }
                static getValuesOfMap(a) {
                    if (this.isFunction(a.values))
                        return Array.from(a.values());
                    const c = [];
                    return (a.forEach((t) =&gt; c.push(t)), c);
                }
                static typesCounter(a) {
                    const c = { epochTs: Date.now() };
                    for (const t of a)
                        c[t.type] = (c[t.type] || 0) + 1;
                    return c;
                }
                static modifiersKeys(a) {
                    const c = [
                        &#39;Alt&#39;,
                        &#39;AltGraph&#39;,
                        &#39;CapsLock&#39;,
                        &#39;Control&#39;,
                        &#39;Fn&#39;,
                        &#39;FnLock&#39;,
                        &#39;Hyper&#39;,
                        &#39;Meta&#39;,
                        &#39;NumLock&#39;,
                        &#39;OS&#39;,
                        &#39;ScrollLock&#39;,
                        &#39;Shift&#39;,
                        &#39;Super&#39;,
                        &#39;Symbol&#39;,
                        &#39;SymbolLock&#39;,
                    ], t = [];
                    return (a.getModifierState &amp;&amp;
                        c.forEach((n) =&gt; {
                            a.getModifierState(n.toString()) &amp;&amp; t.push(n);
                        }),
                        t);
                }
                static getElementText(a) {
                    var c, t;
                    return a instanceof HTMLInputElement
                        ? [&#39;checkbox&#39;, &#39;radio&#39;].indexOf(a.type) &gt;= 0
                            ? `${a.checked}`
                            : a.value
                        : a instanceof HTMLSelectElement
                            ? (t = (c = a.selectedOptions) === null || c === void 0 ? void 0 : c[0]) === null ||
                                t === void 0
                                ? void 0
                                : t.innerText
                            : a.innerText;
                }
                static getSrcElement(a) {
                    return a.srcElement || a.target;
                }
                static getObjectType(a) {
                    try {
                        const t = /function (.{1,})\(/.exec(a.constructor.toString());
                        return t &amp;&amp; t.length &gt; 1 ? t[1] : &#39;&#39;;
                    }
                    catch {
                        return &#39;&#39;;
                    }
                }
                static isSelectorMatches(a, c, t) {
                    try {
                        const n = Element.prototype, e = n.matches || n.webkitMatchesSelector || n.mozMatchesSelector || n.msMatchesSelector;
                        let o = 0;
                        do {
                            if (e.call(a, c))
                                return a;
                            a = a.parentElement || a.parentNode;
                        } while (a !== null &amp;&amp; a.nodeType === 1 &amp;&amp; o++ &lt; t);
                        return null;
                    }
                    catch {
                        return null;
                    }
                }
                static anySelectorMatches(a, c, t) {
                    try {
                        for (const n of c)
                            if (this.isSelectorMatches(a, n, t))
                                return !0;
                    }
                    catch (n) {
                        E.Logger.warn(n);
                    }
                    return false;
                }
                static isArray(a) {
                    return Array.isArray
                        ? Array.isArray(a)
                        : Object.prototype.toString.call(a) === &#39;[object Array]&#39;;
                }
                static safeJsonParse(a) {
                    let c = null;
                    try {
                        a &amp;&amp; (c = JSON.parse(a));
                    }
                    catch (t) {
                        (E.Logger.warn(&#39;Failed to parse object &#39; + t), (c = null));
                    }
                    return c;
                }
                static getElementSelectionStart(a) {
                    let c;
                    try {
                        c = a.selectionStart;
                    }
                    catch {
                        c = &#39;&#39;;
                    }
                    return c;
                }
                static getElementSelectionEnd(a) {
                    let c;
                    try {
                        c = a.selectionEnd;
                    }
                    catch {
                        c = &#39;&#39;;
                    }
                    return c;
                }
                static isClickableInput(a) {
                    return (a &amp;&amp;
                        [
                            &#39;button&#39;,
                            &#39;checkbox&#39;,
                            &#39;color&#39;,
                            &#39;radio&#39;,
                            &#39;range&#39;,
                            &#39;image&#39;,
                            &#39;submit&#39;,
                            &#39;file&#39;,
                            &#39;reset&#39;,
                        ].indexOf(a.type) &gt;= 0);
                }
                static isTextInput(a) {
                    return (a &amp;&amp;
                        [
                            &#39;date&#39;,
                            &#39;datetime-local&#39;,
                            &#39;email&#39;,
                            &#39;month&#39;,
                            &#39;number&#39;,
                            &#39;password&#39;,
                            &#39;search&#39;,
                            &#39;tel&#39;,
                            &#39;text&#39;,
                            &#39;time&#39;,
                            &#39;url&#39;,
                            &#39;week&#39;,
                            &#39;datetime&#39;,
                        ].indexOf(a.type) &gt;= 0);
                }
                static getDeviceOrientation() {
                    const a = screen.orientation || screen.mozOrientation || {}, c = screen.msOrientation || a.type, t = a.angle;
                    return {
                        orientation: c == null ? void 0 : c.toString(),
                        angle: t == null ? void 0 : t.toString(),
                    };
                }
                static getDevToolsState() {
                    var a, c;
                    const n = window.outerWidth - window.innerWidth &gt; 160, e = window.outerHeight - window.innerHeight &gt; 160, o = n ? &#39;vertical&#39; : &#39;horizontal&#39;;
                    return !(e &amp;&amp; n) &amp;&amp;
                        ((!((c = (a = window.Firebug) === null || a === void 0 ? void 0 : a.chrome) === null ||
                            c === void 0) &amp;&amp;
                            c.isInitialized) ||
                            n ||
                            e)
                        ? { open: true, orientation: o }
                        : { open: false, orientation: void 0 };
                }
                static getCookie(a) {
                    const c = document.cookie.match(&#39;(^|;) ?&#39; + a + &#39;=([^;]*)(;|$)&#39;);
                    return c ? c[2] : null;
                }
                static setCookie(a, c, t) {
                    const n = new Date();
                    (n.setTime(n.getTime() + 1e3 * t),
                        (document.cookie =
                            a + &#39;=&#39; + c + &#39;;path=/;secure;SameSite=None;expires=&#39; + n.toUTCString()));
                }
                static deleteCookie(a) {
                    i.setCookie(a, &#39;&#39;, -1);
                }
                static delay(a) {
                    return new Promise((c) =&gt; setTimeout(c, a));
                }
                static getHostnameFromRegex(a) {
                    if (a) {
                        const c = a.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
                        return c &amp;&amp; c[1];
                    }
                    return null;
                }
                static inIframe() {
                    try {
                        return window.self !== window.top;
                    }
                    catch {
                        return true;
                    }
                }
                static promiseTimeout(a, c) {
                    const t = new Promise((n, e) =&gt; {
                        const o = setTimeout(() =&gt; {
                            (clearTimeout(o), e(new Error(&#39;Timed out in &#39; + a + &#39;ms.&#39;)));
                        }, a);
                    });
                    return Promise.race([c, t]);
                }
                static getProperty(a, c) {
                    return c.split(&#39;.&#39;).reduce(function (t, n) {
                        return t ? t[n] : null;
                    }, a);
                }
                static filterReduce(a, c) {
                    return Object.keys(a)
                        .filter((t) =&gt; c(a[t]))
                        .reduce((t, n) =&gt; ({ ...t, [n]: a[n] }), {});
                }
                static dive(a, c, t) {
                    for (const n in c)
                        if (c.hasOwnProperty(n)) {
                            let e = n;
                            const o = c[n];
                            (a.length &gt; 0 &amp;&amp; (e = a + &#39;.&#39; + n), i.isObject(o) ? i.dive(e, o, t) : (t[e] = o));
                        }
                }
                static isObject(a) {
                    const c = typeof a;
                    return c === &#39;function&#39; || (c === &#39;object&#39; &amp;&amp; !!a);
                }
                static allKeys(a) {
                    if (!i.isObject(a))
                        return [];
                    const c = [];
                    for (const t in a)
                        c.push(t);
                    return c;
                }
                static encryptionString(a, c) {
                    const t = [];
                    for (let n = 0; n &lt; a.length; n++) {
                        const e = a.charCodeAt(n) ^ c.charCodeAt(n % c.length);
                        t.push(String.fromCharCode(e));
                    }
                    return t.join(&#39;&#39;);
                }
                static encryptionBytes(a, c) {
                    const t = new Uint8Array(a.length);
                    for (let n = 0; n &lt; a.length; n++)
                        t[n] = a[n] ^ c.charCodeAt(n % c.length);
                    return t;
                }
                static parseJwt(a) {
                    const c = a.replace(/-/g, &#39;+&#39;).replace(/_/g, &#39;/&#39;), t = decodeURIComponent(window
                        .atob(c)
                        .split(&#39;&#39;)
                        .map((n) =&gt; &#39;%&#39; + (&#39;00&#39; + n.charCodeAt(0).toString(16)).slice(-2))
                        .join(&#39;&#39;));
                    return JSON.parse(t);
                }
                static calculateMeanTimeDeltasBetweenEvents(a) {
                    let c = 0;
                    if ((a == null ? void 0 : a.length) &gt; 1) {
                        let t = a[0].epochTs;
                        for (let n = 1; n &lt; a.length; n++)
                            ((c += a[n].epochTs - t), (t = a[n].epochTs));
                        c /= a.length - 1;
                    }
                    return c;
                }
                static sortEventsByTimestamp(a) {
                    return a.sort((c, t) =&gt; c.eventTs &gt; t.eventTs
                        ? 1
                        : c.eventTs &lt; t.eventTs
                            ? -1
                            : c.epochTs &gt; t.epochTs
                                ? 1
                                : c.epochTs &lt; t.epochTs
                                    ? -1
                                    : c.type === &#39;click&#39;
                                        ? 1
                                        : -1);
                }
                static distanceBetweenPoints(a, c) {
                    return Math.sqrt(Math.pow(a.getX() - c.getX(), 2) + Math.pow(a.getY() - c.getY(), 2));
                }
                static calculateMeanDistanceBetweenPoints(a) {
                    let c = 0;
                    if ((a == null ? void 0 : a.length) &gt; 1) {
                        for (let t = 1; t &lt; a.length; t++)
                            c += i.distanceBetweenPoints(a[t - 1], a[t]);
                        c /= a.length - 1;
                    }
                    return c;
                }
                static filterArrayByLength(a, c) {
                    return a.length &lt;= c ? a : a.slice(0, c).concat(a[a.length - 1]);
                }
                static keepFirstEventsWithDistance(a) {
                    const { events: c, threshold: t, min: n, max: e } = a;
                    if (c.length &lt;= n)
                        return c;
                    const o = c[0];
                    let s;
                    for (s = 1; s &lt; c.length &amp;&amp;
                        s &lt; e &amp;&amp;
                        !(Math.max(Math.abs(c[s].getX() - o.getX()), Math.abs(c[s].getY() - o.getY())) &gt;= t); s++)
                        ;
                    return c.slice(0, Math.max(s + 1, n));
                }
                static ab2str(a) {
                    return String.fromCharCode.apply(null, new Uint8Array(a));
                }
                static str2ab(a) {
                    const c = new ArrayBuffer(a.length), t = new Uint8Array(c);
                    for (let n = 0, e = a.length; n &lt; e; n++)
                        t[n] = a.charCodeAt(n);
                    return c;
                }
                static encode(a) {
                    const c = JSON.stringify(a), t = new TextEncoder().encode(c), n = i.base64Uint8Array(t);
                    return i.base64url(n);
                }
                static base64url(a) {
                    return a.replace(/\+/g, &#39;-&#39;).replace(/\//g, &#39;_&#39;).replace(/=+$/, &#39;&#39;);
                }
            }
            ((i.hashCache = new Map()),
                (i.keyStr = &#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=&#39;),
                (E.Util = i));
        })((l._POSignalsUtils || (l._POSignalsUtils = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        var f = l.openDB;
        (function (i) {
            class r {
                constructor() { }
                static async initDB() {
                    if (!(window.indexedDB ||
                        window.mozIndexedDB ||
                        window.webkitIndexedDB ||
                        window.msIndexedDB))
                        throw new Error(&#39;IndexedDB is not supported&#39;);
                    const t = new r();
                    return new Promise(async (n) =&gt; {
                        ((t.indexedDatabase = await f(this._PingDBName, r._version, {
                            upgrade(e, o, s, x, m) {
                                e.createObjectStore(r._storeDefaultName);
                            },
                        })),
                            n(t));
                    });
                }
                close() {
                    this.indexedDatabase.close();
                }
                getValue(c) {
                    return this.indexedDatabase.get(r._storeDefaultName, c);
                }
                setValue(c, t) {
                    return this.indexedDatabase.put(r._storeDefaultName, t, c);
                }
            }
            ((r._PingDBName = &#39;Ping&#39;),
                (r._version = 1),
                (r._storeDefaultName = &#39;PING_ONE&#39;),
                (i.IndexedDBStorage = r));
        })((l._POSignalsStorage || (l._POSignalsStorage = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i, r, a) {
                ((this.deviceId = i), (this.dbStorage = r), (this.cryptoHandler = a));
            }
            async getExportedPublicKey() {
                if (!this.cachedPublicKey) {
                    const i = await this.getDeviceKeys();
                    i &amp;&amp; (this.cachedPublicKey = await this.cryptoHandler.exportPublicKey(i));
                }
                return (l._POSignalsUtils.Logger.info(&#39;Exported public key:&#39;, this.cachedPublicKey),
                    this.cachedPublicKey);
            }
            async setDeviceKeys(i) {
                const r = await this.dbStorage.setValue(this.deviceId, i);
                return ((this.cachedDeviceKey = i), r);
            }
            async associateDeviceKeys() {
                const i = await this.cryptoHandler.generateKeys();
                return (l._POSignalsUtils.Logger.info(&#39;Associating new device domain keys&#39;),
                    await this.setDeviceKeys(i),
                    i);
            }
            async getDeviceKeys() {
                return (this.cachedDeviceKey ||
                    (this.cachedDeviceKey = await this.dbStorage.getValue(this.deviceId)),
                    this.cachedDeviceKey);
            }
            async signDeviceAttributeWithJWT(i, r, a) {
                return await this.cryptoHandler.signJWT(i, await this.getDeviceKeys(), f._default_salt, r, a);
            }
            async verifyJWT(i) {
                return this.cryptoHandler.verifyJwtToken(i, (await this.getDeviceKeys()).publicKey);
            }
        }
        ((f._default_salt = 32), (l.DeviceKeys = f));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                constructor() {
                    ((this._disabledStorage = []),
                        (this.assertionValues = [
                            &#39;BROWSER_ENGINE_VERSION&#39;,
                            &#39;NAVIGATOR_LANGUAGE&#39;,
                            &#39;OS_NAME&#39;,
                            &#39;OS_VERSION&#39;,
                            &#39;NAVIGATOR_USER_AGENT&#39;,
                            &#39;FINGER_PRINT&#39;,
                            &#39;RESOLUTION&#39;,
                            &#39;PUSH_NOTIFICATIONS_SUPPORTED&#39;,
                            &#39;COOKIES_ENABLED&#39;,
                            &#39;IS_INCOGNITO&#39;,
                            &#39;IS_PRIVATE_MODE&#39;,
                        ]));
                    try {
                        (window.sessionStorage.setItem(&#39;_st_storage_enabled_check&#39;, &#39;test&#39;),
                            window.sessionStorage.removeItem(&#39;_st_storage_enabled_check&#39;),
                            (this.signalsSessionStorage = window.sessionStorage));
                    }
                    catch {
                        (l._POSignalsUtils.Logger.warn(&#39;session storage disabled&#39;),
                            this._disabledStorage.push(&#39;sessionStorage&#39;),
                            (this.signalsSessionStorage = new E.StorageFallback()));
                    }
                    try {
                        (window.localStorage.setItem(&#39;_st_storage_enabled_check&#39;, &#39;test&#39;),
                            window.localStorage.removeItem(&#39;_st_storage_enabled_check&#39;),
                            (this.signalsLocalStorage = new E.StorageWrapper(window.localStorage)));
                    }
                    catch {
                        (l._POSignalsUtils.Logger.warn(&#39;local storage disabled&#39;),
                            this._disabledStorage.push(&#39;localStorage&#39;),
                            (this.signalsLocalStorage = new E.StorageWrapper(new E.StorageFallback())));
                    }
                }
                setStorageConfig(a) {
                    ((this.universalTrustEnabled = this.isConfigurationEnabled(a.universalDeviceIdentification)),
                        (this.agentIdentificationEnabled = this.isConfigurationEnabled(a.agentIdentification)),
                        (this.devEnv = a.devEnv),
                        (this.agentPort = a.agentPort),
                        (this.agentTimeout = a.agentTimeout),
                        (this.htmlGeoLocation = this.isConfigurationEnabled(a.htmlGeoLocation)),
                        (this.isIAFDetectionEnabled = this.isConfigurationEnabled(a.isIAFDetectionEnabled)));
                }
                static get instance() {
                    return (i._instance || (i._instance = new i()), i._instance);
                }
                get tabUUID() {
                    let a = this.signalsSessionStorage.getItem(l._POSignalsUtils.Constants.TAB_UUID_KEY);
                    return (a ||
                        ((a = l._POSignalsUtils.Util.newGuid()),
                            this.signalsSessionStorage.setItem(l._POSignalsUtils.Constants.TAB_UUID_KEY, a)),
                        a);
                }
                get ops() {
                    const a = Number(this.signalsSessionStorage.getItem(l._POSignalsUtils.Constants.OPS_KEY));
                    return isNaN(a) ? null : a;
                }
                set ops(a) {
                    a
                        ? this.signalsSessionStorage.setItem(l._POSignalsUtils.Constants.OPS_KEY, a.toString())
                        : this.signalsSessionStorage.removeItem(l._POSignalsUtils.Constants.OPS_KEY);
                }
                get disabledStorage() {
                    return this._disabledStorage;
                }
                get sessionStorage() {
                    return this.signalsSessionStorage;
                }
                get localStorage() {
                    return this.signalsLocalStorage;
                }
                async initDeviceIdentity() {
                    let a;
                    const c = this.signalsLocalStorage.getItem(l._POSignalsUtils.Constants.DEVICE_ID_KEY), t = this.signalsLocalStorage.getItem(l._POSignalsUtils.Constants.DEVICE_ID_CREATED_AT);
                    return (c &amp;&amp; (this.cachedDeviceId = c),
                        this.universalTrustEnabled &amp;&amp;
                            ((this.deviceTrust = { attestation: {}, dtts: new Date().getTime() }),
                                (this.indexedDBStorage = await E.IndexedDBStorage.initDB()),
                                (a = await this.loadLocalDeviceTrust())),
                        this.getDeviceId() || (await this.associateDeviceDetails()),
                        t ||
                            this.signalsLocalStorage.setItem(l._POSignalsUtils.Constants.DEVICE_ID_CREATED_AT, Date.now()),
                        this.universalTrustEnabled &amp;&amp;
                            (!this.getDeviceId() || !a) &amp;&amp;
                            (await this.createDomainKeys()),
                        this.getDeviceId());
                }
                shouldFallbackToP1Key(a) {
                    return (this.universalTrustEnabled &amp;&amp;
                        (!a || this.isRefreshRequired(this.deviceKeyRsyncIntervals)));
                }
                isRefreshRequired(a = 3) {
                    if (!this.deviceTrust.dtts)
                        return true;
                    const c = this.signalsLocalStorage.getItem(l._POSignalsUtils.Constants.LAST_DEVICE_KEY_RESYNC);
                    if (!c || isNaN(parseInt(c)))
                        return true;
                    const n = this.deviceTrust.dtts - c &gt; 60 * 60 * 24 * 1e3 * a;
                    return (n &amp;&amp; l._POSignalsUtils.Logger.debug(&#39;Refresh required&#39;), n);
                }
                async loadLocalDeviceTrust() {
                    try {
                        let a;
                        if (!this.cachedDeviceId)
                            return (l._POSignalsUtils.Logger.debug(&#39;No device id found on customer domain&#39;), !1);
                        if (this.cachedDeviceId)
                            return ((this.domainDeviceKeys = new l.DeviceKeys(this.getDeviceId(), this.indexedDBStorage, new l._POSignalsUtils.CryptoOperator())),
                                (a = await this.domainDeviceKeys.getDeviceKeys()),
                                a
                                    ? ((this.deviceTrust.attestation.deviceKey =
                                        await this.domainDeviceKeys.getExportedPublicKey()),
                                        !0)
                                    : (l._POSignalsUtils.Logger.debug(&#39;No device keys found on customer domain&#39;), !1));
                    }
                    catch (a) {
                        return (l._POSignalsUtils.Logger.error(&#39;Domain PKI initialization failed&#39;, a), false);
                    }
                }
                async createDomainKeys() {
                    try {
                        ((this.domainDeviceKeys = new l.DeviceKeys(this.getDeviceId(), this.indexedDBStorage, new l._POSignalsUtils.CryptoOperator())),
                            await this.domainDeviceKeys.associateDeviceKeys(),
                            (this.deviceTrust.attestation.deviceKey =
                                await this.domainDeviceKeys.getExportedPublicKey()));
                    }
                    catch (a) {
                        l._POSignalsUtils.Logger.error(&#39;Domain PKI initialization failed&#39;, a);
                    }
                }
                getDeviceId() {
                    return this.cachedDeviceId;
                }
                getDeviceCreatedAt() {
                    return this.signalsLocalStorage.getItem(l._POSignalsUtils.Constants.DEVICE_ID_CREATED_AT);
                }
                async associateDeviceDetails() {
                    var a, c;
                    return (l._POSignalsUtils.Logger.debug(&#39;Associating fresh device details&#39;),
                        (this.cachedDeviceId = `Id-${l._POSignalsUtils.Util.newGuid()}`),
                        this.signalsLocalStorage.setItem(l._POSignalsUtils.Constants.DEVICE_ID_KEY, this.cachedDeviceId),
                        this.signalsLocalStorage.setItem(l._POSignalsUtils.Constants.DEVICE_ID_CREATED_AT, Date.now()),
                        l._POSignalsUtils.Logger.debug(`PingOne Signals deviceId: ${this.cachedDeviceId}`),
                        [
                            this.cachedDeviceId,
                            (c = (a = this.deviceTrust) === null || a === void 0 ? void 0 : a.attestation) ===
                                null || c === void 0
                                ? void 0
                                : c.fallbackDeviceKey,
                        ]);
                }
                closeTrustStore() {
                    try {
                        this.indexedDBStorage &amp;&amp; this.indexedDBStorage.close();
                    }
                    catch (a) {
                        l._POSignalsUtils.Logger.info(&#39;Unable to close trust store:&#39;, a);
                    }
                }
                isConfigurationEnabled(a) {
                    return a == null
                        ? false
                        : typeof a == &#39;boolean&#39;
                            ? a
                            : typeof a == &#39;string&#39; &amp;&amp; a.toLowerCase() === &#39;true&#39;;
                }
                async signJWTChallenge(a, c, t) {
                    return this.domainDeviceKeys.signDeviceAttributeWithJWT(a, c, t);
                }
                getGeoSessionData() {
                    const a = this.signalsSessionStorage.getItem(l._POSignalsUtils.Constants.GeoDataKey);
                    return a == null ? null : a;
                }
            }
            E.SessionStorage = i;
        })((l._POSignalsStorage || (l._POSignalsStorage = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            class i {
                constructor(c) {
                    this.storage = c;
                }
                getItem(c) {
                    const t = l._POSignalsUtils.Util.hash(c);
                    let n = this.storage.getItem(t);
                    return (n ||
                        ((n = this.storage.getItem(c)),
                            n &amp;&amp; (this.storage.setItem(t, n), this.storage.removeItem(c))),
                        n);
                }
                removeItem(c) {
                    return this.storage.removeItem(l._POSignalsUtils.Util.hash(c));
                }
                setItem(c, t) {
                    return this.storage.setItem(l._POSignalsUtils.Util.hash(c), t);
                }
            }
            E.StorageWrapper = i;
            class r {
                constructor() {
                    this.internalStorageMap = new Map();
                }
                getItem(c) {
                    return this.internalStorageMap.get(c);
                }
                removeItem(c) {
                    this.internalStorageMap.delete(c);
                }
                setItem(c, t) {
                    this.internalStorageMap.set(c, t);
                }
            }
            E.StorageFallback = r;
        })((l._POSignalsStorage || (l._POSignalsStorage = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    const _0x44f950 = _0x48f7;
    function _0x48f7(l, f) {
        const E = _0x1ccc();
        return ((_0x48f7 = function (i, r) {
            return ((i = i - 308), E[i]);
        }),
            _0x48f7(l, f));
    }
    (function (l, f) {
        const E = _0x48f7, i = l();
        for (;;)
            try {
                if (-parseInt(E(1382)) / 1 +
                    (parseInt(E(1161)) / 2) * (parseInt(E(1510)) / 3) +
                    parseInt(E(1242)) / 4 +
                    -parseInt(E(1015)) / 5 +
                    -parseInt(E(710)) / 6 +
                    parseInt(E(1053)) / 7 +
                    parseInt(E(1284)) / 8 ===
                    f)
                    break;
                i.push(i.shift());
            }
            catch {
                i.push(i.shift());
            }
    })(_0x1ccc, 914438);
    var __awaiter = (undefined &amp;&amp; undefined[_0x44f950(544)]) ||
        function (l, f, E, i) {
            function r(a) {
                return a instanceof E
                    ? a
                    : new E(function (c) {
                        c(a);
                    });
            }
            return new (E || (E = Promise))(function (a, c) {
                const t = _0x48f7;
                function n(s) {
                    const x = _0x48f7;
                    try {
                        o(i[x(1448)](s));
                    }
                    catch (m) {
                        c(m);
                    }
                }
                function e(s) {
                    const x = _0x48f7;
                    try {
                        o(i[x(594)](s));
                    }
                    catch (m) {
                        c(m);
                    }
                }
                function o(s) {
                    const x = _0x48f7;
                    s.done ? a(s[x(584)]) : r(s[x(584)])[x(804)](n, e);
                }
                o((i = i[t(399)](l, f || []))[t(1448)]());
            });
        }, _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                [r(729)]() {
                    const t = r;
                    try {
                        const n = {
                            hasAutofill: !1,
                            autofillCount: 0,
                            detectedFields: [],
                            detectionMethods: [],
                        };
                        if (typeof document == &#39;undefined&#39;)
                            return (l[t(631)].Logger[t(829)](t(856)),
                                {
                                    hasAutofill: !1,
                                    autofillCount: 0,
                                    detectedFields: [],
                                    detectionMethods: [t(1129)],
                                });
                        if (!document[t(517)])
                            return (l[t(631)][t(867)][t(829)](t(1310)),
                                {
                                    hasAutofill: !1,
                                    autofillCount: 0,
                                    detectedFields: [],
                                    detectionMethods: [t(764)],
                                });
                        let e;
                        try {
                            e = document.querySelectorAll(t(816));
                        }
                        catch (m) {
                            return (l[t(631)][t(867)][t(829)](&#39;Failed to query input elements:&#39;, m),
                                {
                                    hasAutofill: !1,
                                    autofillCount: 0,
                                    detectedFields: [],
                                    detectionMethods: [t(617)],
                                });
                        }
                        if (e[t(368)] &lt;= 50)
                            return this[t(678)](e, n);
                        const s = 1e3, x = Math[t(770)](e[t(368)], s);
                        return (e.length &gt; s &amp;&amp;
                            l._POSignalsUtils.Logger.warn(&#39;Large DOM detected: &#39; + e[t(368)] + t(767) + s),
                            this[t(369)](e, x, n));
                    }
                    catch (n) {
                        return (l._POSignalsUtils[t(867)].warn(t(1263), n),
                            { hasAutofill: false, autofillCount: 0, detectedFields: [], detectionMethods: [&#39;error&#39;] });
                    }
                }
                processInputsSynchronously(t, n) {
                    const e = r;
                    for (let o = 0; o &lt; t[e(368)]; o++)
                        try {
                            const s = t[o], x = this.detectInputAutofill(s);
                            x[e(554)] &amp;&amp; this[e(1110)](n, s, x);
                        }
                        catch (s) {
                            l[e(631)][e(867)].warn(e(793) + o + &#39;:&#39;, s);
                        }
                    return n;
                }
                [r(369)](t, n, e) {
                    const o = r, s = performance[o(308)](), x = 100, m = 10;
                    let p = 0;
                    for (; p &lt; n;) {
                        if (performance[o(308)]() - s &gt; x) {
                            (l[o(631)][o(867)].warn(o(962) + p + &#39;/&#39; + n + o(688)),
                                e[o(928)][o(1265)](o(1523)) === -1 &amp;&amp; e.detectionMethods[o(939)](o(1523)));
                            break;
                        }
                        const I = Math[o(770)](p + m, n);
                        for (let g = p; g &lt; I; g++)
                            try {
                                const v = t[g], A = this[o(520)](v);
                                A.isAutofilled &amp;&amp; this[o(1110)](e, v, A);
                            }
                            catch (v) {
                                l[o(631)][o(867)][o(829)](o(793) + g + &#39;:&#39;, v);
                            }
                        p = I;
                    }
                    return e;
                }
                [r(1110)](t, n, e) {
                    const o = r;
                    ((t.hasAutofill = true),
                        t[o(922)]++,
                        t[o(1169)][o(939)]({
                            type: n[o(322)] || o(1299),
                            name: n[o(1246)] || &#39;&#39;,
                            id: n.id || &#39;&#39;,
                            placeholder: n[o(1216)] || &#39;&#39;,
                            value: n[o(584)] ? n[o(584)][o(1073)](0, 3) + o(451) : &#39;&#39;,
                            detectionMethod: e.method,
                        }),
                        t[o(928)][o(1265)](e[o(587)]) === -1 &amp;&amp; t[o(928)][o(939)](e[o(587)]));
                }
                detectInputAutofill(t) {
                    const n = r;
                    if (!t || t[n(708)] !== n(1513))
                        return { isAutofilled: false, method: n(460) };
                    try {
                        if (t.matches &amp;&amp; t[n(1256)](n(1356)))
                            return { isAutofilled: !0, method: n(472) };
                    }
                    catch { }
                    try {
                        if (t[n(1256)] &amp;&amp; t[n(1256)](&#39;:-moz-autofill&#39;))
                            return { isAutofilled: !0, method: n(1200) };
                    }
                    catch { }
                    try {
                        const e = window[n(1396)](t), o = e[n(1504)];
                        if ([n(310), n(378)][n(1265)](o) !== -1 || o[n(1265)](n(1261)) !== -1)
                            return { isAutofilled: !0, method: &#39;background-color&#39; };
                    }
                    catch { }
                    try {
                        if (t[n(584)] &amp;&amp; t[n(584)][n(368)] &gt; 0) {
                            if (t[n(1366)](n(1072)) || t[n(1366)](n(500)))
                                return { isAutofilled: !0, method: n(842) };
                            if (t.hasAttribute(n(1271)) || t[n(1266)][n(637)](n(984))) {
                                const e = [n(1179), n(1410), n(1353), n(1246), n(1189)];
                                if (e.indexOf(t[n(322)]) !== -1 ||
                                    e[n(1148)]((o) =&gt; t[n(1246)] &amp;&amp; t[n(1246)][n(1479)]()[n(1265)](o) !== -1))
                                    return { isAutofilled: !0, method: n(1089) };
                            }
                        }
                    }
                    catch { }
                    try {
                        if (t.classList[n(637)](n(586)) ||
                            t.classList[n(637)](&#39;auto-filled&#39;) ||
                            t[n(1366)](n(789)) ||
                            t[n(1366)](n(531)))
                            return { isAutofilled: !0, method: n(851) };
                    }
                    catch { }
                    try {
                        if (t[n(1058)][n(540)] === &#39;autofill-detection&#39; || t[n(1058)].animationName === n(1319))
                            return { isAutofilled: !0, method: n(871) };
                    }
                    catch { }
                    return { isAutofilled: false, method: n(460) };
                }
                [r(1225)]() {
                    const t = r;
                    try {
                        if (typeof document == &#39;undefined&#39; || !document.querySelectorAll)
                            return { hasEmail: !1, hasPassword: !1, hasName: !1, hasNumber: !1, hasInput: !1 };
                        const n = document.querySelectorAll(&#39;input&#39;);
                        let e = !1, o = !1, s = !1, x = !1;
                        const m = n[t(368)] &gt; 0;
                        for (let p = 0; p &lt; n[t(368)]; p++) {
                            const I = n[p], g = (I[t(322)] || &#39;text&#39;)[t(1479)](), v = (I[t(1246)] || &#39;&#39;)[t(1479)](), A = (I.id || &#39;&#39;)[t(1479)](), S = (I[t(346)] || &#39;&#39;)[t(1479)](), d = (I[t(1216)] || &#39;&#39;).toLowerCase(), _ = (I[t(1503)](t(1282)) || &#39;&#39;).toLowerCase();
                            let L = &#39;&#39;;
                            try {
                                if (I.id) {
                                    const y = document[t(580)](&#39;label[for=&quot;&#39; + I.id + &#39;&quot;]&#39;);
                                    y &amp;&amp; (L = (y[t(1065)] || &#39;&#39;)[t(1479)]());
                                }
                                if (!L) {
                                    const y = I.closest(&#39;label&#39;);
                                    y &amp;&amp; (L = (y.textContent || &#39;&#39;)[t(1479)]());
                                }
                            }
                            catch { }
                            if ((e ||
                                ((g === t(1179) ||
                                    v[t(1265)](t(1179)) !== -1 ||
                                    A[t(1265)](t(1179)) !== -1 ||
                                    S[t(1265)](t(1179)) !== -1 ||
                                    d[t(1265)](t(1179)) !== -1 ||
                                    _[t(1265)](t(1179)) !== -1 ||
                                    L.indexOf(&#39;email&#39;) !== -1 ||
                                    L.indexOf(t(850)) !== -1) &amp;&amp;
                                    (e = !0)),
                                o ||
                                    ((g === t(1410) ||
                                        v[t(1265)](t(1410)) !== -1 ||
                                        v.indexOf(&#39;passwd&#39;) !== -1 ||
                                        v.indexOf(&#39;pass&#39;) !== -1 ||
                                        v.indexOf(t(582)) !== -1 ||
                                        A[t(1265)](t(1410)) !== -1 ||
                                        A[t(1265)](t(825)) !== -1 ||
                                        S.indexOf(t(1410)) !== -1 ||
                                        d.indexOf(&#39;password&#39;) !== -1 ||
                                        L[t(1265)](t(1410)) !== -1) &amp;&amp;
                                        (o = !0)),
                                s ||
                                    ((g === t(1246) ||
                                        v.indexOf(t(1246)) !== -1 ||
                                        v[t(1265)](&#39;username&#39;) !== -1 ||
                                        v[t(1265)](t(559)) !== -1 ||
                                        A[t(1265)](t(1246)) !== -1 ||
                                        A[t(1265)](t(1376)) !== -1 ||
                                        A[t(1265)](t(559)) !== -1 ||
                                        S[t(1265)](t(1246)) !== -1 ||
                                        S[t(1265)](t(1376)) !== -1 ||
                                        d.indexOf(t(1246)) !== -1 ||
                                        L[t(1265)](&#39;name&#39;) !== -1 ||
                                        L.indexOf(t(1376)) !== -1 ||
                                        L[t(1265)](t(1150)) !== -1) &amp;&amp;
                                        (s = !0)),
                                x ||
                                    ((g === t(1353) ||
                                        g === t(497) ||
                                        v[t(1265)](t(727)) !== -1 ||
                                        v[t(1265)](t(1353)) !== -1 ||
                                        v.indexOf(t(512)) !== -1 ||
                                        v.indexOf(t(662)) !== -1 ||
                                        A[t(1265)](t(727)) !== -1 ||
                                        A[t(1265)](t(1353)) !== -1 ||
                                        A.indexOf(t(512)) !== -1 ||
                                        S[t(1265)](&#39;tel&#39;) !== -1 ||
                                        d[t(1265)](t(727)) !== -1 ||
                                        L[t(1265)](t(727)) !== -1 ||
                                        L[t(1265)](t(512)) !== -1) &amp;&amp;
                                        (x = !0)),
                                e &amp;&amp; o &amp;&amp; s &amp;&amp; x))
                                break;
                        }
                        return { hasEmail: e, hasPassword: o, hasName: s, hasNumber: x, hasInput: m };
                    }
                    catch (n) {
                        return (l[t(631)].Logger[t(829)](&#39;Error detecting page input fields:&#39;, n),
                            { hasEmail: false, hasPassword: false, hasName: false, hasNumber: false, hasInput: false });
                    }
                }
                static [r(865)]() {
                    const t = r;
                    try {
                        if (!document.getElementById(t(759))) {
                            const n = document[t(983)](t(1058));
                            ((n.id = t(759)),
                                (n.textContent =
                                    t(1427) +
                                        &#39;@keyframes autofill-detection { 0% { opacity: 1; } 100% { opacity: 1; } }&#39;),
                                document[t(1295)].appendChild(n));
                        }
                        document[t(806)](t(1423), function (n) {
                            const e = t;
                            if (n[e(540)] === &#39;autofill-detection&#39;) {
                                const o = n.target;
                                o &amp;&amp;
                                    o[e(708)] === e(1513) &amp;&amp;
                                    (o[e(318)](e(1072), e(413)), o[e(1266)][e(373)](&#39;autofilled&#39;));
                            }
                        }, !0);
                    }
                    catch (n) {
                        l[t(631)].Logger[t(829)](t(1506), n);
                    }
                }
                [r(479)]() {
                    const t = r, n = this.detectAutofillFields(), e = this.detectPageInputFields();
                    return {
                        AUTOFILL_DETECTED: n[t(632)],
                        AUTOFILL_COUNT: n[t(922)],
                        AUTOFILL_FIELDS_COUNT: n[t(1169)][t(368)],
                        AUTOFILL_METHODS: n[t(928)][t(1512)](&#39;,&#39;),
                        AUTOFILL_FIELD_TYPES: n[t(1169)][t(341)]((o) =&gt; o.type)[t(1512)](&#39;,&#39;),
                        HAS_EMAIL: e[t(810)],
                        HAS_PASSWORD: e[t(1457)],
                        HAS_NAME: e.hasName,
                        HAS_NUMBER: e[t(1177)],
                        HAS_INPUT: e.hasInput,
                    };
                }
                getAutofillMetadataAsync() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7, n = yield this[t(316)](), e = this[t(1225)]();
                        return {
                            AUTOFILL_DETECTED: n[t(632)],
                            AUTOFILL_COUNT: n[t(922)],
                            AUTOFILL_FIELDS_COUNT: n[t(1169)][t(368)],
                            AUTOFILL_METHODS: n.detectionMethods[t(1512)](&#39;,&#39;),
                            AUTOFILL_FIELD_TYPES: n.detectedFields[t(341)]((o) =&gt; o[t(322)]).join(&#39;,&#39;),
                            HAS_EMAIL: e[t(810)],
                            HAS_PASSWORD: e[t(1457)],
                            HAS_NAME: e[t(581)],
                            HAS_NUMBER: e[t(1177)],
                            HAS_INPUT: e[t(1409)],
                        };
                    });
                }
                [r(1415)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7;
                        try {
                            return document[t(517)](t(816))[t(368)] &gt; 500
                                ? yield this[t(1032)]()
                                : this[t(479)]();
                        }
                        catch (n) {
                            return (l._POSignalsUtils[t(867)][t(829)](t(542), n), this[t(479)]());
                        }
                    });
                }
                detectAutofillFieldsAsync() {
                    return __awaiter(this, void 0, void 0, function* () {
                        return new Promise((t) =&gt; {
                            const n = _0x48f7;
                            try {
                                const e = {
                                    hasAutofill: !1,
                                    autofillCount: 0,
                                    detectedFields: [],
                                    detectionMethods: [],
                                };
                                if (typeof document == &#39;undefined&#39;) {
                                    (l[n(631)][n(867)].warn(n(1160)),
                                        t({
                                            hasAutofill: !1,
                                            autofillCount: 0,
                                            detectedFields: [],
                                            detectionMethods: [&#39;document-unavailable&#39;],
                                        }));
                                    return;
                                }
                                let o;
                                try {
                                    o = document[n(517)](&#39;input&#39;);
                                }
                                catch (g) {
                                    (l._POSignalsUtils[n(867)][n(829)](n(693), g),
                                        t({
                                            hasAutofill: !1,
                                            autofillCount: 0,
                                            detectedFields: [],
                                            detectionMethods: [n(617)],
                                        }));
                                    return;
                                }
                                const s = 2e3, x = Math[n(770)](o[n(368)], s), m = 20;
                                let p = 0;
                                const I = () =&gt; {
                                    const g = n, v = Math.min(p + m, x);
                                    for (let A = p; A &lt; v; A++)
                                        try {
                                            const S = o[A], d = this[g(520)](S);
                                            d[g(554)] &amp;&amp; this[g(1110)](e, S, d);
                                        }
                                        catch (S) {
                                            l[g(631)][g(867)][g(829)](g(793) + A + g(432), S);
                                        }
                                    ((p = v),
                                        p &gt;= x
                                            ? t(e)
                                            : window.requestIdleCallback
                                                ? window.requestIdleCallback(I, { timeout: 50 })
                                                : setTimeout(I, 0));
                                };
                                window[n(518)] ? window[n(518)](I, { timeout: 50 }) : setTimeout(I, 0);
                            }
                            catch (e) {
                                (l[n(631)][n(867)][n(829)](n(763), e),
                                    t({
                                        hasAutofill: false,
                                        autofillCount: 0,
                                        detectedFields: [],
                                        detectionMethods: [&#39;async-error&#39;],
                                    }));
                            }
                        });
                    });
                }
            }
            i[r(1201)] = a;
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                constructor() {
                    const t = _0x48f7;
                    ((this[t(323)] = t(1460)),
                        (this[t(898)] = t(1093)),
                        (this[t(1483)] = [t(1167), &#39;sans-serif&#39;, &#39;serif&#39;]),
                        (this[t(522)] = [
                            t(406),
                            &#39;Arial Black&#39;,
                            &#39;Arial Narrow&#39;,
                            &#39;Arial Rounded MT Bold&#39;,
                            t(530),
                            t(758),
                            &#39;Cambria&#39;,
                            &#39;Cambria Math&#39;,
                            t(701),
                            t(1308),
                            t(1458),
                            t(668),
                            t(1158),
                            t(546),
                            t(609),
                            &#39;Franklin Gothic Medium&#39;,
                            t(843),
                            &#39;Gadugi&#39;,
                            t(1524),
                            &#39;HoloLens MDL2 Assets&#39;,
                            t(890),
                            t(779),
                            t(926),
                            t(1069),
                            t(1354),
                            t(1334),
                            t(1348),
                            t(1194),
                            t(728),
                            &#39;Microsoft JhengHei&#39;,
                            t(910),
                            t(1260),
                            &#39;Microsoft Sans Serif&#39;,
                            t(778),
                            t(1403),
                            t(629),
                            t(1520),
                            &#39;Mongolian Baiti&#39;,
                            t(899),
                            t(976),
                            &#39;Myanmar Text&#39;,
                            t(1005),
                            t(819),
                            t(1426),
                            t(425),
                            t(1514),
                            t(1349),
                            &#39;Segoe UI Historic&#39;,
                            &#39;Segoe UI Emoji&#39;,
                            t(535),
                            t(343),
                            t(452),
                            t(1212),
                            t(424),
                            t(519),
                            t(695),
                            t(408),
                            &#39;Verdana&#39;,
                            t(1361),
                            &#39;Wingdings&#39;,
                            t(1220),
                            t(1360),
                            &#39;Andale Mono&#39;,
                            t(656),
                            t(1219),
                            t(547),
                            t(1473),
                            t(635),
                            &#39;AppleMyungjo&#39;,
                            t(1293),
                            t(904),
                            t(515),
                            &#39;Avenir Next&#39;,
                            t(488),
                            t(1526),
                            t(1135),
                            t(1122),
                            &#39;Bodoni 72 Oldstyle&#39;,
                            t(1519),
                            &#39;Bradley Hand&#39;,
                            t(1286),
                            t(1471),
                            t(981),
                            &#39;Chalkduster&#39;,
                            t(935),
                            t(313),
                            t(464),
                            t(1352),
                            t(528),
                            &#39;Futura&#39;,
                            &#39;Geneva&#39;,
                            &#39;Gill Sans&#39;,
                            &#39;Helvetica&#39;,
                            t(1107),
                            t(1464),
                            &#39;Hoefler Text&#39;,
                            t(890),
                            &#39;Lucida Grande&#39;,
                            &#39;Luminari&#39;,
                            t(828),
                            t(1470),
                            t(800),
                            &#39;Noteworthy&#39;,
                            t(971),
                            &#39;Palatino&#39;,
                            &#39;Papyrus&#39;,
                            t(676),
                            &#39;Rockwell&#39;,
                            t(541),
                            t(466),
                            t(864),
                            &#39;Snell Roundhand&#39;,
                            &#39;Tahoma&#39;,
                            t(427),
                            t(1490),
                            t(484),
                            t(1090),
                            t(821),
                            t(1364),
                            t(977),
                            t(1182),
                            &#39;DejaVu Sans&#39;,
                            t(543),
                            t(371),
                            t(724),
                            &#39;Droid Sans Mono&#39;,
                            t(1244),
                            t(461),
                            t(487),
                            t(1132),
                            t(1133),
                            &#39;Gubbi&#39;,
                            t(578),
                            &#39;Khmer OS&#39;,
                            t(1176),
                            t(1419),
                            t(1518),
                            t(1358),
                            t(733),
                            t(1344),
                            &#39;Lohit Devanagari&#39;,
                            t(887),
                            t(1173),
                            t(434),
                            t(332),
                            t(740),
                            &#39;Noto Nastaliq Urdu&#39;,
                            t(644),
                            t(529),
                            t(1046),
                            t(1491),
                            &#39;Noto Sans CJK TC&#39;,
                            &#39;Noto Serif&#39;,
                            t(1020),
                            t(776),
                            t(1527),
                            t(379),
                            t(1018),
                            &#39;Ubuntu&#39;,
                            t(400),
                            t(513),
                            t(732),
                            t(924),
                            t(1007),
                            t(724),
                            t(1244),
                            t(401),
                            t(458),
                            t(350),
                            t(1442),
                            t(504),
                            t(1086),
                            &#39;Roboto Slab&#39;,
                            t(1041),
                            t(1155),
                            t(1467),
                            &#39;PT Sans&#39;,
                            t(777),
                            t(396),
                            t(564),
                            t(1432),
                            t(868),
                            t(499),
                            t(914),
                            t(857),
                            t(1222),
                            t(521),
                            t(787),
                            &#39;Batang&#39;,
                            t(1010),
                            t(493),
                            t(968),
                            &#39;Clarendon&#39;,
                            t(672),
                            &#39;Franklin Gothic&#39;,
                            t(311),
                            t(747),
                            t(826),
                            t(1253),
                            t(524),
                            t(390),
                            t(1050),
                            t(823),
                            t(576),
                            t(1392),
                            t(734),
                            t(1040),
                            t(730),
                            t(1452),
                            t(1077),
                            t(1059),
                            &#39;MYRIAD PRO&#39;,
                            t(765),
                            t(831),
                            &#39;Microsoft Uighur&#39;,
                            t(443),
                            t(653),
                            t(412),
                            t(1456),
                            t(955),
                            t(681),
                            t(1509),
                            t(551),
                            t(1112),
                            &#39;Staccato222 BT&#39;,
                            t(792),
                            t(1214),
                            t(876),
                            &#39;ZWAdobeF&#39;,
                        ]));
                }
                [r(394)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7, n = performance.now();
                        try {
                            const e = yield this.detectFontsWithIframe(), o = performance[t(308)](), s = Math.round(o - n), x = this[t(1232)](e);
                            return { availableFonts: e, fontHash: x, detectionMethod: t(1505) };
                        }
                        catch (e) {
                            return (l[t(631)][t(867)].warn(t(416), e),
                                { availableFonts: [], fontHash: &#39;&#39;, detectionMethod: t(1505) });
                        }
                    });
                }
                [r(569)]() {
                    return new Promise((t, n) =&gt; {
                        const e = _0x48f7, o = document[e(983)](e(697));
                        (o[e(1058)].setProperty(e(1421), e(964), e(1309)),
                            (o.style[e(1351)] = e(685)),
                            (o.style[e(991)] = &#39;-9999px&#39;),
                            (o.style.top = e(735)));
                        const s = () =&gt; {
                            const m = e;
                            try {
                                const p = o[m(766)] || o[m(772)][m(1306)], I = this[m(588)](p);
                                (o[m(738)] &amp;&amp; o[m(738)].removeChild(o), t(I));
                            }
                            catch (p) {
                                (o[m(738)] &amp;&amp; o.parentNode.removeChild(o), n(p));
                            }
                        }, x = () =&gt; {
                            const m = e;
                            (o[m(738)] &amp;&amp; o.parentNode[m(960)](o),
                                n(new Error(&#39;Failed to create iframe for font detection&#39;)));
                        };
                        (o[e(806)](e(925), s), o[e(806)](e(381), x), document[e(1141)][e(896)](o));
                    });
                }
                [r(588)](t) {
                    const n = r, e = t[n(1141)];
                    e.style[n(934)] = this[n(898)];
                    const o = t.createElement(n(1367));
                    (o[n(1058)][n(1229)](&#39;visibility&#39;, &#39;hidden&#39;, &#39;important&#39;),
                        (o[n(1058)][n(1351)] = n(685)),
                        (o.style[n(991)] = n(735)),
                        (o.style[n(550)] = n(735)));
                    const s = {}, x = this[n(1483)].map((p) =&gt; {
                        const I = n, g = t.createElement(I(1425));
                        return ((g.style[I(1351)] = I(685)),
                            (g[I(1058)][I(550)] = &#39;0&#39;),
                            (g[I(1058)][I(991)] = &#39;0&#39;),
                            (g[I(1058)][I(712)] = p),
                            (g[I(1058)].fontSize = this[I(898)]),
                            (g[I(1065)] = this[I(323)]),
                            o[I(896)](g),
                            { font: p, span: g });
                    });
                    (e.appendChild(o),
                        x.forEach(({ font: p, span: I }) =&gt; {
                            s[p] = { width: I.offsetWidth, height: I.offsetHeight };
                        }));
                    const m = [];
                    for (const p of this[n(522)]) {
                        let I = false;
                        for (const g of this[n(1483)]) {
                            const v = t.createElement(n(1425));
                            ((v[n(1058)].position = n(685)),
                                (v[n(1058)][n(550)] = &#39;0&#39;),
                                (v.style.left = &#39;0&#39;),
                                (v[n(1058)][n(712)] = &quot;&#39;&quot; + p + n(1466) + g),
                                (v[n(1058)][n(934)] = this[n(898)]),
                                (v[n(1065)] = this[n(323)]),
                                o[n(896)](v));
                            const A = v.offsetWidth, S = v[n(952)];
                            if (A !== s[g][n(1431)] || S !== s[g][n(507)]) {
                                I = true;
                                break;
                            }
                        }
                        I &amp;&amp; m[n(939)](p);
                    }
                    return (o[n(738)] &amp;&amp; o[n(738)][n(960)](o), m);
                }
                [r(1232)](t) {
                    const n = r;
                    if (t[n(368)] === 0)
                        return &#39;&#39;;
                    const e = t[n(1068)]()[n(1512)](&#39;,&#39;);
                    return this[n(671)](e);
                }
                [r(671)](t) {
                    const n = r;
                    let e = 0, o = 0;
                    for (let I = 0; I &lt; t[n(368)]; I++) {
                        const g = t.charCodeAt(I);
                        ((e = (e &lt;&lt; 5) - e + g), (e = e | 0), (o = g + (o &lt;&lt; 6) + (o &lt;&lt; 16) - o), (o = o | 0));
                    }
                    const s = e &gt;&gt;&gt; 0, x = o &gt;&gt;&gt; 0;
                    let m = s[n(861)](16);
                    for (; m[n(368)] &lt; 8;)
                        m = &#39;0&#39; + m;
                    let p = x[n(861)](16);
                    for (; p[n(368)] &lt; 8;)
                        p = &#39;0&#39; + p;
                    return m + p;
                }
                [r(352)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7, n = performance[t(308)]();
                        try {
                            const e = document[t(983)](t(457)), o = e[t(1482)](&#39;2d&#39;);
                            if (!o)
                                throw new Error(t(1243));
                            ((e.width = 500), (e[t(507)] = 200));
                            const s = [], x = {};
                            for (const g of this.baseFonts)
                                (o[t(575)](0, 0, e[t(1431)], e[t(507)]),
                                    (o[t(364)] = this[t(898)] + &#39; &#39; + g),
                                    o[t(468)](this.testString, 0, 100),
                                    (x[g] = e[t(1008)]()));
                            for (const g of this[t(522)]) {
                                let v = !1;
                                for (const A of this[t(1483)])
                                    if ((o[t(575)](0, 0, e[t(1431)], e[t(507)]),
                                        (o[t(364)] = this[t(898)] + &quot; &#39;&quot; + g + &quot;&#39;, &quot; + A),
                                        o[t(468)](this[t(323)], 0, 100),
                                        e[t(1008)]() !== x[A])) {
                                        v = !0;
                                        break;
                                    }
                                v &amp;&amp; s[t(939)](g);
                            }
                            const m = performance[t(308)](), p = Math[t(620)](m - n), I = this[t(1232)](s);
                            return { availableFonts: s, fontHash: I, detectionMethod: t(457) };
                        }
                        catch (e) {
                            return (l[t(631)].Logger.warn(t(921), e),
                                { availableFonts: [], fontHash: &#39;&#39;, detectionMethod: t(457) });
                        }
                    });
                }
                [r(353)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7; performance.now();
                        try {
                            const e = [
                                t(406),
                                t(758),
                                t(1275),
                                t(1308),
                                t(1458),
                                t(546),
                                &#39;Georgia&#39;,
                                t(890),
                                t(1349),
                                t(519),
                                t(695),
                                t(408),
                                t(762),
                                t(1360),
                                t(1473),
                                t(515),
                                t(716),
                                t(1107),
                                t(1413),
                                &#39;Lucida Grande&#39;,
                                &#39;Menlo&#39;,
                                t(800),
                                &#39;Palatino&#39;,
                                t(484),
                                t(1231),
                                t(543),
                                t(371),
                                t(1518),
                                t(1358),
                                t(1344),
                                t(396),
                                t(513),
                                t(924),
                                t(724),
                                t(1244),
                                &#39;Open Sans&#39;,
                                t(504),
                                t(1086),
                                t(514),
                            ], o = yield this[t(1498)](e), s = this[t(1232)](o);
                            return { availableFonts: o, fontHash: s, detectionMethod: t(1505) };
                        }
                        catch (e) {
                            return (l[t(631)].Logger[t(829)](&#39;Quick font detection failed&#39;, e),
                                { availableFonts: [], fontHash: &#39;&#39;, detectionMethod: &#39;size&#39; });
                        }
                    });
                }
                [r(1498)](t) {
                    return new Promise((n, e) =&gt; {
                        const o = _0x48f7, s = document[o(983)](o(697));
                        (s[o(1058)].setProperty(o(1421), o(964), o(1309)),
                            (s[o(1058)][o(1351)] = o(685)),
                            (s[o(1058)][o(991)] = o(735)),
                            (s[o(1058)].top = &#39;-9999px&#39;));
                        const x = () =&gt; {
                            const p = o;
                            try {
                                const I = s[p(766)] || s.contentWindow[p(1306)], g = I[p(1141)];
                                g[p(1058)].fontSize = this[p(898)];
                                const v = I[p(983)](p(1367));
                                (v[p(1058)][p(1229)](p(1421), p(964), &#39;important&#39;),
                                    (v[p(1058)][p(1351)] = p(685)),
                                    (v[p(1058)][p(991)] = p(735)),
                                    (v[p(1058)][p(550)] = &#39;-9999px&#39;));
                                const A = {}, S = this[p(1483)][p(341)]((_) =&gt; {
                                    const L = p, y = I[L(983)](&#39;span&#39;);
                                    return ((y[L(1058)][L(1351)] = &#39;absolute&#39;),
                                        (y[L(1058)][L(550)] = &#39;0&#39;),
                                        (y[L(1058)][L(991)] = &#39;0&#39;),
                                        (y.style[L(712)] = _),
                                        (y[L(1058)][L(934)] = this[L(898)]),
                                        (y[L(1065)] = this.testString),
                                        v[L(896)](y),
                                        { font: _, span: y });
                                });
                                (g[p(896)](v),
                                    S[p(892)](({ font: _, span: L }) =&gt; {
                                        A[_] = { width: L.offsetWidth, height: L.offsetHeight };
                                    }));
                                const d = [];
                                for (const _ of t) {
                                    let L = !1;
                                    for (const y of this.baseFonts) {
                                        const O = I[p(983)](p(1425));
                                        ((O.style[p(1351)] = &#39;absolute&#39;),
                                            (O.style[p(550)] = &#39;0&#39;),
                                            (O[p(1058)][p(991)] = &#39;0&#39;),
                                            (O.style[p(712)] = &quot;&#39;&quot; + _ + p(1466) + y),
                                            (O[p(1058)][p(934)] = this[p(898)]),
                                            (O.textContent = this[p(323)]),
                                            v.appendChild(O));
                                        const M = O.offsetWidth, R = O.offsetHeight;
                                        if (M !== A[y].width || R !== A[y].height) {
                                            L = !0;
                                            break;
                                        }
                                    }
                                    L &amp;&amp; d[p(939)](_);
                                }
                                (v.parentNode &amp;&amp; v[p(738)][p(960)](v),
                                    s.parentNode &amp;&amp; s[p(738)].removeChild(s),
                                    n(d));
                            }
                            catch (I) {
                                (s[p(738)] &amp;&amp; s[p(738)].removeChild(s), e(I));
                            }
                        }, m = () =&gt; {
                            const p = o;
                            (s.parentNode &amp;&amp; s.parentNode[p(960)](s),
                                e(new Error(&#39;Failed to create iframe for font detection&#39;)));
                        };
                        (s[o(806)](&#39;load&#39;, x), s[o(806)](o(381), m), document[o(1141)][o(896)](s));
                    });
                }
            }
            i[r(428)] = a;
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                get [r(711)]() {
                    const n = r;
                    if (!this[n(567)].browserInfo[n(1508)])
                        return 0;
                    let e = this[n(600)].ops;
                    return (!e &amp;&amp; ((e = this[n(696)]()), (this[n(600)].ops = e)), e);
                }
                constructor(n, e, o, s) {
                    const x = r;
                    ((this.sessionData = n),
                        (this.metadataParams = e),
                        (this[x(496)] = o),
                        (this.localAgentAccessor = s),
                        (this[x(549)] = null),
                        (this[x(1327)] = null),
                        (this[x(1100)] = null),
                        (this[x(1178)] = null),
                        (this[x(1120)] = null),
                        (this.isBatterySupported = null),
                        (this[x(1187)] = null),
                        (this[x(358)] = null),
                        (this.batteryChargingTime = null),
                        (this[x(1346)] = null),
                        (this[x(1469)] = new Map()),
                        (this.lieTests = {}),
                        (this[x(485)] = null),
                        (this[x(717)] = new Set([
                            x(1121),
                            x(1104),
                            &#39;audio&#39;,
                            &#39;audioBaseLatency&#39;,
                            x(457),
                            x(1385),
                            x(356),
                            x(807),
                            x(568),
                            x(1411),
                            x(1210),
                            x(1127),
                            x(1031),
                            x(639),
                            x(663),
                            x(834),
                            x(1070),
                            x(969),
                            x(1289),
                            &#39;invertedColors&#39;,
                            &#39;languages&#39;,
                            x(1446),
                            &#39;monochrome&#39;,
                            x(411),
                            &#39;osCpu&#39;,
                            x(1371),
                            x(1057),
                            x(492),
                            x(516),
                            x(1285),
                            x(885),
                            &#39;screenFrame&#39;,
                            &#39;screenResolution&#39;,
                            &#39;sessionStorage&#39;,
                            x(658),
                            x(1240),
                            x(1230),
                            x(354),
                            x(847),
                        ])),
                        (this[x(1393)] = -1),
                        (this[x(726)] = 0),
                        (this[x(604)] = 0),
                        (this[x(437)] = []),
                        (this[x(509)] = []),
                        (this.audioOutputDevices = []),
                        (this[x(367)] = new Map()),
                        (this[x(1337)] = null),
                        (this[x(589)] = null),
                        (this[x(907)] = 0),
                        (this.metadataQueue = new l[x(417)](1)),
                        (this[x(1174)] = null),
                        (this[x(849)] = null),
                        (this.autoFillMeta = new i.AutofillDetector()),
                        (this[x(624)] = null),
                        (this[x(1166)] = null));
                }
                getDeviceAttributes() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7;
                        return this[n(646)][n(373)](() =&gt; __awaiter(this, void 0, void 0, function* () {
                            const e = n;
                            !this[e(1337)] &amp;&amp;
                                ((this.lastCalculatedMetadata = yield this.calculateDeviceMetadata()),
                                    l._POSignalsUtils[e(867)][e(1300)](e(430)),
                                    l[e(631)][e(867)][e(1300)](e(879) + this.deviceId),
                                    l[e(631)][e(867)][e(1300)](e(875) + this[e(1327)]),
                                    this[e(600)].closeTrustStore());
                            const o = typeof window !== e(480) &amp;&amp;
                                window[e(342)] &amp;&amp;
                                typeof window[e(342)][e(368)] === e(497)
                                ? window[e(342)][e(368)]
                                : null;
                            return (this.lastCalculatedMetadata &amp;&amp; (this.lastCalculatedMetadata[e(1019)] = o),
                                this[e(600)] &amp;&amp; this[e(600)][e(1384)] &amp;&amp; (yield this[e(377)]()),
                                yield this[e(1320)](),
                                this[e(600)] &amp;&amp; this[e(600)][e(945)] &amp;&amp; this[e(395)](),
                                this[e(600)][e(1472)] &amp;&amp; (this[e(1174)] = JSON.stringify(this[e(1337)])),
                                this[e(1337)]);
                        }));
                    });
                }
                getGeoLocationData() {
                    var n, e, o, s;
                    return __awaiter(this, void 0, void 0, function* () {
                        const x = _0x48f7;
                        this[x(1337)] = Object.assign(Object.assign({}, this[x(1337)]), {
                            htmlGeoLocation_latitude: void 0,
                            htmlGeoLocation_longitude: void 0,
                            htmlGeoLocation_accuracy: void 0,
                            htmlGeoLocation_speed: void 0,
                            htmlGeoLocation_heading: void 0,
                            htmlGeoLocation_timestamp: void 0,
                            htmlGeoLocation_ErrorMessage: &#39;&#39;,
                            htmlGeoLocation_ErrorCode: &#39;&#39;,
                        });
                        const m = (_, L = &#39;&#39;) =&gt; {
                            const y = x, O = _[y(368)] &gt; 255 ? _[y(1106)](0, 252) + y(360) : _;
                            return ((this[y(1337)].htmlGeoLocation_ErrorMessage = O),
                                (this[y(1337)][y(894)] = L),
                                { status: y(381), message: O });
                        }, p = (_) =&gt; {
                            const L = x;
                            switch (_) {
                                case 1:
                                    return m(L(607), L(1287));
                                case 2:
                                    return m(L(756), L(1171));
                                case 3:
                                    return m(L(805), L(591));
                                default:
                                    return m(L(1197), L(1171));
                            }
                        };
                        if (!navigator[x(597)])
                            return m(&#39;Geolocation API is not supported by this browser.&#39;, x(933));
                        const I = this[x(1337)][x(1379)].toLowerCase(), g = I[x(1461)](x(1084)), v = I[x(1461)](x(1478));
                        let A = false;
                        const S = yield navigator[x(1184)][x(410)]({ name: x(597) });
                        if (((this[x(1337)][x(917)] = S[x(628)]), S[x(628)] === x(338)))
                            return m(x(1313) + S[x(628)] + x(714) + I + &quot;&#39;.&quot;, &#39;PERMISSION_DENIED&#39;);
                        const d = this[x(600)][x(1302)]();
                        if (d)
                            try {
                                const _ = JSON.parse(d);
                                if (_ &amp;&amp; _.latitude &amp;&amp; _[x(1028)])
                                    ((this[x(1337)][x(675)] = _[x(398)] ? parseFloat(_.latitude[x(1525)](2)) : null),
                                        (this[x(1337)][x(958)] = _[x(1028)]
                                            ? parseFloat(_[x(1028)][x(1525)](2))
                                            : null),
                                        (this[x(1337)].htmlGeoLocation_accuracy =
                                            (n = _[x(801)]) !== null &amp;&amp; n !== void 0 ? n : null),
                                        (this[x(1337)][x(703)] = (e = _.speed) !== null &amp;&amp; e !== void 0 ? e : null),
                                        (this[x(1337)][x(314)] = (o = _.heading) !== null &amp;&amp; o !== void 0 ? o : null),
                                        (this[x(1337)][x(651)] = (s = _[x(456)]) !== null &amp;&amp; s !== void 0 ? s : null),
                                        delete this.lastCalculatedMetadata[x(1092)],
                                        delete this[x(1337)][x(894)],
                                        (A = !0));
                                else if (_ &amp;&amp; _.error_code)
                                    return ((A = !1), p(_[x(1530)]));
                            }
                            catch (_) {
                                l._POSignalsUtils.Logger[x(1300)](&#39;Invalid geoData JSON in session storage:&#39;, _);
                            }
                        if (S[x(628)] === &#39;granted&#39;)
                            return yield new Promise((_) =&gt; {
                                const L = { timeout: 500 }, y = (O = 1) =&gt; {
                                    const M = _0x48f7;
                                    navigator.geolocation[M(942)]((R) =&gt; {
                                        const k = M;
                                        var B;
                                        const { latitude: D, longitude: G, accuracy: N, speed: ne, heading: he, } = R[k(481)];
                                        if ((!D || !G || D === 0 || G === 0) &amp;&amp; (g || v) &amp;&amp; O === 1)
                                            return y(2);
                                        ((this[k(1337)].htmlGeoLocation_latitude = D
                                            ? parseFloat(D[k(1525)](2))
                                            : void 0),
                                            (this[k(1337)].htmlGeoLocation_longitude = G
                                                ? parseFloat(G[k(1525)](2))
                                                : void 0),
                                            (this.lastCalculatedMetadata.htmlGeoLocation_accuracy = N),
                                            (this[k(1337)].htmlGeoLocation_speed = ne),
                                            (this.lastCalculatedMetadata.htmlGeoLocation_heading = he),
                                            (this[k(1337)].htmlGeoLocation_timestamp =
                                                (B = R[k(456)]) !== null &amp;&amp; B !== void 0 ? B : null),
                                            delete this[k(1337)][k(1092)],
                                            delete this[k(1337)][k(894)],
                                            (A = true),
                                            _({ status: k(454) }));
                                    }, (R) =&gt; {
                                        (_(p(R[M(1416)])), (A = false));
                                    }, L);
                                };
                                y();
                            });
                        if (!A)
                            return m(x(1313) + S[x(628)] + x(1234) + I + &quot;&#39;&quot;, x(1171));
                    });
                }
                refreshDeviceAttributes() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7;
                        yield this[n(1383)]();
                        const e = typeof window != &#39;undefined&#39; &amp;&amp;
                            window[n(342)] &amp;&amp;
                            typeof window.history[n(368)] === n(497)
                            ? window[n(342)][n(368)]
                            : null;
                        this.lastCalculatedMetadata &amp;&amp; (this[n(1337)][n(1019)] = e);
                        const o = this[n(1186)][n(479)]();
                        Object.assign(this.lastCalculatedMetadata, o);
                    });
                }
                [r(1383)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = 160, o = window[n(883)] - window[n(1330)] &gt; e, s = window[n(1332)] - window.innerHeight &gt; e, x = n(o ? 421 : 1109);
                        ((this[n(1337)][n(999)] = n(o || s ? 330 : 1474)),
                            (this[n(1337)][n(918)] = o || s ? x : n(477)));
                    });
                }
                [r(994)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7;
                        return this[n(646)][n(373)](() =&gt; __awaiter(this, void 0, void 0, function* () {
                            const e = n;
                            if (this[e(907)] &gt;= 5)
                                return this.localAgentJwt;
                            if (this[e(600)][e(1011)])
                                return (!this[e(589)] &amp;&amp; (this[e(589)] = yield this[e(1076)][e(1292)]()),
                                    this[e(907)]++,
                                    this[e(589)]);
                        }));
                    });
                }
                [r(795)]() {
                    return { identifier: &#39;x1&#39;, key: &#39;Xq7tSbjB517mhZwt&#39; };
                }
                getSerializedDeviceAttributes() {
                    return this[r(1174)];
                }
                [r(1329)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7;
                        this[n(485)] = navigator[n(597)] != null;
                        const e = this[n(567)][n(788)], o = [
                            this.sessionData[n(324)]().catch((x) =&gt; {
                                const m = n;
                                l[m(631)][m(867)][m(1300)](m(694), x);
                            }),
                            this[n(1441)](e)[n(689)]((x) =&gt; {
                                const m = n;
                                l[m(631)][m(867)][m(1300)](&#39;failed to get fingerprint info&#39;, x.message);
                            }),
                            this[n(1154)]()[n(689)]((x) =&gt; {
                                const m = n;
                                l[m(631)][m(867)].info(m(1485), x[m(768)]);
                            }),
                            i[n(1003)][n(1304)]()[n(689)]((x) =&gt; l._POSignalsUtils[n(867)][n(1300)](n(916), x)),
                            this[n(418)]()[n(689)]((x) =&gt; l[n(631)][n(867)][n(1300)](n(1276), x)),
                            new i[n(1459)](e)[n(627)]()[n(689)]((x) =&gt; l[n(631)][n(867)][n(1300)](n(537), x)),
                            new i[n(1004)](e)[n(328)]()
                                .catch((x) =&gt; l._POSignalsUtils[n(867)][n(1300)](&#39;failed to get lies results&#39;, x)),
                            this.audioIntVideoInit()[n(689)]((x) =&gt; l[n(631)].Logger.info(n(387), x)),
                            this[n(508)]()[n(689)]((x) =&gt; l[n(631)][n(867)][n(1300)](n(503), x)),
                            this[n(1339)](e)[n(689)]((x) =&gt; l._POSignalsUtils[n(867)].info(n(757), x)),
                            this[n(625)]()[n(689)]((x) =&gt; {
                                const m = n;
                                return (l[m(631)][m(867)][m(1300)](&#39;failed to get voices info&#39;, x), 0);
                            }),
                        ];
                        (([
                            this[n(549)],
                            this.fingerPrint,
                            this[n(750)],
                            this[n(1051)],
                            this[n(1184)],
                            this[n(1469)],
                            this[n(1033)],
                            ,
                            ,
                            this[n(624)],
                            this[n(1166)],
                        ] = yield Promise[n(683)](o)),
                            (this[n(1327)] = this.sessionData.getDeviceCreatedAt()));
                        const s = {
                            ops: this.OPS,
                            devicePixelRatio: window[n(1209)],
                            screenWidth: window[n(405)][n(1431)],
                            screenHeight: window[n(405)][n(507)],
                        };
                        return (l[n(631)][n(1139)][n(872)](s, screen, false),
                            Object[n(1312)](Object[n(1312)](Object[n(1312)](Object.assign({
                                deviceId: this[n(549)],
                                device_created_ts: this[n(1327)],
                                deviceType: this[n(567)][n(419)].deviceType,
                                osVersion: (this[n(567)][n(419)][n(1311)] + &#39; &#39; + this[n(567)][n(419)][n(719)])[n(1451)]() || &#39;&#39;,
                                externalIdentifiers: this[n(496)],
                                origin: location[n(1434)],
                                href: location.href,
                            }, yield this[n(445)](e)), this[n(393)]()), this.getSensorsMetadata()), s));
                    });
                }
                [r(508)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = this;
                        yield l[n(631)].Util[n(989)](50, new Promise((o, s) =&gt; {
                            const x = n;
                            navigator[x(1268)]
                                ? ((this[x(1404)] = true),
                                    navigator
                                        .getBattery()[x(804)]((m) =&gt; {
                                        const p = x;
                                        (m &amp;&amp;
                                            ((e.batteryLevel = m[p(1137)]),
                                                (e[p(358)] = m[p(944)]),
                                                (e[p(1146)] = m.chargingTime),
                                                (e[p(1346)] = m[p(1397)])),
                                            o());
                                    })[x(689)]((m) =&gt; {
                                        const p = x;
                                        (l[p(631)][p(867)][p(1300)](p(630) + m), o());
                                    }))
                                : (l._POSignalsUtils[x(867)][x(1300)](x(1444)), o());
                        }));
                    });
                }
                [r(1336)]() {
                    const n = r, e = /^((?!chrome|android).)*safari/i[n(431)](navigator[n(641)]);
                    return !l._POSignalsUtils[n(1139)].inIframe() || !e;
                }
                getRTCPeerConnection() {
                    const n = r;
                    let e = window[n(1118)] || window[n(1394)] || window[n(1223)];
                    if (!e) {
                        const o = window[&#39;iframe.contentWindow&#39;];
                        o &amp;&amp; (e = o[n(1118)] || o.mozRTCPeerConnection || o[n(1223)]);
                    }
                    return e;
                }
                [r(482)]() {
                    const n = r, e = this;
                    try {
                        const o = {}, s = this[n(1369)](), x = { optional: [{ RtpDataChannels: !0 }] }, m = { iceServers: [{ urls: this[n(567)][n(556)][n(1451)]() }] }, p = new s(m, x);
                        ((p[n(1499)] = (I) =&gt; {
                            const g = n, v = 1;
                            if (I[g(1188)]) {
                                const A = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/, S = A[g(1079)](I[g(1188)][g(1188)])[1];
                                (o[S] === void 0 &amp;&amp;
                                    (I[g(1188)][g(1188)][g(1265)](&#39;host&#39;) &gt; 0
                                        ? e[g(367)][g(525)](&#39;WEB_RTC_HOST_IP&#39;, S)
                                        : I[g(1188)][g(1188)][g(1265)](&#39;srflx&#39;) &gt; 0 &amp;&amp;
                                            e[g(367)][g(525)](&#39;WEB_RTC_SRFLX_IP&#39;, S)),
                                    (o[S] = !0));
                            }
                        }),
                            p[n(1422)](&#39;&#39;),
                            p[n(1489)](function (I) {
                                p.setLocalDescription(I, function () { }, function () { });
                            }, function () { }));
                    }
                    catch { }
                }
                [r(974)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = this;
                        yield l[n(631)][n(1139)][n(989)](50, new Promise((o, s) =&gt; {
                            const x = n;
                            if (!this[x(1336)]()) {
                                (l._POSignalsUtils[x(867)][x(1420)](x(986)), o());
                                return;
                            }
                            if (!navigator[x(855)] || !navigator.mediaDevices[x(1052)]) {
                                (l[x(631)][x(867)][x(1420)](x(1331)), o());
                                return;
                            }
                            navigator.mediaDevices[x(1052)]()[x(804)]((m) =&gt; {
                                const p = x;
                                (m[p(892)]((I) =&gt; {
                                    const g = p;
                                    I[g(790)] &amp;&amp;
                                        (I[g(790)][g(1479)]() == &#39;audioinput&#39;
                                            ? ((e[g(1100)] = true),
                                                e[g(604)]++,
                                                I[g(1078)] &amp;&amp; e.audioInputDevices[g(939)](I.label))
                                            : I[g(790)][g(1479)]() == g(562)
                                                ? ((e.hasWebcam = true),
                                                    e[g(726)]++,
                                                    I[g(1078)] &amp;&amp; e.videoInputDevices[g(939)](I.label))
                                                : I[g(790)][g(1479)]() == &#39;audiooutput&#39; &amp;&amp;
                                                    ((e[g(1178)] = true),
                                                        e.numberOfAudioDevices++,
                                                        I[g(1078)] &amp;&amp; e[g(938)][g(939)](I[g(1078)])));
                                }),
                                    o());
                            })[x(689)]((m) =&gt; {
                                const p = x;
                                (l[p(631)][p(867)][p(1300)](&#39;enumerateDevices failed&#39;, m), o());
                            });
                        }));
                    });
                }
                [r(1441)](n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7;
                        if (n[e(438)](e(1009)))
                            return Promise[e(1347)](&#39;&#39;);
                        const o = new Promise((x, m) =&gt; __awaiter(this, void 0, void 0, function* () {
                            const p = e;
                            try {
                                const I = yield l[p(389)][p(925)](), g = yield I[p(996)]();
                                ((this[p(687)] = g[p(453)]), (this[p(1418)] = g[p(953)]), x(g[p(453)]));
                            }
                            catch (I) {
                                l[p(631)][p(867)][p(1300)](p(623) + I);
                                const g = { err: I, message: p(329) };
                                m(g);
                            }
                        })), s = new Promise((x, m) =&gt; __awaiter(this, void 0, void 0, function* () {
                            const p = e;
                            yield l._POSignalsUtils[p(1139)][p(929)](this[p(567)].fingerprintTimeoutMillis);
                            const I = { message: p(873) };
                            m(I);
                        }));
                        return yield Promise.race([o, s]);
                    });
                }
                [r(1154)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        return new Promise((n, e) =&gt; {
                            const o = _0x48f7;
                            l.BroprintJS[o(640)]()
                                .then((s) =&gt; {
                                const x = o;
                                ((this[x(750)] = s), n(s));
                            })[o(689)]((s) =&gt; {
                                const x = o;
                                (l[x(631)][x(867)].info(&#39;Failed to get Fingerprint from getCurrentBrowserFingerPrint&#39;, s),
                                    e(s));
                            });
                        });
                    });
                }
                [r(1339)](n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7;
                        if (n[e(438)](&#39;fontFingerprint&#39;))
                            return Promise.resolve(null);
                        try {
                            const o = new i[e(428)](), s = yield o.getQuickFingerprint();
                            return ((this[e(624)] = s), s);
                        }
                        catch (o) {
                            return (l[e(631)][e(867)].info(e(1375) + o), null);
                        }
                    });
                }
                getSensorsMetadata() {
                    const n = r, e = {};
                    return (this[n(592)](e, n(760), () =&gt; n(335) in window),
                        this[n(592)](e, &#39;IS_TOUCH_DEVICE&#39;, () =&gt; &#39;ontouchstart&#39; in window),
                        !window[n(1401)] &amp;&amp; this[n(592)](e, n(665), () =&gt; false),
                        !window[n(886)] &amp;&amp; this.flatAndAddMetadata(e, n(532), () =&gt; false),
                        this[n(592)](e, n(761), () =&gt; n(486) in window),
                        e);
                }
                getIdentificationMetadata(n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7, o = this, s = {};
                        (this[e(592)](s, &#39;FINGER_PRINT&#39;, () =&gt; this[e(687)]),
                            this[e(592)](s, e(501), () =&gt; this[e(750)]),
                            this[e(624)] &amp;&amp;
                                this[e(592)](s, e(1192), () =&gt; {
                                    const d = e;
                                    return this[d(624)][d(447)];
                                }),
                            this[e(567)].browserInfo[e(869)] &amp;&amp;
                                (this[e(592)](s, e(1034), () =&gt; {
                                    const d = e;
                                    return this[d(567)][d(419)].osName;
                                }),
                                    this.flatAndAddMetadata(s, e(884), () =&gt; {
                                        const d = e;
                                        return this[d(567)][d(419)][d(719)];
                                    })),
                            this[e(567)][e(419)][e(869)] &amp;&amp;
                                (this[e(592)](s, e(901), () =&gt; {
                                    const d = e;
                                    return this.metadataParams[d(419)][d(1143)];
                                }),
                                    this[e(592)](s, &#39;DEVICE_VENDOR&#39;, () =&gt; {
                                        const d = e;
                                        return this[d(567)][d(419)][d(900)];
                                    }),
                                    this[e(592)](s, &#39;DEVICE_CATEGORY&#39;, () =&gt; {
                                        const d = e;
                                        return this.metadataParams[d(419)][d(1399)];
                                    })),
                            this[e(567)][e(419)][e(869)] &amp;&amp;
                                (this[e(592)](s, e(655), () =&gt; {
                                    const d = e;
                                    return this[d(567)][d(419)][d(975)];
                                }),
                                    this[e(592)](s, &#39;BROWSER_ENGINE_VERSION&#39;, () =&gt; {
                                        const d = e;
                                        return this.metadataParams[d(419)][d(1495)];
                                    })),
                            this[e(567)][e(419)].userAgentData &amp;&amp;
                                this.flatAndAddMetadata(s, &#39;CPU_ARCHITECTURE&#39;, () =&gt; {
                                    const d = e;
                                    return this.metadataParams[d(419)][d(822)];
                                }),
                            this.metadataParams[e(419)].userAgentData &amp;&amp;
                                (this[e(592)](s, &#39;BROWSER_NAME&#39;, () =&gt; {
                                    const d = e;
                                    return this[d(567)][d(419)].browserName;
                                }),
                                    this[e(592)](s, e(863), () =&gt; {
                                        const d = e;
                                        return this.metadataParams[d(419)][d(866)];
                                    }),
                                    this.flatAndAddMetadata(s, e(1101), () =&gt; {
                                        const d = e;
                                        return this[d(567)][d(419)][d(690)];
                                    }),
                                    this[e(592)](s, &#39;BROWSER_TYPE&#39;, () =&gt; {
                                        const d = e;
                                        return this[d(567)][d(419)][d(659)];
                                    })));
                        const x = new i[e(1408)]();
                        (this[e(592)](s, e(1328), () =&gt; {
                            const d = e;
                            return x[d(1044)](this.metadataParams.browserInfo[d(869)].ua);
                        }),
                            this[e(592)](s, &#39;IS_BOT&#39;, () =&gt; {
                                const d = e;
                                return x[d(1203)](this.metadataParams[d(419)][d(869)].ua);
                            }),
                            this.flatAndAddMetadata(s, e(870), () =&gt; {
                                const d = e;
                                return x.isChromeFamily(this[d(567)][d(419)][d(869)][d(1450)]);
                            }),
                            this[e(592)](s, &#39;IS_ELECTRON_FAMILY&#39;, () =&gt; {
                                const d = e;
                                return x[d(1047)](this[d(567)][d(419)].userAgentData.ua);
                            }),
                            this.flatAndAddMetadata(s, e(598), () =&gt; navigator.vendor),
                            this[e(592)](s, e(1114), () =&gt; {
                                const d = e;
                                return navigator[d(492)] ? navigator[d(492)][d(368)] : null;
                            }),
                            this.flatAndAddMetadata(s, e(1035), () =&gt; {
                                const d = e;
                                return navigator.mimeTypes ? navigator[d(614)][d(368)] : null;
                            }),
                            this[e(592)](s, e(1400), () =&gt; {
                                const d = e;
                                return (navigator[d(359)] ||
                                    navigator[d(351)] ||
                                    navigator.browserLanguage ||
                                    navigator.systemLanguage);
                            }),
                            this.flatAndAddMetadata(s, e(784), () =&gt; navigator[e(1402)]));
                        const m = navigator[e(1402)] ? navigator.languages[e(368)] : 0;
                        this[e(592)](s, &#39;NAVIGATOR_LANGUAGES_COUNT&#39;, () =&gt; m);
                        const p = this[e(1166)] !== null ? this[e(1166)] : 0;
                        (this[e(592)](s, e(1477), () =&gt; p),
                            this[e(592)](s, &#39;NAVIGATOR_MAX_TOUCH_POINTS&#39;, () =&gt; {
                                const d = e;
                                return navigator[d(858)] || navigator[d(1238)];
                            }),
                            this[e(592)](s, e(1438), () =&gt; navigator[e(965)] || navigator.msPointerEnabled),
                            this[e(592)](s, e(880), () =&gt; navigator.webdriver),
                            this[e(592)](s, e(1249), () =&gt; navigator[e(1070)]),
                            this[e(592)](s, e(490), () =&gt; navigator[e(1218)] != null),
                            this[e(592)](s, e(593), () =&gt; &#39;Notification&#39; in window),
                            this[e(592)](s, e(621), () =&gt; navigator[e(1134)]),
                            this.flatAndAddMetadata(s, e(1098), () =&gt; navigator[e(1014)]),
                            this.flatAndAddMetadata(s, e(830), () =&gt; navigator[e(1048)]),
                            this.flatAndAddMetadata(s, e(702), () =&gt; navigator[e(563)]),
                            this.flatAndAddMetadata(s, e(903), () =&gt; navigator[e(1057)]),
                            this[e(592)](s, e(1338), () =&gt; navigator[e(1088)]),
                            this[e(592)](s, e(363), () =&gt; navigator[e(641)]),
                            this.flatAndAddMetadata(s, &#39;NAVIGATOR_PDF_VIEWER_ENABLED&#39;, () =&gt; navigator[e(1371)]),
                            this[e(592)](s, e(442), () =&gt; navigator[e(1127)]),
                            this[e(592)](s, e(802), () =&gt; {
                                const d = e;
                                return navigator[d(606)] ? navigator[d(606)].rtt : null;
                            }),
                            !n[e(438)](&#39;modernizr&#39;) &amp;&amp; (yield this.safeAddModernizrFeatures(s)));
                        const I = window[e(923)] || window[e(1428)];
                        (I
                            ? this[e(592)](s, &#39;JS_CHALLENGE&#39;, () =&gt; I)
                            : this.flatAndAddMetadata(s, e(985), () =&gt; e(477)),
                            this[e(592)](s, &#39;BROWSER_TAB_HISTORY_LENGTH&#39;, () =&gt; {
                                const d = e;
                                return typeof window !== d(480) &amp;&amp;
                                    window[d(342)] &amp;&amp;
                                    typeof window[d(342)][d(368)] == &#39;number&#39;
                                    ? window[d(342)][d(368)]
                                    : null;
                            }));
                        const g = new i.WebGLMetadata();
                        if ((this[e(592)](s, &#39;IS_WEBGL&#39;, () =&gt; g[e(1191)]()),
                            this[e(592)](s, &#39;WEBGLVENDORANDRENDERER&#39;, () =&gt; {
                                const d = e;
                                return g.getWebglData().vendor + &#39;~&#39; + g[d(1083)]()[d(652)];
                            }),
                            this[e(592)](s, e(680), () =&gt; g[e(1125)]()),
                            g[e(1125)]()
                                ? this[e(592)](s, e(832), () =&gt; {
                                    const d = e;
                                    return g[d(1083)]()[d(1230)] + &#39;~&#39; + g[d(1083)]().renderer;
                                })
                                : this[e(592)](s, &#39;WEBGL2VENDORANDRENDERER&#39;, () =&gt; &#39;&#39;),
                            this[e(592)](s, &#39;WEBGL_VERSION&#39;, () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(723)];
                            }),
                            this.flatAndAddMetadata(s, e(920), () =&gt; g.getWebglData().shadingLanguageVersion),
                            this[e(592)](s, e(895), () =&gt; {
                                const d = e;
                                return g.getWebglData()[d(791)].length;
                            }),
                            this[e(592)](s, &#39;WEBGL_MAXTEXTURESIZE&#39;, () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(469)];
                            }),
                            this[e(592)](s, e(997), () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(1373)];
                            }),
                            this[e(592)](s, e(1259), () =&gt; {
                                const d = e;
                                return g.getWebglData()[d(1398)];
                            }),
                            this[e(592)](s, e(667), () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(577)];
                            }),
                            this[e(592)](s, e(1301), () =&gt; g[e(1083)]().maxCombinedTextureImageUnits),
                            this[e(592)](s, e(534), () =&gt; g.getWebglData().maxVertexAttribs),
                            this[e(592)](s, &#39;WEBGL_MAXVARYINGVECTORS&#39;, () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(811)];
                            }),
                            this[e(592)](s, e(1094), () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(506)];
                            }),
                            this[e(592)](s, e(664), () =&gt; {
                                const d = e;
                                return g[d(1083)]()[d(476)];
                            }),
                            this.flatAndAddMetadata(s, e(1130), () =&gt; g[e(648)]()),
                            this.flatAndAddMetadata(s, e(1494), () =&gt; g[e(1502)]()),
                            this.flatAndAddMetadata(s, &#39;HASLIEDOS&#39;, () =&gt; g[e(993)]()),
                            this.flatAndAddMetadata(s, e(1105), () =&gt; g.getHasLiedBrowser()),
                            this[e(1418)]))
                            for (const d in this.fingerPrintComponents) {
                                if (!this[e(1418)][e(1417)](d))
                                    continue;
                                const _ = this[e(1418)][d];
                                d == e(663)
                                    ? this[e(592)](s, e(414), () =&gt; {
                                        const L = e;
                                        return _[L(584)][L(368)];
                                    })
                                    : d == e(457)
                                        ? this[e(592)](s, &#39;IS_CANVAS&#39;, () =&gt; _.value != null)
                                        : d == &#39;screenResolution&#39; &amp;&amp; _[e(584)] &amp;&amp; _.value.length
                                            ? this.flatAndAddMetadata(s, e(602), () =&gt; _.value.join(&#39;,&#39;))
                                            : d == &#39;touchSupport&#39; &amp;&amp; _.value
                                                ? this[e(592)](s, e(853), () =&gt; _.value)
                                                : d == &#39;audio&#39; &amp;&amp; _[e(584)]
                                                    ? this[e(592)](s, e(494), () =&gt; _[e(584)])
                                                    : d == &#39;osCpu&#39; &amp;&amp; _[e(584)]
                                                        ? this[e(592)](s, e(385), () =&gt; _[e(584)])
                                                        : d == &#39;cookiesEnabled&#39; &amp;&amp; _[e(584)]
                                                            ? this[e(592)](s, e(348), () =&gt; _[e(584)])
                                                            : d == e(1321) &amp;&amp; _[e(584)] &amp;&amp; _[e(584)][e(368)]
                                                                ? this[e(592)](s, e(449), () =&gt; {
                                                                    const L = e;
                                                                    return _[L(584)][L(1512)](&#39;,&#39;);
                                                                })
                                                                : d == e(1104) &amp;&amp; _[e(584)]
                                                                    ? this[e(592)](s, e(510), () =&gt; _[e(584)])
                                                                    : d == &#39;domBlockers&#39; &amp;&amp; _[e(1298)]
                                                                        ? this[e(592)](s, &#39;DOM_BLOCKERS&#39;, () =&gt; _[e(1298)])
                                                                        : d == e(639) &amp;&amp; _[e(584)]
                                                                            ? this[e(592)](s, &#39;FONT_PREFERENCES&#39;, () =&gt; _[e(584)])
                                                                            : d == e(1371) &amp;&amp; _.value
                                                                                ? this.flatAndAddMetadata(s, e(932), () =&gt; _[e(584)])
                                                                                : d == &#39;vendorFlavors&#39; &amp;&amp; _[e(584)] &amp;&amp; _[e(584)].length
                                                                                    ? this.flatAndAddMetadata(s, e(844), () =&gt; {
                                                                                        const L = e;
                                                                                        return _[L(584)][L(1512)](&#39;,&#39;);
                                                                                    })
                                                                                    : d == e(963) &amp;&amp; _[e(584)]
                                                                                        ? this[e(592)](s, e(1468), () =&gt; _[e(584)].renderer)
                                                                                        : o[e(717)].has(d) &amp;&amp;
                                                                                            d != null &amp;&amp;
                                                                                            this[e(592)](s, d[e(720)](), () =&gt; _.value);
                            }
                        (this[e(592)](s, e(1254), () =&gt; this[e(1051)]),
                            this[e(592)](s, &#39;IS_WEB_GLSTATUS&#39;, () =&gt; this[e(1393)]));
                        const v = {
                            selenium: navigator[e(859)] ||
                                l[e(631)][e(1139)][e(1503)](window[e(1306)][e(1157)], e(859)) ||
                                &#39;&#39;,
                            phantomjs: {
                                _phantom: window[e(441)] || &#39;&#39;,
                                __phantomas: window.__phantomas || &#39;&#39;,
                                callPhantom: window[e(1152)] || &#39;&#39;,
                            },
                            nodejs: { Buffer: window[e(1131)] || &#39;&#39; },
                            couchjs: { emit: window[e(1108)] || &#39;&#39; },
                            rhino: { spawn: window[e(321)] || &#39;&#39; },
                            chromium: {
                                domAutomationController: window[e(1221)] || &#39;&#39;,
                                domAutomation: window[e(911)] || &#39;&#39;,
                            },
                            outerWidth: window.outerWidth,
                            outerHeight: window.outerHeight,
                        };
                        (this[e(592)](s, e(1228), () =&gt; v),
                            this[e(592)](s, e(1228), () =&gt; this[e(1469)]),
                            this.flatAndAddMetadata(s, e(794), () =&gt; {
                                const d = e, _ = {};
                                for (const L in this.lieTests)
                                    _[L] = JSON[d(833)](this[d(1033)][L]);
                                return Object[d(345)](_)[d(368)] &gt; 0 ? _ : null;
                            }),
                            this[e(592)](s, e(1099), () =&gt; new i[e(704)](n)[e(1165)]()),
                            this[e(592)](s, &#39;REF_LINK&#39;, () =&gt; document[e(1324)]),
                            this[e(592)](s, e(940), () =&gt; {
                                const d = e, _ = { length: navigator.plugins.length, details: [] };
                                for (let L = 0; L &lt; _[d(368)]; L++)
                                    _[d(1204)][d(939)]({
                                        length: navigator.plugins[L][d(368)],
                                        name: navigator[d(492)][L][d(1246)],
                                        version: navigator[d(492)][L][d(317)],
                                        filename: navigator[d(492)][L][d(1291)],
                                    });
                                return _;
                            }),
                            this[e(592)](s, e(737), () =&gt; this[e(604)]),
                            this.flatAndAddMetadata(s, &#39;VIDEO&#39;, () =&gt; this[e(726)]),
                            this.videoInputDevices &amp;&amp;
                                this[e(437)][e(368)] &gt; 0 &amp;&amp;
                                this[e(592)](s, e(699), () =&gt; {
                                    const d = e;
                                    return this.videoInputDevices[d(861)]();
                                }),
                            this.audioInputDevices &amp;&amp;
                                this[e(509)][e(368)] &gt; 0 &amp;&amp;
                                this[e(592)](s, e(1055), () =&gt; this[e(509)].toString()),
                            this[e(938)] &amp;&amp;
                                this.audioOutputDevices[e(368)] &gt; 0 &amp;&amp;
                                this[e(592)](s, e(333), () =&gt; {
                                    const d = e;
                                    return this[d(938)][d(861)]();
                                }),
                            this.flatAndAddMetadata(s, &#39;MEDIA_CODEC_MP4_AVC1&#39;, () =&gt; {
                                const d = e;
                                return this[d(1119)](d(1170));
                            }),
                            this[e(592)](s, e(1241), () =&gt; {
                                const d = e;
                                return this[d(1119)](d(1067));
                            }),
                            this[e(592)](s, &#39;MEDIA_CODEC_AAC&#39;, () =&gt; {
                                const d = e;
                                return this.getMediaCodec(d(1429));
                            }));
                        const A = this.metadataParams[e(691)];
                        for (const d in A)
                            A[e(1417)](d) &amp;&amp; this[e(592)](s, &#39;MEDIA_CODEC_&#39; + d, () =&gt; this.getMediaCodec(A[d]));
                        (window.performance &amp;&amp;
                            window[e(670)][e(948)] &amp;&amp;
                            (this.flatAndAddMetadata(s, e(742), () =&gt; {
                                const d = e;
                                return window[d(670)][d(948)][d(612)];
                            }),
                                this[e(592)](s, &#39;MEMORY_TOTAL_HEAP_SIZE&#39;, () =&gt; {
                                    const d = e;
                                    return window[d(670)][d(948)].totalJSHeapSize;
                                }),
                                this[e(592)](s, &#39;MEMORY_USED_HEAP_SIZE&#39;, () =&gt; {
                                    const d = e;
                                    return window[d(670)][d(948)][d(841)];
                                })),
                            this[e(592)](s, e(1061), () =&gt; navigator[e(1262)]),
                            this[e(592)](s, e(626), () =&gt; i[e(798)].seleniumInDocument()),
                            this[e(592)](s, e(1480), () =&gt; {
                                const d = e;
                                return i[d(798)][d(1113)]();
                            }),
                            this[e(592)](s, e(436), () =&gt; {
                                const d = e;
                                return i[d(798)][d(638)]();
                            }),
                            this[e(592)](s, e(1012), () =&gt; i[e(798)].seleniumSequentum()),
                            this.flatAndAddMetadata(s, &#39;DOCUMENT_ELEMENT_SELENIUM&#39;, () =&gt; {
                                const d = e;
                                return l[d(631)].Util[d(1503)](window[d(1306)].documentElement, d(1307));
                            }),
                            this[e(592)](s, e(1075), () =&gt; {
                                const d = e;
                                return l[d(631)][d(1139)].getAttribute(window[d(1306)][d(1157)], d(859));
                            }),
                            this[e(592)](s, e(415), () =&gt; {
                                const d = e;
                                return l._POSignalsUtils[d(1139)][d(1503)](window[d(1306)].documentElement, d(1405));
                            }),
                            this.flatAndAddMetadata(s, e(836), () =&gt; !!l[e(631)][e(1139)][e(1503)](document.getElementsByTagName(&#39;html&#39;)[0], e(859))),
                            this[e(592)](s, e(1142), () =&gt; !!window.geb),
                            this[e(592)](s, e(1252), () =&gt; !!window[e(326)]),
                            this.flatAndAddMetadata(s, e(463), () =&gt; !!window[e(1406)]),
                            this[e(592)](s, e(1440), () =&gt; !!window[e(1211)]),
                            this[e(592)](s, e(1437), () =&gt; e(1437) in document),
                            this[e(592)](s, e(634), () =&gt; &#39;trustTokenOperationError&#39; in XMLHttpRequest[e(622)]),
                            this[e(592)](s, e(498), () =&gt; e(498) in XMLHttpRequest.prototype),
                            this[e(592)](s, &#39;trustToken&#39;, () =&gt; e(1006) in HTMLIFrameElement[e(622)]),
                            this[e(592)](s, &#39;localStorage.length&#39;, () =&gt; localStorage[e(368)]),
                            this[e(592)](s, e(370), () =&gt; sessionStorage[e(368)]),
                            this[e(600)][e(1037)].forEach((d) =&gt; {
                                const _ = e;
                                this.flatAndAddMetadata(s, d[_(720)]() + _(557), () =&gt; true);
                            }),
                            this[e(592)](s, e(746), () =&gt; !!this[e(1369)]()),
                            this[e(567)][e(556)] &amp;&amp;
                                this[e(567)][e(556)].length &gt; 0 &amp;&amp;
                                (this[e(482)](),
                                    this[e(367)][e(892)]((d, _) =&gt; {
                                        _ != null &amp;&amp; d != null &amp;&amp; this.flatAndAddMetadata(s, _, () =&gt; d);
                                    }),
                                    this[e(367)][e(725)]()),
                            window[e(773)] &amp;&amp;
                                this[e(592)](s, e(471), () =&gt; {
                                    const d = e, _ = window[d(773)](&#39;(min-width: &#39; + (window[d(1330)] - 1) + d(1060));
                                    return { matches: _[d(1256)], media: _.media };
                                }),
                            this[e(478)](s, n),
                            window[e(362)] &amp;&amp;
                                this.flatAndAddMetadata(s, e(1341), () =&gt; {
                                    const d = e;
                                    return window[d(362)][d(1049)];
                                }),
                            this[e(592)](s, e(1062), () =&gt; window[e(771)] &amp;&amp; e(1151) in window[e(771)]),
                            this[e(592)](s, &#39;HAS_CHROME_CSI&#39;, () =&gt; window[e(771)] &amp;&amp; e(1430) in window.chrome),
                            this[e(592)](s, e(877), () =&gt; window[e(771)] &amp;&amp; e(610) in window[e(771)]),
                            this.flatAndAddMetadata(s, e(455), () =&gt; window[e(771)] &amp;&amp; e(1128) in window[e(771)]),
                            yield this[e(1350)](s),
                            this[e(592)](s, e(383), () =&gt; !!navigator[e(780)]),
                            this[e(592)](s, e(320), () =&gt; !!navigator.hid),
                            this[e(592)](s, e(505), () =&gt; !!navigator.serial),
                            this.flatAndAddMetadata(s, e(1153), () =&gt; !!navigator.presentation));
                        try {
                            if (!n.has(e(736)) &amp;&amp; l.Util[e(1136)](document[e(1388)])) {
                                const { id: d, version: _ } = yield l[e(1139)][e(989)](100, document.interestCohort());
                                (this.flatAndAddMetadata(s, e(1181), () =&gt; d),
                                    this.flatAndAddMetadata(s, e(786), () =&gt; _));
                            }
                        }
                        catch { }
                        for (const d in this[e(567)][e(548)])
                            this.flatAndAddMetadata(s, d, () =&gt; l[e(631)][e(1139)][e(972)](window, this[e(567)][e(548)][d]));
                        const S = this.metadataParams.propertyDescriptors;
                        for (const d in S) {
                            if (!S[e(1417)](d))
                                continue;
                            const _ = d === e(1447) ? window : window[d];
                            _ &amp;&amp; this[e(375)](_, d.toUpperCase() + &#39;_PROPERTY_DESCRIPTOR&#39;, S[d], s);
                        }
                        return s;
                    });
                }
                [r(1350)](n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7;
                        try {
                            const o = navigator[e(869)];
                            if (!o)
                                return;
                            (this[e(592)](n, e(1296), () =&gt; o[e(1057)]),
                                this.flatAndAddMetadata(n, e(1355), () =&gt; o[e(512)]));
                            const s = o[e(1016)];
                            if (!s)
                                return;
                            for (let x = 0; x &lt; s[e(368)]; x++)
                                if (s[x].hasOwnProperty(&#39;brand&#39;) &amp;&amp; s[x][e(1417)](e(317))) {
                                    const m = s[x][e(1374)] + &#39;:&#39; + s[x][e(317)];
                                    this.flatAndAddMetadata(n, e(881) + x, () =&gt; m);
                                }
                            if (typeof o[e(1391)] === e(1064)) {
                                const x = [e(1104), e(1294), e(555), e(1340), e(957), &#39;formFactor&#39;], m = yield o[e(1391)](x);
                                if ((this[e(592)](n, e(838), () =&gt; m[e(1104)]),
                                    this[e(592)](n, e(429), () =&gt; m[e(1294)]),
                                    this[e(592)](n, e(950), () =&gt; m.model),
                                    this[e(592)](n, &#39;NAVIGATOR_CLIENT_HINTS_PLATFORM_VERSION&#39;, () =&gt; m[e(1340)]),
                                    this[e(592)](n, e(1270), () =&gt; {
                                        const p = e;
                                        return m[p(334)]
                                            ? Array[p(553)](m[p(334)])
                                                ? m[p(334)][p(1512)](&#39;, &#39;)
                                                : String(m[p(334)])
                                            : &#39;&#39;;
                                    }),
                                    m.fullVersionList)) {
                                    const p = m.fullVersionList[e(341)]((I) =&gt; I.brand + &#39; v&#39; + I[e(317)])[e(1512)](&#39;; &#39;);
                                    this[e(592)](n, e(558), () =&gt; p);
                                }
                            }
                        }
                        catch (o) {
                            l[e(631)][e(867)][e(1300)](e(1529), o);
                        }
                    });
                }
                [r(375)](n, e, o, s) {
                    const x = r;
                    try {
                        for (const m of o)
                            this[x(592)](s, e + &#39;_&#39; + m[x(720)](), () =&gt; {
                                const p = x, I = n[p(622)] ? n[p(622)] : n, g = Object.getOwnPropertyDescriptor(I, m);
                                if (g) {
                                    const v = g[p(996)] ? g[p(996)][p(861)]() : void 0;
                                    return JSON[p(833)]({
                                        configurable: g[p(1507)],
                                        enumerable: g[p(1325)],
                                        value: g[p(584)],
                                        writable: g[p(815)],
                                        getter: v != null &amp;&amp; v.length &lt; 100 ? v : void 0,
                                    });
                                }
                                return &#39;undefined&#39;;
                            });
                    }
                    catch (m) {
                        l[x(631)][x(867)][x(1300)](&#39;failed to add properties descriptor&#39;, m);
                    }
                }
                addIframeData(n, e) {
                    const o = r;
                    if (!e[o(438)](&#39;IFRAME_DATA&#39;))
                        try {
                            const s = l[o(631)][o(1139)][o(325)](o(697));
                            if (!s)
                                return;
                            ((s[o(882)] = &#39;blank page&#39;),
                                document[o(1141)][o(896)](s),
                                this[o(592)](n, o(679), () =&gt; {
                                    const x = o;
                                    return typeof s[x(772)][x(771)];
                                }),
                                this[o(592)](n, &#39;IFRAME_WIDTH&#39;, () =&gt; {
                                    const x = o;
                                    return s[x(772)][x(405)][x(1431)];
                                }),
                                this[o(592)](n, o(1022), () =&gt; {
                                    const x = o;
                                    return s[x(772)][x(405)][x(507)];
                                }),
                                s[o(1283)]());
                        }
                        catch (s) {
                            l[o(631)].Logger[o(1300)](o(1147), s);
                        }
                }
                [r(418)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = {}, o = [
                            n(1248),
                            n(1085),
                            n(1481),
                            n(1045),
                            n(1326),
                            n(448),
                            n(1217),
                            n(597),
                            n(783),
                            n(642),
                            n(1024),
                            n(1279),
                            n(698),
                            &#39;payment-handler&#39;,
                            &#39;persistent-storage&#39;,
                            n(939),
                        ], s = [];
                        if (navigator[n(1184)])
                            for (const x in o) {
                                const m = o[x];
                                s.push(navigator[n(1184)][n(410)]({ name: m })[n(804)]((p) =&gt; {
                                    const I = n;
                                    e[m] = p[I(628)];
                                })[n(689)]((p) =&gt; { }));
                            }
                        try {
                            yield Promise[n(683)](s);
                        }
                        catch (x) {
                            l[n(631)].Logger[n(1300)](x);
                        }
                        return e;
                    });
                }
                [r(1119)](n) {
                    const e = r, o = document[e(983)](&#39;video&#39;);
                    if (o &amp;&amp; o[e(327)])
                        return o[e(327)](n);
                }
                [r(669)](n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7;
                        l[e(1257)]();
                        const o = this, s = l[e(380)], x = s[e(1172)], m = s[e(585)];
                        (this[e(592)](n, e(1323), () =&gt; s[e(893)]),
                            this[e(592)](n, e(388), () =&gt; s[e(1233)]),
                            this[e(592)](n, e(839), () =&gt; !!s[e(839)]),
                            s.audio &amp;&amp; this.flatAndAddMetadata(n, &#39;audio&#39;, () =&gt; s.audio),
                            this[e(592)](n, e(397), () =&gt; {
                                const g = e;
                                return !!x(&#39;battery&#39;, navigator) || !!x(g(1268), navigator);
                            }),
                            this[e(592)](n, e(502), () =&gt; s[e(666)]),
                            this[e(592)](n, &#39;context_menu&#39;, () =&gt; s[e(1465)]),
                            this[e(592)](n, e(1102), () =&gt; s.cors),
                            this[e(592)](n, e(946), () =&gt; s.cryptography),
                            this.flatAndAddMetadata(n, e(1029), () =&gt; s[e(1164)]),
                            this[e(592)](n, e(1198), () =&gt; s[e(1054)]),
                            this[e(592)](n, e(1500), () =&gt; s.customevent),
                            this.flatAndAddMetadata(n, &#39;dart&#39;, () =&gt; s.dart),
                            this[e(592)](n, e(1288), () =&gt; s[e(573)]),
                            this[e(592)](n, e(809), () =&gt; s[e(649)]));
                        const p = yield this[e(1190)](e(1207));
                        (o[e(592)](n, &#39;exif_orientation&#39;, () =&gt; p),
                            this[e(592)](n, e(700), () =&gt; s[e(1273)]),
                            s.forcetouch &amp;&amp;
                                (this[e(592)](n, e(1126), () =&gt; m(x(&#39;mouseforcewillbegin&#39;, window, false), window)),
                                    this[e(592)](n, e(1145), () =&gt; MouseEvent[e(616)]),
                                    this[e(592)](n, e(1180), () =&gt; MouseEvent[e(1370)])),
                            this.flatAndAddMetadata(n, e(718), () =&gt; s[e(1315)]),
                            this[e(592)](n, e(470), () =&gt; s[e(1372)]),
                            this[e(592)](n, e(599), () =&gt; s[e(597)]),
                            this[e(592)](n, e(1407), () =&gt; s[e(1407)]));
                        const I = yield this[e(1190)](e(382));
                        (o[e(592)](n, &#39;indexed_db&#39;, () =&gt; I),
                            this[e(592)](n, e(1511), () =&gt; s[e(748)]),
                            this[e(592)](n, e(1484), () =&gt; s[e(552)]),
                            this[e(592)](n, e(961), () =&gt; s[e(961)]),
                            this[e(592)](n, e(491), () =&gt; s[e(491)]),
                            this.flatAndAddMetadata(n, &#39;media_source&#39;, () =&gt; &#39;MediaSource&#39; in window),
                            this[e(592)](n, &#39;message_channel&#39;, () =&gt; s[e(1149)]),
                            this[e(592)](n, e(571), () =&gt; s[e(571)]),
                            this[e(592)](n, e(741), () =&gt; s[e(611)]),
                            this.flatAndAddMetadata(n, &#39;performance&#39;, () =&gt; s.performance),
                            this.flatAndAddMetadata(n, &#39;pointer_events&#39;, () =&gt; s[e(538)]),
                            this[e(592)](n, e(927), () =&gt; s[e(1236)]),
                            this[e(592)](n, e(1277), () =&gt; s[e(1277)]),
                            this[e(592)](n, e(692), () =&gt; s[e(905)]),
                            this.flatAndAddMetadata(n, &#39;quota_management&#39;, () =&gt; s[e(845)]),
                            this[e(592)](n, e(1091), () =&gt; s[e(366)]),
                            this[e(592)](n, e(1272), () =&gt; s[e(824)]),
                            this[e(592)](n, e(797), () =&gt; s[e(1389)]),
                            this[e(592)](n, e(1074), () =&gt; s.typedarrays),
                            this[e(592)](n, e(1218), () =&gt; s[e(1218)]),
                            this[e(592)](n, e(654), () =&gt; !!s[e(654)]),
                            s.video &amp;&amp; this[e(592)](n, e(654), () =&gt; s.video),
                            this[e(592)](n, e(959), () =&gt; s.webgl),
                            this[e(592)](n, e(426), () =&gt; s[e(1439)]),
                            this[e(592)](n, &#39;x_domain_request&#39;, () =&gt; s.xdomainrequest),
                            this[e(592)](n, &#39;matchmedia&#39;, () =&gt; s[e(1454)]));
                    });
                }
                [r(393)]() {
                    const n = r, e = {}, o = navigator.connection || navigator[n(1463)] || navigator.webkitConnection;
                    return (this[n(592)](e, &#39;NETWORK_TYPE&#39;, () =&gt; (o ? o.type : null)),
                        this[n(592)](e, n(1111), () =&gt; (o ? o[n(682)] : null)),
                        this[n(592)](e, n(661), () =&gt; !!navigator[n(402)]),
                        this[n(592)](e, n(1343), () =&gt; this.hasSpeakers),
                        this.flatAndAddMetadata(e, n(1026), () =&gt; this[n(1100)]),
                        this.flatAndAddMetadata(e, n(1123), () =&gt; this[n(1120)]),
                        this[n(1404)] &amp;&amp;
                            (this.flatAndAddMetadata(e, &#39;BATTERY_SUPPORTED&#39;, () =&gt; this.isBatterySupported),
                                this[n(592)](e, n(1357), () =&gt; this[n(1187)]),
                                this.flatAndAddMetadata(e, n(1206), () =&gt; this[n(358)]),
                                this[n(592)](e, n(347), () =&gt; this[n(1146)]),
                                this[n(592)](e, n(446), () =&gt; this.batteryDischargingTime)),
                        this[n(592)](e, n(1247), () =&gt; this[n(485)]),
                        this[n(592)](e, &#39;IS_MOBILE&#39;, () =&gt; {
                            const s = n;
                            return l._POSignalsUtils[s(1139)][s(1250)];
                        }),
                        this[n(592)](e, n(979), () =&gt; {
                            const s = n;
                            return s(374) in document[s(1157)];
                        }),
                        window[n(773)] &amp;&amp;
                            (this.flatAndAddMetadata(e, &#39;HAS_FINE_POINTER&#39;, () =&gt; window[n(773)](&#39;(any-pointer: fine)&#39;)[n(1256)]),
                                this[n(592)](e, &#39;HAS_COARSE_POINTER&#39;, () =&gt; window[n(773)](&#39;(any-pointer: coarse)&#39;).matches),
                                this[n(592)](e, n(386), () =&gt; window[n(773)](n(391))[n(1256)])),
                        this[n(592)](e, n(1185), () =&gt; this[n(1184)]),
                        this[n(592)](e, n(1386), () =&gt; {
                            const s = n;
                            return window[s(773)](s(422))[s(1256)]
                                ? s(319)
                                : window[s(773)](s(930))[s(1256)]
                                    ? s(409)
                                    : void 0;
                        }),
                        e);
                }
                [r(579)](n, e, o) {
                    const s = r;
                    try {
                        const x = new Set(this.metadataParams[s(788)] || []);
                        e != null &amp;&amp; o != null &amp;&amp; !x[s(438)](e) &amp;&amp; (n[e] = o);
                    }
                    catch (x) {
                        l._POSignalsUtils.Logger[s(1300)](&#39;Failed to add &#39; + e + s(1333) + o + &#39;, &#39; + x);
                    }
                }
                [r(1190)](n) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const e = _0x48f7, o = new Promise((x) =&gt; {
                            const m = _0x48f7;
                            try {
                                l[m(380)].on(n, (p) =&gt; {
                                    x(p);
                                });
                            }
                            catch (p) {
                                (x(null), l[m(631)][m(867)].info(m(1168) + n, p));
                            }
                        }), s = l[e(631)][e(1139)][e(929)](250)[e(804)](() =&gt; null);
                        return yield Promise[e(987)]([o, s]);
                    });
                }
                [r(592)](n, e, o) {
                    const s = r;
                    try {
                        const x = new Set(this[s(567)][s(788)] || []);
                        if (!e || x[s(438)](e))
                            return;
                        const m = o();
                        if (typeof m === s(574) &amp;&amp; m !== null) {
                            const p = l._POSignalsUtils.Util[s(912)](m);
                            for (const I in p)
                                this[s(579)](n, e + &#39;.&#39; + I, p[I]);
                        }
                        else
                            this.safeAddMetadata(n, e, m);
                    }
                    catch (x) {
                        l[s(631)][s(867)][s(1300)](&#39;Failed to add &#39; + e, x);
                    }
                }
                [r(696)]() {
                    const n = r;
                    let e = new Date(), o = 0, s;
                    do
                        (o++, (s = new Date()[n(1144)]() - e.getTime()), Math[n(998)](o * Math[n(605)]()));
                    while (s &lt; 500);
                    const x = o / s;
                    return (l[n(631)][n(867)][n(1420)](&#39;Ops : &#39; + x), x);
                }
                [r(395)]() {
                    const n = r, e = [
                        { name: n(1096), value: false, error: null },
                        { name: n(684), value: false, error: null },
                        { name: n(1013), value: false, error: null },
                        { name: n(1395), value: false, error: null },
                    ];
                    (!this[n(849)] &amp;&amp;
                        ((this.aiSignalsResult = e),
                            (this[n(1337)][n(1115)] = e),
                            l.AiaSignals.detect()[n(804)]((o) =&gt; {
                                const s = n;
                                ((this[s(849)] = o), (this[s(1337)].aiaSignals = o));
                            })[n(689)]((o) =&gt; {
                                const s = n;
                                l._POSignalsUtils.Logger.info(s(643), o);
                            })),
                        this[n(849)] &amp;&amp; (this.lastCalculatedMetadata[n(1115)] = this.aiSignalsResult));
                }
                static [r(1335)]() {
                    const n = r;
                    return (Math[n(1522)](0.123) == 1.4474840516030247 &amp;&amp;
                        Math[n(1297)](Math[n(677)]) == 0.881373587019543 &amp;&amp;
                        Math.atan(2) == 1.1071487177940904 &amp;&amp;
                        Math[n(751)](0.5) == 0.5493061443340548 &amp;&amp;
                        Math[n(752)](Math.PI) == 1.4645918875615231 &amp;&amp;
                        Math.cos(21 * Math[n(840)]) == -0.4067775970251724 &amp;&amp;
                        Math[n(336)](492 * Math[n(707)]) == 9199870313877772e292 &amp;&amp;
                        Math[n(566)](1) == 1.718281828459045 &amp;&amp;
                        Math.hypot(6 * Math.PI, -100) == 101.76102278593319 &amp;&amp;
                        Math[n(1043)](Math.PI) == 0.4971498726941338 &amp;&amp;
                        Math[n(713)](Math.PI) == 12246467991473532e-32 &amp;&amp;
                        Math[n(1476)](Math.PI) == 11.548739357257748 &amp;&amp;
                        Math[n(608)](10 * Math[n(707)]) == -3.3537128705376014 &amp;&amp;
                        Math[n(1290)](0.123) == 0.12238344189440875 &amp;&amp;
                        Math[n(523)](Math.PI, -100) == 19275814160560204e-66);
                }
                [r(625)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        return new Promise((n) =&gt; {
                            const e = _0x48f7;
                            if (typeof window === e(480) || !window.speechSynthesis)
                                return n(0);
                            const o = window[e(340)][e(1163)]();
                            if (o[e(368)] &gt; 0)
                                n(o.length);
                            else {
                                const s = () =&gt; {
                                    const x = e, m = window[x(340)][x(1163)]();
                                    m[x(368)] &gt; 0 &amp;&amp; (window[x(340)][x(888)](x(956), s), n(m[x(368)]));
                                };
                                (window[e(340)][e(806)](&#39;voiceschanged&#39;, s),
                                    window[e(340)][e(1163)](),
                                    setTimeout(() =&gt; {
                                        const x = e;
                                        (window[x(340)].removeEventListener(x(956), s), n(0));
                                    }, 500));
                            }
                        });
                    });
                }
            }
            i[r(846)] = a;
            class c {
                constructor(n, e) {
                    const o = r;
                    ((this[o(435)] = n),
                        (this[o(1342)] = e),
                        (this.AGENT_BASE_URL = o(722)),
                        (this[o(1528)] = &#39;/device&#39;));
                }
                getDevicePayload() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = this[n(902)] + &#39;:&#39; + this[n(435)] + this.AGENT_DEVICE_URL, o = new AbortController(), s = o[n(1239)], x = setTimeout(() =&gt; o[n(657)](), this[n(1342)]);
                        try {
                            const m = yield fetch(e, {
                                method: n(636),
                                headers: { &#39;Content-Type&#39;: n(874) },
                                signal: s,
                            });
                            if (!m.ok)
                                return (l[n(631)][n(867)].info(n(495) + m[n(1445)]), void 0);
                            const p = yield m[n(1299)]();
                            return (l[n(631)][n(867)][n(1300)](&#39;calculated workstation device attributes.&#39;), p);
                        }
                        catch (m) {
                            return (m.name === &#39;AbortError&#39;
                                ? l[n(631)][n(867)].error(&#39;Failed to fetch the Workstation data. Request timed out after &#39; +
                                    this[n(1342)] +
                                    &#39;ms&#39;)
                                : l[n(631)][n(867)].info(n(1103) + m[n(768)]),
                                void 0);
                        }
                        finally {
                            clearTimeout(x);
                        }
                    });
                }
            }
            i[r(474)] = c;
        })((l[f(813)] || (l._POSignalsMetadata = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                static [r(1363)]() {
                    const t = r, n = [
                        &#39;__webdriver_evaluate&#39;,
                        t(1264),
                        t(1380),
                        &#39;__webdriver_script_func&#39;,
                        t(583),
                        t(1462),
                        t(818),
                        &#39;__webdriver_unwrapped&#39;,
                        t(1202),
                        &#39;__selenium_unwrapped&#39;,
                        t(1455),
                    ];
                    for (const e of n)
                        if (document[e])
                            return true;
                    return false;
                }
                static [r(1113)]() {
                    const t = r, n = [
                        t(441),
                        &#39;__nightmare&#39;,
                        t(980),
                        t(1152),
                        &#39;calledSelenium&#39;,
                        &#39;callSelenium&#39;,
                        &#39;_Selenium_IDE_Recorder&#39;,
                    ];
                    for (const e of n)
                        if (window[e])
                            return true;
                    return false;
                }
                static [r(638)]() {
                    const t = r, n = [
                        &#39;webdriver&#39;,
                        t(1202),
                        t(860),
                        t(1264),
                        &#39;__fxdriver_evaluate&#39;,
                        t(818),
                        t(1435),
                        t(715),
                        t(1455),
                        &#39;_Selenium_IDE_Recorder&#39;,
                        t(980),
                        t(1322),
                        t(475),
                        t(915),
                        t(891),
                        t(1303),
                        t(775),
                        t(1492),
                        t(837),
                        t(1317),
                        &#39;__webdriver_script_fn&#39;,
                        &#39;__$webdriverAsyncExecutor&#39;,
                        t(1493),
                        t(595),
                        t(852),
                        t(1318),
                        t(440),
                    ];
                    for (const e of n)
                        if (navigator[e])
                            return true;
                    return false;
                }
                static [r(450)]() {
                    const t = r;
                    return (window[t(1424)] &amp;&amp;
                        window[t(1424)][t(861)]() &amp;&amp;
                        window[t(1424)][t(861)]()[t(1265)](&#39;Sequentum&#39;) != -1);
                }
            }
            i[r(798)] = a;
        })((l[f(813)] || (l._POSignalsMetadata = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7, a = r(555), c = r(1246), t = r(322), n = r(1230), e = r(317), o = r(512), s = r(878), x = &#39;crawler&#39;, m = &#39;cli&#39;, p = r(1179), I = r(1082), g = r(1475), v = r(315), A = r(835), S = Object.freeze({
                browser: [[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [c, e, [t, m]]],
            }), d = Object[r(951)]({
                browser: [
                    [
                        /((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
                        /(applebot(?:-extended)?)\/([\w\.]+)/i,
                        /(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
                        /(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
                        /(coccocbot-(?:image|web))\/([\w\.]+)/i,
                        /(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
                        /(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
                        /(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
                        /((?:semrush|splitsignal)bot[-abcfimostw]*)\/([\w\.-]+)/i,
                        /(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
                        /(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
                        /(yandex(?:(?:mobile)?(?:accessibility|additional|renderresources|screenshot|sprav)?bot|image(?:s|resizer)|video(?:parser)?|blogs|adnet|favicons|fordomain|market|media|metrika|news|ontodb(?:api)?|pagechecker|partner|rca|tracker|turbo|vertis|webmaster|antivirus))\/([\w\.]+)/i,
                        /(yeti)\/([\w\.]+)/i,
                        /((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i,
                    ],
                    [c, e, [t, x]],
                    [
                        /((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
                        /\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i,
                    ],
                    [c, [t, x]],
                ],
            }); Object[r(951)]({
                device: [
                    [
                        /(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,
                    ],
                    [n, a, [t, s]],
                    [/(u304aa)/i],
                    [a, [n, r(331)], [t, o]],
                    [/\bsie-(\w*)/i],
                    [a, [n, &#39;Siemens&#39;], [t, o]],
                    [/\b(rct\w+) b/i],
                    [a, [n, r(943)], [t, s]],
                    [/\b(venue[\d ]{2,7}) b/i],
                    [a, [n, r(909)], [t, s]],
                    [/\b(q(?:mv|ta)\w+) b/i],
                    [a, [n, r(1215)], [t, s]],
                    [/\b(?:barnes[&amp; ]+noble |bn[rt])([\w\+ ]*) b/i],
                    [a, [n, r(1365)], [t, s]],
                    [/\b(tm\d{3}\w+) b/i],
                    [a, [n, r(967)], [t, s]],
                    [/\b(k88) b/i],
                    [a, [n, r(1501)], [t, s]],
                    [/\b(nx\d{3}j) b/i],
                    [a, [n, &#39;ZTE&#39;], [t, o]],
                    [/\b(gen\d{3}) b.+49h/i],
                    [a, [n, r(660)], [t, o]],
                    [/\b(zur\d{3}) b/i],
                    [a, [n, r(660)], [t, s]],
                    [/^((zeki)?tb.*\b) b/i],
                    [a, [n, r(349)], [t, s]],
                    [/\b([yr]\d{2}) b/i, /\b(?:dragon[- ]+touch |dt)(\w{5}) b/i],
                    [a, [n, r(973)], [t, s]],
                    [/\b(ns-?\w{0,9}) b/i],
                    [a, [n, &#39;Insignia&#39;], [t, s]],
                    [/\b((nxa|next)-?\w{0,9}) b/i],
                    [a, [n, &#39;NextBook&#39;], [t, s]],
                    [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],
                    [[n, &#39;Voice&#39;], a, [t, o]],
                    [/\b(lvtel\-)?(v1[12]) b/i],
                    [[n, r(1521)], a, [t, o]],
                    [/\b(ph-1) /i],
                    [a, [n, r(705)], [t, o]],
                    [/\b(v(100md|700na|7011|917g).*\b) b/i],
                    [a, [n, r(357)], [t, s]],
                    [/\b(trio[-\w\. ]+) b/i],
                    [a, [n, &#39;MachSpeed&#39;], [t, s]],
                    [/\btu_(1491) b/i],
                    [a, [n, &#39;Rotor&#39;], [t, s]],
                ],
            }); Object[r(951)]({
                browser: [
                    [
                        /(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i,
                    ],
                    [c, e, [t, p]],
                ],
            }); const y = Object[r(951)]({
                browser: [
                    [
                        /(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|siteaudit|telegram|twitter|uptimero)bot|google-site-verification|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
                        /(bluesky) cardyb\/([\w\.]+)/i,
                        /(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
                        /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
                    ],
                    [c, e, [t, I]],
                    [
                        /(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat|yandex(?:sitelinks|userproxy))/i,
                    ],
                    [c, [t, I]],
                ],
            }); Object[r(951)]({
                browser: [
                    [/chatlyio\/([\d\.]+)/i],
                    [e, &#39;Slack&#39;, [t, g]],
                    [/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i],
                    [e, r(1414), [t, g]],
                ],
            }); Object.freeze({
                browser: [
                    [
                        /(apple(?:coremedia|tv))\/([\w\._]+)/i,
                        /(coremedia) v([\w\._]+)/i,
                        /(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
                        /^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i,
                        /(lg player|nexplayer) ([\d\.]+)/i,
                        /player\/(nexplayer|lg player) ([\w\.-]+)/i,
                        /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i,
                        /(htc streaming player) [\w_]+ \/ ([\d\.]+)/i,
                        /(lavf)([\d\.]+)/i,
                        /(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
                        / (songbird)\/([\w\.-]+)/i,
                        /(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i,
                        /(vlc)(?:\/| media player - version )([\w\.-]+)/i,
                        /^(foobar2000|itunes|smp)\/([\d\.]+)/i,
                        /com\.(riseupradioalarm)\/([\d\.]*)/i,
                        /(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i,
                        /(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i,
                    ],
                    [c, e, [t, v]],
                    [/(flrp)\/([\w\.-]+)/i],
                    [[c, &#39;Flip Player&#39;], e, [t, v]],
                    [
                        /(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i,
                    ],
                    [c, [t, v]],
                    [/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i],
                    [[c, /[_-]/g, &#39; &#39;], e, [t, v]],
                    [/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i],
                    [[c, r(1071)], e, [t, v]],
                ],
            }); const R = Object.freeze({
                browser: [
                    [
                        /^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
                        /(jsdom|java)\/([\w\.]+)/i,
                    ],
                    [c, e, [t, A]],
                ],
            }); Object.freeze({
                device: [
                    [/dilink.+(byd) auto/i],
                    [n],
                    [/(rivian) (r1t)/i],
                    [n, a],
                    [/vcc.+netfront/i],
                    [[n, r(615)]],
                ],
            }); const B = Object[r(951)]({ browser: [...S[r(489)], ...d[r(489)], ...y[r(489)], ...R[r(489)]] });
            class D {
                constructor() {
                    const N = r;
                    ((this[N(1044)] = (ne) =&gt; [
                        N(1116),
                        N(982),
                        N(1362),
                        N(1387),
                        N(407),
                        &#39;applebot&#39;,
                        &#39;applebot-extended&#39;,
                        N(618),
                        N(731),
                        N(384),
                        &#39;diffbot&#39;,
                        N(1195),
                        N(1267),
                        N(433),
                        N(1087),
                        N(1196),
                        N(1199),
                        &#39;facebookbot&#39;,
                        &#39;meta-externalagent&#39;,
                        N(613),
                        N(966),
                        N(527),
                        N(420),
                        N(774),
                        N(908),
                        N(1245),
                        N(590),
                        N(1017),
                        N(1e3),
                        N(931),
                    ][N(1148)]((he) =&gt; ne[N(1479)]().includes(he))),
                        (this[N(1203)] = (ne) =&gt; {
                            const he = N, Y = ne[he(1479)](), ye = B[he(489)];
                            for (let be = 0; be &lt; ye[he(368)]; be += 2) {
                                const Ne = ye[be], P = Array.isArray(Ne) ? Ne : [Ne];
                                for (const X of P)
                                    if (X instanceof RegExp &amp;&amp; X.test(Y))
                                        return true;
                            }
                            return false;
                        }),
                        (this[N(536)] = (ne) =&gt; ne[N(1246)] === Engine[N(990)]),
                        (this[N(1047)] = (ne) =&gt; ne[N(1479)]()[N(1461)](&#39;electron&#39;)));
                }
            }
            i[r(1408)] = D;
        })((l[f(813)] || (l._POSignalsMetadata = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    function _0x1ccc() {
        const l = [
            &#39;NAVIGATOR_LANGUAGE&#39;,
            &#39;DeviceMotionEvent&#39;,
            &#39;languages&#39;,
            &#39;Microsoft YaHei&#39;,
            &#39;isBatterySupported&#39;,
            &#39;driver&#39;,
            &#39;RunPerfTest&#39;,
            &#39;ie8compat&#39;,
            &#39;UAParserHelperMetadata&#39;,
            &#39;hasInput&#39;,
            &#39;password&#39;,
            &#39;cpuClass&#39;,
            &#39;iframeWindow&#39;,
            &#39;Hoefler Text&#39;,
            &#39;Yahoo! Japan&#39;,
            &#39;getAutofillMetadataSmart&#39;,
            &#39;code&#39;,
            &#39;hasOwnProperty&#39;,
            &#39;fingerPrintComponents&#39;,
            &#39;LKLUG&#39;,
            &#39;debug&#39;,
            &#39;visibility&#39;,
            &#39;createDataChannel&#39;,
            &#39;animationstart&#39;,
            &#39;external&#39;,
            &#39;span&#39;,
            &#39;Segoe MDL2 Assets&#39;,
            &#39;input:-webkit-autofill { animation: autofill-detection 0.001s; }&#39;,
            &#39;_ST_PING&#39;,
            &#39;audio/aac&#39;,
            &#39;csi&#39;,
            &#39;width&#39;,
            &#39;Poppins&#39;,
            &#39;    [native code]&#39;,
            &#39;origin&#39;,
            &#39;__webdriver_unwrapped&#39;,
            &#39;VENDOR&#39;,
            &#39;hasTrustToken&#39;,
            &#39;NAVIGATOR_POINTER_ENABLED&#39;,
            &#39;websockets&#39;,
            &#39;window_fmget_targets&#39;,
            &#39;getFingerPrint&#39;,
            &#39;Open Sans&#39;,
            &#39;you&#39;,
            &#39;Battery not supported!&#39;,
            &#39;statusText&#39;,
            &#39;localStorage&#39;,
            &#39;window&#39;,
            &#39;next&#39;,
            &#39;removeItem&#39;,
            &#39;engine&#39;,
            &#39;trim&#39;,
            &#39;MS Reference Specialty&#39;,
            &#39;webgl2&#39;,
            &#39;matchmedia&#39;,
            &#39;__fxdriver_unwrapped&#39;,
            &#39;Pristina&#39;,
            &#39;hasPassword&#39;,
            &#39;Consolas&#39;,
            &#39;DetectHeadless&#39;,
            &#39;mmMwWLliI0O&amp;1&#39;,
            &#39;includes&#39;,
            &#39;__fxdriver_evaluate&#39;,
            &#39;mozConnection&#39;,
            &#39;Herculanum&#39;,
            &#39;contextmenu&#39;,
            &quot;&#39;, &quot;,
            &#39;Raleway&#39;,
            &#39;VIDEO_CARD&#39;,
            &#39;headlessTests&#39;,
            &#39;Menlo&#39;,
            &#39;Chalkboard&#39;,
            &#39;universalTrustEnabled&#39;,
            &#39;Apple Symbols&#39;,
            &#39;closed&#39;,
            &#39;inapp&#39;,
            &#39;sinh&#39;,
            &#39;BROWSER_VOICES_COUNT&#39;,
            &#39;safari&#39;,
            &#39;toLowerCase&#39;,
            &#39;selenium_in_window&#39;,
            &#39;ambient-light-sensor&#39;,
            &#39;getContext&#39;,
            &#39;baseFonts&#39;,
            &#39;internationalization&#39;,
            &#39;failed to get broJsFingerprint info&#39;,
            &#39;Windows Phone&#39;,
            &#39;Other&#39;,
            &#39;getLies&#39;,
            &#39;createOffer&#39;,
            &#39;Trattatello&#39;,
            &#39;Noto Sans CJK SC&#39;,
            &#39;webdriverCommand&#39;,
            &#39;__lastWatirAlert&#39;,
            &#39;HASLIEDRESOLUTION&#39;,
            &#39;engineVersion&#39;,
            &#39;getNewObjectToStringTypeErrorLie&#39;,
            &#39;documentLie&#39;,
            &#39;detectFontsQuick&#39;,
            &#39;onicecandidate&#39;,
            &#39;custom_event&#39;,
            &#39;ZTE&#39;,
            &#39;getHasLiedResolution&#39;,
            &#39;getAttribute&#39;,
            &#39;backgroundColor&#39;,
            &#39;size&#39;,
            &#39;Failed to setup autofill detection:&#39;,
            &#39;configurable&#39;,
            &#39;isIphoneOrIPad&#39;,
            &#39;Serifa&#39;,
            &#39;27szwMUD&#39;,
            &#39;indexed_db_blob&#39;,
            &#39;join&#39;,
            &#39;INPUT&#39;,
            &#39;Segoe Script&#39;,
            &#39;webkitRequestFileSystem&#39;,
            &#39;constructor&#39;,
            &#39;MAX_VARYING_VECTORS&#39;,
            &#39;Liberation Mono&#39;,
            &#39;Bodoni 72 Smallcaps&#39;,
            &#39;MingLiU-ExtB&#39;,
            &#39;LvTel&#39;,
            &#39;acos&#39;,
            &#39;timeout&#39;,
            &#39;Georgia&#39;,
            &#39;toFixed&#39;,
            &#39;Baskerville&#39;,
            &#39;Sawasdee&#39;,
            &#39;AGENT_DEVICE_URL&#39;,
            &#39;failed to add client hints&#39;,
            &#39;error_code&#39;,
            &#39;now&#39;,
            &#39;isCanvasSupported&#39;,
            &#39;rgb(250, 255, 189)&#39;,
            &#39;Futura Bk BT&#39;,
            &#39;quota detection failed: &#39;,
            &#39;Cochin&#39;,
            &#39;htmlGeoLocation_heading&#39;,
            &#39;mediaplayer&#39;,
            &#39;detectAutofillFieldsAsync&#39;,
            &#39;version&#39;,
            &#39;setAttribute&#39;,
            &#39;light&#39;,
            &#39;NAVIGATOR_HID_SUPPORTED&#39;,
            &#39;spawn&#39;,
            &#39;type&#39;,
            &#39;testString&#39;,
            &#39;initDeviceIdentity&#39;,
            &#39;createInvisibleElement&#39;,
            &#39;awesomium&#39;,
            &#39;canPlayType&#39;,
            &#39;getAllLies&#39;,
            &#39;FingerPrint failed&#39;,
            &#39;open&#39;,
            &#39;AT&amp;T&#39;,
            &#39;Noto Color Emoji&#39;,
            &#39;AUDIO_OUTPUT_DEVICES&#39;,
            &#39;formFactor&#39;,
            &#39;ondevicelight&#39;,
            &#39;cosh&#39;,
            &#39;addStealthTest&#39;,
            &#39;denied&#39;,
            &#39;getHasLiedBrowser&#39;,
            &#39;speechSynthesis&#39;,
            &#39;map&#39;,
            &#39;history&#39;,
            &#39;SimSun&#39;,
            &#39;getSupportedExtensions&#39;,
            &#39;keys&#39;,
            &#39;autocomplete&#39;,
            &#39;BATTERY_CHARGING_TIME&#39;,
            &#39;COOKIES_ENABLED&#39;,
            &#39;Zeki&#39;,
            &#39;sans-serif-medium&#39;,
            &#39;userLanguage&#39;,
            &#39;detectFontsWithCanvas&#39;,
            &#39;getQuickFingerprint&#39;,
            &#39;vendorFlavors&#39;,
            &#39;consistent_mimetypes_prototype&#39;,
            &#39;colorGamut&#39;,
            &#39;Envizen&#39;,
            &#39;batteryCharging&#39;,
            &#39;language&#39;,
            &#39;...&#39;,
            &#39;connect&#39;,
            &#39;Notification&#39;,
            &#39;NAVIGATOR_USER_AGENT&#39;,
            &#39;font&#39;,
            &#39;filter&#39;,
            &#39;requestanimationframe&#39;,
            &#39;webRtcIps&#39;,
            &#39;length&#39;,
            &#39;processInputsWithTimeout&#39;,
            &#39;sessionStorage.length&#39;,
            &#39;DejaVu Serif&#39;,
            &#39;isInvalidStackTraceSize&#39;,
            &#39;add&#39;,
            &#39;ontouchstart&#39;,
            &#39;addPropertyDescriptorInfo&#39;,
            &#39;split&#39;,
            &#39;getGeoLocationData&#39;,
            &#39;rgb(232, 240, 254)&#39;,
            &#39;Standard Symbols L&#39;,
            &#39;Modernizr&#39;,
            &#39;error&#39;,
            &#39;indexeddb&#39;,
            &#39;NAVIGATOR_KEYBOARD_SUPPORTED&#39;,
            &#39;dataforseobot&#39;,
            &#39;OS_CPU&#39;,
            &#39;HAS_HOVER&#39;,
            &#39;failed to get audio-video info&#39;,
            &#39;application_cache&#39;,
            &#39;FingerprintJS&#39;,
            &#39;Humanst521 BT&#39;,
            &#39;(any-hover: hover)&#39;,
            &#39;headless_chrome&#39;,
            &#39;getIoMetadata&#39;,
            &#39;detectFonts&#39;,
            &#39;getAiaSignals&#39;,
            &#39;Ubuntu&#39;,
            &#39;battery_api&#39;,
            &#39;latitude&#39;,
            &#39;apply&#39;,
            &#39;Ubuntu Condensed&#39;,
            &#39;sans-serif-thin&#39;,
            &#39;bluetooth&#39;,
            &#39;__proto__&#39;,
            &#39;webkitTemporaryStorage&#39;,
            &#39;screen&#39;,
            &#39;Arial&#39;,
            &#39;claudebot&#39;,
            &#39;Trebuchet MS&#39;,
            &#39;dark&#39;,
            &#39;query&#39;,
            &#39;openDatabase&#39;,
            &#39;PMingLiU&#39;,
            &#39;true&#39;,
            &#39;JS_FONTS&#39;,
            &#39;DOCUMENT_ELEMENT_DRIVER&#39;,
            &#39;Font detection failed&#39;,
            &#39;PromiseQueue&#39;,
            &#39;getPermissionsMetadata&#39;,
            &#39;browserInfo&#39;,
            &#39;semrushbot-ocob&#39;,
            &#39;vertical&#39;,
            &#39;(prefers-color-scheme: light)&#39;,
            &#39;Internet Explorer&#39;,
            &#39;Symbol&#39;,
            &#39;Segoe Print&#39;,
            &#39;web_sockets&#39;,
            &#39;Times&#39;,
            &#39;FontFingerprint&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_BITNESS&#39;,
            &#39;calculated browser device attributes.&#39;,
            &#39;test&#39;,
            &#39; in async detection:&#39;,
            &#39;googleother-video&#39;,
            &#39;Meera&#39;,
            &#39;agentPort&#39;,
            &#39;selenium_in_navigator&#39;,
            &#39;videoInputDevices&#39;,
            &#39;has&#39;,
            &#39;MAX_VERTEX_ATTRIBS&#39;,
            &#39;$cdc_asdjflasutopfhvcZLmcfl_&#39;,
            &#39;_phantom&#39;,
            &#39;NAVIGATOR_DEVICE_MEMORY&#39;,
            &#39;Minion Pro&#39;,
            &#39;productSub&#39;,
            &#39;getIdentificationMetadata&#39;,
            &#39;BATTERY_DISCHARGING_TIME&#39;,
            &#39;fontHash&#39;,
            &#39;clipboard-read&#39;,
            &#39;SCREEN_FRAME&#39;,
            &#39;seleniumSequentum&#39;,
            &#39;***&#39;,
            &#39;Sitka&#39;,
            &#39;visitorId&#39;,
            &#39;granted&#39;,
            &#39;HAS_CHROME_RUNTIME&#39;,
            &#39;timestamp&#39;,
            &#39;canvas&#39;,
            &#39;sans-serif-light&#39;,
            &#39;find&#39;,
            &#39;none&#39;,
            &#39;FreeMono&#39;,
            &#39;cant&#39;,
            &#39;window_RunPerfTest&#39;,
            &#39;Copperplate&#39;,
            &#39;getOwnPropertyDescriptors&#39;,
            &#39;SignPainter&#39;,
            &#39;ondevicemotion&#39;,
            &#39;fillText&#39;,
            &#39;maxTextureSize&#39;,
            &#39;game_pads&#39;,
            &#39;MQ_SCREEN&#39;,
            &#39;webkit-autofill&#39;,
            &#39;ipod&#39;,
            &#39;LocalAgentAccessor&#39;,
            &#39;_WEBDRIVER_ELEM_CACHE&#39;,
            &#39;maxFragmentUniformVectors&#39;,
            &#39;unknown&#39;,
            &#39;addIframeData&#39;,
            &#39;getAutofillMetadata&#39;,
            &#39;undefined&#39;,
            &#39;coords&#39;,
            &#39;collectWebRtc&#39;,
            &#39;MAX_VERTEX_UNIFORM_VECTORS&#39;,
            &#39;Zapfino&#39;,
            &#39;gpsSupported&#39;,
            &#39;ondeviceproximity&#39;,
            &#39;FreeSans&#39;,
            &#39;Avenir Next Condensed&#39;,
            &#39;browser&#39;,
            &#39;NAVIGATOR_VIBRATE&#39;,
            &#39;ligatures&#39;,
            &#39;plugins&#39;,
            &#39;Century&#39;,
            &#39;AUDIO_FINGERPRINT&#39;,
            &#39;Failed to fetch the Workstation data. Invalid network response: &#39;,
            &#39;externalIdentifiers&#39;,
            &#39;number&#39;,
            &#39;setTrustToken&#39;,
            &#39;Mukta&#39;,
            &#39;autocompleted&#39;,
            &#39;SDKBP_FINGERPRINT&#39;,
            &#39;blob_constructor&#39;,
            &#39;failed to get battery info&#39;,
            &#39;Montserrat&#39;,
            &#39;NAVIGATOR_SERIAL_SUPPORTED&#39;,
            &#39;maxVertexUniformVectors&#39;,
            &#39;height&#39;,
            &#39;batteryInit&#39;,
            &#39;audioInputDevices&#39;,
            &#39;ARCHITECTURE&#39;,
            &#39;Browser unknown&#39;,
            &#39;mobile&#39;,
            &#39;Ubuntu Mono&#39;,
            &#39;Roboto Slab&#39;,
            &#39;Avenir&#39;,
            &#39;privateClickMeasurement&#39;,
            &#39;querySelectorAll&#39;,
            &#39;requestIdleCallback&#39;,
            &#39;Tahoma&#39;,
            &#39;detectInputAutofill&#39;,
            &#39;AvantGarde Bk BT&#39;,
            &#39;fontList&#39;,
            &#39;pow&#39;,
            &#39;Haettenschweiler&#39;,
            &#39;set&#39;,
            &#39;getToStringLie&#39;,
            &#39;perplexitybot&#39;,
            &#39;Didot&#39;,
            &#39;Noto Sans CJK JP&#39;,
            &#39;Bahnschrift&#39;,
            &#39;data-lastpass-icon-id&#39;,
            &#39;GYROSCOPE_SUPPORTED&#39;,
            &#39;experimental-webgl&#39;,
            &#39;WEBGL_MAXVERTEXATTRIBS&#39;,
            &#39;Segoe UI Symbol&#39;,
            &#39;isChromeFamily&#39;,
            &#39;failed to get headless results&#39;,
            &#39;pointerevents&#39;,
            &#39;chrome_runtime_functions_invalid&#39;,
            &#39;animationName&#39;,
            &#39;Savoye LET&#39;,
            &#39;Error in smart autofill detection, falling back to sync:&#39;,
            &#39;DejaVu Sans Mono&#39;,
            &#39;__awaiter&#39;,
            &#39;MAX_RENDERBUFFER_SIZE&#39;,
            &#39;Courier New&#39;,
            &#39;Apple SD Gothic Neo&#39;,
            &#39;dataPoints&#39;,
            &#39;deviceId&#39;,
            &#39;top&#39;,
            &#39;SimHei&#39;,
            &#39;intl&#39;,
            &#39;isArray&#39;,
            &#39;isAutofilled&#39;,
            &#39;model&#39;,
            &#39;webRtcUrl&#39;,
            &#39;_FAILED&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_FULL_VERSION&#39;,
            &#39;user&#39;,
            &#39;Mac&#39;,
            &#39;trident&#39;,
            &#39;videoinput&#39;,
            &#39;onLine&#39;,
            &#39;Playfair Display&#39;,
            &#39;Firefox&#39;,
            &#39;expm1&#39;,
            &#39;metadataParams&#39;,
            &#39;cookiesEnabled&#39;,
            &#39;detectFontsWithIframe&#39;,
            &#39;Edge&#39;,
            &#39;notification&#39;,
            &#39;stealth test &#39;,
            &#39;dataview&#39;,
            &#39;object&#39;,
            &#39;clearRect&#39;,
            &#39;Levenim MT&#39;,
            &#39;maxVertexTextureImageUnits&#39;,
            &#39;KacstOne&#39;,
            &#39;safeAddMetadata&#39;,
            &#39;querySelector&#39;,
            &#39;hasName&#39;,
            &#39;pwd&#39;,
            &#39;__webdriver_script_fn&#39;,
            &#39;value&#39;,
            &#39;hasEvent&#39;,
            &#39;autofilled&#39;,
            &#39;method&#39;,
            &#39;performFontDetection&#39;,
            &#39;localAgentJwt&#39;,
            &#39;omgilibot&#39;,
            &#39;TIMEOUT&#39;,
            &#39;flatAndAddMetadata&#39;,
            &#39;PUSH_NOTIFICATIONS_SUPPORTED&#39;,
            &#39;throw&#39;,
            &#39;__lastWatirConfirm&#39;,
            &#39;stack&#39;,
            &#39;geolocation&#39;,
            &#39;NAVIGATOR_VENDOR&#39;,
            &#39;geo_location&#39;,
            &#39;sessionData&#39;,
            &#39;MAX_TEXTURE_IMAGE_UNITS&#39;,
            &#39;RESOLUTION&#39;,
            &#39;windows phone&#39;,
            &#39;numberOfAudioDevices&#39;,
            &#39;random&#39;,
            &#39;connection&#39;,
            &#39;Geolocation retrieval failed: Location permission denied by the user.&#39;,
            &#39;tan&#39;,
            &#39;Ebrima&#39;,
            &#39;loadTimes&#39;,
            &#39;pagevisibility&#39;,
            &#39;jsHeapSizeLimit&#39;,
            &#39;gptbot&#39;,
            &#39;mimeTypes&#39;,
            &#39;Volvo&#39;,
            &#39;WEBKIT_FORCE_AT_MOUSE_DOWN&#39;,
            &#39;dom-query-error&#39;,
            &#39;bytespider&#39;,
            &#39;deleteDatabase&#39;,
            &#39;round&#39;,
            &#39;NAVIGATOR_APP_CODE_NAME&#39;,
            &#39;prototype&#39;,
            &#39;Failed to get FingerPrint &#39;,
            &#39;fontFingerprintResult&#39;,
            &#39;getVoicesCount&#39;,
            &#39;selenium_in_document&#39;,
            &#39;getHeadlessResults&#39;,
            &#39;state&#39;,
            &#39;Microsoft Yi Baiti&#39;,
            &#39;Battery &#39;,
            &#39;_POSignalsUtils&#39;,
            &#39;hasAutofill&#39;,
            &#39;WebGLMetadata&#39;,
            &#39;trustTokenOperationError&#39;,
            &#39;AppleGothic&#39;,
            &#39;GET&#39;,
            &#39;contains&#39;,
            &#39;seleniumInNavigator&#39;,
            &#39;fontPreferences&#39;,
            &#39;getCurrentBrowserFingerPrint&#39;,
            &#39;userAgent&#39;,
            &#39;magnetometer&#39;,
            &#39;Error during detection of aiasignals:&#39;,
            &#39;Noto Sans&#39;,
            &#39;getUndefinedValueLie&#39;,
            &#39;metadataQueue&#39;,
            &#39;serviceWorker&#39;,
            &#39;getHasLiedLanguages&#39;,
            &#39;eventlistener&#39;,
            &#39;getParameter&#39;,
            &#39;htmlGeoLocation_timestamp&#39;,
            &#39;renderer&#39;,
            &#39;Monotype Corsiva&#39;,
            &#39;video&#39;,
            &#39;BROWSER_ENGINE_NAME&#39;,
            &#39;Apple Chancery&#39;,
            &#39;abort&#39;,
            &#39;timezone&#39;,
            &#39;browserType&#39;,
            &#39;Swiss&#39;,
            &#39;BLUTOOTH_SUPPORTED&#39;,
            &#39;cell&#39;,
            &#39;fonts&#39;,
            &#39;WEBGL_MAXFRAGMENTUNIFORMVECTORS&#39;,
            &#39;ACCELEROMETER_SUPPORTED&#39;,
            &#39;blobconstructor&#39;,
            &#39;WEBGL_MAXVERTEXTEXTUREIMAGEUNITS&#39;,
            &#39;Constantia&#39;,
            &#39;safeAddModernizrFeatures&#39;,
            &#39;performance&#39;,
            &#39;simpleHash&#39;,
            &#39;EUROSTILE&#39;,
            &#39;Linux&#39;,
            &#39;Unknown&#39;,
            &#39;htmlGeoLocation_latitude&#39;,
            &#39;Phosphate&#39;,
            &#39;SQRT2&#39;,
            &#39;processInputsSynchronously&#39;,
            &#39;IFRAME_CHROME&#39;,
            &#39;IS_WEBGL2&#39;,
            &#39;Segoe UI Light&#39;,
            &#39;downlinkMax&#39;,
            &#39;all&#39;,
            &#39;FILE_INJECT_JS_FOUND&#39;,
            &#39;absolute&#39;,
            &#39;linux&#39;,
            &#39;fingerPrint&#39;,
            &#39; inputs&#39;,
            &#39;catch&#39;,
            &#39;browserMajor&#39;,
            &#39;additionalMediaCodecs&#39;,
            &#39;query_selector&#39;,
            &#39;Failed to query input elements in async detection:&#39;,
            &#39;failed to get deviceId info&#39;,
            &#39;Times New Roman&#39;,
            &#39;getOps&#39;,
            &#39;iframe&#39;,
            &#39;notifications&#39;,
            &#39;VIDEO_INPUT_DEVICES&#39;,
            &#39;force_touch&#39;,
            &#39;Candara&#39;,
            &#39;NAVIGATOR_ON_LINE&#39;,
            &#39;htmlGeoLocation_speed&#39;,
            &#39;DetectStealth&#39;,
            &#39;Essential&#39;,
            &#39;SHADING_LANGUAGE_VERSION&#39;,
            &#39;LOG2E&#39;,
            &#39;tagName&#39;,
            &#39;getLineDash&#39;,
            &#39;6608340mbTdOA&#39;,
            &#39;OPS&#39;,
            &#39;fontFamily&#39;,
            &#39;sin&#39;,
            &quot; in browser &#39;&quot;,
            &#39;__selenium_unwrapped&#39;,
            &#39;Helvetica&#39;,
            &#39;fingerPrintComponentKeys&#39;,
            &#39;full_screen&#39;,
            &#39;osVersion&#39;,
            &#39;toUpperCase&#39;,
            &#39;log&#39;,
            &#39;http://127.0.0.1&#39;,
            &#39;webglVersion&#39;,
            &#39;Droid Sans&#39;,
            &#39;clear&#39;,
            &#39;numberOfVideoDevices&#39;,
            &#39;phone&#39;,
            &#39;Microsoft Himalaya&#39;,
            &#39;detectAutofillFields&#39;,
            &#39;MS Outlook&#39;,
            &#39;ccbot&#39;,
            &#39;Urdu Nastaliq Unicode&#39;,
            &#39;Liberation Sans Narrow&#39;,
            &#39;Lucida Sans&#39;,
            &#39;-9999px&#39;,
            &#39;floc&#39;,
            &#39;AUDIO&#39;,
            &#39;parentNode&#39;,
            &#39;win&#39;,
            &#39;Noto Mono&#39;,
            &#39;page_visibility&#39;,
            &#39;MEMORY_HEAP_SIZE_LIMIT&#39;,
            &#39;function query() { [native code] }&#39;,
            &#39;create&#39;,
            &#39;android&#39;,
            &#39;WEB_RTC_ENABLED&#39;,
            &#39;Futura Md BT&#39;,
            &#39;indexeddbblob&#39;,
            &#39;20030107&#39;,
            &#39;broJsFingerprint&#39;,
            &#39;atanh&#39;,
            &#39;cbrt&#39;,
            &#39;getDirectory&#39;,
            &#39;minDecibels&#39;,
            &#39;isWebGlSupported&#39;,
            &#39;Geolocation retrieval failed: Location information is unavailable.&#39;,
            &#39;failed to get font fingerprint info&#39;,
            &#39;Calibri&#39;,
            &#39;autofill-detector-styles&#39;,
            &#39;DEDVCE_LIGHT_SUPPORTED&#39;,
            &#39;PROXIMITY_SUPPORTED&#39;,
            &#39;Verdana&#39;,
            &#39;Failed to start async autofill detection:&#39;,
            &#39;queryselector-unsupported&#39;,
            &#39;Meiryo&#39;,
            &#39;contentDocument&#39;,
            &#39; inputs, checking first &#39;,
            &#39;message&#39;,
            &#39;ipad&#39;,
            &#39;min&#39;,
            &#39;chrome&#39;,
            &#39;contentWindow&#39;,
            &#39;matchMedia&#39;,
            &#39;timpibot&#39;,
            &#39;selenium-evaluate&#39;,
            &#39;Rachana&#39;,
            &#39;Merriweather&#39;,
            &#39;Microsoft Tai Le&#39;,
            &#39;Ink Free&#39;,
            &#39;keyboard&#39;,
            &#39; failed&#39;,
            &#39;LIES.&#39;,
            &#39;gyroscope&#39;,
            &#39;NAVIGATOR_LANGUAGES&#39;,
            &#39;mac&#39;,
            &#39;floc_version&#39;,
            &#39;BankGothic Md BT&#39;,
            &#39;metadataBlackList&#39;,
            &#39;data-com-onepassword-filled&#39;,
            &#39;kind&#39;,
            &#39;extensions&#39;,
            &#39;TRAJAN PRO&#39;,
            &#39;Error processing input &#39;,
            &#39;LIES&#39;,
            &#39;getObfsInfo&#39;,
            &#39;getFrequencyResponse&#39;,
            &#39;touch_events&#39;,
            &#39;SeleniumProperties&#39;,
            &#39;caller&#39;,
            &#39;Monaco&#39;,
            &#39;accuracy&#39;,
            &#39;NAVIGATOR_CONNECTION_RTT&#39;,
            &#39;propertyBlackList&#39;,
            &#39;then&#39;,
            &#39;Geolocation retrieval failed: Location request timed out.&#39;,
            &#39;addEventListener&#39;,
            &#39;contrast&#39;,
            &#39;srcdoc_triggers_window_proxy&#39;,
            &#39;event_listener&#39;,
            &#39;hasEmail&#39;,
            &#39;maxVaryingVectors&#39;,
            &#39;createObjectStore&#39;,
            &#39;_POSignalsMetadata&#39;,
            &#39;getWebglCanvas&#39;,
            &#39;writable&#39;,
            &#39;input&#39;,
            &#39;consistent_plugins_prototype&#39;,
            &#39;__driver_unwrapped&#39;,
            &#39;Palatino Linotype&#39;,
            &#39;page intentionally left blank&#39;,
            &#39;Bitstream Charter&#39;,
            &#39;cpuArchitecture&#39;,
            &#39;Letter Gothic&#39;,
            &#39;serviceworker&#39;,
            &#39;pass&#39;,
            &#39;GOTHAM&#39;,
            &#39;hashMini&#39;,
            &#39;Marker Felt&#39;,
            &#39;warn&#39;,
            &#39;NAVIGATOR_APP_VERSION&#39;,
            &#39;Meiryo UI&#39;,
            &#39;WEBGL2VENDORANDRENDERER&#39;,
            &#39;stringify&#39;,
            &#39;forcedColors&#39;,
            &#39;library&#39;,
            &#39;window_html_webdriver&#39;,
            &#39;webdriver-evaluate-response&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_ARCHITECTURE&#39;,
            &#39;audio&#39;,
            &#39;LN2&#39;,
            &#39;usedJSHeapSize&#39;,
            &#39;data-attribute&#39;,
            &#39;Gabriola&#39;,
            &#39;VENDOR_FLAVORS&#39;,
            &#39;quotamanagement&#39;,
            &#39;Metadata&#39;,
            &#39;webGlBasics&#39;,
            &#39;StackTraceTester&#39;,
            &#39;aiSignalsResult&#39;,
            &#39;e-mail&#39;,
            &#39;browser-class&#39;,
            &#39;__lastWatirPrompt&#39;,
            &#39;TOUCH_SUPPORT&#39;,
            &#39;lied&#39;,
            &#39;mediaDevices&#39;,
            &#39;Document not available for autofill detection&#39;,
            &#39;Agency FB&#39;,
            &#39;maxTouchPoints&#39;,
            &#39;webdriver&#39;,
            &#39;__webdriver_evaluate&#39;,
            &#39;toString&#39;,
            &#39;cros&#39;,
            &#39;BROWSER_VERSION&#39;,
            &#39;Skia&#39;,
            &#39;setupAutofillDetection&#39;,
            &#39;browserVersion&#39;,
            &#39;Logger&#39;,
            &#39;Nunito&#39;,
            &#39;userAgentData&#39;,
            &#39;IS_CHROME_FAMILY&#39;,
            &#39;animation-detection&#39;,
            &#39;extendPrimitiveValues&#39;,
            &#39;Fingerprint timeout&#39;,
            &#39;application/json&#39;,
            &#39;PingOne Signals deviceCreatedAt: &#39;,
            &#39;Vrinda&#39;,
            &#39;HAS_CHROME_LOADTIMES&#39;,
            &#39;tablet&#39;,
            &#39;PingOne Signals deviceId: &#39;,
            &#39;NAVIGATOR_WEB_DRIVER&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_BRAND_&#39;,
            &#39;srcdoc&#39;,
            &#39;outerWidth&#39;,
            &#39;OS_VERSION&#39;,
            &#39;reducedTransparency&#39;,
            &#39;DeviceOrientationEvent&#39;,
            &#39;Lohit Gujarati&#39;,
            &#39;removeEventListener&#39;,
            &#39;Function_prototype_toString_invalid_typeError&#39;,
            &#39;Impact&#39;,
            &#39;driver-evaluate&#39;,
            &#39;forEach&#39;,
            &#39;ambientlight&#39;,
            &#39;htmlGeoLocation_ErrorCode&#39;,
            &#39;WEBGL_EXTENSIONS&#39;,
            &#39;appendChild&#39;,
            &#39;function () { [native code] }&#39;,
            &#39;textSize&#39;,
            &#39;MS Gothic&#39;,
            &#39;deviceVendor&#39;,
            &#39;DEVICE_MODEL&#39;,
            &#39;AGENT_BASE_URL&#39;,
            &#39;NAVIGATOR_PLATFORM&#39;,
            &#39;Arial Unicode MS&#39;,
            &#39;queryselector&#39;,
            &#39;msSaveBlob&#39;,
            &#39;localAgentJwtRequestCount&#39;,
            &#39;velenpublicwebcrawler&#39;,
            &#39;Dell&#39;,
            &#39;Microsoft New Tai Lue&#39;,
            &#39;domAutomation&#39;,
            &#39;flatten&#39;,
            &#39;MAX_TEXTURE_SIZE&#39;,
            &#39;ARNO PRO&#39;,
            &#39;ChromeDriverw&#39;,
            &#39;failed to get private mode info&#39;,
            &#39;PERMISSIONS.geolocation&#39;,
            &#39;devToolsOrientation&#39;,
            &#39;Chromium&#39;,
            &#39;WEBGL_SHADINGLANGUAGEVERSION&#39;,
            &#39;Canvas font detection failed&#39;,
            &#39;autofillCount&#39;,
            &#39;_pingOneSignalsPingResult&#39;,
            &#39;Roboto&#39;,
            &#39;load&#39;,
            &#39;Javanese Text&#39;,
            &#39;pointer_lock&#39;,
            &#39;detectionMethods&#39;,
            &#39;delay&#39;,
            &#39;(prefers-color-scheme: dark)&#39;,
            &#39;scrapy&#39;,
            &#39;PDF_VIEWER_ENABLED&#39;,
            &#39;INCOMPATIBLE_BROWSER&#39;,
            &#39;fontSize&#39;,
            &#39;Charter&#39;,
            &#39;getPrototypeInFunctionLie&#39;,
            &#39;getExtension&#39;,
            &#39;audioOutputDevices&#39;,
            &#39;push&#39;,
            &#39;PLUGINS&#39;,
            &#39;Promise&#39;,
            &#39;getCurrentPosition&#39;,
            &#39;RCA&#39;,
            &#39;charging&#39;,
            &#39;isIAFDetectionEnabled&#39;,
            &#39;cryptography&#39;,
            &#39;replace&#39;,
            &#39;memory&#39;,
            &#39;setItem&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_MODEL&#39;,
            &#39;freeze&#39;,
            &#39;offsetHeight&#39;,
            &#39;components&#39;,
            &#39;() {&#39;,
            &#39;SCRIPTINA&#39;,
            &#39;voiceschanged&#39;,
            &#39;fullVersionList&#39;,
            &#39;htmlGeoLocation_longitude&#39;,
            &#39;web_gl&#39;,
            &#39;removeChild&#39;,
            &#39;json&#39;,
            &#39;Autofill detection timeout after processing &#39;,
            &#39;videoCard&#39;,
            &#39;hidden&#39;,
            &#39;pointerEnabled&#39;,
            &#39;oai-searchbot&#39;,
            &#39;NuVision&#39;,
            &#39;Century Gothic&#39;,
            &#39;hdr&#39;,
            &#39;permissions_api_overriden&#39;,
            &#39;Optima&#39;,
            &#39;getProperty&#39;,
            &#39;Dragon Touch&#39;,
            &#39;audioIntVideoInit&#39;,
            &#39;engineName&#39;,
            &#39;MV Boli&#39;,
            &#39;Cantarell&#39;,
            &#39;getOwnPropertyDescriptor&#39;,
            &#39;HAS_TOUCH&#39;,
            &#39;_selenium&#39;,
            &#39;Chalkboard SE&#39;,
            &#39;amazonbot&#39;,
            &#39;createElement&#39;,
            &#39;browser-autofilled&#39;,
            &#39;JS_CHALLENGE&#39;,
            &#39;enumerateDevices() cannot run within safari iframe&#39;,
            &#39;race&#39;,
            &#39;getOwnPropertyNames&#39;,
            &#39;promiseTimeout&#39;,
            &#39;BLINK&#39;,
            &#39;left&#39;,
            &#39;VERSION&#39;,
            &#39;getHasLiedOs&#39;,
            &#39;getLocalAgentJwt&#39;,
            &#39;result&#39;,
            &#39;get&#39;,
            &#39;WEBGL_MAXRENDERBUFFERSIZE&#39;,
            &#39;sqrt&#39;,
            &#39;devToolsOpen&#39;,
            &#39;youbot&#39;,
            &#39;allSettled&#39;,
            &#39;navigator.webdriver_present&#39;,
            &#39;Incognito&#39;,
            &#39;DetectLies&#39;,
            &#39;Nirmala UI&#39;,
            &#39;trustToken&#39;,
            &#39;Roboto Condensed&#39;,
            &#39;toDataURL&#39;,
            &#39;fingerprint&#39;,
            &#39;Bitstream Vera Sans Mono&#39;,
            &#39;agentIdentificationEnabled&#39;,
            &#39;selenium_sequentum&#39;,
            &#39;FILE_CONTENT_JS_FOUND&#39;,
            &#39;appName&#39;,
            &#39;7884160moAMPL&#39;,
            &#39;brands&#39;,
            &#39;webzio-extended&#39;,
            &#39;Tibetan Machine Uni&#39;,
            &#39;BROWSER_TAB_HISTORY_LENGTH&#39;,
            &#39;Padauk&#39;,
            &#39;function get &#39;,
            &#39;IFRAME_HEIGHT&#39;,
            &#39;Windows&#39;,
            &#39;microphone&#39;,
            &#39;LIES_IFRAME&#39;,
            &#39;HAS_MICROPHONE&#39;,
            &#39;iOS&#39;,
            &#39;longitude&#39;,
            &#39;custom_elements&#39;,
            &#39;lieTypes&#39;,
            &#39;domBlockers&#39;,
            &#39;getAutofillMetadataAsync&#39;,
            &#39;lieTests&#39;,
            &#39;OS_NAME&#39;,
            &#39;NAVIGATOR_MIME_TYPES_LENGTH&#39;,
            &#39;queryUsageAndQuota&#39;,
            &#39;disabledStorage&#39;,
            &#39;Opera&#39;,
            &#39;substr&#39;,
            &#39;MS Mincho&#39;,
            &#39;Oswald&#39;,
            &#39;getOwnPropertyLie&#39;,
            &#39;log10&#39;,
            &#39;isAIBot&#39;,
            &#39;background-sync&#39;,
            &#39;Noto Sans CJK KR&#39;,
            &#39;isElectronFamily&#39;,
            &#39;appVersion&#39;,
            &#39;permission&#39;,
            &#39;Leelawadee&#39;,
            &#39;isPrivateModeV2&#39;,
            &#39;enumerateDevices&#39;,
            &#39;9921562buzzOg&#39;,
            &#39;customprotocolhandler&#39;,
            &#39;AUDIO_INPUT_DEVICES&#39;,
            &#39;UNMASKED_RENDERER_WEBGL&#39;,
            &#39;platform&#39;,
            &#39;style&#39;,
            &#39;MT Extra&#39;,
            &#39;px)&#39;,
            &#39;IS_ACCEPT_COOKIES&#39;,
            &#39;HAS_CHROME_APP&#39;,
            &#39;[[IsRevoked]]&#39;,
            &#39;function&#39;,
            &#39;textContent&#39;,
            &#39;failed &#39;,
            &#39;audio/x-m4a&#39;,
            &#39;sort&#39;,
            &#39;Leelawadee UI&#39;,
            &#39;hardwareConcurrency&#39;,
            &#39;rad.io&#39;,
            &#39;data-autofilled&#39;,
            &#39;substring&#39;,
            &#39;typed_arrays&#39;,
            &#39;DOCUMENT_ELEMENT_WEBDRIVER&#39;,
            &#39;localAgentAccessor&#39;,
            &#39;MS UI Gothic&#39;,
            &#39;label&#39;,
            &#39;exec&#39;,
            &#39;storage&#39;,
            &#39;pike&#39;,
            &#39;fetcher&#39;,
            &#39;getWebglData&#39;,
            &#39;firefox&#39;,
            &#39;accessibility-events&#39;,
            &#39;Lato&#39;,
            &#39;google-extended&#39;,
            &#39;product&#39;,
            &#39;field-type-heuristic&#39;,
            &#39;Abyssinica SIL&#39;,
            &#39;request_animation_frame&#39;,
            &#39;htmlGeoLocation_ErrorMessage&#39;,
            &#39;72px&#39;,
            &#39;WEBGL_MAXVERTEXUNIFORMVECTORS&#39;,
            &#39;Android&#39;,
            &#39;IS_USER_VERIFYING_PLATFORM_AUTHENTICATOR_AVAILABLE&#39;,
            &#39;function &#39;,
            &#39;NAVIGATOR_APP_NAME&#39;,
            &#39;STEALTH&#39;,
            &#39;hasMicrophone&#39;,
            &#39;BROWSER_MAJOR&#39;,
            &#39;cors&#39;,
            &#39;Failed to fetch the Workstation data: &#39;,
            &#39;architecture&#39;,
            &#39;HASLIEDBROWSER&#39;,
            &#39;slice&#39;,
            &#39;Helvetica Neue&#39;,
            &#39;emit&#39;,
            &#39;horizontal&#39;,
            &#39;addAutofillResult&#39;,
            &#39;NETWORK_DOWNLOAD_MAX&#39;,
            &#39;Small Fonts&#39;,
            &#39;seleniumInWindow&#39;,
            &#39;NAVIGATOR_PLUGINS_LENGTH&#39;,
            &#39;aiaSignals&#39;,
            &#39;ai2bot&#39;,
            &#39;Neither WebGL 2.0 nor WebGL 1.0 is supported.&#39;,
            &#39;RTCPeerConnection&#39;,
            &#39;getMediaCodec&#39;,
            &#39;hasWebcam&#39;,
            &#39;applePay&#39;,
            &#39;Bodoni 72&#39;,
            &#39;HAS_CAMERA&#39;,
            &#39;Security error&#39;,
            &#39;isWebGl2&#39;,
            &#39;force_touch.mouse_force_will_begin&#39;,
            &#39;deviceMemory&#39;,
            &#39;runtime&#39;,
            &#39;document-unavailable&#39;,
            &#39;HASLIEDLANGUAGES&#39;,
            &#39;Buffer&#39;,
            &#39;FreeSerif&#39;,
            &#39;Gargi&#39;,
            &#39;appCodeName&#39;,
            &#39;Big Caslon&#39;,
            &#39;isFunction&#39;,
            &#39;level&#39;,
            &#39;availHeight&#39;,
            &#39;Util&#39;,
            &#39;RENDERER&#39;,
            &#39;body&#39;,
            &#39;window_geb&#39;,
            &#39;deviceModel&#39;,
            &#39;getTime&#39;,
            &#39;force_touch.webkit_force_at_mouse_down&#39;,
            &#39;batteryChargingTime&#39;,
            &#39;failed to add iframe data&#39;,
            &#39;some&#39;,
            &#39;messagechannel&#39;,
            &#39;user name&#39;,
            &#39;app&#39;,
            &#39;callPhantom&#39;,
            &#39;NAVIGATOR_PRESENTATION_SUPPORTED&#39;,
            &#39;getBroPrintFingerPrint&#39;,
            &#39;Source Sans Pro&#39;,
            &#39;navigator.plugins_empty&#39;,
            &#39;documentElement&#39;,
            &#39;Corbel&#39;,
            &#39;copyFromChannel&#39;,
            &#39;Document not available for async autofill detection&#39;,
            &#39;105246tdrkWn&#39;,
            &#39;Function&#39;,
            &#39;getVoices&#39;,
            &#39;customelements&#39;,
            &#39;getStealthResult&#39;,
            &#39;voicesCount&#39;,
            &#39;monospace&#39;,
            &#39;Modernizr.on Failed with feature &#39;,
            &#39;detectedFields&#39;,
            &#39;video/mp4;; codecs = &quot;avc1.42E01E&quot;&#39;,
            &#39;POSITION_UNAVAILABLE&#39;,
            &#39;prefixed&#39;,
            &#39;Lohit Tamil&#39;,
            &#39;serializedDeviceAttributes&#39;,
            &#39;WEBGL_debug_renderer_info&#39;,
            &#39;Khmer OS System&#39;,
            &#39;hasNumber&#39;,
            &#39;hasSpeakers&#39;,
            &#39;email&#39;,
            &#39;force_touch.webkit_force_at_force_mouse_down&#39;,
            &#39;floc_id&#39;,
            &#39;Century Schoolbook L&#39;,
            &#39;[[Handler]]&#39;,
            &#39;permissions&#39;,
            &#39;PERMISSIONS&#39;,
            &#39;autoFillMeta&#39;,
            &#39;batteryLevel&#39;,
            &#39;candidate&#39;,
            &#39;address&#39;,
            &#39;safeModernizrOn&#39;,
            &#39;isWebGl&#39;,
            &#39;FONT_FINGERPRINT&#39;,
            &#39;iphone&#39;,
            &#39;Marlett&#39;,
            &#39;googleother&#39;,
            &#39;imagesiftbot&#39;,
            &#39;Geolocation retrieval failed: Unknown geolocation error occurred.&#39;,
            &#39;custom_protocol_handler&#39;,
            &#39;petalbot&#39;,
            &#39;moz-autofill&#39;,
            &#39;AutofillDetector&#39;,
            &#39;__driver_evaluate&#39;,
            &#39;isBot&#39;,
            &#39;details&#39;,
            &#39;headlessResults&#39;,
            &#39;BATTERY_CHARGING&#39;,
            &#39;exiforientation&#39;,
            &#39;navigator.languages_blank&#39;,
            &#39;devicePixelRatio&#39;,
            &#39;dateTimeLocale&#39;,
            &#39;fmget_targets&#39;,
            &#39;Sylfaen&#39;,
            &#39;iframe_window&#39;,
            &#39;Univers CE 55 Medium&#39;,
            &#39;Verizon&#39;,
            &#39;placeholder&#39;,
            &#39;clipboard-write&#39;,
            &#39;vibrate&#39;,
            &#39;Apple Color Emoji&#39;,
            &#39;Yu Gothic&#39;,
            &#39;domAutomationController&#39;,
            &#39;Arabic Typesetting&#39;,
            &#39;webkitRTCPeerConnection&#39;,
            &#39;[[Target]]&#39;,
            &#39;detectPageInputFields&#39;,
            &#39;toSource&#39;,
            &#39;UNMASKED_VENDOR_WEBGL&#39;,
            &#39;HEADLESS&#39;,
            &#39;setProperty&#39;,
            &#39;vendor&#39;,
            &#39;DejaVu Sans&#39;,
            &#39;hashFonts&#39;,
            &#39;applicationcache&#39;,
            &quot;&#39; in browser &#39;&quot;,
            &#39;Chrome&#39;,
            &#39;pointerlock&#39;,
            &#39;isPrivate&#39;,
            &#39;msMaxTouchPoints&#39;,
            &#39;signal&#39;,
            &#39;touchSupport&#39;,
            &#39;MEDIA_CODEC_X_M4A&#39;,
            &#39;2675716vuQeYs&#39;,
            &#39;Canvas context not available&#39;,
            &#39;Droid Serif&#39;,
            &#39;omgili&#39;,
            &#39;name&#39;,
            &#39;GPS_SUPPORTED&#39;,
            &#39;accelerometer&#39;,
            &#39;NAVIGATOR_HARDWARE_CONCURRENCY&#39;,
            &#39;isMobile&#39;,
            &#39;hide&#39;,
            &#39;window_awesomium&#39;,
            &#39;HELV&#39;,
            &#39;IS_PRIVATE_MODE&#39;,
            &#39;function () {&#39;,
            &#39;matches&#39;,
            &#39;evaluateModernizr&#39;,
            &#39;srcdoc_throws_error&#39;,
            &#39;WEBGL_MAXTEXTUREIMAGEUNITS&#39;,
            &#39;Microsoft PhagsPa&#39;,
            &#39;250, 255, 189&#39;,
            &#39;cookieEnabled&#39;,
            &#39;Failed to detect autofill:&#39;,
            &#39;__selenium_evaluate&#39;,
            &#39;indexOf&#39;,
            &#39;classList&#39;,
            &#39;googleother-image&#39;,
            &#39;getBattery&#39;,
            &#39;webgl&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_FORM_FACTORS&#39;,
            &#39;data-rapid-fill&#39;,
            &#39;service_worker&#39;,
            &#39;forcetouch&#39;,
            &#39;searchLies&#39;,
            &#39;Cambria&#39;,
            &#39;failed to get permissions info&#39;,
            &#39;proximity&#39;,
            &#39; headless test was failed&#39;,
            &#39;midi&#39;,
            &#39;() { [native code] }&#39;,
            &#39;string&#39;,
            &#39;aria-label&#39;,
            &#39;remove&#39;,
            &#39;8763432iXdKsh&#39;,
            &#39;reducedMotion&#39;,
            &#39;Brush Script MT&#39;,
            &#39;PERMISSION_DENIED&#39;,
            &#39;data_view&#39;,
            &#39;indexedDB&#39;,
            &#39;tanh&#39;,
            &#39;filename&#39;,
            &#39;getDevicePayload&#39;,
            &#39;Arial Hebrew&#39;,
            &#39;bitness&#39;,
            &#39;head&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_PLATFORM&#39;,
            &#39;acosh&#39;,
            &#39;duration&#39;,
            &#39;text&#39;,
            &#39;info&#39;,
            &#39;WEBGL_MAXCOMBINEDTEXTUREIMAGEUNITS&#39;,
            &#39;getGeoSessionData&#39;,
            &#39;webdriver-evaluate&#39;,
            &#39;isPrivateMode&#39;,
            &#39;Safari&#39;,
            &#39;document&#39;,
            &#39;selenium&#39;,
            &#39;Comic Sans MS&#39;,
            &#39;important&#39;,
            &#39;querySelectorAll not supported for autofill detection&#39;,
            &#39;osName&#39;,
            &#39;assign&#39;,
            &quot;Geolocation permission state is &#39;&quot;,
            &#39;match&#39;,
            &#39;fullscreen&#39;,
            &#39;cookieStore&#39;,
            &#39;__webdriverFunc&#39;,
            &#39;$chrome_asyncScriptInfo&#39;,
            &#39;onAutoFillStart&#39;,
            &#39;refreshDeviceAttributes&#39;,
            &#39;screenFrame&#39;,
            &#39;calledSelenium&#39;,
            &#39;ambient_light&#39;,
            &#39;referrer&#39;,
            &#39;enumerable&#39;,
            &#39;camera&#39;,
            &#39;deviceCreatedAt&#39;,
            &#39;IS_AIBot&#39;,
            &#39;calculateDeviceMetadata&#39;,
            &#39;innerWidth&#39;,
            &#39;enumerateDevices() not supported.&#39;,
            &#39;outerHeight&#39;,
            &#39; -&gt; &#39;,
            &#39;Lucida Sans Unicode&#39;,
            &#39;detectChromium&#39;,
            &#39;enumerateDevicesEnabled&#39;,
            &#39;lastCalculatedMetadata&#39;,
            &#39;NAVIGATOR_PRODUCT&#39;,
            &#39;getFontFingerprint&#39;,
            &#39;platformVersion&#39;,
            &#39;NOTIFICATION_PERMISSION&#39;,
            &#39;agentTimeout&#39;,
            &#39;HAS_SPEAKERS&#39;,
            &#39;Liberation Serif&#39;,
            &#39;onupgradeneeded&#39;,
            &#39;batteryDischargingTime&#39;,
            &#39;resolve&#39;,
            &#39;Malgun Gothic&#39;,
            &#39;Segoe UI&#39;,
            &#39;addClientHints&#39;,
            &#39;position&#39;,
            &#39;Courier&#39;,
            &#39;tel&#39;,
            &#39;Lucida Console&#39;,
            &#39;NAVIGATOR_CLIENT_HINTS_MOBILE&#39;,
            &#39;:-webkit-autofill&#39;,
            &#39;BATTERY_LEVEL&#39;,
            &#39;Liberation Sans&#39;,
            &#39;function toString() { [native code] }&#39;,
            &#39;American Typewriter&#39;,
            &#39;Webdings&#39;,
            &#39;anthropic-ai&#39;,
            &#39;seleniumInDocument&#39;,
            &#39;C059&#39;,
            &#39;Barnes &amp; Noble&#39;,
            &#39;hasAttribute&#39;,
            &#39;div&#39;,
            &#39;navigator&#39;,
            &#39;getRTCPeerConnection&#39;,
            &#39;WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN&#39;,
            &#39;pdfViewerEnabled&#39;,
            &#39;gamepads&#39;,
            &#39;maxRenderbufferSize&#39;,
            &#39;brand&#39;,
            &#39;Failed to get font fingerprint: &#39;,
            &#39;username&#39;,
            &#39;window.chrome_missing&#39;,
            &#39;TypeError&#39;,
            &#39;BROWSER_NAME&#39;,
            &#39;__webdriver_script_function&#39;,
            &#39; test execution&#39;,
            &#39;62671tHBJnn&#39;,
            &#39;calculatedDevToolsOpen&#39;,
            &#39;htmlGeoLocation&#39;,
            &#39;colorDepth&#39;,
            &#39;PREFERS_COLOR_SCHEME&#39;,
            &#39;claude-web&#39;,
            &#39;interestCohort&#39;,
            &#39;touchevents&#39;,
            &#39;call&#39;,
            &#39;getHighEntropyValues&#39;,
            &#39;Lucida Bright&#39;,
            &#39;webGlStatus&#39;,
            &#39;mozRTCPeerConnection&#39;,
            &#39;WINDOW_GLOBAL_KEY_FOUND&#39;,
            &#39;getComputedStyle&#39;,
            &#39;dischargingTime&#39;,
            &#39;maxTextureImageUnits&#39;,
            &#39;deviceCategory&#39;,
        ];
        return ((_0x1ccc = function () {
            return l;
        }),
            _0x1ccc());
    }
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                [r(309)]() {
                    const t = r, n = document.createElement(t(457));
                    return !!(n.getContext &amp;&amp; n.getContext(&#39;2d&#39;));
                }
                getWebglCanvas(t) {
                    const n = r, e = document.createElement(n(457));
                    let o = null;
                    try {
                        t === n(1269)
                            ? (o = e.getContext(n(1269)) || e[n(1482)](&#39;experimental-webgl&#39;))
                            : (o = e[n(1482)](&#39;webgl2&#39;));
                    }
                    catch { }
                    return o;
                }
                [r(755)]() {
                    const t = r;
                    if (!this[t(309)]())
                        return { supported: false, type: null };
                    let n = this[t(814)](t(1453));
                    return n
                        ? { supported: true, type: t(1453) }
                        : ((n = this[t(814)](&#39;webgl&#39;)),
                            n ? { supported: true, type: t(1269) } : { supported: false, type: null });
                }
                [r(1191)]() {
                    const t = r, { supported: n } = this[t(755)]();
                    return n;
                }
                [r(1125)]() {
                    const t = r, { supported: n, type: e } = this[t(755)]();
                    return n &amp;&amp; e === t(1453);
                }
                [r(1083)]() {
                    const t = r, n = document[t(983)](t(457));
                    let e, o, s, x;
                    try {
                        ((e = n[t(1482)](t(1453))),
                            !e &amp;&amp;
                                ((e = n[t(1482)](t(1269)) || n[t(1482)](t(533))), !e &amp;&amp; console[t(721)](t(1117))));
                    }
                    catch {
                        console[t(721)](&#39;Neither WebGL 2.0 nor WebGL 1.0 is supported.&#39;);
                    }
                    try {
                        ((o = e[t(937)](t(1175))),
                            (s = e[t(650)](o[t(1227)])),
                            (x = e.getParameter(o[t(1056)])));
                    }
                    catch {
                        ((s = e.getParameter(e[t(1436)])), (x = e.getParameter(e[t(1140)])));
                    }
                    return {
                        vendor: s,
                        renderer: x,
                        webglVersion: e.getParameter(e[t(992)]),
                        shadingLanguageVersion: e[t(650)](e[t(706)]),
                        extensions: e[t(344)](),
                        maxTextureSize: e[t(650)](e[t(913)]),
                        maxRenderbufferSize: e.getParameter(e[t(545)]),
                        maxTextureImageUnits: e[t(650)](e[t(601)]),
                        maxVertexTextureImageUnits: e[t(650)](e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),
                        maxCombinedTextureImageUnits: e[t(650)](e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),
                        maxVertexAttribs: e[t(650)](e[t(439)]),
                        maxVaryingVectors: e[t(650)](e[t(1517)]),
                        maxVertexUniformVectors: e[t(650)](e[t(483)]),
                        maxFragmentUniformVectors: e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),
                    };
                }
                getHasLiedLanguages() {
                    const t = r;
                    if (typeof navigator[t(1402)] !== t(480))
                        try {
                            if (navigator[t(1402)][0][t(1039)](0, 2) !== navigator.language.substr(0, 2))
                                return !0;
                        }
                        catch {
                            return true;
                        }
                    return false;
                }
                getHasLiedResolution() {
                    const t = r;
                    return (window[t(405)][t(1431)] &lt; window[t(405)].availWidth ||
                        window[t(405)][t(507)] &lt; window[t(405)][t(1138)]);
                }
                [r(993)]() {
                    const t = r, n = navigator[t(641)][t(1479)]();
                    let e = navigator.oscpu;
                    const o = navigator[t(1057)][t(1479)]();
                    let s;
                    if ((n.indexOf(t(603)) &gt;= 0
                        ? (s = t(1486))
                        : n[t(1265)](t(739)) &gt;= 0
                            ? (s = &#39;Windows&#39;)
                            : n.indexOf(t(745)) &gt;= 0
                                ? (s = t(1095))
                                : n[t(1265)](t(686)) &gt;= 0 || n[t(1265)](t(862)) &gt;= 0
                                    ? (s = t(673))
                                    : n[t(1265)](t(1193)) &gt;= 0 || n[t(1265)](t(769)) &gt;= 0
                                        ? (s = t(1027))
                                        : n[t(1265)](t(785)) &gt;= 0
                                            ? (s = t(560))
                                            : (s = t(1487)),
                        (t(374) in window || navigator[t(858)] &gt; 0 || navigator[t(1238)] &gt; 0) &amp;&amp;
                            s !== &#39;Windows Phone&#39; &amp;&amp;
                            s !== t(1095) &amp;&amp;
                            s !== &#39;iOS&#39; &amp;&amp;
                            s !== &#39;Other&#39;))
                        return true;
                    if (typeof e !== t(480)) {
                        if (((e = e.toLowerCase()), e[t(1265)](t(739)) &gt;= 0 &amp;&amp; s !== t(1023) &amp;&amp; s !== t(1486)))
                            return true;
                        if (e[t(1265)](t(686)) &gt;= 0 &amp;&amp; s !== t(673) &amp;&amp; s !== t(1095))
                            return true;
                        if (e[t(1265)](t(785)) &gt;= 0 &amp;&amp; s !== &#39;Mac&#39; &amp;&amp; s !== t(1027))
                            return true;
                        if ((e[t(1265)](t(739)) === -1 &amp;&amp;
                            e[t(1265)](t(686)) === -1 &amp;&amp;
                            e[t(1265)](t(785)) === -1) !=
                            (s === t(1487)))
                            return true;
                    }
                    return (o[t(1265)](t(739)) &gt;= 0 &amp;&amp; s !== &#39;Windows&#39; &amp;&amp; s !== &#39;Windows Phone&#39;) ||
                        ((o.indexOf(&#39;linux&#39;) &gt;= 0 || o.indexOf(t(745)) &gt;= 0 || o[t(1265)](t(1081)) &gt;= 0) &amp;&amp;
                            s !== t(673) &amp;&amp;
                            s !== t(1095)) ||
                        ((o[t(1265)](t(785)) &gt;= 0 ||
                            o[t(1265)](&#39;ipad&#39;) &gt;= 0 ||
                            o.indexOf(t(473)) &gt;= 0 ||
                            o.indexOf(t(1193)) &gt;= 0) &amp;&amp;
                            s !== t(560) &amp;&amp;
                            s !== &#39;iOS&#39;) ||
                        (o[t(1265)](t(739)) &lt; 0 &amp;&amp;
                            o[t(1265)](t(686)) &lt; 0 &amp;&amp;
                            o[t(1265)](t(785)) &lt; 0 &amp;&amp;
                            o[t(1265)](t(1193)) &lt; 0 &amp;&amp;
                            o[t(1265)](&#39;ipad&#39;) &lt; 0) !==
                            (s === &#39;Other&#39;)
                        ? true
                        : typeof navigator.plugins === t(480) &amp;&amp; s !== &#39;Windows&#39; &amp;&amp; s !== t(1486);
                }
                [r(339)]() {
                    const t = r, n = navigator.userAgent[t(1479)](), e = navigator[t(444)];
                    let o;
                    if ((n[t(1265)](t(1084)) &gt;= 0
                        ? (o = t(565))
                        : n.indexOf(&#39;opera&#39;) &gt;= 0 || n.indexOf(&#39;opr&#39;) &gt;= 0
                            ? (o = t(1038))
                            : n[t(1265)](t(771)) &gt;= 0
                                ? (o = t(1235))
                                : n[t(1265)](t(1478)) &gt;= 0
                                    ? (o = &#39;Safari&#39;)
                                    : n[t(1265)](t(561)) &gt;= 0
                                        ? (o = t(423))
                                        : (o = &#39;Other&#39;),
                        (o === t(1235) || o === &#39;Safari&#39; || o === t(1038)) &amp;&amp; e !== t(749)))
                        return true;
                    const s = eval[t(861)]()[t(368)];
                    if (s === 37 &amp;&amp; o !== &#39;Safari&#39; &amp;&amp; o !== t(565) &amp;&amp; o !== &#39;Other&#39;)
                        return true;
                    if (s === 39 &amp;&amp; o !== t(423) &amp;&amp; o !== &#39;Other&#39;)
                        return true;
                    if (s === 33 &amp;&amp; o !== t(1235) &amp;&amp; o !== t(1038) &amp;&amp; o !== &#39;Other&#39;)
                        return true;
                    let x;
                    try {
                        throw &#39;a&#39;;
                    }
                    catch (m) {
                        try {
                            (m[t(1226)](), (x = !0));
                        }
                        catch {
                            x = false;
                        }
                    }
                    return x &amp;&amp; o !== t(565) &amp;&amp; o !== t(1487);
                }
            }
            i[r(633)] = a;
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                constructor(t) {
                    const n = _0x48f7;
                    this[n(803)] = t;
                }
                [r(627)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7, n = yield this[t(1205)](window);
                        return (yield this[t(431)](n, t(1213), () =&gt; __awaiter(this, void 0, void 0, function* () {
                            const e = t;
                            if (!Object[e(465)])
                                return;
                            const o = l[e(631)][e(1139)][e(325)](&#39;iframe&#39;);
                            if (!o)
                                return;
                            if (((o[e(882)] = e(820)),
                                document.body[e(896)](o),
                                Object[e(465)](HTMLIFrameElement[e(622)])[e(772)][e(996)][e(861)]() !==
                                    &#39;function get contentWindow() { [native code] }&#39; || o[e(772)] === window))
                                return true;
                            const x = yield this[e(1205)](o[e(772)]);
                            return (o.remove(), x);
                        })),
                            n);
                    });
                }
                headlessResults(t) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const n = _0x48f7, e = new Map(), o = [];
                        return (o[n(939)](this[n(431)](e, n(392), () =&gt; __awaiter(this, void 0, void 0, function* () {
                            const s = n;
                            return /HeadlessChrome/.test(t[s(1368)][s(641)]);
                        }))),
                            o[n(939)](this.test(e, n(1002), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n;
                                return t[s(1368)][s(859)];
                            }))),
                            o[n(939)](this[n(431)](e, n(1377), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n;
                                return /Chrome/.test(t.navigator.userAgent) &amp;&amp; !t[s(771)];
                            }))),
                            o[n(939)](this[n(431)](e, &#39;permissions_api&#39;, () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n;
                                if (t[s(1368)][s(1184)] &amp;&amp; t[s(362)]) {
                                    const x = yield t.navigator.permissions.query({ name: &#39;notifications&#39; });
                                    return t[s(362)][s(1049)] === s(338) &amp;&amp; x[s(628)] === &#39;prompt&#39;;
                                }
                            }))),
                            o[n(939)](this[n(431)](e, n(970), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n, x = t[s(1368)][s(1184)];
                                if (x)
                                    return x[s(410)][s(861)]() !== s(743) ||
                                        x[s(410)][s(861)][s(861)]() !== s(1359) ||
                                        (x[s(410)].toString[s(1417)](s(1183)) &amp;&amp;
                                            x[s(410)][s(861)].hasOwnProperty(s(1224)) &amp;&amp;
                                            x.query[s(861)][s(1417)](s(1063)))
                                        ? true
                                        : x[s(1417)](s(410));
                            }))),
                            o[n(939)](this[n(431)](e, n(1156), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                return navigator[n(492)].length === 0;
                            }))),
                            o[n(939)](this[n(431)](e, n(1208), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                return navigator[n(1402)] === &#39;&#39;;
                            }))),
                            o[n(939)](this[n(431)](e, n(817), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n;
                                let x = PluginArray[s(622)] === navigator[s(492)].__proto__;
                                return (navigator[s(492)][s(368)] &gt; 0 &amp;&amp;
                                    (x = x &amp;&amp; Plugin[s(622)] === navigator.plugins[0].__proto__),
                                    x);
                            }))),
                            o[n(939)](this.test(e, n(355), () =&gt; __awaiter(this, void 0, void 0, function* () {
                                const s = n;
                                let x = MimeTypeArray[s(622)] === navigator[s(614)].__proto__;
                                return (navigator[s(614)].length &gt; 0 &amp;&amp;
                                    (x = x &amp;&amp; MimeType[s(622)] === navigator[s(614)][0][s(403)]),
                                    x);
                            }))),
                            yield Promise[n(683)](o),
                            e);
                    });
                }
                [r(431)](t, n, e) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const o = _0x48f7;
                        try {
                            if (!this[o(803)][o(438)](n)) {
                                const s = yield l[o(631)][o(1139)][o(989)](100, e());
                                s != null &amp;&amp; (t[n] = s);
                            }
                        }
                        catch (s) {
                            l[o(631)][o(867)].warn(n + o(1278), s);
                        }
                    });
                }
            }
            i[r(1459)] = a;
        })((l._POSignalsMetadata || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            function r() {
                return new Promise((a, c) =&gt; {
                    const t = _0x48f7;
                    let n = t(674), e = false;
                    function o(D) {
                        e || ((e = true), a({ isPrivate: D, browserName: n }));
                    }
                    function s() {
                        const D = t, G = navigator[D(641)];
                        return G.match(/Chrome/)
                            ? navigator.brave !== void 0
                                ? &#39;Brave&#39;
                                : G[D(1314)](/Edg/)
                                    ? D(570)
                                    : G[D(1314)](/OPR/)
                                        ? D(1038)
                                        : D(1235)
                            : D(919);
                    }
                    function x(D) {
                        const G = t;
                        try {
                            return D === eval[G(861)]()[G(368)];
                        }
                        catch {
                            return false;
                        }
                    }
                    function m() {
                        const D = t;
                        let G = 0;
                        const N = parseInt(&#39;-1&#39;);
                        try {
                            N[D(1525)](N);
                        }
                        catch (ne) {
                            G = ne[D(768)][D(368)];
                        }
                        return G;
                    }
                    function p() {
                        return m() === 44;
                    }
                    function I() {
                        return m() === 51;
                    }
                    function g() {
                        return m() === 25;
                    }
                    function v() {
                        return navigator[t(906)] !== void 0 &amp;&amp; x(39);
                    }
                    function A() {
                        var D;
                        return __awaiter(this, void 0, void 0, function* () {
                            const G = _0x48f7;
                            try {
                                const N = navigator[G(1080)];
                                (typeof (N == null ? void 0 : N[G(753)]) === G(1064) &amp;&amp; (yield N[G(753)]()), o(!1));
                            }
                            catch (N) {
                                const ne = N instanceof Error &amp;&amp; (D = N[G(768)]) !== null &amp;&amp; D !== void 0 ? D : N;
                                o(typeof ne === G(1281) &amp;&amp; ne.includes(&#39;unknown transient reason&#39;));
                            }
                        });
                    }
                    function S() {
                        const D = t, G = String(Math[D(605)]());
                        try {
                            const N = indexedDB[D(330)](G, 1);
                            ((N[D(1345)] = (ne) =&gt; {
                                const he = D, Y = ne.target.result;
                                try {
                                    (Y[he(812)](&#39;t&#39;, { autoIncrement: !0 }).put(new Blob()), o(!1));
                                }
                                catch (ye) {
                                    const be = ye.message || &#39;&#39;;
                                    o(be[he(1461)](&#39;are not yet supported&#39;));
                                }
                                finally {
                                    (Y.close(), indexedDB[he(619)](G));
                                }
                            }),
                                (N.onerror = () =&gt; o(!1)));
                        }
                        catch {
                            o(false);
                        }
                    }
                    function d() {
                        const D = t;
                        try {
                            window[D(411)](null, null, null, null);
                        }
                        catch {
                            return o(true);
                        }
                        try {
                            (localStorage[D(949)](D(431), &#39;1&#39;), localStorage[D(1449)](D(431)));
                        }
                        catch {
                            return o(true);
                        }
                        o(false);
                    }
                    function _() {
                        return __awaiter(this, void 0, void 0, function* () {
                            const D = _0x48f7, G = navigator[D(1080)];
                            typeof (G == null ? void 0 : G[D(753)]) === D(1064)
                                ? yield A()
                                : navigator[D(858)] !== void 0
                                    ? S()
                                    : d();
                        });
                    }
                    function L() {
                        const D = t;
                        var G;
                        const N = (G = performance == null ? void 0 : performance.memory) === null || G === void 0
                            ? void 0
                            : G[D(612)];
                        return N != null ? N : 1073741824;
                    }
                    function y() {
                        const D = t;
                        navigator[D(404)][D(1036)](function (G, N) {
                            const ne = Math.round(N / 1048576), he = Math.round(L() / (1024 * 1024)) * 2;
                            o(ne &lt; he);
                        }, function (G) {
                            const N = D;
                            c(new Error(N(312) + G[N(768)]));
                        });
                    }
                    function O() {
                        const D = t, G = window[D(1515)];
                        G(0, 1, () =&gt; o(false), () =&gt; o(true));
                    }
                    function M() {
                        const D = t;
                        self[D(941)] &amp;&amp; self[D(941)][D(1001)] ? y() : O();
                    }
                    function R() {
                        return __awaiter(this, void 0, void 0, function* () {
                            const D = _0x48f7, G = navigator[D(1080)];
                            if (typeof (G == null ? void 0 : G.getDirectory) == &#39;function&#39;)
                                try {
                                    (yield G[D(753)](), o(!1));
                                }
                                catch (N) {
                                    const ne = N instanceof Error ? N[D(768)] : String(N);
                                    o(typeof ne === D(1281) &amp;&amp; ne[D(1461)](D(1124)));
                                    return;
                                }
                            else
                                o(navigator[D(647)] === void 0);
                        });
                    }
                    function k() {
                        o(window[t(1289)] === void 0);
                    }
                    function B() {
                        return __awaiter(this, void 0, void 0, function* () {
                            const D = _0x48f7;
                            p()
                                ? ((n = D(1305)), yield _())
                                : I()
                                    ? ((n = s()), M())
                                    : g()
                                        ? ((n = D(565)), yield R())
                                        : v()
                                            ? ((n = &#39;Internet Explorer&#39;), k())
                                            : c(new Error(D(511)));
                        });
                    }
                    B()[t(689)](c);
                });
            }
            i.detectIncognitoInternal = r;
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                constructor(t) {
                    const n = _0x48f7;
                    ((this.propertyBlackList = t), (this[n(995)] = {}));
                }
                [r(1497)](t, n) {
                    const e = r;
                    if (n[e(854)])
                        for (const o of n[e(1030)])
                            (!this.result[o] &amp;&amp; (this[e(995)][o] = []), this.result[o][e(939)](t));
                }
                getLies(t, n, e = null) {
                    const o = r;
                    if (typeof t != &#39;function&#39;)
                        return { lied: false, lieTypes: [] };
                    const s = t[o(1246)][o(947)](/get\s/, &#39;&#39;), x = {
                        undefined_properties: () =&gt; (e ? a[o(645)](e, s) : false),
                        to_string: () =&gt; a[o(526)](t, s, this[o(1412)]),
                        prototype_in_function: () =&gt; a[o(936)](t),
                        own_property: () =&gt; a[o(1042)](t),
                        object_to_string_error: () =&gt; a[o(1496)](t),
                    }, m = Object[o(345)](x)[o(365)]((p) =&gt; !this[o(803)][o(438)](o(782) + p) &amp;&amp; !!x[p]());
                    return { lied: m[o(368)] &gt; 0, lieTypes: m };
                }
                [r(328)]() {
                    return __awaiter(this, void 0, void 0, function* () {
                        const t = _0x48f7;
                        if (this.propertyBlackList[t(438)](t(794)))
                            return this[t(995)];
                        if (!this[t(803)][t(438)](t(1025))) {
                            const n = l[t(631)][t(1139)].createInvisibleElement(t(697));
                            n &amp;&amp; (document[t(1141)][t(896)](n), (this.iframeWindow = n));
                        }
                        return (yield Promise.all([
                            this[t(1274)](() =&gt; AnalyserNode, { target: [t(754)] }),
                            this[t(1274)](() =&gt; AudioBuffer, { target: [t(1159)] }),
                            this[t(1274)](() =&gt; BiquadFilterNode, { target: [t(796)] }),
                            this[t(1274)](() =&gt; CanvasRenderingContext2D, { target: [t(709)] }),
                            this[t(1274)](() =&gt; DOMRect, { target: [t(507)] }),
                            this[t(1274)](() =&gt; DOMRectReadOnly, { target: [&#39;left&#39;] }),
                            this.searchLies(() =&gt; Element, { target: [&#39;getClientRects&#39;] }),
                            this[t(1274)](() =&gt; HTMLCanvasElement, { target: [t(507)] }),
                            this[t(1274)](() =&gt; Math, { target: [t(1476)] }),
                            this[t(1274)](() =&gt; MediaDevices, { target: [t(1052)] }),
                            this[t(1274)](() =&gt; Navigator, { target: [t(492)] }),
                            this[t(1274)](() =&gt; OffscreenCanvasRenderingContext2D, { target: [t(709)] }),
                            this[t(1274)](() =&gt; SVGRect, { target: [&#39;x&#39;] }),
                        ]),
                            this.iframeWindow[t(1283)](),
                            this[t(995)]);
                    });
                }
                [r(1274)](t, { target: n = [], ignore: e = [] } = {}) {
                    return __awaiter(this, void 0, void 0, function* () {
                        const o = _0x48f7;
                        function s(p) {
                            return typeof p != _0x48f7(480) &amp;&amp; !!p;
                        }
                        let x;
                        try {
                            if (((x = t()), !s(x)))
                                return;
                        }
                        catch {
                            return;
                        }
                        const m = x.prototype ? x.prototype : x;
                        Object[o(988)](m)[o(892)]((p) =&gt; {
                            const I = o;
                            if (p == I(1516) ||
                                (n.length &amp;&amp; !new Set(n)[I(438)](p)) ||
                                (e.length &amp;&amp; new Set(e).has(p)))
                                return;
                            const v = /\s(.+)\]/, A = (x[I(1246)] ? x.name : v[I(431)](x) ? v.exec(x)[1] : void 0) + &#39;.&#39; + p;
                            try {
                                const S = x.prototype ? x[I(622)] : x;
                                try {
                                    if (typeof S[p] == &#39;function&#39;) {
                                        const y = this[I(1488)](S[p], S);
                                        this[I(1497)](A, y);
                                        return;
                                    }
                                }
                                catch { }
                                const d = Object[I(978)](S, p)[I(996)], _ = this.getLies(d, S, x);
                                this.documentLie(A, _);
                            }
                            catch (S) {
                                l[I(631)][I(867)][I(829)](I(1066) + p + I(1381), S);
                            }
                        });
                    });
                }
                static [r(645)](t, n) {
                    const e = r, o = t.name, s = window[o.charAt(0).toLowerCase() + o[e(1106)](1)];
                    return (!!s &amp;&amp; (typeof Object[e(978)](s, n) != e(480) || typeof Reflect[e(978)](s, n) != e(480)));
                }
                static [r(526)](t, n, e) {
                    const o = r;
                    let s, x;
                    try {
                        s = e[o(1162)][o(622)][o(861)][o(1390)](t);
                    }
                    catch { }
                    try {
                        x = e.Function[o(622)].toString.call(t[o(861)]);
                    }
                    catch { }
                    const m = s || t[o(861)](), p = x || t[o(861)][o(861)](), I = (g) =&gt; ({
                        [o(1097) + g + &#39;() { [native code] }&#39;]: true,
                        [&#39;function get &#39; + g + o(1280)]: true,
                        [o(897)]: true,
                        [o(1097) +
                            g +
                            o(954) +
                            `
    [native code]
}`]: true,
                        [o(1021) +
                            g +
                            o(954) +
                            `
    [native code]
}`]: true,
                        [o(1255) +
                            `
` +
                            o(1433) +
                            `
}`]: true,
                    });
                    return !I(n)[m] || !I(o(861))[p];
                }
                static [r(936)](t) {
                    return r(622) in t;
                }
                static [r(1042)](t) {
                    const n = r;
                    return (t.hasOwnProperty(&#39;arguments&#39;) ||
                        t[n(1417)](n(799)) ||
                        t.hasOwnProperty(n(622)) ||
                        t[n(1417)](&#39;toString&#39;));
                }
                static getNewObjectToStringTypeErrorLie(t) {
                    const n = r;
                    try {
                        return (Object[n(744)](t)[n(861)](), !0);
                    }
                    catch (e) {
                        const o = e[n(596)][n(376)](`
`), s = o.slice(1), x = /at Object\.apply/, m = /at Function\.toString/, p = !s[n(459)]((v) =&gt; x[n(431)](v)), I = e[n(1516)][n(1246)] == n(1378) &amp;&amp; o.length &gt; 1, g = n(771) in window || i[n(846)].detectChromium();
                        return I &amp;&amp; g &amp;&amp; (!m[n(431)](o[1]) || !p) ? true : !I;
                    }
                }
            }
            i[r(1004)] = a;
        })((l[f(813)] || (l._POSignalsMetadata = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                constructor(t) {
                    const n = _0x48f7;
                    ((this[n(803)] = t), (this[n(995)] = new Map()));
                }
                [r(1165)]() {
                    const t = r;
                    return (this.addStealthTest(t(1258), () =&gt; {
                        const n = t;
                        try {
                            const { srcdoc: e } = document[n(983)](n(697));
                            return !!e;
                        }
                        catch {
                            return true;
                        }
                    }),
                        this[t(337)](t(808), () =&gt; {
                            const n = t, e = document[n(983)](n(697));
                            return ((e.srcdoc =
                                &#39;&#39; + l[n(631)][n(1139)][n(827)](crypto.getRandomValues(new Uint32Array(10)))),
                                !!e[n(772)]);
                        }),
                        this[t(337)](&#39;index_chrome_too_high&#39;, () =&gt; {
                            const n = t, e = n(1316) in window ? n(1316) : n(467) in window ? n(467) : n(340), o = [];
                            for (const m in window)
                                o[n(939)](m);
                            const s = o.indexOf(&#39;chrome&#39;), x = o[n(1265)](e);
                            return s &gt; x;
                        }),
                        this[t(337)](t(539), () =&gt; {
                            const n = t;
                            if (!(&#39;chrome&#39; in window &amp;&amp; n(1128) in window[n(771)]))
                                return false;
                            try {
                                return (n(622) in window[n(771)][n(1128)].sendMessage ||
                                    n(622) in window[n(771)][n(1128)][n(361)] ||
                                    (new window[n(771)].runtime.sendMessage(),
                                        new window[n(771)][n(1128)][n(361)]()),
                                    !0);
                            }
                            catch (e) {
                                return e[n(1516)][n(1246)] != n(1378);
                            }
                        }),
                        this[t(337)](t(889), () =&gt; {
                            const n = t, e = new a[n(848)]();
                            return e[n(372)](Function[n(622)][n(861)]) || e[n(372)](() =&gt; { });
                        }),
                        this[t(995)]);
                }
                [r(337)](t, n) {
                    const e = r;
                    if (!this[e(803)][e(438)](t))
                        try {
                            this[e(995)][t] = n();
                        }
                        catch (o) {
                            l[e(631)][e(867)][e(829)](e(572) + t + e(781), o);
                        }
                }
            }
            ((a[r(848)] = class {
                [r(372)](c) {
                    const t = r;
                    try {
                        return ((this[t(1443)] = () =&gt; Object[t(744)](c)[t(861)]()),
                            (this[t(462)] = () =&gt; this[t(1443)]()),
                            (this[t(1251)] = () =&gt; this[t(462)]()),
                            this[t(1251)](),
                            !0);
                    }
                    catch (n) {
                        const e = n[t(596)].split(`
`), o = !/at Object\.apply/[t(431)](e[1]), s = n[t(1516)].name == &#39;TypeError&#39; &amp;&amp; e.length &gt;= 5, x = &#39;chrome&#39; in window || i[t(846)][t(1335)]();
                        return s &amp;&amp;
                            x &amp;&amp;
                            (!o ||
                                !/at Function\.toString/[t(431)](e[1]) ||
                                !/\.you/[t(431)](e[2]) ||
                                !/\.cant/[t(431)](e[3]) ||
                                !/\.hide/[t(431)](e[4]))
                            ? true
                            : !s;
                    }
                }
            }),
                (i[r(704)] = a));
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = _0x44f950;
        (function (i) {
            const r = _0x48f7;
            class a {
                static [r(1304)]() {
                    const t = r;
                    return l[t(813)]
                        .detectIncognitoInternal()[t(804)]((n) =&gt; n[t(1237)])[t(689)](() =&gt; false);
                }
            }
            i[r(1003)] = a;
        })((l[f(813)] || (l[f(813)] = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        (function (E) {
            ((E[(E.Unknown = 0)] = &#39;Unknown&#39;),
                (E[(E.FlingRight = 1)] = &#39;FlingRight&#39;),
                (E[(E.FlingLeft = 2)] = &#39;FlingLeft&#39;),
                (E[(E.FlingUp = 3)] = &#39;FlingUp&#39;),
                (E[(E.FlingDown = 4)] = &#39;FlingDown&#39;),
                (E[(E.Diagonal = 5)] = &#39;Diagonal&#39;),
                (E[(E.ScrollRight = 6)] = &#39;ScrollRight&#39;),
                (E[(E.ScrollLeft = 7)] = &#39;ScrollLeft&#39;),
                (E[(E.ScrollUp = 8)] = &#39;ScrollUp&#39;),
                (E[(E.ScrollDown = 9)] = &#39;ScrollDown&#39;),
                (E[(E.Tap = 10)] = &#39;Tap&#39;),
                (E[(E.DoubleTap = 11)] = &#39;DoubleTap&#39;));
        })((l.GestureType || (l.GestureType = {})));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(_, L) {
                ((this.handler = _), (this.isOnce = L), (this.isExecuted = false));
            }
            execute(_, L, y) {
                if (!this.isOnce || !this.isExecuted) {
                    this.isExecuted = true;
                    const O = this.handler;
                    _
                        ? setTimeout(() =&gt; {
                            O.apply(L, y);
                        }, 1)
                        : O.apply(L, y);
                }
            }
        }
        class E {
            constructor() {
                ((this._wrap = new c(this)), (this._subscriptions = new Array()));
            }
            subscribe(_) {
                _ &amp;&amp; this._subscriptions.push(new f(_, false));
            }
            sub(_) {
                this.subscribe(_);
            }
            one(_) {
                _ &amp;&amp; this._subscriptions.push(new f(_, true));
            }
            has(_) {
                if (_) {
                    for (const L of this._subscriptions)
                        if (L.handler == _)
                            return true;
                }
                return false;
            }
            unsubscribe(_) {
                if (_) {
                    for (let L = 0; L &lt; this._subscriptions.length; L++)
                        if (this._subscriptions[L].handler == _) {
                            this._subscriptions.splice(L, 1);
                            break;
                        }
                }
            }
            unsub(_) {
                this.unsubscribe(_);
            }
            _dispatch(_, L, y) {
                for (let O = 0; O &lt; this._subscriptions.length; O++) {
                    const M = this._subscriptions[O];
                    if (M.isOnce) {
                        if (M.isExecuted === true)
                            continue;
                        (this._subscriptions.splice(O, 1), O--);
                    }
                    M.execute(_, L, y);
                }
            }
            asEvent() {
                return this._wrap;
            }
        }
        l.DispatcherBase = E;
        class i extends E {
            dispatch(_, L) {
                this._dispatch(false, this, arguments);
            }
            dispatchAsync(_, L) {
                this._dispatch(true, this, arguments);
            }
        }
        l.EventDispatcher = i;
        class c {
            constructor(_) {
                ((this._subscribe = (L) =&gt; _.subscribe(L)),
                    (this._unsubscribe = (L) =&gt; _.unsubscribe(L)),
                    (this._one = (L) =&gt; _.one(L)),
                    (this._has = (L) =&gt; _.has(L)));
            }
            subscribe(_) {
                this._subscribe(_);
            }
            sub(_) {
                this.subscribe(_);
            }
            unsubscribe(_) {
                this._unsubscribe(_);
            }
            unsub(_) {
                this.unsubscribe(_);
            }
            one(_) {
                this._one(_);
            }
            has(_) {
                return this._has(_);
            }
        }
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            get LAST_GESTURE_SENSOR_TIMEOUT_MILI_SECONDS() {
                return 3e3;
            }
            get accX() {
                return this._accX;
            }
            get accY() {
                return this._accY;
            }
            get accZ() {
                return this._accZ;
            }
            get lienarAccX() {
                return this._lienarAccX;
            }
            get lienarAccY() {
                return this._lienarAccY;
            }
            get lienarAccZ() {
                return this._lienarAccZ;
            }
            get isStarted() {
                return this._isStarted;
            }
            get rotX() {
                return this._rotX;
            }
            get rotY() {
                return this._rotY;
            }
            get rotZ() {
                return this._rotZ;
            }
            get maxSensorSamples() {
                return this._maxSensorSamples;
            }
            set maxSensorSamples(i) {
                this._maxSensorSamples = i;
            }
            get sensorsTimestampDeltaInMillis() {
                return this._sensorsTimestampDeltaInMillis;
            }
            set sensorsTimestampDeltaInMillis(i) {
                this._sensorsTimestampDeltaInMillis = i;
            }
            get accelerometerList() {
                return this.getRelevantSensorSamples(this._accelerometerList);
            }
            get gyroscopeList() {
                return this.getRelevantSensorSamples(this._gyroscopeList);
            }
            get linearAccelerometerList() {
                return this.getRelevantSensorSamples(this._linearAccelerometerList);
            }
            get rotationList() {
                return this._rotationList;
            }
            constructor(i) {
                ((this._isStarted = false),
                    (this._isEventsStarted = false),
                    (this._gestureTimestamps = []),
                    (this._maxSensorSamples = 0),
                    (this._sensorsTimestampDeltaInMillis = 0),
                    (this._accelerometerList = []),
                    (this._gyroscopeList = []),
                    (this._linearAccelerometerList = []),
                    (this._rotationList = []),
                    (this.orientationImplementationFix = 1),
                    (this.delegate = i),
                    window.navigator.userAgent.match(/^.*(iPhone|iPad).*(OS\s[0-9]).*(CriOS|Version)\/[.0-9]*\sMobile.*$/i) &amp;&amp; (this.orientationImplementationFix = -1),
                    (this.accelerometerUpdateHandle = this.accelerometerUpdate.bind(this)),
                    (this.orientationUpdateHandle = this.orientationUpdate.bind(this)));
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true), l._POSignalsUtils.Logger.debug(&#39;Sensor events started...&#39;));
            }
            getRotationListCopy() {
                return this._rotationList ? Array.from(this._rotationList) : [];
            }
            stop() {
                this._isStarted &amp;&amp;
                    (window.DeviceMotionEvent != null &amp;&amp;
                        window.removeEventListener(&#39;devicemotion&#39;, this.accelerometerUpdateHandle, true),
                        window.DeviceOrientationEvent &amp;&amp;
                            window.removeEventListener(&#39;deviceorientation&#39;, this.orientationUpdateHandle, true),
                        (this._isStarted = false),
                        l._POSignalsUtils.Logger.debug(&#39;Sensor events stopped&#39;));
            }
            getRelevantSensorSamples(i) {
                if (i.length == 0 ||
                    this._sensorsTimestampDeltaInMillis &lt; 1 ||
                    this._gestureTimestamps.length == 0)
                    return i;
                const r = new Map();
                let a = null, c = 0;
                for (let t = 0; t &lt; i.length; t++)
                    for (let n = 0; n &lt; this._gestureTimestamps.length; n++)
                        ((c = i[t].timestamp),
                            (a = this._gestureTimestamps[n]),
                            c &gt;= a.start - this._sensorsTimestampDeltaInMillis &amp;&amp;
                                c &lt;= a.end + this._sensorsTimestampDeltaInMillis &amp;&amp;
                                r.set(i[t].timestamp, i[t]));
                return l._POSignalsUtils.Util.getValuesOfMap(r);
            }
            stopEvents() {
                this._isEventsStarted &amp;&amp;
                    (window.DeviceMotionEvent != null &amp;&amp;
                        window.removeEventListener(&#39;devicemotion&#39;, this.accelerometerUpdateHandle, true),
                        window.DeviceOrientationEvent &amp;&amp;
                            window.removeEventListener(&#39;deviceorientation&#39;, this.orientationUpdateHandle, true),
                        (this._isEventsStarted = false),
                        l._POSignalsUtils.Logger.debug(&#39;Sensor events stopped listening&#39;));
            }
            async startEvents() {
                if (this._isEventsStarted)
                    return;
                typeof DeviceMotionEvent != &#39;undefined&#39; &amp;&amp;
                    typeof DeviceMotionEvent.requestPermission == &#39;function&#39; &amp;&amp;
                    l._POSignalsUtils.Logger.debug(&#39;iOS detected. Attaching passive sensor listeners (data will flow if host app grants permission).&#39;);
                if (navigator.permissions)
                    try {
                        if ((await navigator.permissions.query({ name: &#39;accelerometer&#39; })).state !== &#39;granted&#39;) {
                            l._POSignalsUtils.Logger.debug(&#39;Sensor permission not granted. Skipping.&#39;);
                            return;
                        }
                    }
                    catch { }
                (window.DeviceMotionEvent != null
                    ? this.delegate.addEventListener(window, &#39;devicemotion&#39;, this.accelerometerUpdateHandle, true)
                    : l._POSignalsUtils.Logger.warn(&#39;DeviceMotion not supported!&#39;),
                    window.DeviceOrientationEvent
                        ? this.delegate.addEventListener(window, &#39;deviceorientation&#39;, this.orientationUpdateHandle, true)
                        : l._POSignalsUtils.Logger.warn(&#39;DeviceOrientation not supported!&#39;),
                    l._POSignalsUtils.Logger.debug(&#39;Sensor events start listening...&#39;),
                    (this._isEventsStarted = true));
            }
            reset() {
                ((this._accelerometerList = []),
                    (this._gyroscopeList = []),
                    (this._linearAccelerometerList = []),
                    (this._rotationList = []),
                    this._gestureTimestamps.length &gt; 0
                        ? (this._gestureTimestamps = [
                            this._gestureTimestamps[this._gestureTimestamps.length - 1],
                        ])
                        : (this._gestureTimestamps = []),
                    (this._accX = 0),
                    (this._accY = 0),
                    (this._accZ = 0),
                    (this._rotX = 0),
                    (this._rotY = 0),
                    (this._rotZ = 0));
            }
            onGesture(i) {
                (this._isEventsStarted || this.startEvents(),
                    i.events.length &gt; 1 &amp;&amp;
                        this._gestureTimestamps.push({
                            start: i.events[0].eventTs,
                            end: i.events[i.events.length - 1].eventTs,
                        }));
            }
            puaseSensorsCollectionIfNoActivity(i) {
                if ((this._gestureTimestamps.length &gt; 0
                    ? this._gestureTimestamps[this._gestureTimestamps.length - 1].end
                    : 0) &gt; 0) {
                    if (Math.abs(i - this._gestureTimestamps[this._gestureTimestamps.length - 1].end) &gt;
                        this.LAST_GESTURE_SENSOR_TIMEOUT_MILI_SECONDS)
                        return (this.stopEvents(), true);
                }
                else
                    return (this.stopEvents(), true);
                return false;
            }
            getDeviceAcceleration(i) {
                return !i || i.x == null || i.y == null || i.z == null ? null : i;
            }
            accelerometerUpdate(i) {
                try {
                    if (!this.delegate.collectBehavioralData() ||
                        this.puaseSensorsCollectionIfNoActivity(l._POSignalsUtils.Util.now()))
                        return;
                    const r = this.getDeviceAcceleration(i.accelerationIncludingGravity);
                    r &amp;&amp;
                        ((this._accX = r.x * this.orientationImplementationFix),
                            (this._accY = r.y * this.orientationImplementationFix),
                            (this._accZ = r.z),
                            this.safeAddSensorSample({
                                x: this._accX,
                                y: this._accY,
                                z: this._accX,
                                timestamp: l._POSignalsUtils.Util.now(),
                            }, this._accelerometerList));
                    const a = this.getDeviceAcceleration(i.acceleration);
                    (a &amp;&amp;
                        ((this._lienarAccX = a.x * this.orientationImplementationFix),
                            (this._lienarAccY = a.y * this.orientationImplementationFix),
                            (this._lienarAccZ = a.z),
                            this.safeAddSensorSample({
                                x: this._lienarAccX,
                                y: this._lienarAccY,
                                z: this._lienarAccZ,
                                timestamp: l._POSignalsUtils.Util.now(),
                            }, this._linearAccelerometerList)),
                        i.rotationRate &amp;&amp;
                            i.rotationRate.alpha != null &amp;&amp;
                            i.rotationRate.beta != null &amp;&amp;
                            i.rotationRate.gamma != null &amp;&amp;
                            ((this._rotX = i.rotationRate.alpha),
                                (this._rotY = i.rotationRate.beta),
                                (this._rotZ = i.rotationRate.gamma),
                                this.safeAddSensorSample({
                                    x: this._rotX,
                                    y: this._rotY,
                                    z: this._rotZ,
                                    timestamp: l._POSignalsUtils.Util.now(),
                                }, this._gyroscopeList)));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in accelerometer handler&#39;, r);
                }
            }
            orientationUpdate(i) {
                try {
                    if (!this.delegate.collectBehavioralData() ||
                        this.puaseSensorsCollectionIfNoActivity(l._POSignalsUtils.Util.now()))
                        return;
                    i.alpha != null &amp;&amp;
                        i.beta != null &amp;&amp;
                        i.gamma != null &amp;&amp;
                        this.safeAddSensorSample({ x: i.alpha, y: i.beta, z: i.gamma, timestamp: l._POSignalsUtils.Util.now() }, this._rotationList);
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in orientation handler&#39;, r);
                }
            }
            safeAddSensorSample(i, r) {
                this.maxSensorSamples &gt; r.length &amp;&amp; r.push(i);
            }
        }
        l.Sensors = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            static get instance() {
                return (f._instance || (f._instance = new f()), f._instance);
            }
            constructor() {
                this._pointerParams = new l.PointerParams();
            }
            get pointerParams() {
                return this._pointerParams;
            }
        }
        l.PointerConfig = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        let f;
        (function (i) {
            ((i[(i.Up = 1)] = &#39;Up&#39;),
                (i[(i.Down = 2)] = &#39;Down&#39;),
                (i[(i.Left = 3)] = &#39;Left&#39;),
                (i[(i.Right = 4)] = &#39;Right&#39;));
        })(f || (f = {}));
        class E {
            get onGesture() {
                return this._onGesture.asEvent();
            }
            get isStarted() {
                return this._isStarted;
            }
            get SCROLL_MIN_DURATION() {
                return 500;
            }
            get SWIPE_MAX_ANGLE() {
                return 45;
            }
            get TAP_MOVEMENT_TRESHOLD() {
                return 10;
            }
            constructor(r, a) {
                ((this.BEHAVIORAL_TYPE = &#39;gestures&#39;),
                    (this._isStarted = false),
                    (this._onGesture = new l.EventDispatcher()),
                    (this.touchSnapshotsMap = new Map()),
                    (this.snapshotStartTime = new Map()),
                    (this.delegate = r),
                    (this.sensors = a),
                    (this.touchStartHandler = this.touchStart.bind(this)),
                    (this.touchMoveHandler = this.touchMove.bind(this)),
                    (this.touchEndHandler = this.touchEnd.bind(this)),
                    (this.touchCancelHandler = this.touchCancel.bind(this)));
            }
            countEvents(r) {
                const a = { epochTs: Date.now() };
                for (const c of r)
                    a[c.type] = (a[c.type] || 0) + 1;
                return a;
            }
            clearTouchSnapshots(r) {
                (this.touchSnapshotsMap.delete(r), this.snapshotStartTime.delete(r));
            }
            getTouchSnapshots(r) {
                let a;
                return (this.touchSnapshotsMap.has(r)
                    ? (a = this.touchSnapshotsMap.get(r))
                    : ((a = []), this.touchSnapshotsMap.set(r, a)),
                    a);
            }
            isEmpty() {
                return this.touchSnapshotsMap.size === 0;
            }
            start() {
                this._isStarted ||
                    (this.delegate.addEventListener(document, &#39;touchstart&#39;, this.touchStartHandler),
                        this.delegate.addEventListener(document, &#39;touchmove&#39;, this.touchMoveHandler),
                        this.delegate.addEventListener(document, &#39;touchend&#39;, this.touchEndHandler),
                        this.delegate.addEventListener(document, &#39;touchcancel&#39;, this.touchCancelHandler),
                        (this._isStarted = true));
            }
            stop() {
                this._isStarted &amp;&amp;
                    (document.removeEventListener(&#39;touchstart&#39;, this.touchStartHandler),
                        document.removeEventListener(&#39;touchmove&#39;, this.touchMoveHandler),
                        document.removeEventListener(&#39;touchend&#39;, this.touchEndHandler),
                        document.removeEventListener(&#39;touchcancel&#39;, this.touchCancelHandler),
                        (this._isStarted = false));
            }
            touchStart(r) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(r.type))
                        return;
                    (l._POSignalsUtils.Logger.debug(&#39;touchstart(&#39; + r.changedTouches.length + &#39;)&#39;, r),
                        r.changedTouches.length &gt; 0 &amp;&amp; this.pushSnapshot(r));
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(&#39;error in touchStart handler&#39;, a);
                }
            }
            touchMove(r) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(r.type))
                        return;
                    (l._POSignalsUtils.Logger.debug(&#39;touchmove(&#39; + r.changedTouches.length + &#39;)&#39;, r),
                        r.changedTouches.length &gt; 0 &amp;&amp; this.pushSnapshot(r));
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(&#39;error in touchMove handler&#39;, a);
                }
            }
            touchEnd(r) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE)) {
                        this._onGesture.dispatch(this, null);
                        return;
                    }
                    if (l.PointerConfig.instance.pointerParams.eventsToIgnore.has(r.type))
                        return;
                    (l._POSignalsUtils.Logger.debug(&#39;touchend(&#39; + r.changedTouches.length + &#39;)&#39;, r),
                        this.gestureEnd(r));
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(&#39;error in touchEnd handler&#39;, a);
                }
            }
            touchCancel(r) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE)) {
                        this._onGesture.dispatch(this, null);
                        return;
                    }
                    if (l.PointerConfig.instance.pointerParams.eventsToIgnore.has(r.type))
                        return;
                    (l._POSignalsUtils.Logger.debug(&#39;touchcancel(&#39; + r.changedTouches.length + &#39;)&#39;, r),
                        this.gestureEnd(r));
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(&#39;error in touchCancel handler&#39;, a);
                }
            }
            gestureEnd(r) {
                r.changedTouches.length &gt; 0 &amp;&amp; this.pushSnapshot(r);
                for (let a = 0; a &lt; r.changedTouches.length; a++) {
                    const c = r.changedTouches.item(a), t = this.getTouchSnapshots(c.identifier);
                    t.length &gt; 0 &amp;&amp;
                        (this.isTap(t)
                            ? this.dispatchGesture(l.GestureType.Tap, c.identifier)
                            : this.dispatchGesture(this.calcGestureType(t), c.identifier));
                }
            }
            calcGestureType(r) {
                let a;
                const c = this.getDirection(r);
                if (this.isFling(r))
                    switch (c) {
                        case f.Up: {
                            a = l.GestureType.FlingUp;
                            break;
                        }
                        case f.Right: {
                            a = l.GestureType.FlingRight;
                            break;
                        }
                        case f.Down: {
                            a = l.GestureType.FlingDown;
                            break;
                        }
                        case f.Left: {
                            a = l.GestureType.FlingLeft;
                            break;
                        }
                    }
                else if (this.isScroll(r))
                    switch (c) {
                        case f.Up: {
                            a = l.GestureType.ScrollUp;
                            break;
                        }
                        case f.Right: {
                            a = l.GestureType.ScrollRight;
                            break;
                        }
                        case f.Down: {
                            a = l.GestureType.ScrollDown;
                            break;
                        }
                        case f.Left: {
                            a = l.GestureType.ScrollLeft;
                            break;
                        }
                    }
                return a;
            }
            pushSnapshot(r) {
                if (r.changedTouches &amp;&amp; r.changedTouches.length &gt; 0)
                    for (let a = 0; a &lt; r.changedTouches.length; a++) {
                        const c = r.changedTouches.item(a), t = c.radiusX &amp;&amp; c.radiusY ? (c.radiusX + c.radiusY) / 2 : null;
                        this.snapshotStartTime.has(c.identifier) ||
                            this.snapshotStartTime.set(c.identifier, Date.now());
                        const n = this.getTouchSnapshots(c.identifier);
                        n.length &lt; l.PointerConfig.instance.pointerParams.maxSnapshotsCount &amp;&amp;
                            n.push({
                                type: r.type,
                                eventTs: r.timeStamp,
                                epochTs: Date.now(),
                                relativeX: c.screenX,
                                relativeY: c.screenY,
                                x: c.clientX,
                                y: c.clientY,
                                pressure: c.force,
                                size: t,
                                xaccelerometer: this.sensors.accX,
                                yaccelerometer: this.sensors.accY,
                                zaccelerometer: this.sensors.accZ,
                                xlinearaccelerometer: this.sensors.lienarAccX,
                                ylinearaccelerometer: this.sensors.lienarAccY,
                                zlinearaccelerometer: this.sensors.lienarAccZ,
                                xrotation: this.sensors.rotX,
                                yrotation: this.sensors.rotY,
                                zrotation: this.sensors.rotZ,
                                radiusX: c.radiusX,
                                radiusY: c.radiusY,
                                rotationAngle: c.rotationAngle,
                                pageX: c.pageX,
                                pageY: c.pageY,
                                getX() {
                                    return c.screenX;
                                },
                                getY() {
                                    return c.screenY;
                                },
                            });
                    }
            }
            dispatchGesture(r, a) {
                const c = this.touchSnapshotsMap.get(a) || [], t = c.filter((n) =&gt; n.type === &#39;touchmove&#39;);
                (this._onGesture.dispatch(this, {
                    epochTs: this.snapshotStartTime.get(a) || 0,
                    counter: this.delegate.gesturesCounter,
                    type: r,
                    events: c,
                    eventCounters: this.countEvents(c),
                    duration: this.delegate.getInteractionDuration(c),
                    additionalData: this.delegate.additionalData,
                    uiControl: void 0,
                    timeProximity: l._POSignalsUtils.Util.calculateMeanTimeDeltasBetweenEvents(t),
                    meanEuclidean: l._POSignalsUtils.Util.calculateMeanDistanceBetweenPoints(t),
                    reduction: {},
                    quality: &#39;&#39;,
                }),
                    this.clearTouchSnapshots(a));
            }
            isTap(r) {
                const a = Math.abs(r[0].x - r[1].x), c = Math.abs(r[0].y - r[1].y);
                return r.length == 2 &amp;&amp; a &lt; this.TAP_MOVEMENT_TRESHOLD &amp;&amp; c &lt; this.TAP_MOVEMENT_TRESHOLD;
            }
            isFling(r) {
                return r.length &gt; 1 &amp;&amp; r[r.length - 1].eventTs - r[0].eventTs &lt; this.SCROLL_MIN_DURATION;
            }
            isScroll(r) {
                return r.length &gt; 1 &amp;&amp; r[r.length - 1].eventTs - r[0].eventTs &gt; this.SCROLL_MIN_DURATION;
            }
            getDirection(r) {
                const a = this.calcAngle(r[0], r[r.length - 1]);
                return a &gt; 90 - this.SWIPE_MAX_ANGLE &amp;&amp; a &lt;= 90 + this.SWIPE_MAX_ANGLE
                    ? f.Up
                    : a &gt; 180 - this.SWIPE_MAX_ANGLE &amp;&amp; a &lt;= 180 + this.SWIPE_MAX_ANGLE
                        ? f.Right
                        : a &gt; 270 - this.SWIPE_MAX_ANGLE &amp;&amp; a &lt;= 270 + this.SWIPE_MAX_ANGLE
                            ? f.Down
                            : f.Left;
            }
            calcAngle(r, a) {
                return (Math.atan2(a.y - r.y, a.x - r.x) * 180) / Math.PI + 180;
            }
        }
        l.GestureEvents = E;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.key = i), (this.cache = this.loadFromStorage()));
            }
            loadFromStorage() {
                let i = f.sessionStorage.getItem(this.key);
                return (i || (i = JSON.stringify([])), JSON.parse(i));
            }
            get() {
                return this.cache;
            }
            get length() {
                return this.cache.length;
            }
            push(i) {
                const r = this.cache.push(i);
                return (f.sessionStorage.setItem(this.key, JSON.stringify(this.cache)), r);
            }
            set(i) {
                ((this.cache = i), f.sessionStorage.setItem(this.key, JSON.stringify(this.cache)));
            }
            remove(i) {
                (this.cache.splice(i, 1), f.sessionStorage.setItem(this.key, JSON.stringify(this.cache)));
            }
            concat(i) {
                return this.cache.concat(i);
            }
            clear() {
                ((this.cache = []), f.sessionStorage.removeItem(this.key));
            }
        }
        ((f.sessionStorage = l._POSignalsStorage.SessionStorage.instance.sessionStorage),
            (l.StorageArray = f));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor() {
                ((this.MAX_TAGS = 10),
                    (this._tags = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_TAGS)));
            }
            static get instance() {
                return (f._instance || (f._instance = new f()), f._instance);
            }
            get tags() {
                return this._tags.get();
            }
            set disableTags(i) {
                this._disableTags = i;
            }
            setTag(i, r) {
                var a;
                if (this._disableTags)
                    return;
                if (!l.PointerConfig.instance.pointerParams.enabled) {
                    l._POSignalsUtils.Logger.info(&quot;Can&#39;t add tag, PingOneSignals SDK is disabled&quot;);
                    return;
                }
                if (!i) {
                    l._POSignalsUtils.Logger.info(&quot;Can&#39;t add tag, missing name&quot;);
                    return;
                }
                const c = l.PointerConfig.instance.pointerParams.tagsBlacklistRegex;
                if (c &amp;&amp; (i.match(c) || (typeof r == &#39;string&#39; &amp;&amp; r != null &amp;&amp; r.match(c)))) {
                    l._POSignalsUtils.Logger.info(&#39;Tag name or value is blacklisted&#39;);
                    return;
                }
                if (this._tags.length &gt;= this.MAX_TAGS)
                    return;
                typeof r != &#39;number&#39;
                    ? this._tags.push({
                        name: i.trim(),
                        value: ((a = r == null ? void 0 : r.trim) === null || a === void 0 ? void 0 : a.call(r)) ||
                            void 0,
                        epochTs: Date.now(),
                        timestamp: Date.now(),
                    })
                    : this._tags.push({
                        name: i.trim(),
                        value: r,
                        epochTs: Date.now(),
                        timestamp: Date.now(),
                    });
                const t = r ? `${i}:${r}` : i;
                l._POSignalsUtils.Logger.info(`Add tag: ${t}`);
            }
            reset() {
                this._tags.clear();
            }
        }
        l.Tags = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                this.client = i;
            }
            calculateStrategyResult(i, r) {
                return {
                    shouldCollect: this.client.getBufferSize() &lt; l.PointerConfig.instance.pointerParams.bufferSize,
                };
            }
        }
        l.FirstInteractionsStrategy = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        let f;
        (function (i) {
            ((i[(i.RICH = 3)] = &#39;RICH&#39;),
                (i[(i.CLICK = 2)] = &#39;CLICK&#39;),
                (i[(i.MOVE = 1)] = &#39;MOVE&#39;),
                (i[(i.POOR = 0)] = &#39;POOR&#39;));
        })(f || (f = {}));
        class E {
            constructor(r) {
                ((this.client = r),
                    (this.MAX_INTERACTIONS_PER_TYPE = 7),
                    (this.RICH_MOUSE_MOVES_AMOUNT = 8),
                    (this.MIN_KEYBOARD_EVENTS = 6),
                    (this.MIN_TOUCH_EVENTS = 20));
            }
            isRichMouseInteraction(r) {
                return r.mousemove &gt;= this.RICH_MOUSE_MOVES_AMOUNT &amp;&amp; this.isClickInteraction(r);
            }
            isClickInteraction(r) {
                return r.mousedown &gt; 0 &amp;&amp; r.mouseup &gt; 0;
            }
            isMoveInteraction(r) {
                return r.mousemove &gt;= this.RICH_MOUSE_MOVES_AMOUNT;
            }
            classifyMouseInteraction(r) {
                const a = l._POSignalsUtils.Util.typesCounter(r.events);
                return this.isRichMouseInteraction(a)
                    ? f.RICH
                    : this.isClickInteraction(a)
                        ? f.CLICK
                        : this.isMoveInteraction(a)
                            ? f.MOVE
                            : f.POOR;
            }
            classifyKeyboardInteraction(r) {
                return r.events.length &gt;= this.MIN_KEYBOARD_EVENTS ? f.RICH : f.POOR;
            }
            classifyTouchInteraction(r) {
                return r.events.length &gt;= this.MIN_TOUCH_EVENTS ? f.RICH : f.POOR;
            }
            handleMouseInteraction(r, a) {
                const t = Date.now(), n = this.classifyMouseInteraction(r), e = this.getEnumKeyByValue(n);
                if (a.mouse.interactions.length &lt; this.MAX_INTERACTIONS_PER_TYPE)
                    return { shouldCollect: true, quality: e };
                if (n === f.RICH) {
                    const x = this.findOldestInteractionWithLowestQuality(a.mouse.interactions);
                    if (x !== -1)
                        return { shouldCollect: true, remove: { type: &#39;mouse&#39;, index: x }, quality: e };
                }
                const [o, s] = this.splitInteractionsByTime(a.mouse.interactions, t, 18e4);
                return o.length &lt; 2
                    ? this.handleOlderInteractions(s, e)
                    : this.handleRecentInteractions(o, s, n, e);
            }
            splitInteractionsByTime(r, a, c) {
                return r.reduce((t, n) =&gt; (n.epochTs &gt;= a - c ? t[0].push(n) : t[1].push(n), t), [[], []]);
            }
            handleOlderInteractions(r, a) {
                const c = this.findOldestInteractionWithLowestQuality(r);
                return c !== -1
                    ? { shouldCollect: true, remove: { type: &#39;mouse&#39;, index: c }, quality: a }
                    : { shouldCollect: false, quality: a };
            }
            handleRecentInteractions(r, a, c, t) {
                const n = this.findOldestInteractionWithLowestQuality(r, c);
                if (n !== -1) {
                    const e = r[n], o = this.client.getBehavioralData().mouse.interactions.indexOf(e), s = this.findOldestInteractionWithLowestQuality(a, f[this.client.getBehavioralData().mouse.interactions[o].quality]);
                    return s !== -1
                        ? { shouldCollect: true, remove: { type: &#39;mouse&#39;, index: s }, quality: t }
                        : { shouldCollect: true, remove: { type: &#39;mouse&#39;, index: o }, quality: t };
                }
                return { shouldCollect: false, quality: t };
            }
            handleKeyboardInteraction(r, a) {
                const t = Date.now(), n = this.classifyKeyboardInteraction(r), e = this.getEnumKeyByValue(n);
                if (a.keyboard.interactions.length &lt; this.MAX_INTERACTIONS_PER_TYPE)
                    return { shouldCollect: true, quality: e };
                if (n === f.RICH) {
                    const x = this.findOldestInteractionWithLowestQuality(a.keyboard.interactions);
                    if (x !== -1)
                        return { shouldCollect: true, remove: { type: &#39;keyboard&#39;, index: x }, quality: e };
                }
                const [o, s] = this.splitInteractionsByTime(a.keyboard.interactions, t, 18e4);
                return o.length &lt; 2
                    ? this.handleOlderInteractions(s, e)
                    : this.handleRecentInteractions(o, s, n, e);
            }
            handleTouchInteraction(r, a) {
                const t = Date.now(), n = this.classifyTouchInteraction(r), e = this.getEnumKeyByValue(n);
                if (a.touch.interactions.length &lt; this.MAX_INTERACTIONS_PER_TYPE)
                    return { shouldCollect: true, quality: e };
                if (n === f.RICH) {
                    const x = this.findOldestInteractionWithLowestQuality(a.touch.interactions);
                    if (x !== -1)
                        return { shouldCollect: true, remove: { type: &#39;touch&#39;, index: x }, quality: e };
                }
                const [o, s] = this.splitInteractionsByTime(a.touch.interactions, t, 18e4);
                return o.length &lt; 2
                    ? this.handleOlderInteractions(s, e)
                    : this.handleRecentInteractions(o, s, n, e);
            }
            calculateStrategyResult(r, a) {
                const c = this.client.getBehavioralData();
                switch (a) {
                    case &#39;mouse&#39;:
                        return this.handleMouseInteraction(r, c);
                    case &#39;keyboard&#39;:
                        return this.handleKeyboardInteraction(r, c);
                    case &#39;touch&#39;:
                        return this.handleTouchInteraction(r, c);
                    default:
                        throw new Error(`Unknown interaction type: ${a}`);
                }
            }
            getEnumKeyByValue(r) {
                return Object.keys(f).find((a) =&gt; f[a] === r);
            }
            findOldestInteractionWithLowestQuality(r, a) {
                let c = a != null ? a : f.RICH, t = -1, n = Number.MAX_SAFE_INTEGER;
                for (let e = 0; e &lt; r.length; e++) {
                    const o = f[r[e].quality];
                    (o &lt; c || (o === c &amp;&amp; r[e].epochTs &lt; n)) &amp;&amp; ((c = o), (n = r[e].epochTs), (t = e));
                }
                return t;
            }
        }
        l.PriorityStrategy = E;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        let f;
        (function (i) {
            ((i[(i.FIRST_INTERACTIONS = 0)] = &#39;FIRST_INTERACTIONS&#39;),
                (i[(i.PRIORITY_INTERACTIONS = 1)] = &#39;PRIORITY_INTERACTIONS&#39;));
        })((f = l.BufferingStrategyType || (l.BufferingStrategyType = {})));
        class E {
            static createBufferingStrategy(r, a) {
                switch (r) {
                    case f.FIRST_INTERACTIONS:
                        return new l.FirstInteractionsStrategy(a);
                    case f.PRIORITY_INTERACTIONS:
                        return new l.PriorityStrategy(a);
                }
            }
        }
        l.StrategyFactory = E;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.sessionData = i),
                    (this.instanceUUID = l._POSignalsUtils.Util.newGuid()),
                    (this._isBehavioralDataPaused = false),
                    (this.started = false),
                    (this.initQueue = new l.PromiseQueue(1)));
            }
            static instance() {
                if (!this._instance) {
                    const i = l._POSignalsStorage.SessionStorage.instance;
                    if (!document.body)
                        throw (l._POSignalsUtils.Logger.error(&#39;PingOne Signals can be started only after DOM Ready!&#39;),
                            new Error(&#39;PingOne Signals can be started only after DOM Ready!&#39;));
                    this._instance = new l.Client(i, l.BufferingStrategyType.PRIORITY_INTERACTIONS);
                }
                return this._instance;
            }
            async getData() {
                if (!this.startedPromise)
                    throw new Error(&#39;SDK not initialized&#39;);
                return (await this.startedPromise, await this.dataHandler.getData(Date.now()));
            }
            addTag(i, r) {
                l.Tags.instance.setTag(i, r);
            }
            async start(i = {}) {
                var r, a, c, t;
                if ((((r = i.waitForWindowLoad) !== null &amp;&amp; r !== void 0 ? r : true) &amp;&amp;
                    (await this.loadEventPromise()),
                    (this.initParams = i),
                    this.validateStartParams(i),
                    (this.clientVersion = l._POSignalsUtils.Constants.CLIENT_VERSION),
                    this.started)) {
                    l._POSignalsUtils.Logger.warn(&#39;SDK already initialized&#39;);
                    return;
                }
                ((this.browserInfo = new l._POSignalsUtils.BrowserInfo()),
                    (l._POSignalsUtils.Logger.isLogEnabled = !!i.consoleLogEnabled || !!i.devEnv),
                    l._POSignalsUtils.Logger.info(&#39;Starting Signals SDK...&#39;),
                    (l.Tags.instance.disableTags = !!this.initParams.disableTags),
                    this.sessionData.setStorageConfig(i));
                const e = l.PointerConfig.instance.pointerParams, o = {
                    additionalMediaCodecs: e.additionalMediaCodecs,
                    browserInfo: this.browserInfo,
                    fingerprintTimeoutMillis: e.fingerprintTimeoutMillis,
                    metadataBlackList: new Set(e.metadataBlackList.concat(i.deviceAttributesToIgnore)),
                    propertyDescriptors: e.propertyDescriptors,
                    webRtcUrl: e.webRtcUrl,
                    dataPoints: e.metadataDataPoints,
                };
                ((this.localAgentAccessor = new l._POSignalsMetadata.LocalAgentAccessor((a = i.agentPort) !== null &amp;&amp; a !== void 0
                    ? a
                    : l._POSignalsUtils.Constants.PINGID_AGENT_DEFAULT_PORT, (c = i.agentTimeout) !== null &amp;&amp; c !== void 0
                    ? c
                    : l._POSignalsUtils.Constants.PINGID_AGENT_DEFAULT_TIMEOUT)),
                    (this.metadata = new l._POSignalsMetadata.Metadata(this.sessionData, o, i.externalIdentifiers, this.localAgentAccessor)),
                    (this.dataHandler = new l.DataHandler(this.clientVersion, this.instanceUUID, this.initParams, this.metadata, this, this.sessionData)),
                    (!((t = this.initParams.behavioralDataCollection) !== null &amp;&amp; t !== void 0) || t) &amp;&amp;
                        this.refreshListening(),
                    i.lazyMetadata || (this.metadata.getDeviceAttributes(), this.metadata.getLocalAgentJwt()),
                    (this.started = true));
                try {
                    (this.logInit(), this.addStartupTags());
                }
                catch (s) {
                    l._POSignalsUtils.Logger.warn(&#39;SDK post init failed&#39;, s);
                }
            }
            logInit() {
                var i, r;
                l._POSignalsUtils.Logger.info(`PingOne Signals initialized. ${JSON.stringify({ timestamp: new Date().getTime(), sdkVersion: this.clientVersion, instanceUUID: this.instanceUUID, tabUUID: this.sessionData.tabUUID }, null, 2)}`);
                const a = () =&gt; l._POSignalsUtils.Logger.info(`Token Ready: ${window._pingOneSignalsToken}`), c = () =&gt; {
                    (l._POSignalsUtils.Logger.info(&#39;Signals token fetch is disabled&#39;),
                        (window._pingOneSignalsToken = void 0));
                }, t = &#39;uninitialized&#39;, n = &#39;skipped&#39;;
                (((i = window._pingOneSignalsToken) === null || i === void 0
                    ? void 0
                    : i.substring(0, n.length)) === n
                    ? c()
                    : ((r = window._pingOneSignalsToken) === null || r === void 0
                        ? void 0
                        : r.substring(0, t.length)) !== t &amp;&amp; a(),
                    document.addEventListener(&#39;PingOneSignalsTokenReadyEvent&#39;, a),
                    document.addEventListener(&#39;PingOneSignalsTokenSkippedEvent&#39;, c));
            }
            get isBehavioralDataPaused() {
                return this._isBehavioralDataPaused;
            }
            getSignalsToken() {
                let i = &#39;&#39;;
                if (typeof window._pingOneSignalsToken == &#39;string&#39; &amp;&amp;
                    0 &lt;= window._pingOneSignalsToken.indexOf(&#39;:&#39;)) {
                    const r = window._pingOneSignalsToken.match(/t:(.*?)(&amp;|$)/g);
                    r &amp;&amp; 0 &lt; r.length &amp;&amp; (i = r[0].replace(/&amp;s*$/, &#39;&#39;).replace(/t:/, &#39;&#39;));
                }
                else
                    typeof window._pingOneSignalsToken == &#39;string&#39; &amp;&amp; (i = window._pingOneSignalsToken);
                return i;
            }
            pauseBehavioralData() {
                this._isBehavioralDataPaused ||
                    ((this._isBehavioralDataPaused = true), this.addTag(&#39;SDK paused behaviorally&#39;));
            }
            resumeBehavioralData() {
                this._isBehavioralDataPaused &amp;&amp;
                    ((this._isBehavioralDataPaused = false), this.addTag(&#39;SDK resumed behaviorally&#39;));
            }
            async startSignals(i) {
                try {
                    return ((this.startedPromise = this.initQueue.add(() =&gt; this.start(i))),
                        await this.startedPromise);
                }
                catch (r) {
                    const a = {
                        id: l._POSignalsUtils.POErrorCodes.INITIALIZATION_ERROR,
                        message: r.message,
                        code: &#39;SDK initialization failed.&#39;,
                    };
                    throw new Error(JSON.stringify(a));
                }
            }
            validateStartParams(i) {
                if (!document.body)
                    throw (l._POSignalsUtils.Logger.error(&#39;PingOne Signals can be started only after DOM Ready!&#39;),
                        new Error(&#39;PingOne Signals can be started only after DOM Ready!&#39;));
                i.externalIdentifiers = i.externalIdentifiers || {};
            }
            async loadEventPromise() {
                return new Promise((i) =&gt; {
                    document.readyState === &#39;complete&#39;
                        ? i()
                        : window.addEventListener(&#39;load&#39;, (r) =&gt; {
                            i();
                        });
                });
            }
            addStartupTags() {
                (this.addTag(&#39;SDK started&#39;),
                    document.referrer &amp;&amp; this.addTag(&#39;referrer&#39;, document.referrer),
                    this.addTag(&#39;location&#39;, window.location.href));
            }
        }
        l.ClientBase = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.BEHAVIORAL_TYPE = &#39;indirect&#39;),
                    (this._isStarted = false),
                    (this._onClipboardEvent = new l.EventDispatcher()),
                    (this.delegate = i),
                    (this.onClipboardEventHandler = this.onEvent.bind(this)));
            }
            get isStarted() {
                return this._isStarted;
            }
            get onClipboardEvent() {
                return this._onClipboardEvent.asEvent();
            }
            onEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    this._onClipboardEvent.dispatch(this, this.createClipboardEvent(i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in clipboard handler&#39;, r);
                }
            }
            createClipboardEvent(i) {
                const r = l._POSignalsUtils.Util.getSrcElement(i);
                return {
                    category: &#39;ClipboardEvent&#39;,
                    type: i.type,
                    eventTs: i.timeStamp,
                    epochTs: new Date().getTime(),
                    additionalData: {
                        locationHref: location.href,
                        stId: this.delegate.getElementsStID(r),
                        elementId: r == null ? void 0 : r.id,
                    },
                };
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true),
                        this.delegate.addEventListener(document, &#39;cut&#39;, this.onClipboardEventHandler),
                        this.delegate.addEventListener(document, &#39;copy&#39;, this.onClipboardEventHandler),
                        this.delegate.addEventListener(document, &#39;paste&#39;, this.onClipboardEventHandler));
            }
            stop() {
                this._isStarted &amp;&amp;
                    ((this._isStarted = false),
                        document.removeEventListener(&#39;cut&#39;, this.onClipboardEventHandler),
                        document.removeEventListener(&#39;copy&#39;, this.onClipboardEventHandler),
                        document.removeEventListener(&#39;paste&#39;, this.onClipboardEventHandler));
            }
        }
        l.ClipboardEvents = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.BEHAVIORAL_TYPE = &#39;indirect&#39;),
                    (this._isStarted = false),
                    (this._onDragEvent = new l.EventDispatcher()),
                    (this.delegate = i),
                    (this.onDragEventHandler = this.onEvent.bind(this)));
            }
            get isStarted() {
                return this._isStarted;
            }
            get onDragEvent() {
                return this._onDragEvent.asEvent();
            }
            createDragEvent(i) {
                return {
                    category: &#39;DragEvent&#39;,
                    type: i.type,
                    eventTs: i.timeStamp,
                    epochTs: new Date().getTime(),
                    additionalData: { locationHref: location.href },
                };
            }
            onEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    this._onDragEvent.dispatch(this, this.createDragEvent(i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in drag handler&#39;, r);
                }
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true),
                        this.delegate.addEventListener(document, &#39;dragstart&#39;, this.onDragEventHandler),
                        this.delegate.addEventListener(document, &#39;dragexit&#39;, this.onDragEventHandler),
                        this.delegate.addEventListener(document, &#39;drop&#39;, this.onDragEventHandler),
                        this.delegate.addEventListener(document, &#39;dragend&#39;, this.onDragEventHandler));
            }
            stop() {
                this._isStarted &amp;&amp;
                    ((this._isStarted = false),
                        document.removeEventListener(&#39;dragstart&#39;, this.onDragEventHandler),
                        document.removeEventListener(&#39;dragexit&#39;, this.onDragEventHandler),
                        document.removeEventListener(&#39;drop&#39;, this.onDragEventHandler),
                        document.removeEventListener(&#39;dragend&#39;, this.onDragEventHandler));
            }
        }
        l.DragEvents = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.BEHAVIORAL_TYPE = &#39;indirect&#39;),
                    (this._isStarted = false),
                    (this._onFocusEvent = new l.EventDispatcher()),
                    (this.delegate = i),
                    (this.onFocusEventHandler = this.onEvent.bind(this)));
            }
            get isStarted() {
                return this._isStarted;
            }
            get onFocusEvent() {
                return this._onFocusEvent.asEvent();
            }
            getRelatedTarget(i) {
                if (!i.relatedTarget)
                    return { type: &#39;&#39;, stId: &#39;&#39;, elementId: &#39;&#39; };
                const r = {
                    type: l._POSignalsUtils.Util.getObjectType(i.relatedTarget),
                    stId: &#39;&#39;,
                    elementId: &#39;&#39;,
                };
                i.relatedTarget.id &amp;&amp; (r.elementId = i.relatedTarget.id);
                try {
                    const a = i.relatedTarget;
                    r.stId = this.delegate.getElementsStID(a);
                }
                catch { }
                return r;
            }
            createFocusEvent(i) {
                const r = l._POSignalsUtils.Util.getSrcElement(i), a = this.getRelatedTarget(i);
                return {
                    category: &#39;FocusEvent&#39;,
                    type: i.type,
                    eventTs: i.timeStamp,
                    epochTs: new Date().getTime(),
                    additionalData: {
                        locationHref: location.href,
                        stId: this.delegate.getElementsStID(r),
                        elementId: r ? r.id : &#39;&#39;,
                        relatedTarget: a,
                    },
                };
            }
            onEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    this._onFocusEvent.dispatch(this, this.createFocusEvent(i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in focus handler&#39;, r);
                }
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true),
                        this.delegate.addEventListener(document, &#39;DOMFocusIn&#39;, this.onFocusEventHandler),
                        this.delegate.addEventListener(document, &#39;DOMFocusOut&#39;, this.onFocusEventHandler),
                        this.delegate.addEventListener(document, &#39;focus&#39;, this.onFocusEventHandler),
                        this.delegate.addEventListener(document, &#39;focusin&#39;, this.onFocusEventHandler),
                        this.delegate.addEventListener(document, &#39;focusout&#39;, this.onFocusEventHandler));
            }
            stop() {
                this._isStarted &amp;&amp;
                    ((this._isStarted = false),
                        document.removeEventListener(&#39;DOMFocusIn&#39;, this.onFocusEventHandler),
                        document.removeEventListener(&#39;DOMFocusOut&#39;, this.onFocusEventHandler),
                        document.removeEventListener(&#39;focus&#39;, this.onFocusEventHandler),
                        document.removeEventListener(&#39;focusin&#39;, this.onFocusEventHandler),
                        document.removeEventListener(&#39;focusout&#39;, this.onFocusEventHandler));
            }
        }
        l.FocusEvents = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.BEHAVIORAL_TYPE = &#39;indirect&#39;),
                    (this._isStarted = false),
                    (this._onUIEvent = new l.EventDispatcher()),
                    (this.delegate = i),
                    (this.onUIEventHandler = this.onEvent.bind(this)));
            }
            get isStarted() {
                return this._isStarted;
            }
            get onUIEvent() {
                return this._onUIEvent.asEvent();
            }
            createUIEvent(i) {
                return {
                    category: &#39;UIEvent&#39;,
                    type: i.type,
                    eventTs: i.timeStamp,
                    epochTs: new Date().getTime(),
                    additionalData: { locationHref: location.href },
                };
            }
            onEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    this._onUIEvent.dispatch(this, this.createUIEvent(i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in UIEvent handler&#39;, r);
                }
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true),
                        this.delegate.addEventListener(document, &#39;resize&#39;, this.onUIEventHandler),
                        this.delegate.addEventListener(document, &#39;scroll&#39;, this.onUIEventHandler),
                        this.delegate.addEventListener(document, &#39;select&#39;, this.onUIEventHandler));
            }
            stop() {
                this._isStarted &amp;&amp;
                    ((this._isStarted = false),
                        document.removeEventListener(&#39;resize&#39;, this.onUIEventHandler),
                        document.removeEventListener(&#39;scroll&#39;, this.onUIEventHandler),
                        document.removeEventListener(&#39;select&#39;, this.onUIEventHandler));
            }
        }
        l.UIEvents = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.BEHAVIORAL_TYPE = &#39;indirect&#39;),
                    (this.visibilityChangeEventName = &#39;visibilitychange&#39;),
                    (this.hiddenProperty = &#39;hidden&#39;),
                    (this._isStarted = false),
                    (this._onGeneralEvent = new l.EventDispatcher()),
                    (this.delegate = i),
                    (this.onGeneralEventHandler = this.onEvent.bind(this)),
                    (this.onLangChangeHandler = this.onLangChangeEvent.bind(this)),
                    (this.onOrientationChangeHandler = this.onOrientationChangeEvent.bind(this)),
                    (this.onVisibilityChangeHandler = this.onVisibilityChangeEvent.bind(this)),
                    typeof document.msHidden != &#39;undefined&#39;
                        ? ((this.hiddenProperty = &#39;msHidden&#39;),
                            (this.visibilityChangeEventName = &#39;msvisibilitychange&#39;))
                        : typeof document.webkitHidden != &#39;undefined&#39; &amp;&amp;
                            ((this.hiddenProperty = &#39;webkitHidden&#39;),
                                (this.visibilityChangeEventName = &#39;webkitvisibilitychange&#39;)));
            }
            get isStarted() {
                return this._isStarted;
            }
            get onGeneralEvent() {
                return this._onGeneralEvent.asEvent();
            }
            onEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    this._onGeneralEvent.dispatch(this, this.createGeneralEvent(i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in general event handler&#39;, r);
                }
            }
            onLangChangeEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    const r = this.createGeneralEvent(i);
                    this._onGeneralEvent.dispatch(this, r);
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in LangChange event handler&#39;, r);
                }
            }
            onOrientationChangeEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    const r = this.createGeneralEvent(i), a = l._POSignalsUtils.Util.getDeviceOrientation();
                    ((r.additionalData.deviceOrientation = a.orientation),
                        (r.additionalData.deviceAngle = a.angle),
                        this._onGeneralEvent.dispatch(this, r));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in OrientationChange event handler&#39;, r);
                }
            }
            onVisibilityChangeEvent(i) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))
                        return;
                    const r = this.createGeneralEvent(i);
                    ((r.additionalData.hidden = !!document[this.hiddenProperty]),
                        document.visibilityState &amp;&amp;
                            (r.additionalData.visibilityState = document.visibilityState.toString()),
                        this._onGeneralEvent.dispatch(this, r));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;error in VisibilityChange event handler&#39;, r);
                }
            }
            createGeneralEvent(i) {
                return {
                    category: &#39;Event&#39;,
                    type: i.type,
                    eventTs: i.timeStamp,
                    epochTs: new Date().getTime(),
                    additionalData: { locationHref: location.href },
                };
            }
            start() {
                this._isStarted ||
                    ((this._isStarted = true),
                        this.delegate.addEventListener(document, this.visibilityChangeEventName, this.onVisibilityChangeHandler),
                        this.delegate.addEventListener(document, &#39;change&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;fullscreenchange&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;invalid&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(window, &#39;languagechange&#39;, this.onLangChangeHandler),
                        this.delegate.addEventListener(window, &#39;orientationchange&#39;, this.onOrientationChangeHandler),
                        this.delegate.addEventListener(document, &#39;seeked&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;seeking&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;selectstart&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;selectionchange&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;submit&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;volumechange&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;reset&#39;, this.onGeneralEventHandler),
                        this.delegate.addEventListener(document, &#39;textInput&#39;, this.onGeneralEventHandler));
            }
            stop() {
                this._isStarted &amp;&amp;
                    ((this._isStarted = false),
                        document.removeEventListener(this.visibilityChangeEventName, this.onVisibilityChangeHandler),
                        document.removeEventListener(&#39;change&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;fullscreenchange&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;invalid&#39;, this.onGeneralEventHandler),
                        window.removeEventListener(&#39;languagechange&#39;, this.onLangChangeHandler),
                        window.removeEventListener(&#39;orientationchange&#39;, this.onOrientationChangeHandler),
                        document.removeEventListener(&#39;seeked&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;seeking&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;selectstart&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;selectionchange&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;submit&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;volumechange&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;reset&#39;, this.onGeneralEventHandler),
                        document.removeEventListener(&#39;textInput&#39;, this.onGeneralEventHandler));
            }
        }
        l.GeneralEvents = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.DEFAULT_INDIRECT_IDLE_INTERVAL = 1e3),
                    (this.MAX_INDIRECT_EVENTS = 25),
                    (this._onIndirect = new l.EventDispatcher()),
                    (this.indirectEvents = []),
                    (this.idleTimeInMillis = this.DEFAULT_INDIRECT_IDLE_INTERVAL),
                    (this.lastIndirectEventTimestamp = 0),
                    (this._isStarted = false),
                    (this.clipboardEvents = new l.ClipboardEvents(i)),
                    this.clipboardEvents.onClipboardEvent.subscribe(this.handleEvent.bind(this)),
                    (this.dragEvents = new l.DragEvents(i)),
                    this.dragEvents.onDragEvent.subscribe(this.handleEvent.bind(this)),
                    (this.focusEvents = new l.FocusEvents(i)),
                    this.focusEvents.onFocusEvent.subscribe(this.handleEvent.bind(this)),
                    (this.uiEvents = new l.UIEvents(i)),
                    this.uiEvents.onUIEvent.subscribe(this.handleEvent.bind(this)),
                    (this.generalEvents = new l.GeneralEvents(i)),
                    this.generalEvents.onGeneralEvent.subscribe(this.handleEvent.bind(this)),
                    (this.onTimeElapsedHandler = this.onTimeElapsed.bind(this)));
            }
            get onIndirect() {
                return this._onIndirect.asEvent();
            }
            async onTimeElapsed() {
                this.indirectEvents.length &gt; 0 &amp;&amp;
                    new Date().getTime() - this.lastIndirectEventTimestamp &gt;= this.idleTimeInMillis &amp;&amp;
                    this.dispatch();
            }
            handleEvent(i, r) {
                ((this.lastIndirectEventTimestamp = new Date().getTime()), this.pushEvent(r));
            }
            pushEvent(i) {
                (this.indirectEvents.push(i),
                    this.indirectEvents.length &gt;= this.MAX_INDIRECT_EVENTS &amp;&amp; this.dispatch());
            }
            clearBuffer() {
                const i = { events: this.indirectEvents };
                return ((this.indirectEvents = []), i);
            }
            dispatch() {
                try {
                    (clearInterval(this.updateIntervalHandle),
                        this._onIndirect.dispatch(this, this.clearBuffer()),
                        (this.updateIntervalHandle = setInterval(this.onTimeElapsedHandler, l.PointerConfig.instance.pointerParams.indirectIntervalMillis)));
                }
                catch (i) {
                    l._POSignalsUtils.Logger.warn(&#39;Failed to dispatch indirect events&#39;, i);
                }
            }
            get isStarted() {
                return this._isStarted;
            }
            start() {
                this._isStarted ||
                    ((this.updateIntervalHandle = setInterval(this.onTimeElapsedHandler, l.PointerConfig.instance.pointerParams.indirectIntervalMillis)),
                        this.clipboardEvents.start(),
                        this.dragEvents.start(),
                        this.focusEvents.start(),
                        this.uiEvents.start(),
                        this.generalEvents.start(),
                        (this._isStarted = true));
            }
            stop() {
                this._isStarted &amp;&amp;
                    (this.clipboardEvents.stop(),
                        this.dragEvents.stop(),
                        this.focusEvents.stop(),
                        this.uiEvents.stop(),
                        this.generalEvents.stop(),
                        clearInterval(this.updateIntervalHandle),
                        (this.updateIntervalHandle = null),
                        (this._isStarted = false));
            }
            unsubscribe() {
                (this.clipboardEvents.onClipboardEvent.unsubscribe(this.handleEvent.bind(this)),
                    this.dragEvents.onDragEvent.unsubscribe(this.handleEvent.bind(this)),
                    this.focusEvents.onFocusEvent.unsubscribe(this.handleEvent.bind(this)),
                    this.uiEvents.onUIEvent.unsubscribe(this.handleEvent.bind(this)),
                    this.generalEvents.onGeneralEvent.unsubscribe(this.handleEvent.bind(this)));
            }
        }
        l.IndirectClient = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor() {
                ((this.config = {}), (this._cacheHash = 0), (this.cache = new Map()));
            }
            refreshCssSelectors(i) {
                try {
                    if (!i)
                        return;
                    const r = l._POSignalsUtils.Util.hashCode(JSON.stringify(i));
                    if (this._cacheHash === r)
                        return;
                    ((this.config = i), (this._cacheHash = r), (this.cache = new Map()));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;Failed to set css selectors&#39;, r);
                }
            }
            getIdentification(i, r) {
                if (this.cache.get(i) === null)
                    return null;
                if (this.cache.get(i) !== void 0)
                    return this.cache.get(i);
                for (const a in this.config)
                    try {
                        if (!this.config.hasOwnProperty(a))
                            continue;
                        let c = this.config[a] || [];
                        l._POSignalsUtils.Util.isArray(c) || (c = [].concat(c));
                        for (const t of c)
                            if (l._POSignalsUtils.Util.isSelectorMatches(i, t, r))
                                return (this.cache.set(i, a), a);
                    }
                    catch (c) {
                        l._POSignalsUtils.Logger.warn(`Failed to find selector for ${a}`, c);
                    }
                return (this.cache.set(i, null), null);
            }
            get cacheHash() {
                return this._cacheHash;
            }
        }
        l.ElementsIdentifications = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        const f = &#39;keydown&#39;, E = &#39;keyup&#39;, i = &#39;blur&#39;, r = &#39;focus&#39;;
        class c {
            get isStarted() {
                return this._isStarted;
            }
            get onInteraction() {
                return this._onInteraction.asEvent();
            }
            get onEnterPress() {
                return this._onEnterPress.asEvent();
            }
            get onObfuscatedValue() {
                return this._onObfuscatedValue.asEvent();
            }
            refreshKeyboardCssSelectors(n) {
                this._fieldsIdentifications.refreshCssSelectors(n);
            }
            get modifiersKeys() {
                return [
                    &#39;Alt&#39;,
                    &#39;AltGraph&#39;,
                    &#39;CapsLock&#39;,
                    &#39;Control&#39;,
                    &#39;Fn&#39;,
                    &#39;FnLock&#39;,
                    &#39;Hyper&#39;,
                    &#39;Meta&#39;,
                    &#39;NumLock&#39;,
                    &#39;OS&#39;,
                    &#39;ScrollLock&#39;,
                    &#39;Shift&#39;,
                    &#39;Super&#39;,
                    &#39;Symbol&#39;,
                    &#39;SymbolLock&#39;,
                ];
            }
            get specialKeys() {
                return [
                    &#39;Tab&#39;,
                    &#39;Shift&#39;,
                    &#39;Backspace&#39;,
                    &#39;Enter&#39;,
                    &#39;CapsLock&#39;,
                    &#39;Meta&#39;,
                    &#39;Delete&#39;,
                    &#39;Alt&#39;,
                    &#39;ArrowDown&#39;,
                    &#39;ArrowUp&#39;,
                    &#39;Control&#39;,
                    &#39;ArrowLeft&#39;,
                    &#39;End&#39;,
                    &#39;Unidentified&#39;,
                    &#39;Home&#39;,
                    &#39;ArrowRight&#39;,
                    &#39;Insert&#39;,
                    &#39;Pause&#39;,
                    &#39;PageDown&#39;,
                    &#39;PageUp&#39;,
                    &#39;F1&#39;,
                    &#39;F2&#39;,
                    &#39;F3&#39;,
                    &#39;F4&#39;,
                    &#39;F5&#39;,
                    &#39;F6&#39;,
                    &#39;F7&#39;,
                    &#39;F8&#39;,
                    &#39;F9&#39;,
                    &#39;F10&#39;,
                    &#39;F11&#39;,
                    &#39;F12&#39;,
                    &#39;AltGraph&#39;,
                    &#39;Escape&#39;,
                ];
            }
            constructor(n, e) {
                ((this.BEHAVIORAL_TYPE = &#39;eventKeyboard&#39;),
                    (this._isStarted = false),
                    (this._onInteraction = new l.EventDispatcher()),
                    (this._onEnterPress = new l.EventDispatcher()),
                    (this._onObfuscatedValue = new l.EventDispatcher()),
                    (this.interactionsMap = new Map()),
                    (this._fieldsIdentifications = new l.ElementsIdentifications()),
                    (this.keyStrokeMap = new Map()),
                    (this.delegate = n),
                    (this.uiControlManager = e),
                    (this.onKeyDownHandle = this.onKeyDown.bind(this)),
                    (this.onKeyUpHandle = this.onKeyUp.bind(this)),
                    (this.onFocusHandle = this.onFocus.bind(this)),
                    (this.onBlurHandle = this.onBlur.bind(this)));
            }
            countEvent(n, e) {
                e &amp;&amp; (e.eventCounters[n] = (e.eventCounters[n] || 0) + 1);
            }
            clearBuffer() {
                const n = l._POSignalsUtils.Util.getValuesOfMap(this.interactionsMap);
                return (this.interactionsMap.clear(), n);
            }
            start() {
                this._isStarted
                    ? l._POSignalsUtils.Logger.debug(&#39;Desktop Keyboard events already listening&#39;)
                    : (this.delegate.addEventListener(document, f, this.onKeyDownHandle),
                        this.delegate.addEventListener(document, E, this.onKeyUpHandle),
                        this.delegate.addEventListener(document, r, this.onFocusHandle, true),
                        this.delegate.addEventListener(document, i, this.onBlurHandle, true),
                        (this._isStarted = true),
                        l._POSignalsUtils.Logger.debug(&#39;Desktop Keyboard events start listening...&#39;));
            }
            stop() {
                this._isStarted
                    ? (document.removeEventListener(f, this.onKeyDownHandle),
                        document.removeEventListener(E, this.onKeyUpHandle),
                        document.removeEventListener(r, this.onFocusHandle, true),
                        document.removeEventListener(i, this.onBlurHandle, true),
                        (this._isStarted = false),
                        l._POSignalsUtils.Logger.debug(&#39;Desktop Keyboard events stop listening...&#39;))
                    : l._POSignalsUtils.Logger.debug(&#39;Desktop Keyboard events already stopped&#39;);
            }
            getInteractionFromElement(n) {
                var e;
                let o = null, s = null;
                const x = l._POSignalsUtils.Util.getSrcElement(n);
                if (x &amp;&amp;
                    x instanceof HTMLInputElement &amp;&amp;
                    !l._POSignalsUtils.Util.isClickableInput(x) &amp;&amp;
                    l._POSignalsUtils.Util.isFunction(x.getAttribute) &amp;&amp;
                    !(!((e = x.hasAttribute) === null || e === void 0) &amp;&amp; e.call(x, &#39;data-st-ignore&#39;)) &amp;&amp;
                    !l._POSignalsUtils.Util.anySelectorMatches(x, l.PointerConfig.instance.pointerParams.keyboardCssSelectorsBlacklist, 0)) {
                    s = this.delegate.getElementsStID(x);
                    const m = l.PointerConfig.instance.pointerParams.keyboardIdentifierAttributes;
                    for (let p = 0; p &lt; m.length &amp;&amp; !s; p++)
                        s = x.getAttribute(m[p]);
                    s &amp;&amp;
                        !l.PointerConfig.instance.pointerParams.keyboardFieldBlackList.has(s) &amp;&amp;
                        ((o = this.interactionsMap.get(x)),
                            o ||
                                ((o = {
                                    epochTs: Date.now(),
                                    stId: s,
                                    elementId: l._POSignalsUtils.Util.getAttribute(x, &#39;id&#39;),
                                    name: l._POSignalsUtils.Util.getAttribute(x, &#39;name&#39;),
                                    type: l._POSignalsUtils.Util.getAttribute(x, &#39;type&#39;),
                                    events: [],
                                    counter: this.delegate.keyboardCounter,
                                    eventCounters: { epochTs: Date.now() },
                                    duration: 0,
                                    numOfDeletions: 0,
                                    additionalData: this.delegate.additionalData,
                                    quality: &#39;&#39;,
                                }),
                                    this.interactionsMap.set(x, o)));
                }
                return o;
            }
            getKeyCode(n) {
                return n.keyCode
                    ? n.keyCode
                    : n.which
                        ? n.which
                        : n.code
                            ? l._POSignalsUtils.Util.hashCode(n.code)
                            : l._POSignalsUtils.Util.hashCode(n.key) + (n.location || 0);
            }
            getKeyboardEvent(n) {
                return n || window.event;
            }
            getKeystrokeId(n, e) {
                const o = this.getKeyCode(n);
                let s;
                return (e === E &amp;&amp;
                    (this.keyStrokeMap.has(o)
                        ? ((s = this.keyStrokeMap.get(o)), this.keyStrokeMap.delete(o))
                        : (s = l._POSignalsUtils.Util.newGuid())),
                    e === f &amp;&amp;
                        (this.keyStrokeMap.has(o) &amp;&amp; n.repeat
                            ? (s = this.keyStrokeMap.get(o))
                            : ((s = l._POSignalsUtils.Util.newGuid()), this.keyStrokeMap.set(o, s))),
                    s);
            }
            createKeyboardInteractionEvent(n, e) {
                const o = l._POSignalsUtils.Util.getSrcElement(e), s = o.value ? o.value.toString().length : 0;
                return {
                    type: n,
                    eventTs: e.timeStamp,
                    epochTs: Date.now(),
                    selectionStart: l._POSignalsUtils.Util.getElementSelectionStart(o),
                    selectionEnd: l._POSignalsUtils.Util.getElementSelectionEnd(o),
                    key: e.key,
                    keystrokeId: null,
                    currentLength: s,
                };
            }
            enrichKeyboardEvent(n, e) {
                ((this.modifiersKeys.indexOf(n.key) &gt;= 0 || this.specialKeys.indexOf(n.key) &gt;= 0) &amp;&amp;
                    (e.key = n.key),
                    (e.keystrokeId = this.getKeystrokeId(n, e.type)));
                const o = l._POSignalsUtils.Util.getSrcElement(n);
                e.currentLength = String(o.value).length;
            }
            onFocus(n) {
                var e, o;
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE)) {
                        this._onInteraction.dispatch(this, null);
                        return;
                    }
                    n = this.getKeyboardEvent(n);
                    const s = this.getInteractionFromElement(n);
                    if ((this.countEvent(n.type, s),
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(n.type)))
                        return;
                    if (s) {
                        const x = this.createKeyboardInteractionEvent(r, n);
                        s.events.push(x);
                        const m = this.uiControlManager.createUIControlData(n);
                        m &amp;&amp;
                            ((s.uiControl = { uiElement: m.uiElement, enrichedData: m.enrichedData }),
                                ((o = (e = m.uiElement) === null || e === void 0 ? void 0 : e.id) === null ||
                                    o === void 0
                                    ? void 0
                                    : o.length) &gt; 0 &amp;&amp;
                                    l._POSignalsUtils.Logger.info(`Typing in element with id &#39;${m.uiElement.id}&#39;`));
                    }
                }
                catch (s) {
                    l._POSignalsUtils.Logger.warn(&#39;error in keyboard focus handler&#39;, s);
                }
            }
            onKeyUp(n) {
                try {
                    if (((n = this.getKeyboardEvent(n)),
                        (n.keyCode === 13 || n.which === 13) &amp;&amp;
                            this._onEnterPress.dispatch(this, l._POSignalsUtils.Util.getSrcElement(n)),
                        !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE))) {
                        this._onInteraction.dispatch(this, null);
                        return;
                    }
                    const e = this.getInteractionFromElement(n);
                    if ((this.countEvent(n.type, e),
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(n.type)))
                        return;
                    if (e) {
                        const o = this.createKeyboardInteractionEvent(E, n);
                        (this.enrichKeyboardEvent(n, o), e.events.push(o));
                    }
                    else
                        this.keyStrokeMap.delete(this.getKeyCode(n));
                }
                catch (e) {
                    l._POSignalsUtils.Logger.warn(&#39;error in keyUp handler&#39;, e);
                }
            }
            isEmpty() {
                return this.interactionsMap.size === 0;
            }
            onKeyDown(n) {
                try {
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE)) {
                        this._onInteraction.dispatch(this, null);
                        return;
                    }
                    n = this.getKeyboardEvent(n);
                    const e = this.getInteractionFromElement(n);
                    if ((this.countEvent(n.type, e),
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(n.type)))
                        return;
                    if (e) {
                        const o = this.createKeyboardInteractionEvent(f, n);
                        (this.enrichKeyboardEvent(n, o), e.events.push(o));
                    }
                }
                catch (e) {
                    l._POSignalsUtils.Logger.warn(&#39;error in keyDown handler&#39;, e);
                }
            }
            onBlur(n) {
                try {
                    n = this.getKeyboardEvent(n);
                    const e = this.getInteractionFromElement(n);
                    if (!this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE)) {
                        this._onInteraction.dispatch(this, null);
                        return;
                    }
                    if ((this.countEvent(n.type, e),
                        l.PointerConfig.instance.pointerParams.eventsToIgnore.has(n.type)))
                        return;
                    if (e) {
                        const o = this.createKeyboardInteractionEvent(i, n);
                        (e.events.push(o),
                            (e.duration = this.delegate.getInteractionDuration(e.events)),
                            (e.numOfDeletions = this.calculateNumOfDeletions(e.events)));
                        const s = l._POSignalsUtils.Util.getSrcElement(n);
                        (this.interactionsMap.delete(s), this._onInteraction.dispatch(this, e));
                    }
                }
                catch (e) {
                    l._POSignalsUtils.Logger.warn(&#39;error in blur handler&#39;, e);
                }
            }
            calculateNumOfDeletions(n) {
                if (!(n != null &amp;&amp; n[0]))
                    return 0;
                let e = 0, o = n[0].currentLength;
                for (let s = 1; s &lt; n.length; s++)
                    (n[s].currentLength &lt; o &amp;&amp; e++, (o = n[s].currentLength));
                return e;
            }
            get fieldsIdentifications() {
                return this._fieldsIdentifications;
            }
        }
        l.Keyboard = c;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i, r) {
                var a;
                const c = l.PointerConfig.instance.pointerParams.uiModelingElementFilters, t = l._POSignalsUtils.Util.getAttribute, n = (a = i.getBoundingClientRect) === null || a === void 0 ? void 0 : a.call(i);
                ((this._htmlElement = i),
                    (this._data = {
                        location: this.getUIElementAttribute(c.location, () =&gt; window.location.href),
                        id: this.getUIElementAttribute(c.id, () =&gt; t(i, &#39;id&#39;)),
                        aria_label: this.getUIElementAttribute(c.aria_label, () =&gt; t(i, &#39;aria-label&#39;)),
                        data_st_field: this.getUIElementAttribute(c.data_st_field, () =&gt; r.getElementsStID(i)),
                        data_st_tag: this.getUIElementAttribute(c.data_st_tag, () =&gt; t(i, &#39;data-st-tag&#39;)),
                        data_selenium: this.getUIElementAttribute(c.data_selenium, () =&gt; t(i, &#39;data-selenium&#39;)),
                        data_selenium_id: this.getUIElementAttribute(c.data_selenium_id, () =&gt; t(i, &#39;data-selenium-id&#39;)),
                        data_testid: this.getUIElementAttribute(c.data_testid, () =&gt; t(i, &#39;data-testid&#39;)),
                        data_test_id: this.getUIElementAttribute(c.data_test_id, () =&gt; t(i, &#39;data-test-id&#39;)),
                        data_qa_id: this.getUIElementAttribute(c.data_qa_id, () =&gt; t(i, &#39;data-qa-id&#39;)),
                        data_id: this.getUIElementAttribute(c.data_id, () =&gt; t(i, &#39;data-id&#39;)),
                        name: this.getUIElementAttribute(c.name, () =&gt; t(i, &#39;name&#39;)),
                        placeholder: this.getUIElementAttribute(c.placeholder, () =&gt; t(i, &#39;placeholder&#39;)),
                        role: this.getUIElementAttribute(c.role, () =&gt; t(i, &#39;role&#39;)),
                        type: this.getUIElementAttribute(c.type, () =&gt; t(i, &#39;type&#39;)),
                        nodeTypeInt: this.getUIElementAttribute(c.nodeTypeInt, () =&gt; i.nodeType),
                        nodeName: this.getUIElementAttribute(c.nodeName, () =&gt; i.nodeName),
                        cursorType: this.getUIElementAttribute(c.cursorType, () =&gt; window.getComputedStyle(i).cursor),
                        text: this.getUIElementAttribute(c.text, () =&gt; this.getElementText(i)),
                        textLength: this.getUIElementAttribute(c.textLength, () =&gt; {
                            var e;
                            return (((e = this.getElementText(i)) === null || e === void 0 ? void 0 : e.length) || null);
                        }),
                        bottom: this.getUIElementAttribute(c.bottom, () =&gt; (n == null ? void 0 : n.bottom)),
                        height: this.getUIElementAttribute(c.height, () =&gt; (n == null ? void 0 : n.height)),
                        left: this.getUIElementAttribute(c.left, () =&gt; (n == null ? void 0 : n.left)),
                        right: this.getUIElementAttribute(c.right, () =&gt; (n == null ? void 0 : n.right)),
                        top: this.getUIElementAttribute(c.top, () =&gt; (n == null ? void 0 : n.top)),
                        width: this.getUIElementAttribute(c.width, () =&gt; (n == null ? void 0 : n.width)),
                        x: this.getUIElementAttribute(c.x, () =&gt; (n == null ? void 0 : n.x)),
                        y: this.getUIElementAttribute(c.y, () =&gt; (n == null ? void 0 : n.y)),
                    }),
                    (this._data.elementId = this.getStrongestElementID()));
            }
            get data() {
                return l._POSignalsUtils.Util.filterReduce(this._data, (i) =&gt; i != null &amp;&amp; i !== &#39;&#39;);
            }
            get htmlElement() {
                return this._htmlElement;
            }
            getUIElementAttribute(i, r) {
                var a;
                try {
                    if (!((a = i == null ? void 0 : i.enabled) !== null &amp;&amp; a !== void 0) || a) {
                        let c = r();
                        return (typeof c == &#39;string&#39; &amp;&amp;
                            (typeof (i == null ? void 0 : i.maxLength) == &#39;number&#39; &amp;&amp;
                                c.length &gt; i.maxLength &amp;&amp;
                                (c = c.substring(0, i.maxLength)),
                                i != null &amp;&amp; i.filterRegex &amp;&amp; (c = c.replace(new RegExp(i.filterRegex, &#39;g&#39;), &#39;*&#39;))),
                            c);
                    }
                }
                catch (c) {
                    l._POSignalsUtils.Logger.warn(&#39;Failed to add ui element attribute&#39;, c);
                }
                return null;
            }
            getStrongestElementID() {
                return (this._data.data_st_field ||
                    this._data.data_selenium_id ||
                    this._data.data_selenium ||
                    this._data.data_testid ||
                    this._data.data_test_id ||
                    this._data.data_qa_id ||
                    this._data.data_id ||
                    this._data.id ||
                    &#39;&#39;);
            }
            getElementText(i) {
                return i instanceof HTMLInputElement &amp;&amp; !l._POSignalsUtils.Util.isClickableInput(i)
                    ? null
                    : l._POSignalsUtils.Util.getElementText(i);
            }
            equals(i) {
                return !(!i ||
                    (i.location &amp;&amp; location.href.indexOf(i.location) &lt; 0) ||
                    (i.elementId &amp;&amp; i.elementId !== this._data.elementId) ||
                    (i.id &amp;&amp; i.id !== this._data.id) ||
                    (i.aria_label &amp;&amp; i.aria_label !== this._data.aria_label) ||
                    (i.data_st_field &amp;&amp; i.data_st_field !== this._data.data_st_field) ||
                    (i.data_st_tag &amp;&amp; i.data_st_tag !== this._data.data_st_tag) ||
                    (i.data_selenium &amp;&amp; i.data_selenium !== this._data.data_selenium) ||
                    (i.data_selenium_id &amp;&amp; i.data_selenium_id !== this._data.data_selenium_id) ||
                    (i.data_testid &amp;&amp; i.data_testid !== this._data.data_testid) ||
                    (i.data_test_id &amp;&amp; i.data_test_id !== this._data.data_test_id) ||
                    (i.data_qa_id &amp;&amp; i.data_qa_id !== this._data.data_qa_id) ||
                    (i.data_id &amp;&amp; i.data_id !== this._data.data_id) ||
                    (i.name &amp;&amp; i.name !== this._data.name) ||
                    (i.placeholder &amp;&amp; i.placeholder !== this._data.placeholder) ||
                    (i.role &amp;&amp; i.role !== this._data.role) ||
                    (i.type &amp;&amp; i.type !== this._data.type) ||
                    (i.nodeTypeInt &amp;&amp; i.nodeTypeInt !== this._data.nodeTypeInt) ||
                    (i.nodeName &amp;&amp; i.nodeName !== this._data.nodeName) ||
                    (i.cursorType &amp;&amp; i.cursorType !== this._data.cursorType) ||
                    (i.text &amp;&amp; i.text !== this._data.text) ||
                    (i.textLength &amp;&amp; i.textLength !== this._data.textLength) ||
                    (i.bottom &amp;&amp; i.bottom !== this._data.bottom) ||
                    (i.height &amp;&amp; i.height !== this._data.height) ||
                    (i.left &amp;&amp; i.left !== this._data.left) ||
                    (i.right &amp;&amp; i.right !== this._data.right) ||
                    (i.top &amp;&amp; i.top !== this._data.top) ||
                    (i.width &amp;&amp; i.width !== this._data.width) ||
                    (i.x &amp;&amp; i.x !== this._data.x) ||
                    (i.y &amp;&amp; i.y !== this._data.y));
            }
            static createCssSelector(i) {
                let r = &#39;&#39;;
                return (i != null &amp;&amp; i.nodeName &amp;&amp; (r += i.nodeName.toLowerCase()),
                    i != null &amp;&amp; i.id &amp;&amp; (r += `[id=&quot;${i.id}&quot;]`),
                    i != null &amp;&amp; i.aria_label &amp;&amp; (r += `[aria-label=&quot;${i.aria_label}&quot;]`),
                    i != null &amp;&amp; i.data_st_field &amp;&amp; (r += `[data-st-field=&quot;${i.data_st_field}&quot;]`),
                    i != null &amp;&amp; i.data_st_tag &amp;&amp; (r += `[data-st-tag=&quot;${i.data_st_tag}&quot;]`),
                    i != null &amp;&amp; i.data_selenium &amp;&amp; (r += `[data-selenium=&quot;${i.data_selenium}&quot;]`),
                    i != null &amp;&amp; i.data_selenium_id &amp;&amp; (r += `[data-selenium-id=&quot;${i.data_selenium_id}&quot;]`),
                    i != null &amp;&amp; i.data_testid &amp;&amp; (r += `[data-testid=&quot;${i.data_testid}&quot;]`),
                    i != null &amp;&amp; i.data_test_id &amp;&amp; (r += `[data-test-id=&quot;${i.data_test_id}&quot;]`),
                    i != null &amp;&amp; i.data_qa_id &amp;&amp; (r += `[data-qa-id=&quot;${i.data_qa_id}&quot;]`),
                    i != null &amp;&amp; i.data_id &amp;&amp; (r += `[data-id=&quot;${i.data_id}&quot;]`),
                    i != null &amp;&amp; i.name &amp;&amp; (r += `[name=&quot;${i.name}&quot;]`),
                    i != null &amp;&amp; i.placeholder &amp;&amp; (r += `[placeholder=&quot;${i.placeholder}&quot;]`),
                    i != null &amp;&amp; i.role &amp;&amp; (r += `[role=&quot;${i.role}&quot;]`),
                    i != null &amp;&amp; i.type &amp;&amp; (r += `[type=&quot;${i.type}&quot;]`),
                    r);
            }
        }
        l.UiElement = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                this._clientDelegate = i;
            }
            createUIControlData(i) {
                const r = l._POSignalsUtils.Util.getSrcElement(i);
                if (!r)
                    return null;
                const a = l.PointerConfig.instance.pointerParams.uiModelingBlacklistRegex;
                if (a &amp;&amp; window.location.href.match(a))
                    return (l._POSignalsUtils.Logger.debug(&#39;ui control data is disabled for this url&#39;), null);
                const c = new l.UiElement(r, this._clientDelegate);
                return this.findMatchingUiControl(c) || { uiElement: c.data };
            }
            findMatchingUiControl(i, r = 0) {
                try {
                    const a = l.PointerConfig.instance.pointerParams.uiControlsConfig;
                    if (a.length === 0 ||
                        r &gt; l.PointerConfig.instance.pointerParams.uiModelingMaxMatchingParents)
                        return null;
                    let c = !1;
                    for (const n of a)
                        if (!(!n.tagConfig &amp;&amp; !n.enrichedData) &amp;&amp; ((c = !0), i.equals(n.uiElement)))
                            return { uiElement: i.data, enrichedData: n.enrichedData, tagConfig: n.tagConfig };
                    if (!c)
                        return null;
                    const t = i.htmlElement.parentElement;
                    if ((t == null ? void 0 : t.nodeType) === Node.ELEMENT_NODE) {
                        const n = new l.UiElement(t, this._clientDelegate);
                        return this.findMatchingUiControl(n, r + 1);
                    }
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(&#39;failed to find matching ui control&#39;, a);
                }
                return null;
            }
            convertToTagValueConfig(i) {
                var r;
                return {
                    context: (r = i == null ? void 0 : i.uiElement) === null || r === void 0 ? void 0 : r.location,
                    valueSelector: l.UiElement.createCssSelector(i == null ? void 0 : i.uiElement),
                    operation: i == null ? void 0 : i.operation,
                    valueMandatory: i == null ? void 0 : i.valueMandatory,
                };
            }
        }
        l.UIControlManager = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            get isStarted() {
                return this._isStarted;
            }
            get onInteraction() {
                return this._onInteraction.asEvent();
            }
            get onClickEvent() {
                return this._onClickEvent.asEvent();
            }
            constructor(i, r) {
                ((this.BEHAVIORAL_TYPE = &#39;mouse&#39;),
                    (this._isStarted = false),
                    (this._onInteraction = new l.EventDispatcher()),
                    (this._onClickEvent = new l.EventDispatcher()),
                    (this.lastMouseInteractionTimestamp = null),
                    (this.mouseEventsCounter = 0),
                    (this.eventCounters = { epochTs: Date.now() }),
                    (this.delegate = i),
                    (this.uiControlManager = r),
                    (this.wheelOptions = l._POSignalsUtils.Util.isPassiveSupported() ? { passive: true } : false),
                    (this.onPointerHandle = this.onPointerEvent.bind(this)),
                    (this.onClickHandle = this.onClick.bind(this)),
                    (this.onDblclickHandle = this.onMouseClickEvent.bind(this)),
                    (this.onMousedownHandle = this.onMouseClickEvent.bind(this)),
                    (this.onMousemoveHandle = this.onMouseEvent.bind(this)),
                    (this.onMouseoutHandle = this.onMouseout.bind(this)),
                    (this.onMouseoverHandle = this.onMouseEvent.bind(this)),
                    (this.onMouseupHandle = this.onMouseClickEvent.bind(this)),
                    (this.onWheelHandle = this.onMouseEvent.bind(this)),
                    (this.interactionUpdateHandle = this.interactionUpdate.bind(this)));
            }
            countEvent(i) {
                this.eventCounters[i] = (this.eventCounters[i] || 0) + 1;
            }
            interactionUpdate() {
                this.lastMouseInteraction
                    ? Date.now() - this.lastMouseInteractionTimestamp &gt;=
                        l.PointerConfig.instance.pointerParams.mouseIdleTimeoutMillis &amp;&amp; this.dispatch()
                    : !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) &amp;&amp;
                        Date.now() - this.lastMouseInteractionTimestamp &lt;=
                            l.PointerConfig.instance.pointerParams.mouseIntervalMillis &amp;&amp;
                        this.dispatch();
            }
            enrichLastInteraction() {
                var i;
                if (!this.lastMouseInteraction)
                    return;
                ((this.lastMouseInteraction.eventCounters = this.eventCounters),
                    (this.lastMouseInteraction.duration = this.delegate.getInteractionDuration(this.lastMouseInteraction.events)));
                const r = (i = this.lastMouseInteraction.events) === null || i === void 0
                    ? void 0
                    : i.filter((a) =&gt; a.type === &#39;mousemove&#39;);
                ((this.lastMouseInteraction.timeProximity =
                    l._POSignalsUtils.Util.calculateMeanTimeDeltasBetweenEvents(r)),
                    (this.lastMouseInteraction.meanEuclidean =
                        l._POSignalsUtils.Util.calculateMeanDistanceBetweenPoints(r)));
            }
            dispatch() {
                try {
                    (this.enrichLastInteraction(),
                        this._onInteraction.dispatch(this, this.lastMouseInteraction),
                        (this.eventCounters = { epochTs: Date.now() }),
                        (this.lastMouseInteraction = null),
                        (this.mouseEventsCounter = 0));
                }
                catch (i) {
                    l._POSignalsUtils.Logger.warn(&#39;Failed to dispatch mouse events&#39;, i);
                }
            }
            updateInteraction(i, r) {
                (this.lastMouseInteraction ||
                    (this.lastMouseInteraction = {
                        epochTs: Date.now(),
                        events: [],
                        counter: this.delegate.mouseCounter,
                        additionalData: this.delegate.additionalData,
                        eventCounters: { epochTs: Date.now() },
                        duration: 0,
                        timeProximity: 0,
                        uiControl: void 0,
                        meanEuclidean: 0,
                        reduction: {},
                        quality: &#39;&#39;,
                    }),
                    this.lastMouseInteraction.events.push(i),
                    this.mouseEventsCounter++,
                    r &amp;&amp;
                        ((this.lastMouseInteraction.uiControl = {
                            uiElement: r.uiElement,
                            enrichedData: r.enrichedData,
                        }),
                            this.delegate.addUiControlTags(r.tagConfig)),
                    this.mouseEventsCounter &gt;= l.PointerConfig.instance.pointerParams.maxMouseEvents &amp;&amp;
                        this.dispatch());
            }
            start() {
                this._isStarted
                    ? l._POSignalsUtils.Logger.debug(&#39;Desktop Mouse events already listening&#39;)
                    : (this.delegate.addEventListener(document, &#39;click&#39;, this.onClickHandle, true),
                        this.delegate.addEventListener(document, &#39;dblclick&#39;, this.onDblclickHandle),
                        this.delegate.addEventListener(document, &#39;mousedown&#39;, this.onMousedownHandle),
                        this.delegate.addEventListener(document, &#39;mousemove&#39;, this.onMousemoveHandle),
                        this.delegate.addEventListener(document, &#39;mouseout&#39;, this.onMouseoutHandle),
                        this.delegate.addEventListener(document, &#39;mouseover&#39;, this.onMouseoverHandle),
                        this.delegate.addEventListener(document, &#39;mouseup&#39;, this.onMouseupHandle),
                        this.delegate.addEventListener(document, &#39;wheel&#39;, this.onWheelHandle, this.wheelOptions),
                        this.delegate.addEventListener(document, &#39;pointerover&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointerenter&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointerdown&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointermove&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointerup&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointercancel&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointerout&#39;, this.onPointerHandle),
                        this.delegate.addEventListener(document, &#39;pointerleave&#39;, this.onPointerHandle),
                        (this.updateIntervalHandle = setInterval(this.interactionUpdateHandle, l.PointerConfig.instance.pointerParams.mouseIntervalMillis)),
                        (this._isStarted = true),
                        l._POSignalsUtils.Logger.debug(&#39;Desktop Mouse events start listening...&#39;));
            }
            stop() {
                this._isStarted
                    ? (document.removeEventListener(&#39;click&#39;, this.onClickHandle, true),
                        document.removeEventListener(&#39;dblclick&#39;, this.onDblclickHandle),
                        document.removeEventListener(&#39;mousedown&#39;, this.onMousedownHandle),
                        document.removeEventListener(&#39;mousemove&#39;, this.onMousemoveHandle),
                        document.removeEventListener(&#39;mouseout&#39;, this.onMouseoutHandle),
                        document.removeEventListener(&#39;mouseover&#39;, this.onMouseoverHandle),
                        document.removeEventListener(&#39;mouseup&#39;, this.onMouseupHandle),
                        document.removeEventListener(&#39;wheel&#39;, this.onWheelHandle, this.wheelOptions),
                        document.removeEventListener(&#39;pointerover&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointerenter&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointerdown&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointermove&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointerup&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointercancel&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointerout&#39;, this.onPointerHandle),
                        document.removeEventListener(&#39;pointerleave&#39;, this.onPointerHandle),
                        clearInterval(this.updateIntervalHandle),
                        (this.updateIntervalHandle = null),
                        (this._isStarted = false),
                        l._POSignalsUtils.Logger.debug(&#39;Desktop Mouse events stop listening...&#39;))
                    : l._POSignalsUtils.Logger.debug(&#39;Desktop Mouse events already stopped&#39;);
            }
            onClick(i) {
                var r, a;
                try {
                    this.lastMouseInteractionTimestamp = Date.now();
                    const c = l._POSignalsUtils.Util.getSrcElement(i);
                    if ((this._onClickEvent.dispatch(this, c),
                        !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                            (this.countEvent(i.type),
                                l.PointerConfig.instance.pointerParams.eventsToIgnore.has(i.type))))
                        return;
                    const t = this.uiControlManager.createUIControlData(i);
                    (this.updateInteraction(this.createMouseClickEvent(i.type, i), t),
                        this.dispatch(),
                        ((a =
                            (r = t == null ? void 0 : t.uiElement) === null || r === void 0 ? void 0 : r.id) ===
                            null || a === void 0
                            ? void 0
                            : a.length) &gt; 0 &amp;&amp;
                            l._POSignalsUtils.Logger.info(`Tapped on element with id &#39;${t.uiElement.id}&#39;`));
                }
                catch (c) {
                    l._POSignalsUtils.Logger.warn(`error in ${i.type} handler`, c);
                }
            }
            onMouseout(i) {
                try {
                    this.onMouseEvent(i);
                    const r = i.relatedTarget || i.toElement;
                    (!r || r.nodeName === &#39;HTML&#39;) &amp;&amp; this.dispatch();
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(`error in ${i.type} handler`, r);
                }
            }
            onMouseEvent(i) {
                try {
                    if ((i.type !== &#39;wheel&#39; &amp;&amp; (this.lastMouseInteractionTimestamp = Date.now()),
                        !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                            (this.countEvent(i.type),
                                l.PointerConfig.instance.pointerParams.eventsToIgnore.has(i.type))))
                        return;
                    this.updateInteraction(this.createMouseEvent(i.type, i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(`error in ${i.type} handler`, r);
                }
            }
            onMouseClickEvent(i) {
                try {
                    if (((this.lastMouseInteractionTimestamp = Date.now()),
                        !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                            (this.countEvent(i.type),
                                l.PointerConfig.instance.pointerParams.eventsToIgnore.has(i.type))))
                        return;
                    this.updateInteraction(this.createMouseClickEvent(i.type, i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(`error in ${i.type} handler`, r);
                }
            }
            onPointerEvent(i) {
                try {
                    if (((this.lastMouseInteractionTimestamp = Date.now()),
                        !this.delegate.collectBehavioralData(this.BEHAVIORAL_TYPE) ||
                            (this.countEvent(i.type),
                                l.PointerConfig.instance.pointerParams.eventsToIgnore.has(i.type))))
                        return;
                    this.updateInteraction(this.createPointerEvent(i.type, i));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(`error in ${i.type} handler`, r);
                }
            }
            clearBuffer() {
                let i = null;
                return (this.lastMouseInteraction &amp;&amp; (i = this.lastMouseInteraction),
                    (this.lastMouseInteraction = null),
                    i);
            }
            isEmpty() {
                return !this.lastMouseInteraction;
            }
            createMouseEvent(i, r) {
                return {
                    type: i,
                    eventTs: r.timeStamp,
                    epochTs: Date.now(),
                    button: r.button,
                    offsetX: r.offsetX,
                    offsetY: r.offsetY,
                    pageX: r.pageX,
                    pageY: r.pageY,
                    screenX: r.screenX,
                    screenY: r.screenY,
                    getX() {
                        return r.screenX;
                    },
                    getY() {
                        return r.screenY;
                    },
                };
            }
            createPointerEvent(i, r) {
                return {
                    ...this.createMouseEvent(i, r),
                    pointerId: r.pointerId,
                    width: r.width,
                    height: r.height,
                    pressure: r.pressure,
                    tangentialPressure: r.tangentialPressure,
                    tiltX: r.tiltX,
                    tiltY: r.tiltY,
                    twist: r.twist,
                    pointerType: r.pointerType,
                    isPrimary: r.isPrimary,
                };
            }
            createMouseClickEvent(i, r) {
                const a = this.createMouseEvent(i, r);
                if (r.target &amp;&amp; l._POSignalsUtils.Util.isFunction(r.target.getBoundingClientRect)) {
                    const c = r.target.getBoundingClientRect();
                    ((a.targetBottom = c.bottom),
                        (a.targetHeight = c.height),
                        (a.targetLeft = c.left),
                        (a.targetRight = c.right),
                        (a.targetTop = c.top),
                        (a.targetWidth = c.width),
                        (a.targetX = c.x),
                        (a.targetY = c.y));
                }
                return a;
            }
        }
        l.Mouse = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.counter = 0), (this.key = i), (this.counter = this.loadFromStorage()));
            }
            loadFromStorage() {
                const i = f.sessionStorage.getItem(this.key);
                return Number(i) || 0;
            }
            get() {
                return this.counter;
            }
            increment(i = 1) {
                ((this.counter += i), f.sessionStorage.setItem(this.key, this.counter));
            }
            decrement(i = 1) {
                this.increment(i * -1);
            }
            reset() {
                ((this.counter = 0), f.sessionStorage.removeItem(this.key));
            }
        }
        ((f.sessionStorage = l._POSignalsStorage.SessionStorage.instance.sessionStorage),
            (l.StorageCounter = f));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                ((this.mapKey = i), (this.cache = this.loadFromStorage()));
            }
            loadFromStorage() {
                let i = f.sessionStorage.getItem(this.mapKey);
                return (i || (i = JSON.stringify({})), JSON.parse(i));
            }
            asMap() {
                return this.cache;
            }
            set(i, r, a = true) {
                ((this.cache[i] = r),
                    a &amp;&amp; f.sessionStorage.setItem(this.mapKey, JSON.stringify(this.cache)));
            }
            sync() {
                f.sessionStorage.setItem(this.mapKey, JSON.stringify(this.cache));
            }
            get(i) {
                return this.cache[i];
            }
            delete(i) {
                (delete this.cache[i], f.sessionStorage.setItem(this.mapKey, JSON.stringify(this.cache)));
            }
            values() {
                return l._POSignalsUtils.Util.values(this.cache);
            }
            clear() {
                ((this.cache = {}), f.sessionStorage.removeItem(this.mapKey));
            }
            forEach(i) {
                for (const r in this.cache)
                    this.cache.hasOwnProperty(r) &amp;&amp; i(this.cache[r], r);
            }
        }
        ((f.sessionStorage = l._POSignalsStorage.SessionStorage.instance.sessionStorage),
            (l.StorageMap = f));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor() {
                ((this.config = {}), (this._cacheHash = 0), (this.cache = new Map()));
            }
            refreshConfig(i) {
                try {
                    if (!i)
                        return;
                    const r = l._POSignalsUtils.Util.hashCode(JSON.stringify(i));
                    if (this._cacheHash === r)
                        return;
                    ((this.config = i), (this._cacheHash = r), (this.cache = new Map()));
                }
                catch (r) {
                    l._POSignalsUtils.Logger.warn(&#39;Failed to set css selectors&#39;, r);
                }
            }
            getMatchingTags(i, r) {
                const a = this.cache.get(i);
                if (a)
                    return a;
                const c = {};
                for (const t in this.config)
                    try {
                        if (!this.config.hasOwnProperty(t))
                            continue;
                        let n = this.config[t].selector || [];
                        l._POSignalsUtils.Util.isArray(n) || (n = [].concat(n));
                        for (const e of n)
                            l._POSignalsUtils.Util.isSelectorMatches(i, e, r) &amp;&amp; (c[t] = this.config[t]);
                    }
                    catch (n) {
                        l._POSignalsUtils.Logger.warn(`Failed to get the config for ${t} tag`, n);
                    }
                return (this.cache.set(i, c), c);
            }
            getValue(i, r) {
                if (r &amp;&amp; i)
                    switch (((r = r.trim()), i)) {
                        case &#39;email_domain&#39;:
                            return l._POSignalsUtils.Util.getEmailDomain(r);
                        case &#39;obfuscate&#39;:
                            return `${l._POSignalsUtils.Util.mod(r, 1e3)}`;
                        case &#39;plain&#39;:
                            return r;
                        case &#39;zip&#39;:
                            return r.substr(0, 3);
                        case &#39;length&#39;:
                            return `${r.length}`;
                    }
                return &#39;&#39;;
            }
            get cacheHash() {
                return this._cacheHash;
            }
        }
        l.TagsIdentifications = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor() {
                this._reduceFactorMap = null;
            }
            set reduceFactorMap(i) {
                this._reduceFactorMap = i;
            }
            get reduceFactorMap() {
                return this._reduceFactorMap;
            }
            reduceEventsByFactor(i) {
                try {
                    if (!i || i.length === 0 || !this.reduceFactorMap)
                        return i;
                    const r = new Map(), a = [];
                    for (let t = 0; t &lt; i.length; t++)
                        r.get(i[t].type) ? r.get(i[t].type).push(t) : r.set(i[t].type, [t]);
                    r.forEach((t, n) =&gt; {
                        const e = this.reduceFactorMap[n] ? Number(this.reduceFactorMap[n]) : 0;
                        this.reduceByFactor(e, t, (o) =&gt; {
                            a[t[o]] = !0;
                        });
                    });
                    const c = [];
                    for (let t = 0; t &lt; i.length; t++)
                        a[t] &amp;&amp; c.push(i[t]);
                    return (i.length !== c.length &amp;&amp;
                        l._POSignalsUtils.Logger.debug(`${i.length - c.length} events reduced out of ${i.length}`),
                        c);
                }
                catch (r) {
                    return (l._POSignalsUtils.Logger.warn(&#39;Failed to reduce events&#39;, r), i);
                }
            }
            reduceByFactor(i, r, a) {
                i = Math.min(i, 1);
                const c = Math.round(Math.max(r.length * (1 - i), 2)), t = (r.length - 1) / (c - 1), n = Math.min(r.length, c);
                for (let e = 0; e &lt; n; e++) {
                    const o = Math.round(e * t);
                    a(o);
                }
            }
        }
        l.ReduceFactor = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                this.algorithm = i;
            }
            reduce(i, r) {
                if (f.TYPES_TO_REDUCE.indexOf(r) === -1)
                    return { keptEvents: i, epsilon: 0 };
                if (i.length &lt;= f.MIN_EVENTS_TO_REDUCE)
                    return { keptEvents: i, epsilon: 0 };
                const a = i.length &lt; 50 ? 0.55 : i.length &lt; 100 ? 0.35 : 0.2, c = i.length &lt; 50 ? 1 : i.length &lt; 100 ? 3 : 7, t = this.algorithm.reduceEvents(i, c), n = t.length / i.length;
                if (t.length &gt;= 10 &amp;&amp; n &gt;= a)
                    return { keptEvents: t, epsilon: c };
                const e = i.length &lt; 50 ? 0.1 : i.length &lt; 100 ? 0.3 : 0.7, o = this.algorithm.reduceEvents(i, e), s = o.length / i.length;
                if (o.length &lt;= f.MIN_EVENTS_TO_REDUCE || s &lt;= a)
                    return { keptEvents: o, epsilon: e };
                const m = (Math.min(c, Math.pow(c, n / a)) * Math.abs(s - a) + e * Math.abs(n - a)) /
                    Math.abs(n - s);
                return ((m &lt; e || m &gt; c) &amp;&amp;
                    l._POSignalsUtils.Logger.warn(`linear weighted average - calculated epsilon is out of range, lowEpsilon: ${e}, highEpsilon: ${c}, epsilon: ${m}`),
                    { keptEvents: this.algorithm.reduceEvents(i, m), epsilon: m });
            }
        }
        ((f.MIN_EVENTS_TO_REDUCE = 18),
            (f.TYPES_TO_REDUCE = [&#39;mousemove&#39;, &#39;touchmove&#39;]),
            (l.RDPEpsilonStrategy = f));
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor(i) {
                this.rdpStrategy = i;
            }
            reduceWithRPD(i) {
                if (!i || i.length === 0)
                    return { events: i, reductionInfo: {} };
                const r = new Map();
                let a = [];
                for (const n of i)
                    r.get(n.type) ? r.get(n.type).push(n) : r.set(n.type, [n]);
                const c = {};
                return (r.forEach((n, e) =&gt; {
                    const { keptEvents: o, epsilon: s } = this.rdpStrategy.reduce(n, e);
                    (s &gt; 0 &amp;&amp; (c[e] = { epsilon: s, originalLength: n.length, keptLength: o.length }),
                        (a = a.concat(o)));
                }),
                    { events: l._POSignalsUtils.Util.sortEventsByTimestamp(a), reductionInfo: c });
            }
        }
        l.ReduceRDP = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            getSqDist(i, r) {
                const a = i.getX() - r.getX(), c = i.getY() - r.getY();
                return a * a + c * c;
            }
            getSqSegDist(i, r, a) {
                let c = r.getX(), t = r.getY(), n = a.getX() - c, e = a.getY() - t;
                if (n !== 0 || e !== 0) {
                    const o = ((i.getX() - c) * n + (i.getY() - t) * e) / (n * n + e * e);
                    o &gt; 1 ? ((c = a.getX()), (t = a.getY())) : o &gt; 0 &amp;&amp; ((c += n * o), (t += e * o));
                }
                return ((n = i.getX() - c), (e = i.getY() - t), n * n + e * e);
            }
            simplifyRadialDist(i, r) {
                let a = i[0], c = [a], t;
                for (let n = 1, e = i.length; n &lt; e; n++)
                    ((t = i[n]), this.getSqDist(t, a) &gt; r &amp;&amp; (c.push(t), (a = t)));
                return (a !== t &amp;&amp; c.push(t), c);
            }
            simplifyDPStep(i, r, a, c, t) {
                let n = c, e;
                for (let o = r + 1; o &lt; a; o++) {
                    const s = this.getSqSegDist(i[o], i[r], i[a]);
                    s &gt; n &amp;&amp; ((e = o), (n = s));
                }
                n &gt; c &amp;&amp;
                    (e - r &gt; 1 &amp;&amp; this.simplifyDPStep(i, r, e, c, t),
                        t.push(i[e]),
                        a - e &gt; 1 &amp;&amp; this.simplifyDPStep(i, e, a, c, t));
            }
            simplifyDouglasPeucker(i, r) {
                const a = i.length - 1, c = [i[0]];
                return (this.simplifyDPStep(i, 0, a, r, c), c.push(i[a]), c);
            }
            simplify(i, r, a) {
                if (i.length &lt;= 2)
                    return i;
                const c = r !== void 0 ? r * r : 1;
                return ((i = a ? i : this.simplifyRadialDist(i, c)),
                    (i = this.simplifyDouglasPeucker(i, c)),
                    i);
            }
            reduceEvents(i, r) {
                return this.simplify(i, r);
            }
        }
        l.RDPReduction = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            filterMoveEvents(i, r) {
                if (i.length &lt;= 18)
                    return i;
                const a = i.filter((e) =&gt; e.type === r), c = l._POSignalsUtils.Util.keepFirstEventsWithDistance({
                    events: a,
                    threshold: 200,
                    min: 18,
                    max: 30,
                });
                let t = -1;
                const n = {};
                for (let e = 0; e &lt; i.length; e++) {
                    const o = i[e];
                    if (o.type !== r) {
                        if (o.type === &#39;mousedown&#39;) {
                            t = e;
                            continue;
                        }
                        n[o.type] || (c.push(o), (n[o.type] = true));
                    }
                }
                return (t &gt;= 0 &amp;&amp; c.push(i[t]), l._POSignalsUtils.Util.sortEventsByTimestamp(c));
            }
        }
        l.EventsReduction = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f {
            constructor() {
                ((this.reduceFactor = new l.ReduceFactor()),
                    (this.reduceRDP = new l.ReduceRDP(new l.RDPEpsilonStrategy(new l.RDPReduction()))),
                    (this.eventsReduction = new l.EventsReduction()));
            }
            set reduceFactorMap(i) {
                this.reduceFactor.reduceFactorMap = i;
            }
            reduceGesture(i) {
                const r = this.reduceRDP.reduceWithRPD(i.events);
                ((i.events = this.eventsReduction.filterMoveEvents(r.events, &#39;touchmove&#39;)),
                    (i.reduction = r.reductionInfo));
            }
            reduceKeyboardInteraction(i) {
                i.events = l._POSignalsUtils.Util.filterArrayByLength(i.events, 50);
            }
            reduceMouseInteraction(i) {
                const r = this.reduceRDP.reduceWithRPD(i.events);
                ((i.events = this.eventsReduction.filterMoveEvents(r.events, &#39;mousemove&#39;)),
                    (i.reduction = r.reductionInfo));
            }
        }
        l.ReductionManager = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (function (l) {
        class f extends l.ClientBase {
            constructor(i, r) {
                (super(i),
                    (this.tagsWithValueIdentifications = new l.TagsIdentifications()),
                    (this.reductionManager = new l.ReductionManager()),
                    (this.lastGestureTimestamp = 0),
                    (this.currentBufferSize = 0),
                    (this.MAX_EVENT_COUNTERS = 20),
                    (this.bufferingStrategy = l.StrategyFactory.createBufferingStrategy(r, this)),
                    (this.capturedKeyboardInteractions = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_KEYBOARD_INTERACTIONS)),
                    (this.keyboardInteractionsCount = new l.StorageCounter(l._POSignalsUtils.Constants.KEYBOARD_INTERACTIONS_COUNT)),
                    (this.mouseInteractionsCount = new l.StorageCounter(l._POSignalsUtils.Constants.MOUSE_INTERACTIONS_COUNT)),
                    (this.gesturesCount = new l.StorageCounter(l._POSignalsUtils.Constants.GESTURES_COUNT)),
                    (this.mouseEventCounters = new l.StorageArray(l._POSignalsUtils.Constants.MOUSE_EVENT_COUNTERS)),
                    (this.keyboardEventCounters = new l.StorageArray(l._POSignalsUtils.Constants.KEYBOARD_EVENT_COUNTERS)),
                    (this.touchEventCounters = new l.StorageArray(l._POSignalsUtils.Constants.TOUCH_EVENT_COUNTERS)),
                    (this.indirectEventCounters = new l.StorageArray(l._POSignalsUtils.Constants.INDIRECT_EVENT_COUNTERS)),
                    (this.capturedMouseInteractions = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_MOUSE_INTERACTIONS)),
                    (this.capturedGestures = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_GESTURES)),
                    (this.capturedIndirectEvents = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_INDIRECT)),
                    (this.capturedMouseInteractionSummary = new l.StorageArray(l._POSignalsUtils.Constants.CAPTURED_MOUSE_INTERACTIONS_SUMMARY)),
                    (this.currentBufferSize =
                        this.capturedGestures.length +
                            this.capturedMouseInteractions.length +
                            this.capturedKeyboardInteractions.length),
                    (this.uiControlManager = new l.UIControlManager(this)),
                    (this.keyboard = new l.Keyboard(this, this.uiControlManager)),
                    this.keyboard.onInteraction.subscribe(this.handleKeyboardInteraction.bind(this)),
                    this.keyboard.onEnterPress.subscribe(this.handleStTagOnEnter.bind(this)),
                    this.keyboard.onObfuscatedValue.subscribe(this.handleTagValueOnBlur.bind(this)),
                    (this.mouse = new l.Mouse(this, this.uiControlManager)),
                    this.mouse.onInteraction.subscribe(this.handleMouseInteraction.bind(this)),
                    this.mouse.onClickEvent.subscribe(this.handleStTagOnClick.bind(this)),
                    (this.sensors = new l.Sensors(this)),
                    (this.gesture = new l.GestureEvents(this, this.sensors)),
                    this.gesture.onGesture.subscribe(this.handleGesture.bind(this)),
                    (this.indirect = new l.IndirectClient(this)),
                    this.indirect.onIndirect.subscribe(this.handleIndirect.bind(this)),
                    (this.onUrlChangeHandler = this.onUrlChange.bind(this)));
            }
            get keyboardCounter() {
                return this.keyboardInteractionsCount.get();
            }
            get mouseCounter() {
                return this.mouseInteractionsCount.get();
            }
            get gesturesCounter() {
                return this.gesturesCount.get();
            }
            get additionalData() {
                const i = l._POSignalsUtils.Util.getDeviceOrientation();
                return {
                    locationHref: location.href,
                    devTools: l._POSignalsUtils.Util.getDevToolsState(),
                    innerWidth: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
                    innerHeight: window.innerHeight ||
                        document.documentElement.clientHeight ||
                        document.body.clientHeight,
                    outerWidth: window.outerWidth,
                    outerHeight: window.outerHeight,
                    width: screen.width,
                    height: screen.height,
                    availWidth: screen.availWidth,
                    availHeight: screen.availHeight,
                    pixelRatio: window.devicePixelRatio,
                    deviceOrientation: i.orientation,
                    deviceAngle: i.angle,
                };
            }
            getBehavioralData() {
                this.clearIndirectBuffer();
                const i = this.reduceEpochEventCounters();
                return {
                    mouse: {
                        count: this.mouseInteractionsCount.get(),
                        interactions: this.capturedMouseInteractions.get(),
                    },
                    keyboard: {
                        count: this.keyboardInteractionsCount.get(),
                        interactions: this.capturedKeyboardInteractions.get(),
                    },
                    touch: { count: this.gesturesCount.get(), interactions: this.capturedGestures.get() },
                    indirect: { events: this.capturedIndirectEvents.get() },
                    mouseSummary: { events: this.capturedMouseInteractionSummary.get() },
                    eventCounters: i,
                };
            }
            getBufferSize() {
                return this.currentBufferSize;
            }
            getInteractionDuration(i) {
                return (i == null ? void 0 : i.length) &gt; 0 ? i[i.length - 1].epochTs - i[0].epochTs : 0;
            }
            async dispose() {
                (this.stopListening(),
                    this.keyboard.onInteraction.unsubscribe(this.handleKeyboardInteraction.bind(this)),
                    this.keyboard.onEnterPress.unsubscribe(this.handleStTagOnEnter.bind(this)),
                    this.keyboard.onObfuscatedValue.unsubscribe(this.handleTagValueOnBlur.bind(this)),
                    this.mouse.onInteraction.unsubscribe(this.handleMouseInteraction.bind(this)),
                    this.mouse.onClickEvent.unsubscribe(this.handleStTagOnClick.bind(this)),
                    this.gesture.onGesture.unsubscribe(this.handleGesture.bind(this)),
                    this.indirect.unsubscribe(),
                    this.indirect.onIndirect.unsubscribe(this.handleIndirect.bind(this)));
            }
            collectBehavioralData(i) {
                if (this.isBehavioralDataPaused)
                    return false;
                const r = l.PointerConfig.instance.pointerParams.behavioralBlacklist;
                return !i || !r || !r[i] ? true : !window.location.href.match(r[i]);
            }
            getElementsStID(i) {
                try {
                    return (l._POSignalsUtils.Util.getAttribute(i, &#39;data-st-field&#39;) ||
                        this.keyboard.fieldsIdentifications.getIdentification(i, 0) ||
                        &#39;&#39;);
                }
                catch (r) {
                    return (l._POSignalsUtils.Logger.warn(&#39;failed to get element stId&#39;, r), &#39;&#39;);
                }
            }
            addEventListener(i, r, a, c) {
                l.PointerConfig.instance.pointerParams.eventsBlackList.has(r) ||
                    (i.addEventListener(r, this.onEventHandler, c), i.addEventListener(r, a, c));
            }
            addUiControlTags(i) {
                if ((i == null ? void 0 : i.length) &gt; 0) {
                    let r = false;
                    for (const a of i)
                        try {
                            if (a != null &amp;&amp; a.name) {
                                const c = this.uiControlManager.convertToTagValueConfig(a.value);
                                r = this.addSingleTagWithValue(a.name, c) || r;
                            }
                        }
                        catch (c) {
                            l._POSignalsUtils.Logger.warn(&#39;failed to add tag config&#39;, c);
                        }
                }
            }
            refreshListening() {
                const i = l.PointerConfig.instance;
                (this.tagsWithValueIdentifications.refreshConfig(i.pointerParams.remoteTags),
                    (this.reductionManager.reduceFactorMap = i.pointerParams.eventsReduceFactorMap),
                    this.keyboard.refreshKeyboardCssSelectors(i.pointerParams.keyboardCssSelectors),
                    (this.sensors.maxSensorSamples = i.pointerParams.maxSensorSamples),
                    (this.sensors.sensorsTimestampDeltaInMillis = i.pointerParams.sensorsDeltaInMillis),
                    this.mouse.start(),
                    this.keyboard.start(),
                    this.gesture.start(),
                    this.indirect.start(),
                    i.pointerParams.maxSensorSamples == 0 ? this.sensors.stop() : this.sensors.start(),
                    this.addEventListener(window, &#39;_onlocationchange&#39;, this.onUrlChangeHandler),
                    this.addEventListener(window, &#39;popstate&#39;, this.onUrlChangeHandler));
            }
            addSingleTagWithValue(i, r) {
                try {
                    if (r != null &amp;&amp; r.context &amp;&amp; !window.location.href.match(r.context))
                        return !1;
                    let a = &#39;&#39;;
                    if (r != null &amp;&amp; r.operation &amp;&amp; r != null &amp;&amp; r.valueSelector) {
                        const c = document.querySelector(r.valueSelector);
                        if (c) {
                            const t = l._POSignalsUtils.Util.getElementText(c);
                            a = this.tagsWithValueIdentifications.getValue(r.operation, t);
                        }
                    }
                    if (r != null &amp;&amp; r.valueMandatory &amp;&amp; !a)
                        return (l._POSignalsUtils.Logger.warn(`tag &#39;${i}&#39; wasn&#39;t added. value is missing`), !1);
                    this.addTag(i, a);
                }
                catch (a) {
                    l._POSignalsUtils.Logger.warn(`failed to add ${i} tag`, a);
                }
                return false;
            }
            addTagsWithValue(i) {
                let r = false;
                for (const a in i)
                    i.hasOwnProperty(a) &amp;&amp; (r = this.addSingleTagWithValue(a, i[a]) || r);
            }
            handleStTagOnEnter(i, r) {
                r instanceof HTMLInputElement &amp;&amp;
                    l._POSignalsUtils.Util.isTextInput(r) &amp;&amp;
                    this.handleStTagElement(r);
            }
            handleTagValueOnBlur(i, r) {
                r &amp;&amp; this.addTag(r.fieldKey, r.obfuscatedValue);
            }
            handleStTagOnClick(i, r) {
                (!(r instanceof HTMLInputElement) || l._POSignalsUtils.Util.isClickableInput(r)) &amp;&amp;
                    this.handleStTagElement(r);
            }
            handleMouseInteraction(i, r) {
                if (!r)
                    return;
                (this.incrementEventCounters(r.eventCounters, &#39;mouse&#39;),
                    this.filterOldMouseEvents(),
                    this.mouseInteractionsCount.increment(),
                    this.reductionManager.reduceMouseInteraction(r));
                const a = this.bufferingStrategy.calculateStrategyResult(r, &#39;mouse&#39;);
                ((r.quality = a.quality),
                    this.handleMouseInteractionSummary(r),
                    a.shouldCollect &amp;&amp;
                        (a.remove &amp;&amp; this.removeInteraction(a.remove),
                            this.capturedMouseInteractions.push(r),
                            this.lastGestureTimestamp !== r.events[r.events.length - 1].eventTs &amp;&amp;
                                this.currentBufferSize++));
            }
            handleMouseInteractionSummary(i) {
                const r = {
                    epochTs: i.epochTs,
                    duration: this.getInteractionDuration(i.events),
                    quality: i.quality,
                };
                (this.capturedMouseInteractionSummary.push(r),
                    this.capturedMouseInteractionSummary.length &gt; 10 &amp;&amp;
                        this.capturedMouseInteractionSummary.remove(0));
            }
            handleIndirect(i, r) {
                (this.filterOldIndirectEvents(), this.addIndirectEvents(r));
            }
            handleKeyboardInteraction(i, r) {
                if (!r)
                    return;
                (this.incrementEventCounters(r.eventCounters, &#39;keyboard&#39;),
                    this.filterOldKeyboardEvents(),
                    this.keyboardInteractionsCount.increment(),
                    this.reductionManager.reduceKeyboardInteraction(r));
                const a = this.bufferingStrategy.calculateStrategyResult(r, &#39;keyboard&#39;);
                a.shouldCollect &amp;&amp;
                    (a.remove &amp;&amp; this.removeInteraction(a.remove),
                        (r.quality = a.quality),
                        this.capturedKeyboardInteractions.push(r),
                        this.currentBufferSize++);
            }
            handleGesture(i, r) {
                var a;
                if (!this.isValidGesture(r))
                    return;
                (this.incrementEventCounters(r.eventCounters, &#39;touch&#39;),
                    this.filterOldGesturesEvents(),
                    this.gesturesCount.increment(),
                    this.reductionManager.reduceGesture(r));
                const c = this.bufferingStrategy.calculateStrategyResult(r, &#39;touch&#39;);
                c.shouldCollect &amp;&amp;
                    (c.remove &amp;&amp; this.removeInteraction(c.remove),
                        (r.quality = c.quality),
                        this.sensors.onGesture(r),
                        this.capturedGestures.push(r),
                        this.currentBufferSize++,
                        (this.lastGestureTimestamp =
                            (a = r.events[r.events.length - 1]) === null || a === void 0 ? void 0 : a.eventTs));
            }
            clearIndirectBuffer() {
                const i = this.indirect.clearBuffer();
                this.addIndirectEvents(i);
            }
            removeInteraction(i) {
                switch (i.type) {
                    case &#39;mouse&#39;:
                        this.capturedMouseInteractions.remove(i.index);
                        break;
                    case &#39;keyboard&#39;:
                        this.capturedKeyboardInteractions.remove(i.index);
                        break;
                    case &#39;touch&#39;:
                        this.capturedGestures.remove(i.index);
                        break;
                }
            }
            addIndirectEvents(i) {
                var r;
                if (((r = i == null ? void 0 : i.events) === null || r === void 0 ? void 0 : r.length) &gt; 0) {
                    const a = [], c = l._POSignalsUtils.Util.typesCounter(this.capturedIndirectEvents.get());
                    for (const t of i.events)
                        (l.PointerConfig.instance.pointerParams.highPriorityIndirectEvents.has(t.type) &amp;&amp;
                            this.capturedIndirectEvents.length + a.length &lt;
                                l.PointerConfig.instance.pointerParams.maxIndirectEvents &amp;&amp;
                            a.push(t),
                            c[t.type] &gt; 0 || (a.push(t), (c[t.type] = 1)));
                    (this.incrementEventCounters(c, &#39;indirect&#39;),
                        this.capturedIndirectEvents.set(this.capturedIndirectEvents.concat(a)));
                }
            }
            onUrlChange() {
                this.addTag(&#39;location&#39;, window.location.href);
            }
            handleStTagElement(i) {
                if (i) {
                    const r = l.PointerConfig.instance.pointerParams.maxSelectorChildren, a = this.tagsWithValueIdentifications.getMatchingTags(i, r);
                    this.addTagsWithValue(a);
                    const c = l._POSignalsUtils.Util.isSelectorMatches(i, &#39;[data-st-tag]&#39;, r);
                    if (c instanceof Element) {
                        const t = l._POSignalsUtils.Util.getAttribute(c, &#39;data-st-tag&#39;), n = l._POSignalsUtils.Util.getAttribute(c, &#39;data-st-tag-value&#39;);
                        t &amp;&amp; this.addTag(t, n);
                    }
                }
            }
            stopListening() {
                (this.keyboard.stop(),
                    this.mouse.stop(),
                    this.gesture.stop(),
                    this.indirect.stop(),
                    this.sensors.stop(),
                    window.removeEventListener(&#39;_onlocationchange&#39;, this.onUrlChangeHandler),
                    window.removeEventListener(&#39;popstate&#39;, this.onUrlChangeHandler));
            }
            clearBehavioralData() {
                (this.capturedKeyboardInteractions.clear(),
                    this.capturedMouseInteractions.clear(),
                    this.capturedGestures.clear(),
                    this.capturedIndirectEvents.clear(),
                    this.sensors.reset(),
                    l.Tags.instance.reset(),
                    (this.currentBufferSize = 0),
                    this.keyboardInteractionsCount.reset(),
                    this.mouseInteractionsCount.reset(),
                    this.gesturesCount.reset(),
                    this.mouseEventCounters.clear(),
                    this.mouseEventCounters.clear(),
                    this.indirectEventCounters.clear(),
                    this.keyboardEventCounters.clear(),
                    this.touchEventCounters.clear(),
                    this.eventCounters.clear());
            }
            isValidGesture(i) {
                var r, a;
                return (((r = i == null ? void 0 : i.events) === null || r === void 0 ? void 0 : r.length) &gt; 0 &amp;&amp;
                    ((a = i == null ? void 0 : i.events) === null || a === void 0 ? void 0 : a.length) &lt;
                        l.PointerConfig.instance.pointerParams.maxSnapshotsCount);
            }
            filterOldIndirectEvents() {
                const r = new Date().getTime();
                this.capturedIndirectEvents.set(this.capturedIndirectEvents.get().filter((a) =&gt; r - a.epochTs &lt;= 36e5));
            }
            filterOldMouseEvents() {
                const r = new Date().getTime();
                this.capturedMouseInteractions.set(this.capturedMouseInteractions.get().filter((a) =&gt; r - a.epochTs &lt;= 36e5));
            }
            filterOldKeyboardEvents() {
                const r = new Date().getTime();
                this.capturedKeyboardInteractions.set(this.capturedKeyboardInteractions.get().filter((a) =&gt; r - a.epochTs &lt;= 36e5));
            }
            filterOldGesturesEvents() {
                const r = new Date().getTime();
                this.capturedGestures.set(this.capturedGestures.get().filter((a) =&gt; r - a.epochTs &lt;= 36e5));
            }
            incrementEventCounters(i, r) {
                const c = Date.now();
                let t;
                switch (r) {
                    case &#39;mouse&#39;:
                        t = this.mouseEventCounters;
                        break;
                    case &#39;keyboard&#39;:
                        t = this.keyboardEventCounters;
                        break;
                    case &#39;touch&#39;:
                        t = this.touchEventCounters;
                        break;
                    case &#39;indirect&#39;:
                        t = this.indirectEventCounters;
                        break;
                }
                (t.set(t.get().filter((n) =&gt; c - n.epochTs &lt;= 36e5)),
                    t.length &lt; this.MAX_EVENT_COUNTERS || t.remove(0),
                    t.push(i));
            }
            reduceEpochEventCounters() {
                const i = { epochTs: Date.now() };
                return ([
                    ...this.mouseEventCounters.get(),
                    ...this.keyboardEventCounters.get(),
                    ...this.touchEventCounters.get(),
                    ...this.indirectEventCounters.get(),
                ].forEach((a) =&gt; {
                    Object.keys(a).forEach((c) =&gt; {
                        c !== &#39;epochTs&#39; &amp;&amp; (i[c] ? (i[c] += a[c]) : (i[c] = a[c]));
                    });
                }),
                    delete i.epochTs,
                    i);
            }
        }
        l.Client = f;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    class _pingOneSignals {
        static getData() {
            return _POSignalsEntities.ClientBase.instance().getData();
        }
        static init(f) {
            return (_POSignalsEntities._POSignalsUtils.Util.ieFix(),
                _POSignalsEntities.ClientBase.instance().startSignals(f));
        }
        static initSilent(f) {
            return this.init(f);
        }
        static pauseBehavioralData() {
            _POSignalsEntities.ClientBase.instance().pauseBehavioralData();
        }
        static resumeBehavioralData() {
            _POSignalsEntities.ClientBase.instance().resumeBehavioralData();
        }
    }
    const onDomReady = function (l) {
        document.readyState !== &#39;loading&#39; ? l() : document.addEventListener(&#39;DOMContentLoaded&#39;, l);
    };
    onDomReady(function () {
        if (!window._pingOneSignalsReady) {
            const l = new CustomEvent(&#39;PingOneSignalsReadyEvent&#39;);
            (document.dispatchEvent(l), (window._pingOneSignalsReady = true));
        }
    });
    var _POSignalsEntities;
    (function (l) {
        let f;
        (function (i) {
            ((i[(i.RICH = 3)] = &#39;RICH&#39;),
                (i[(i.CLICK = 2)] = &#39;CLICK&#39;),
                (i[(i.MOVE = 1)] = &#39;MOVE&#39;),
                (i[(i.POOR = 0)] = &#39;POOR&#39;));
        })(f || (f = {}));
        class E {
            constructor(r, a, c, t, n, e) {
                ((this.clientVersion = r),
                    (this.instanceUUID = a),
                    (this.initParams = c),
                    (this.metadata = t),
                    (this.behavioralDataHandler = n),
                    (this.sessionData = e),
                    (this.Max_Mouse_Touch_Interactions = 6));
            }
            async getData(r) {
                this.incrementGetData();
                const a = await this.getRiskData(r), c = a.tags.findIndex((t) =&gt; t.name === &#39;Get Data&#39;);
                return (c !== -1 ? (a.tags[c] = this._getDataCounter) : a.tags.push(this._getDataCounter),
                    this.toString(a));
            }
            async getRiskData(r) {
                const [a, c] = await Promise.all([
                    this.metadata.getDeviceAttributes(),
                    this.metadata.getLocalAgentJwt(),
                ]);
                let t = this.behavioralDataHandler.getBehavioralData();
                t = await this.modifyBehavioralData(t);
                const n = {
                    behavioral: t,
                    tags: l.Tags.instance.tags,
                    sdkConfig: this.initParams,
                    epochTs: r,
                    instanceUUID: this.instanceUUID,
                    tabUUID: l._POSignalsStorage.SessionStorage.instance.tabUUID,
                    sdkVersion: this.clientVersion,
                    platform: &#39;web&#39;,
                    clientToken: window._pingOneSignalsToken,
                };
                let e;
                return (this.sessionData.universalTrustEnabled
                    ? (e = { jwtDeviceAttributes: await this.getJWTSignedPayload(r, a.deviceId), ...n })
                    : (e = { deviceAttributes: a, ...n }),
                    this.sessionData.agentIdentificationEnabled &amp;&amp; (e = { jwtAgentPayload: c, ...e }),
                    e);
            }
            toString(r) {
                let a;
                const c = this.metadata.getObfsInfo();
                try {
                    a = l._POSignalsUtils.Util.string2buf(JSON.stringify(r));
                }
                catch (t) {
                    throw new Error(`Failed to create data, ${t.message}`);
                }
                try {
                    a = l.pako.gzip(a);
                }
                catch (t) {
                    throw new Error(`Failed to compress data, ${t.message}`);
                }
                try {
                    a = l._POSignalsUtils.Util.encryptionBytes(a, c.key);
                }
                catch (t) {
                    throw new Error(`failed to obfuscate data, ${t.message}`);
                }
                try {
                    return `${l._POSignalsUtils.Util.base64Uint8Array(a)}.${btoa(c.identifier)}`;
                }
                catch (t) {
                    throw new Error(`failed to encode data, ${t.message}`);
                }
            }
            async getJWTSignedPayload(r, a) {
                const c = this.metadata.getSerializedDeviceAttributes();
                return this.sessionData.signJWTChallenge(c, r, a);
            }
            async modifyBehavioralData(r) {
                return ((r.mouse.interactions = this.getBestMouseInteractions(r.mouse.interactions)),
                    (r.touch.interactions = this.getBestTouchInteractions(r.touch.interactions, r.mouse.interactions)),
                    (r.keyboard.interactions = this.getBestKeyboardInteractions(r.keyboard.interactions)),
                    r);
            }
            getBestInteractions(r) {
                const c = Date.now();
                l._POSignalsUtils.Logger.debug(&#39;total interactions:&#39;, r);
                const t = r.filter((s) =&gt; c - s.epochTs &lt;= 18e4), n = this.sortInteractions(t).slice(0, 2), e = r.filter((s) =&gt; !n.some((x) =&gt; x.epochTs === s.epochTs)), o = this.sortInteractions(e).slice(0, 5 - n.length);
                return (l._POSignalsUtils.Logger.debug(&#39;final interactions for getData:&#39;, [...n, ...o]),
                    [...n, ...o].sort((s, x) =&gt; s.epochTs - x.epochTs));
            }
            getBestMouseInteractions(r) {
                return this.getBestInteractions(r);
            }
            getBestKeyboardInteractions(r) {
                return this.getBestInteractions(r);
            }
            getBestTouchInteractions(r, a) {
                const c = this.Max_Mouse_Touch_Interactions - a.length;
                return this.getTouchBestInteraction(r, c);
            }
            incrementGetData() {
                this._getDataCounter
                    ? (this._getDataCounter.value++, (this._getDataCounter.timestamp = Date.now()))
                    : (this._getDataCounter = {
                        value: 1,
                        name: &#39;Get Data&#39;,
                        timestamp: Date.now(),
                        epochTs: Date.now(),
                    });
            }
            getTouchBestInteraction(r, a) {
                return ((r = this.sortInteractions(r)), r.slice(0, a));
            }
            sortInteractions(r) {
                return r.sort((a, c) =&gt; {
                    const t = f[a.quality], n = f[c.quality];
                    return t === n ? c.epochTs - a.epochTs : n - t;
                });
            }
        }
        l.DataHandler = E;
    })(_POSignalsEntities || (_POSignalsEntities = {}));
    var _POSignalsEntities;
    (((function (l) {
        class f {
            constructor() {
                this._configuration = {
                    enabled: f.ENABLED_DEFAULT,
                    bufferSize: f.BUFFER_SIZE_DEFAULT,
                    maxSnapshotsCount: f.MAX_SNAPSHOTS_COUNT_DEFAULT,
                    sensors: f.SENSORS_DEFAULT,
                    metadataBlacklist: f.METADATA_BLACK_LIST_DEFAULT,
                    tagsBlacklistRegex: f.TAGS_BLACK_LIST_REGEX_DEFAULT,
                    behavioralBlacklist: f.BEHAVIORAL_BLACK_LIST_DEFAULT,
                    webRtcUrl: f.WEB_RTC_URL_DEFAULT,
                    eventsBlackList: f.EVENTS_BLACK_LIST_DEFAULT,
                    eventsToIgnore: f.EVENTS_TO_IGNORE_DEFAULT,
                    highPriorityIndirectEvents: f.HIGH_PRIORITY_INDIRECT_EVENTS_DEFAULT,
                    indirectIntervalMillis: f.INDIRECT_INTERVAL_MILLIS_DEFAULT,
                    mouseIntervalMillis: f.MOUSE_INTERVAL_MILLIS_DEFAULT,
                    mouseIdleTimeoutMillis: f.MOUSE_IDLE_TIMEOUT_MILLIS_DEFAULT,
                    maxMouseEvents: f.MAX_MOUSE_EVENTS_DEFAULT,
                    maxIndirectEvents: f.MAX_INDIRECT_EVENTS_DEFAULT,
                    keyboardFieldBlackList: f.KEYBOARD_FIELD_BLACK_LIST_DEFAULT,
                    keyboardCssSelectors: f.KEYBOARD_CSS_SELECTORS_DEFAULT,
                    keyboardCssSelectorsBlacklist: f.KEYBOARD_CSS_SELECTORS_BLACKLIST_DEFAULT,
                    keyboardIdentifierAttributes: f.KEYBOARD_IDENTIFIER_ATTRIBUTES_DEFAULT,
                    remoteTags: f.REMOTE_TAGS_DEFAULT,
                    maxSelectorChildren: f.MAX_SELECTOR_CHILDREN_DEFAULT,
                    eventsReduceFactorMap: f.EVENTS_REDUCE_FACTOR_MAP_DEFAULT,
                    propertyDescriptors: f.PROPERTY_DESCRIPTORS_DEFAULT,
                    additionalMediaCodecs: f.ADDITIONAL_MEDIA_CODECS_DEFAULT,
                    fingerprintTimeoutMillis: f.FINGER_PRINT_TIMEOUT_MILLIS_DEFAULT,
                    metadataDataPoints: f.METADATA_DATA_POINTS_DEFAULT,
                    uiModeling: f.UI_MODELING_CONFIG_DEFAULT,
                    uiControl: f.UI_CONTROL_LIST_DEFAULT,
                };
            }
            updateParams(i) {
                i &amp;&amp; (this._configuration = i);
            }
            get enabled() {
                return typeof this._configuration.enabled == &#39;boolean&#39;
                    ? this._configuration.enabled
                    : f.ENABLED_DEFAULT;
            }
            get bufferSize() {
                return typeof this._configuration.bufferSize == &#39;number&#39; &amp;&amp;
                    this._configuration.bufferSize &gt; 0
                    ? this._configuration.bufferSize
                    : f.BUFFER_SIZE_DEFAULT;
            }
            get maxSnapshotsCount() {
                return typeof this._configuration.maxSnapshotsCount == &#39;number&#39; &amp;&amp;
                    this._configuration.maxSnapshotsCount &gt;= 0
                    ? this._configuration.maxSnapshotsCount
                    : f.MAX_SNAPSHOTS_COUNT_DEFAULT;
            }
            get maxSensorSamples() {
                const i = this._configuration.sensors;
                return i &amp;&amp; typeof i.maxSensorSamples == &#39;number&#39; &amp;&amp; i.maxSensorSamples &gt;= 0
                    ? i.maxSensorSamples
                    : f.SENSORS_DEFAULT.maxSensorSamples;
            }
            get sensorsDeltaInMillis() {
                const i = this._configuration.sensors;
                return i &amp;&amp; typeof i.sensorsDeltaInMillis == &#39;number&#39; &amp;&amp; i.sensorsDeltaInMillis &gt;= 0
                    ? i.sensorsDeltaInMillis
                    : f.SENSORS_DEFAULT.sensorsDeltaInMillis;
            }
            get metadataBlackList() {
                var i;
                return l._POSignalsUtils.Util.isArray(this._configuration.metadataBlacklist) &amp;&amp;
                    ((i = this._configuration.metadataBlacklist) === null || i === void 0
                        ? void 0
                        : i.length) &gt; 0
                    ? this._configuration.metadataBlacklist
                    : f.METADATA_BLACK_LIST_DEFAULT;
            }
            get behavioralBlacklist() {
                return this._configuration.behavioralBlacklist
                    ? this._configuration.behavioralBlacklist
                    : f.BEHAVIORAL_BLACK_LIST_DEFAULT;
            }
            get tagsBlacklistRegex() {
                return typeof this._configuration.tagsBlacklistRegex == &#39;string&#39;
                    ? this._configuration.tagsBlacklistRegex
                    : f.TAGS_BLACK_LIST_REGEX_DEFAULT;
            }
            get webRtcUrl() {
                return typeof this._configuration.webRtcUrl == &#39;string&#39;
                    ? this._configuration.webRtcUrl
                    : f.WEB_RTC_URL_DEFAULT;
            }
            get eventsBlackList() {
                return (l._POSignalsUtils.Util.isArray(this._configuration.eventsBlackList) &amp;&amp;
                    (this._configuration.eventsBlackList = new Set(this._configuration.eventsBlackList)),
                    this._configuration.eventsBlackList instanceof Set
                        ? this._configuration.eventsBlackList
                        : f.EVENTS_BLACK_LIST_DEFAULT);
            }
            get eventsToIgnore() {
                return (l._POSignalsUtils.Util.isArray(this._configuration.eventsToIgnore) &amp;&amp;
                    (this._configuration.eventsToIgnore = new Set(this._configuration.eventsToIgnore)),
                    this._configuration.eventsToIgnore instanceof Set
                        ? this._configuration.eventsToIgnore
                        : f.EVENTS_TO_IGNORE_DEFAULT);
            }
            get highPriorityIndirectEvents() {
                return (l._POSignalsUtils.Util.isArray(this._configuration.highPriorityIndirectEvents) &amp;&amp;
                    (this._configuration.highPriorityIndirectEvents = new Set(this._configuration.highPriorityIndirectEvents)),
                    this._configuration.highPriorityIndirectEvents instanceof Set
                        ? this._configuration.highPriorityIndirectEvents
                        : f.HIGH_PRIORITY_INDIRECT_EVENTS_DEFAULT);
            }
            get indirectIntervalMillis() {
                return typeof this._configuration.indirectIntervalMillis == &#39;number&#39; &amp;&amp;
                    this._configuration.indirectIntervalMillis &gt; 0
                    ? this._configuration.indirectIntervalMillis
                    : f.INDIRECT_INTERVAL_MILLIS_DEFAULT;
            }
            get mouseIntervalMillis() {
                return typeof this._configuration.mouseIntervalMillis == &#39;number&#39; &amp;&amp;
                    this._configuration.mouseIntervalMillis &gt; 0
                    ? this._configuration.mouseIntervalMillis
                    : f.MOUSE_INTERVAL_MILLIS_DEFAULT;
            }
            get mouseIdleTimeoutMillis() {
                return typeof this._configuration.mouseIdleTimeoutMillis == &#39;number&#39; &amp;&amp;
                    this._configuration.mouseIdleTimeoutMillis &gt; 0
                    ? this._configuration.mouseIdleTimeoutMillis
                    : f.MOUSE_IDLE_TIMEOUT_MILLIS_DEFAULT;
            }
            get maxMouseEvents() {
                return typeof this._configuration.maxMouseEvents == &#39;number&#39; &amp;&amp;
                    this._configuration.maxMouseEvents &gt;= 0
                    ? this._configuration.maxMouseEvents
                    : f.MAX_MOUSE_EVENTS_DEFAULT;
            }
            get maxIndirectEvents() {
                return typeof this._configuration.maxIndirectEvents == &#39;number&#39; &amp;&amp;
                    this._configuration.maxIndirectEvents &gt;= 0
                    ? this._configuration.maxIndirectEvents
                    : f.MAX_INDIRECT_EVENTS_DEFAULT;
            }
            get keyboardFieldBlackList() {
                return (l._POSignalsUtils.Util.isArray(this._configuration.keyboardFieldBlackList) &amp;&amp;
                    (this._configuration.keyboardFieldBlackList = new Set(this._configuration.keyboardFieldBlackList)),
                    this._configuration.keyboardFieldBlackList instanceof Set
                        ? this._configuration.keyboardFieldBlackList
                        : f.KEYBOARD_FIELD_BLACK_LIST_DEFAULT);
            }
            get keyboardCssSelectors() {
                return this._configuration.keyboardCssSelectors
                    ? this._configuration.keyboardCssSelectors
                    : f.KEYBOARD_CSS_SELECTORS_DEFAULT;
            }
            get keyboardCssSelectorsBlacklist() {
                return l._POSignalsUtils.Util.isArray(this._configuration.keyboardCssSelectorsBlacklist)
                    ? this._configuration.keyboardCssSelectorsBlacklist
                    : f.KEYBOARD_CSS_SELECTORS_BLACKLIST_DEFAULT;
            }
            get keyboardIdentifierAttributes() {
                return l._POSignalsUtils.Util.isArray(this._configuration.keyboardIdentifierAttributes)
                    ? this._configuration.keyboardIdentifierAttributes
                    : f.KEYBOARD_IDENTIFIER_ATTRIBUTES_DEFAULT;
            }
            get remoteTags() {
                return this._configuration.remoteTags
                    ? this._configuration.remoteTags
                    : f.REMOTE_TAGS_DEFAULT;
            }
            get maxSelectorChildren() {
                return typeof this._configuration.maxSelectorChildren == &#39;number&#39; &amp;&amp;
                    this._configuration.maxSelectorChildren &gt; 0
                    ? this._configuration.maxSelectorChildren
                    : f.MAX_SELECTOR_CHILDREN_DEFAULT;
            }
            get eventsReduceFactorMap() {
                return this._configuration.eventsReduceFactorMap
                    ? this._configuration.eventsReduceFactorMap
                    : f.EVENTS_REDUCE_FACTOR_MAP_DEFAULT;
            }
            get propertyDescriptors() {
                return this._configuration.propertyDescriptors
                    ? this._configuration.propertyDescriptors
                    : f.PROPERTY_DESCRIPTORS_DEFAULT;
            }
            get additionalMediaCodecs() {
                return this._configuration.additionalMediaCodecs
                    ? this._configuration.additionalMediaCodecs
                    : f.ADDITIONAL_MEDIA_CODECS_DEFAULT;
            }
            get fingerprintTimeoutMillis() {
                return typeof this._configuration.fingerprintTimeoutMillis == &#39;number&#39; &amp;&amp;
                    this._configuration.fingerprintTimeoutMillis &gt; 0
                    ? this._configuration.fingerprintTimeoutMillis
                    : f.FINGER_PRINT_TIMEOUT_MILLIS_DEFAULT;
            }
            get metadataDataPoints() {
                return this._configuration.metadataDataPoints
                    ? this._configuration.metadataDataPoints
                    : f.METADATA_DATA_POINTS_DEFAULT;
            }
            get uiModelingBlacklistRegex() {
                var i;
                return typeof ((i = this._configuration.uiModeling) === null || i === void 0
                    ? void 0
                    : i.blacklistRegex) == &#39;string&#39;
                    ? this._configuration.uiModeling.blacklistRegex
                    : f.UI_MODELING_CONFIG_DEFAULT.blacklistRegex;
            }
            get uiModelingElementFilters() {
                var i;
                return !((i = this._configuration.uiModeling) === null || i === void 0) &amp;&amp;
                    i.uiElementFilters
                    ? this._configuration.uiModeling.uiElementFilters
                    : f.UI_MODELING_CONFIG_DEFAULT.uiElementFilters;
            }
            get uiModelingMaxMatchingParents() {
                var i;
                return typeof ((i = this._configuration.uiModeling) === null || i === void 0
                    ? void 0
                    : i.maxMatchingParents) == &#39;number&#39;
                    ? this._configuration.uiModeling.maxMatchingParents
                    : f.UI_MODELING_CONFIG_DEFAULT.maxMatchingParents;
            }
            get uiControlsConfig() {
                return l._POSignalsUtils.Util.isArray(this._configuration.uiControl)
                    ? this._configuration.uiControl
                    : f.UI_CONTROL_LIST_DEFAULT;
            }
        }
        ((f.ENABLED_DEFAULT = true),
            (f.BUFFER_SIZE_DEFAULT = 10),
            (f.MAX_SNAPSHOTS_COUNT_DEFAULT = 500),
            (f.METADATA_BLACK_LIST_DEFAULT = []),
            (f.TAGS_BLACK_LIST_REGEX_DEFAULT = &#39;&#39;),
            (f.BEHAVIORAL_BLACK_LIST_DEFAULT = {}),
            (f.WEB_RTC_URL_DEFAULT = &#39;&#39;),
            (f.EVENTS_BLACK_LIST_DEFAULT = new Set()),
            (f.EVENTS_TO_IGNORE_DEFAULT = new Set([
                &#39;pointerover&#39;,
                &#39;pointerenter&#39;,
                &#39;pointerdown&#39;,
                &#39;pointermove&#39;,
                &#39;pointerup&#39;,
                &#39;pointercancel&#39;,
                &#39;pointerout&#39;,
                &#39;pointerleave&#39;,
                &#39;dragstart&#39;,
                &#39;dragexit&#39;,
                &#39;drop&#39;,
                &#39;dragend&#39;,
            ])),
            (f.MAX_INDIRECT_EVENTS_DEFAULT = 15),
            (f.HIGH_PRIORITY_INDIRECT_EVENTS_DEFAULT = new Set([
                &#39;copy&#39;,
                &#39;cut&#39;,
                &#39;paste&#39;,
                &#39;resize&#39;,
                &#39;orientationchange&#39;,
                &#39;languagechange&#39;,
                &#39;submit&#39;,
                &#39;select&#39;,
            ])),
            (f.INDIRECT_INTERVAL_MILLIS_DEFAULT = 1e3),
            (f.MOUSE_INTERVAL_MILLIS_DEFAULT = 1e3),
            (f.MOUSE_IDLE_TIMEOUT_MILLIS_DEFAULT = 1e3),
            (f.MAX_MOUSE_EVENTS_DEFAULT = 500),
            (f.KEYBOARD_FIELD_BLACK_LIST_DEFAULT = new Set()),
            (f.KEYBOARD_CSS_SELECTORS_DEFAULT = {}),
            (f.KEYBOARD_CSS_SELECTORS_BLACKLIST_DEFAULT = []),
            (f.KEYBOARD_IDENTIFIER_ATTRIBUTES_DEFAULT = [
                &#39;data-selenium&#39;,
                &#39;data-selenium-id&#39;,
                &#39;data-testid&#39;,
                &#39;data-test-id&#39;,
                &#39;data-qa-id&#39;,
                &#39;data-id&#39;,
                &#39;id&#39;,
            ]),
            (f.REMOTE_TAGS_DEFAULT = {
                dv_form_submit: { selector: &#39;[data-skbuttontype=&quot;form-submit&quot;]&#39; },
                login_attempt_email_domain: {
                    selector: &#39;[data-st-tag=&quot;login.login_attempt&quot;]&#39;,
                    operation: &#39;email_domain&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
                login_attempt_hash: {
                    selector: &#39;[data-st-tag=&quot;login.login_attempt&quot;]&#39;,
                    operation: &#39;obfuscate&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
                login_attempt_length: {
                    selector: &#39;[data-st-tag=&quot;login.login_attempt&quot;]&#39;,
                    operation: &#39;length&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
                registration_attempt_email_domain: {
                    selector: &#39;[data-st-tag=&quot;registration.registration_attempt&quot;]&#39;,
                    operation: &#39;email_domain&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
                registration_attempt_hash: {
                    selector: &#39;[data-st-tag=&quot;registration.registration_attempt&quot;]&#39;,
                    operation: &#39;obfuscate&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
                registration_attempt_length: {
                    selector: &#39;[data-st-tag=&quot;registration.registration_attempt&quot;]&#39;,
                    operation: &#39;length&#39;,
                    valueSelector: &#39;[data-st-field=&quot;username&quot;]&#39;,
                    valueMandatory: true,
                },
            }),
            (f.MAX_SELECTOR_CHILDREN_DEFAULT = 2),
            (f.EVENTS_REDUCE_FACTOR_MAP_DEFAULT = {}),
            (f.PROPERTY_DESCRIPTORS_DEFAULT = {
                chrome: [&#39;app&#39;, &#39;csi&#39;, &#39;loadtimes&#39;, &#39;runtime&#39;],
                navigator: [&#39;webdriver&#39;],
                Navigator: [&#39;languages&#39;, &#39;hardwareConcurrency&#39;],
                window: [&#39;outerWidth&#39;, &#39;outerHeight&#39;],
                Screen: [&#39;width&#39;, &#39;height&#39;],
            }),
            (f.ADDITIONAL_MEDIA_CODECS_DEFAULT = {}),
            (f.FINGER_PRINT_TIMEOUT_MILLIS_DEFAULT = 3e3),
            (f.METADATA_DATA_POINTS_DEFAULT = {}),
            (f.UI_CONTROL_LIST_DEFAULT = []),
            (f.UI_MODELING_CONFIG_DEFAULT = {
                blacklistRegex: &#39;&#39;,
                uiElementFilters: { text: { maxLength: 25 }, placeholder: { maxLength: 25 } },
                maxMatchingParents: 2,
            }),
            (f.SENSORS_DEFAULT = { maxSensorSamples: 1, sensorsDeltaInMillis: 0 }),
            (l.PointerParams = f));
    }))(_POSignalsEntities || (_POSignalsEntities = {})),
        (window._POSignalsEntities = _POSignalsEntities),
        (window._pingOneSignals = _pingOneSignals));
    /**
     * [js-sha256]{@link https://github.com/emn178/js-sha256}
     *
     * @version 0.9.0
     * @author Chen, Yi-Cyuan [emn178@gmail.com]
     * @copyright Chen, Yi-Cyuan 2014-2017
     * @license MIT
     */
    /*! modernizr 3.13.0 (Custom Build) | MIT *
     * https://modernizr.com/download/?-ambientlight-applicationcache-audio-batteryapi-blobconstructor-contextmenu-cors-cryptography-customelements-customevent-customprotocolhandler-dart-dataview-eventlistener-forcetouch-fullscreen-gamepads-geolocation-ie8compat-intl-json-ligatures-matchmedia-messagechannel-notification-pagevisibility-performance-pointerevents-pointerlock-queryselector-quotamanagement-requestanimationframe-serviceworker-touchevents-typedarrays-vibrate-video-webgl-websockets-xdomainrequest !*/
    
    // Ping Identity INC.
    // Â© ALL RIGHTS RESERVED
    //Mon Mar 16 2026 15:08:53 GMT+0000 (Coordinated Universal Time)
}
">
<input type="hidden" name="project[description]" value="generated by https://pkg.pr.new">
<input type="hidden" name="project[template]" value="node">
<input type="hidden" name="project[title]" value="@forgerock/journey-app">
</form>
<script>document.getElementById("mainForm").submit();</script>

</body></html>