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EAAOC,QACPC,OAAOC,SAASC,KAAOjE,EAAK6B,OAAOqC,YAEnCvB,EAASwB,6BACTnE,EAAK8C,UAAU,kCAAoCe,EAAOrC,SAElE,GAER,GACJ,CAEA,SAAAsB,CAAUsB,GACN3E,KAAKqC,aAAamB,UAAW,EAC7BxD,KAAKwC,UAAUiB,MAAMC,QAAU,QAC/B1D,KAAKyC,WAAWgB,MAAMC,QAAU,OAC5BiB,IACA3E,KAAK0C,gBAAgBe,MAAMC,QAAU,QACrC1D,KAAK0C,gBAAgBkC,UAAYD,EAEzC,G","sources":["webpack://AJN/webpack/bootstrap","webpack://AJN/webpack/runtime/define property getters","webpack://AJN/webpack/runtime/hasOwnProperty shorthand","webpack://AJN/webpack/runtime/make namespace object","webpack://AJN/./src/js/site/statecheck.ts","webpack://AJN/./src/js/site/checkeval.ts","webpack://AJN/external var \"jQuery\"","webpack://AJN/./src/js/site/braintree.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as $ from 'jquery';\r\n\r\nexport interface StateCheckItem {\r\n statecode: string;\r\n message: string;\r\n onlyCourt: boolean;\r\n tags: Array;\r\n zipCodes?: Array;\r\n}\r\n\r\nexport class StateCheck {\r\n statecheckitems: Array;\r\n classtags: Array;\r\n $warning: JQuery;\r\n $state: JQuery;\r\n $courtddCourt?: JQuery;\r\n $courtddPersonal?: JQuery;\r\n $zipcode?: JQuery;\r\n\r\n constructor(statecheckitems: Array, classtags: Array) {\r\n this.statecheckitems = statecheckitems;\r\n this.classtags = classtags;\r\n }\r\n\r\n setup($warning: JQuery, $state: JQuery, $courtddCourt?: JQuery, $courtddPersonal?: JQuery, $zipcode?: JQuery) {\r\n const self = this;\r\n this.$warning = $warning;\r\n this.$state = $state;\r\n this.$courtddCourt = $courtddCourt;\r\n this.$courtddPersonal = $courtddPersonal;\r\n this.$zipcode = $zipcode;\r\n\r\n this.$state.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n\r\n if (this.$zipcode)\r\n this.$zipcode.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n\r\n if (this.$courtddCourt) {\r\n this.$courtddCourt.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n }\r\n if (this.$courtddPersonal) {\r\n this.$courtddPersonal.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n }\r\n this.doCheckControls();\r\n }\r\n\r\n getZipcode(): string | null {\r\n if (this.$zipcode) {\r\n const zip = this.$zipcode.val();\r\n return zip.trim().substring(0, 5);\r\n }\r\n return null;\r\n }\r\n\r\n doCheckControls() {\r\n const state = this.$state.val();\r\n if (state) {\r\n const isCourt =\r\n !(this.$courtddCourt) || (this.$courtddCourt.is(\":checked\"));\r\n const zipcode = this.getZipcode();\r\n\r\n this.doCheck(state, isCourt, zipcode);\r\n }\r\n else {\r\n this.$warning.hide();\r\n }\r\n }\r\n\r\n doCheck(statecode: string, isCourt: boolean, zipcode: string | null) {\r\n for (const item of this.statecheckitems) {\r\n if (item.statecode === statecode) {\r\n if (this.doCheckState(item, isCourt, zipcode)) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n this.$warning.hide();\r\n }\r\n\r\n // Returns true if we needed to show a warning\r\n doCheckState(item: StateCheckItem, isCourt: boolean, zipcode: string | null): boolean {\r\n // see if ANY tag matches\r\n for (const classtag of this.classtags) {\r\n for (const statetag of item.tags) {\r\n // do we need to check for a zip code match\r\n if (item.zipCodes && item.zipCodes.length > 0) {\r\n if (!zipcode) {\r\n return false;\r\n }\r\n if (!item.zipCodes.includes(zipcode)) {\r\n return false;\r\n }\r\n }\r\n\r\n if (classtag === statetag && (!item.onlyCourt || isCourt)) {\r\n this.$warning.html(item.message).show();\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}","import { StateCheckItem } from \"./statecheck\";\r\n\r\nexport const checkEval: Array = [\r\n {\r\n statecode: 'IA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: The state of Iowa does not allow assessments/​evaluations to be completed for anyone who currently resides in Iowa who had an OWI in Iowa.\r\nIf you need an assessment for an Iowa OWI but live out of state, you may complete this assessment.\r\nPlease ask us for our out of state provider form. `\r\n },\r\n {\r\n statecode: 'GA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are required to complete an assessment/evaluation for the state of GA you must go through a local provider in GA approved by DBHDD. If you take our out of state assessment you MUST get prior approval before doing so and NO REFUNDS be provided once the assessment is completed.`\r\n },\r\n {\r\n statecode: 'IL',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: If you live in the state of IL and have a requirement in IL to complete a risk reduction class or assessment, you must go through a local provider in your state.\r\n If you have a requirement in IL but live out of the state, you may be able to complete our programs with prior approval. `\r\n },\r\n {\r\n statecode: 'MI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Residents of Michigan that need to complete a MI assessment must go through a local in-state provider. Those that have a MI assessment requirement that live out of state may complete an assessment from an out of state provider with prior approval.`\r\n },\r\n {\r\n statecode: 'MO',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are a resident of the state of Missouri and had a DUI in this state, you must go through a local SATOP provider. \r\n If you had a DUI in MO but live out of state, \r\n then you can complete our assessment using the \"SATOP Comparable Form\".`\r\n },\r\n {\r\n statecode: 'NC',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: If you live in NC and had a DUI in NC you must go through one of their state approved providers. \r\nIf you live out of the state of NC, and you must complete a substance assessment, it is best to contact a North Carolina provider before you begin your services.\r\nIf you complete our substance abuse assessment, you must choose a North Carolina DWI services provider to review and approve it.\r\nPlease be advised we DO NOT refund completed assessments.`\r\n },\r\n {\r\n statecode: 'OK',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: This assessment must be completed by an ADSAC assessor certified by the Oklahoma Department of Mental Health and Substance Abuse Services and cannot be taken by an out of state provider for a DUI in Oklahoma. We do not provide a red stamp for this evaluation. If you live out of state you may be able to complete our assessment with prior approval.`\r\n },\r\n {\r\n statecode: 'OR',\r\n zipCodes: [\"97702\", \"97701\", \"97756\", \"97703\", \"97739\", \"97759\", \"97760\",\"97539\",\r\n \"97707\", \"97413\", \"97712\", \"97709\", \"97708\", \"97741\", \"97759\", \"97760\",\r\n \"97734\", \"97761\", \"97350\", \"97711\", \"97730\", \"97701\", \"97754\", \"97760\",\r\n \"97753\", \"97712\", \"97751\", \"97752\"],\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning If you live in Deschutes, Jefferson or Crook Counties in the state of Oregon, you must use a local in-state provider for your DUI evaluation.`\r\n },\r\n {\r\n statecode: 'NY',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: \r\n NY residents who also have a requirement to complete an evaluation must also contact a local OASIS approved provider in the state of NY.\r\nOut of state residents may be able to have an evaluation completed by an out of state provider with prior approval.`\r\n },\r\n {\r\n statecode: 'WA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you live in WA state and have a WA state drivers license you must go through a local state approved and certified agency. If you live out of state, you can complete our assessment.`\r\n },\r\n {\r\n statecode: 'WI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning The state of WI requires anyone required to complete an assessment to do so with a state licensed counselor in the state you live in. If you have a WI assessment requirement you can only complete ours if you live in CA as we are licensed in this state.`\r\n }\r\n];","const __WEBPACK_NAMESPACE_OBJECT__ = jQuery;","import * as $ from 'jquery';\r\n\r\ndeclare var braintree: any;\r\n\r\n// assume these IDs for dom objects\r\nconst containerid = '#dropin-container';\r\nconst submitbuttonid = '#submit-button';\r\nconst processingid = '#processing-message';\r\nconst checkoutmessageid = '#checkout-message';\r\n\r\nexport interface BraintreeConfig {\r\n clientToken: string;\r\n urlProcess: string; // '/Registration/PaymentBTProcess.ashx'\r\n urlReceipt: string; // '/Registration/RegisterReceipt.aspx'\r\n}\r\n\r\nexport class BraintreePay {\r\n config: BraintreeConfig;\r\n submitButton: HTMLInputElement;\r\n container: HTMLDivElement;\r\n processing: HTMLDivElement;\r\n checkoutmessage: HTMLDivElement;\r\n\r\n constructor(config: BraintreeConfig) {\r\n this.config = config;\r\n this.submitButton = document.querySelector(submitbuttonid) as HTMLInputElement;\r\n this.container = document.querySelector(containerid) as HTMLDivElement;\r\n this.processing = document.querySelector(processingid) as HTMLDivElement;\r\n this.checkoutmessage = document.querySelector(checkoutmessageid) as HTMLDivElement;\r\n }\r\n\r\n initalize() {\r\n const self = this;\r\n braintree.dropin.create({\r\n // Insert your tokenization key here\r\n authorization: this.config.clientToken,\r\n container: '#dropin-container'\r\n }, function (createErr, instance) {\r\n if (createErr) {\r\n // Handle any errors that might've occurred when creating Drop-in\r\n console.error(createErr);\r\n self.showError(createErr);\r\n return;\r\n }\r\n self.submitButton.addEventListener('click', function () {\r\n self.handleSubmit(instance);\r\n });\r\n self.submitButton.disabled = false;\r\n });\r\n }\r\n\r\n handleSubmit(instance: any) {\r\n const self = this;\r\n self.submitButton.disabled = true;\r\n self.container.style.display = \"none\";\r\n self.processing.style.display = \"block\";\r\n instance.requestPaymentMethod(function (requestPaymentMethodErr, payload) {\r\n // When the user clicks on the 'Submit payment' button this code will send the\r\n // encrypted payment information in a variable called a payment method nonce\r\n if (requestPaymentMethodErr) {\r\n console.error(requestPaymentMethodErr);\r\n self.showError(requestPaymentMethodErr);\r\n return;\r\n }\r\n else {\r\n $.ajax({\r\n type: 'POST',\r\n url: self.config.urlProcess,\r\n data: {\r\n 'payment_method_nonce': payload.nonce\r\n }\r\n }).done(function (result) {\r\n if (result.success) {\r\n window.location.href = self.config.urlReceipt;\r\n } else {\r\n instance.clearSelectedPaymentMethod();\r\n self.showError('Payment Error ' + result.message);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n showError(errormsg: string) {\r\n this.submitButton.disabled = false;\r\n this.container.style.display = \"block\";\r\n this.processing.style.display = \"none\";\r\n if (errormsg) {\r\n this.checkoutmessage.style.display = \"block\";\r\n this.checkoutmessage.innerHTML = errormsg;\r\n }\r\n }\r\n}"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","StateCheck","constructor","statecheckitems","classtags","this","setup","$warning","$state","$courtddCourt","$courtddPersonal","$zipcode","self","on","doCheckControls","getZipcode","val","trim","substring","state","isCourt","is","zipcode","doCheck","hide","statecode","item","doCheckState","classtag","statetag","tags","zipCodes","length","includes","onlyCourt","html","message","show","checkEval","jQuery","BraintreePay","config","submitButton","document","querySelector","container","processing","checkoutmessage","initalize","braintree","dropin","create","authorization","clientToken","createErr","instance","console","error","showError","addEventListener","handleSubmit","disabled","style","display","requestPaymentMethod","requestPaymentMethodErr","payload","type","url","urlProcess","data","nonce","done","result","success","window","location","href","urlReceipt","clearSelectedPaymentMethod","errormsg","innerHTML"],"sourceRoot":""}