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IAAIX,EAAae,EACrC,EAEA,gBAAIC,GACF,OAAOH,KAAKN,aAAavF,IAxLT,mCAyLlB,EAKA,SAAIiG,GACF,OAAOJ,KAAKN,aAAavF,IAAIiF,IAAc,CAAC,CAC9C,EAKA,SAAIgB,CAAMA,GACRJ,KAAKN,aAAaI,IAAIV,EAAWgB,EACnC,EAKA,QAAIC,GACF,OAAOL,KAAKN,aAAavF,IAAIkF,IAAa,CAAC,CAC7C,EAKA,QAAIgB,CAAKA,GACPL,KAAKN,aAAaI,IAAIT,EAAUgB,EAClC,EAKA,gBAAIC,GACF,OAAON,KAAKN,aAAavF,IAAImF,EAC/B,EAKA,gBAAIgB,CAAaA,GACfN,KAAKN,aAAaI,IAAIR,EAAmBgB,EAC3C,EAEJ,C","sources":["webpack://stdcheck-exposed-wp-theme/./themes/stdcheck-exposed/src/js/services/http.js","webpack://stdcheck-exposed-wp-theme/./themes/stdcheck-exposed/src/js/services/cart.js","webpack://stdcheck-exposed-wp-theme/./themes/stdcheck-exposed/src/js/components/prices-packages.js","webpack://stdcheck-exposed-wp-theme/./themes/stdcheck-exposed/src/js/services/storage.js"],"sourcesContent":["/**\n * Service class for making HTTP requests\n */\nexport function HttpService() {\n  /**\n   * Make an HTTP request that expects a JSON response\n   *\n   * @param {*} url       The URL to make the request to\n   * @param {*} options   options for the fetch function\n   *\n   * @returns {Promise}   A promise that resolves with the JSON response data, or rejects for any of these reasons:\n   *                      1. The HTTP status code is not between 200-299\n   *                      2. The response is not valid JSON\n   *                      3. Network failures or anything that prevented the HTTP request from completing\n   */\n  function fetchJson(url, options = {}) {\n    options.headers = { Accept: 'application/json', 'Content-Type': 'application/json' };\n\n    return new Promise((resolve, reject) => {\n      fetch(url, options)\n        .then((response) => {\n          if (response.ok && response.status !== 204) {\n            response.json().then((data) => resolve(data));\n          } else if (response.ok && response.status === 204) {\n            resolve();\n          } else {\n            response.json().then((errorResponse) => {\n              errorResponse.code = response.status;\n              reject(errorResponse);\n            });\n          }\n        })\n        .catch((error) => reject(error));\n    });\n  }\n\n  return {\n    /**\n     * Make a GET request to the specified URL\n     *\n     * @param {string} url  The URL to make the request to\n     *\n     * @returns {Promise} A Promise that resolves with the response data when successful, and rejects on failure\n     */\n    get: (url) => fetchJson(url, { method: 'GET' }),\n\n    /**\n     * Make a POST request to the specified URL\n     *\n     * @param {string} url  The URL to make the request to\n     * @param {any} body    The request body\n     *\n     * @returns {Promise} A Promise that resolves with the response data when successful, and rejects on failure\n     */\n    post: (url, body) => fetchJson(url, { method: 'POST', body: JSON.stringify(body) }),\n  };\n}\n","import { StorageService } from './storage';\n\n/**\n *  Service for handling client-side logic related to the user's tests and packages shopping cart\n */\nexport function CartService() {\n  const storageService = new StorageService();\n\n  return {\n    /**\n     * Sends the user to the order page\n     */\n    goToOrderPage: function () {\n      window.location.href = storageService.token ? `/order?token=${storageService.token.token}` : '/order';\n    },\n  };\n}\n","import { CartService } from '../services/cart';\nimport { HttpService } from '../services/http';\nimport { StorageService } from '../services/storage';\n\n/**\n * JS component for actions in the \"Prices & Packages\" page\n */\nfunction PricesPackagesComponent() {\n  const cartService = new CartService();\n  const httpService = new HttpService();\n  const storageService = new StorageService();\n\n  // Data loaded server-side\n  const testData = window.serverData;\n\n  /**\n   * Initialize the component\n   */\n  window.addEventListener('load', () => {\n    setCjevent();\n    setLocation();\n    initializeCheckboxesFromLocalStorage();\n  });\n\n  /**\n   * Sets the \"checked\" state of the checkbox for a test in the DOM\n   *\n   * @param {string} slug     The slug for the test, which is the checkbox id\n   * @param {boolean} value   The value for the checked attribute\n   */\n  function setTestCheckboxState(slug, value) {\n    const checkbox = document.getElementById(slug);\n    if (checkbox) {\n      checkbox.checked = value;\n    }\n  }\n\n  /**\n   * Initializes checkbox values for each test based on selected tests in localStorage\n   */\n  function initializeCheckboxesFromLocalStorage() {\n    storageService.tests.forEach((test) => setTestCheckboxState(test.slug, true));\n  }\n\n  /**\n   * Check if a test is selected by the user\n   *\n   * @param {string} testSlug   The slug of the test to check for whether it is selected or not\n   *\n   * @returns {bool} Whether the test is selected or not\n   */\n  function isTestSelected(testSlug) {\n    return storageService.tests.some((test) => test.slug === testSlug);\n  }\n\n  /**\n   * Set location request\n   */\n  function setLocation() {\n    const locationId = new URLSearchParams(window.location.search).get('loc_id');\n    if (!locationId) {\n      return;\n    }\n\n    httpService\n      .post(`${process.env.API_URL}/order-select-lab`, {\n        center_id: parseInt(locationId),\n        coupon: storageService.coupon,\n        tests: storageService.tests,\n      })\n      .then((data) => {\n        storageService.lab = data.center || null;\n        storageService.fee = data.fee || null;\n        window.location.href = '/std-test-pricing.php';\n      })\n      .catch(() => {\n        storageService.lab = null;\n      });\n  }\n\n  /**\n   * Set cjevent\n   */\n  function setCjevent() {\n    const cjevent = new URLSearchParams(window.location.search).get('cjevent');\n    if (cjevent) {\n      storageService.cjevent = cjevent;\n    }\n  }\n\n  /**\n   * Handles special cases where tests are related and affect each other's selection\n   *\n   * @param {string} testSlug the slug of the test being selected\n   */\n  function handleRelatedTestsSelection(testSlug) {\n    const relatedTests = ['chlamydia', 'gonorrhea', 'chlamydia-gonorrhea'];\n\n    switch (testSlug) {\n      case 'chlamydia':\n        if (isTestSelected('gonorrhea')) {\n          selectTestAndRemoveRelated('chlamydia-gonorrhea', relatedTests);\n        } else {\n          selectTestAndRemoveRelated('chlamydia', relatedTests);\n        }\n        break;\n      case 'gonorrhea':\n        if (isTestSelected('chlamydia')) {\n          selectTestAndRemoveRelated('chlamydia-gonorrhea', relatedTests);\n        } else {\n          selectTestAndRemoveRelated('gonorrhea', relatedTests);\n        }\n        break;\n      case 'chlamydia-gonorrhea':\n        selectTestAndRemoveRelated('chlamydia-gonorrhea', relatedTests);\n        break;\n    }\n  }\n\n  /**\n   * Select a test and remove its related tests from the selected tests\n   *\n   * @param {string} testSlug         The slug of the test to select\n   * @param {string[]} relatedTests   An array with the slugs of tests related to the one being selected\n   */\n  function selectTestAndRemoveRelated(testSlug, relatedTests) {\n    relatedTests.forEach((relatedSlug) => {\n      removeTest(relatedSlug);\n      setTestCheckboxState(relatedSlug, false);\n    });\n\n    selectTest(testSlug);\n    setTestCheckboxState(testSlug, true);\n  }\n\n  /**\n   * Select the test and add it to the tests stored in localStorage\n   *\n   * @param {string} testSlug  The slug of the test to be added.\n   */\n  function selectTest(testSlug) {\n    if (isTestSelected(testSlug)) {\n      return;\n    }\n\n    const test = testSlug === testData.hivRNA.slug ? testData.hivRNA : testData.tests[testSlug];\n    let selectedTests = storageService.tests;\n    selectedTests.push({\n      name: test.name,\n      type: test.type,\n      slug: test.slug,\n      price: test.price || 0,\n      public_name: test.public_name,\n    });\n    storageService.tests = selectedTests;\n  }\n\n  /**\n   * Remove the test from the selected tests stored in localStorage\n   *\n   * @param {string} testSlug The name of the test to remove\n   */\n  function removeTest(testSlug) {\n    storageService.tests = storageService.tests.filter((test) => test.slug !== testSlug);\n  }\n\n  /**\n   * Display error message\n   *\n   * @param {string} id The id of the DOM to display\n   */\n  function displayErrorMessage(id) {\n    document.getElementById(id).classList.remove('is-hidden');\n  }\n\n  /**\n   * Hide error message\n   *\n   * @param {string} id The id of the DOM to hide\n   */\n  function hideErrorMessage(id) {\n    document.getElementById(id).classList.add('is-hidden');\n  }\n\n  return {\n    /**\n     * Click handler for the individual test checkboxes.\n     *\n     * Adds/removes the test from localStorage, handling the special case for chlamydia/gonorrhea selection.\n     *\n     * @param {Object} event The click event.\n     */\n    onIndividualTestClick: function (event) {\n      // Clear any previously selected test panels when selecting individual tests\n      removeTest(testData.ten.slug);\n      removeTest(testData.tenWithHIVRNA.slug);\n\n      hideErrorMessage('individual-test-required-error');\n\n      storageService.removeReorderInformation();\n      storageService.removePreviousOrderInformation();\n\n      let testSlug = event.target.value;\n      if (event.target.checked) {\n        selectTest(testSlug);\n        handleRelatedTestsSelection(testSlug);\n      } else {\n        removeTest(testSlug);\n      }\n    },\n\n    /**\n     * Click handler for the 10 Test Panel buttons.\n     *\n     * Adds only the panel to selected tests and submits the selection\n     *\n     * @param {string} panelKey The key for the panel in the testData object\n     */\n    onPanelButtonClick(panelKey) {\n      const panel = testData[panelKey];\n      storageService.removeReorderInformation();\n\n      if (storageService.tests.length === 1 && storageService.tests[0].slug === panel.slug) {\n        cartService.goToOrderPage();\n\n        return;\n      }\n\n      storageService.removePreviousOrderInformation();\n      storageService.tests = [\n        {\n          name: panel.name,\n          type: panel.type,\n          slug: panel.slug,\n          price: panel.price || 0,\n          public_name: panel.public_name,\n          tests: panel.tests,\n        },\n      ];\n\n      cartService.goToOrderPage();\n    },\n\n    /**\n     * Click handler for the individual tests.\n     *\n     * Submits the individual tests selected\n     */\n    onIndividualTestButtonClick() {\n      if (!storageService.tests.length) {\n        displayErrorMessage('individual-test-required-error');\n\n        return;\n      }\n\n      cartService.goToOrderPage();\n    },\n  };\n}\n\nwindow.pricesPackages = new PricesPackagesComponent();\n","/**\n * Service class for accessing localStorage.\n */\nexport function StorageService() {\n  /**\n   * Keys used to reference data in localStorage\n   */\n  const CJ_EVENT_KEY = 'ngStorage-cjevent';\n  const COUPON_KEY = 'ngStorage-coupon';\n  const FEE_KEY = 'ngStorage-fee';\n  const LAB_KEY = 'ngStorage-center';\n  const REORDER_KEY = 'ngStorage-reorder';\n  const TESTS_KEY = 'ngStorage-tests';\n  const TOKEN_KEY = 'ngStorage-token';\n  const ZIPCODE_KEY = 'ngStorage-zip_code';\n  const IN_HOME_KEY = 'ngStorage-in-home-booking-result';\n  const EMAIL_KEY = 'ngStorage-email';\n  const FREE_KEY = 'ngStorage-free';\n  const TRANSACTION_ID_KEY = 'transaction_id';\n  const BETTER_LAB = 'ngStorage-betterlab';\n  const IHC_PROVIDERS_KEY = 'ngStorage-ihc-providers';\n\n  /**\n   * Retrieves a value stored as JSON in localStorage\n   *\n   * @param {string} key the key to retrieve from storage\n   *\n   * @return {any}  The value stored in localStorage\n   */\n  function getLocalStorage(key) {\n    return JSON.parse(window.localStorage?.getItem(key) || null);\n  }\n\n  /**\n   * Saves a value in localStorage as a JSON string\n   *\n   * @param {string} key The key to store the value in\n   * @param {any} value  The value to be stored\n   *\n   * @return {void}\n   */\n  function setLocalStorage(key, value) {\n    window.localStorage?.setItem(key, JSON.stringify(value || null));\n  }\n\n  /**\n   * Deletes a value from the storage.\n   *\n   * @param key {string} The value's key.\n   *\n   * @return void\n   */\n  function removeLocalStorage(key) {\n    window.localStorage?.removeItem(key);\n  }\n\n  // Initialize tests in localStorage\n  if (!getLocalStorage(TESTS_KEY)) {\n    setLocalStorage(TESTS_KEY, []);\n  }\n\n  return {\n    /**\n     * Local Storage get, set and remove\n     */\n    localStorage: {\n      get: getLocalStorage,\n      set: setLocalStorage,\n      remove: removeLocalStorage,\n    },\n\n    /**\n     * Removes any reorder information from local storage\n     */\n    removeReorderInformation: function () {\n      window.localStorage?.removeItem(REORDER_KEY);\n    },\n\n    /**\n     * Removes previous order information from local storage\n     */\n    removePreviousOrderInformation: function () {\n      window.localStorage?.removeItem(TRANSACTION_ID_KEY);\n      window.localStorage?.removeItem(BETTER_LAB);\n    },\n\n    /**\n     * Retrieve coupon data from local storage\n     */\n    get coupon() {\n      return this.localStorage.get(COUPON_KEY) ?? {};\n    },\n\n    /**\n     * Store coupon data in local storage\n     */\n    set coupon(coupon) {\n      this.localStorage.set(COUPON_KEY, coupon);\n    },\n\n    /**\n     * Retrieve fee data from localStorage\n     */\n    get fee() {\n      return this.localStorage.get(FEE_KEY);\n    },\n\n    /**\n     * Store fee data in localStorage\n     */\n    set fee(fee) {\n      this.localStorage.set(FEE_KEY, fee);\n    },\n\n    /**\n     * Retrieve lab data from local storage\n     */\n    get lab() {\n      return this.localStorage.get(LAB_KEY) ?? {};\n    },\n\n    /**\n     * Store lab data in local storage\n     */\n    set lab(lab) {\n      this.localStorage.set(LAB_KEY, lab);\n    },\n\n    /**\n     * Retrieve psc data from local storage\n     */\n    get psc() {\n      return this.lab;\n    },\n\n    /**\n     * Store psc data in local storage\n     */\n    set psc(psc) {\n      this.lab = psc;\n    },\n\n    /**\n     * Retrieve selected tests data from local storage\n     */\n    get tests() {\n      return this.localStorage.get(TESTS_KEY) ?? [];\n    },\n\n    /**\n     * Store selected tests data in local storage\n     */\n    set tests(tests) {\n      this.localStorage.set(TESTS_KEY, tests);\n    },\n\n    /**\n     * Retrieve token data from localStorage\n     */\n    get token() {\n      return this.localStorage.get(TOKEN_KEY);\n    },\n\n    /**\n     * Store token data in localStorage\n     */\n    set token(token) {\n      this.localStorage.set(TOKEN_KEY, token);\n    },\n\n    /**\n     * Retrieve CJ Affiliate data from localStorage\n     */\n    get cjevent() {\n      return this.localStorage.get(CJ_EVENT_KEY);\n    },\n\n    /**\n     * Store CJ Affiliate data in localStorage\n     */\n    set cjevent(cjevent) {\n      this.localStorage.set(CJ_EVENT_KEY, cjevent);\n    },\n\n    /**\n     * Retrieve zip code data from localStorage\n     */\n    get zipCode() {\n      return this.localStorage.get(ZIPCODE_KEY);\n    },\n\n    /**\n     * Store zip code data in localStorage\n     */\n    set zipCode(zipCode) {\n      this.localStorage.set(ZIPCODE_KEY, zipCode);\n    },\n\n    get inHomeResult() {\n      return this.localStorage.get(IN_HOME_KEY);\n    },\n\n    /**\n     * Retrieve email data from local storage\n     */\n    get email() {\n      return this.localStorage.get(EMAIL_KEY) ?? {};\n    },\n\n    /**\n     * Store email data in local storage\n     */\n    set email(email) {\n      this.localStorage.set(EMAIL_KEY, email);\n    },\n\n    /**\n     * Retrieve free order data from local storage\n     */\n    get free() {\n      return this.localStorage.get(FREE_KEY) ?? {};\n    },\n\n    /**\n     * Store free order data in local storage\n     */\n    set free(free) {\n      this.localStorage.set(FREE_KEY, free);\n    },\n\n    /**\n     * Retrieve In-Home Collection provider IDs from local storage\n     */\n    get ihcProviders() {\n      return this.localStorage.get(IHC_PROVIDERS_KEY);\n    },\n\n    /**\n     * Store In-Home Collection provider IDs in local storage\n     */\n    set ihcProviders(ihcProviders) {\n      this.localStorage.set(IHC_PROVIDERS_KEY, ihcProviders);\n    },\n  };\n}\n"],"names":["HttpService","fetchJson","url","options","headers","Accept","Promise","resolve","reject","fetch","then","response","ok","status","json","data","errorResponse","code","catch","error","get","method","post","body","JSON","stringify","CartService","storageService","goToOrderPage","window","location","href","token","pricesPackages","cartService","httpService","testData","serverData","setTestCheckboxState","slug","value","checkbox","document","getElementById","checked","isTestSelected","testSlug","tests","some","test","selectTestAndRemoveRelated","relatedTests","forEach","relatedSlug","removeTest","selectTest","hivRNA","selectedTests","push","name","type","price","public_name","filter","addEventListener","cjevent","URLSearchParams","search","setCjevent","locationId","center_id","parseInt","coupon","lab","center","fee","setLocation","onIndividualTestClick","event","ten","tenWithHIVRNA","classList","add","removeReorderInformation","removePreviousOrderInformation","target","handleRelatedTestsSelection","onPanelButtonClick","panelKey","panel","length","onIndividualTestButtonClick","remove","StorageService","CJ_EVENT_KEY","COUPON_KEY","FEE_KEY","LAB_KEY","TESTS_KEY","TOKEN_KEY","ZIPCODE_KEY","EMAIL_KEY","FREE_KEY","IHC_PROVIDERS_KEY","getLocalStorage","key","parse","localStorage","getItem","setLocalStorage","setItem","set","removeItem","this","psc","zipCode","inHomeResult","email","free","ihcProviders"],"sourceRoot":""}