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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAgBf,IAAMC,EAAN,cAA6C,IAAW,CAAxD,kCACsB,uBAA8B,CAAC,EAE1D,kBAAmB,CACjB,OAAO,IACT,CAEQ,oBAAoBC,EAAuBC,EAAe,CAChE,MAAO,GAAGD,EAAc,QAAQ,IAAK,GAAG,CAAC,IAAIC,CAAK,EACpD,CAEA,QAAS,CACP,SAAO;AAAA;AAAA,UAED,KAAK,kBAAkB,IACvB,CAACD,EAAuBC,OACtB,iBAAgB,IAAM,KAAK,oBAAoBD,EAAeC,EAAQ,CAAC,CAAC;AAAA,gBACpEH,EAAa;AAAA,sBACPE,CAAa;AAAA,kBAE3B,CAAC;AAAA;AAAA,KAGP,CACF,EAvB6B,MAA1B,MAAS,CAAE,KAAM,KAAM,CAAC,GADdD,EACgB,iCADhBA,EAAN,MADN,MAAc,uCAAuC,GACzCA,CAA8B,ECN3C,MAAMG,EAAY,CAAC,EAGnBA,EAAU,KAAK,6DAA6E,EAG5F,UAAY,EAaZ,QAAQ,IAAIA,CAAS,EAClB,KAAK,IAAM,CACV,MAAMC,EAAc,KAAY,MAAM,EAChCC,EAAU,OAChBD,EAAY,QAAK,KAAuBC,CAAO,CAAC,CAClD,CAAC,EACA,MAAMzB,GAAS,CACd,QAAQ,MAAM,4BAA6BA,CAAK,CAClD,CAAC,C","sources":["webpack://dot-com/./app/assets/javascript/utils/safe_assign.ts","webpack://dot-com/./app/assets/javascript/components/quote/flood-premium.ts","webpack://dot-com/./app/assets/javascript/components/quote/policy-premium.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/policy-preparation-accordion.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/completion-summary/completion-summary.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/completion-summary/progress-circle/progress-circle.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/content/content.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/content/upload/document-upload.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/content/download/document-download.ts","webpack://dot-com/./app/assets/javascript/components/portal/policy-preparation-accordion/content/upload/confirm-document/confirm-document.ts","webpack://dot-com/./app/assets/javascript/components/portal/slide-carousel/slide-carousel.ts","webpack://dot-com/./app/assets/javascript/components/portal/slide-carousel/controls/slide-carousel-controls.ts","webpack://dot-com/./app/assets/javascript/components/portal/slide-carousel/content/required-documents.ts","webpack://dot-com/./app/assets/packs/application-next-of-kin.js"],"sourcesContent":["/** Object.assign, except the compiler tells you if the types don't match */\nexport function safeAssign(target: T, source: Pick | T): T {\n return Object.assign(target, source)\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement } from \"lit/decorators.js\"\nimport { store, PremiumStoreState } from \"../../store/quote/premium\"\nimport { safeAssign } from \"../../utils/safe_assign\"\n\n@customElement(\"kin-quote-flood-premium\")\nexport class QuoteFloodPremiumComponent extends LitElement {\n waiting = true\n flood = \"\"\n\n // Since we're not using slots, we don't need the Shady DOM.\n createRenderRoot() {\n return this\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n store.subscribe(this.onStoreUpdate)\n store.refresh(true)\n }\n\n render() {\n if (this.waiting) {\n return html`\n \n \n Calculating...\n \n `\n } else {\n return html` ${this.flood} `\n }\n }\n\n private onStoreUpdate = ({ flood, waiting }: PremiumStoreState) => {\n safeAssign(this, { flood, waiting })\n this.requestUpdate()\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement } from \"lit/decorators.js\"\nimport { store, PremiumStoreState } from \"../../store/quote/premium\"\nimport { safeAssign } from \"../../utils/safe_assign\"\n\n@customElement(\"kin-quote-policy-premium\")\nexport class QuotePolicyPremiumComponent extends LitElement {\n waiting = true\n floodEnabled = false\n policy = \"\"\n flood = \"\"\n\n // Since we're not using slots, we don't need the Shady DOM.\n createRenderRoot() {\n return this\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n store.subscribe(this.onStoreUpdate)\n store.refresh()\n }\n\n render() {\n if (this.waiting) {\n return html`\n
\n \n

Calculating...

\n
\n `\n } else {\n return html`\n
\n

\n Home Policy:\n ${this.policy}\n this year\n

\n
\n ${this.floodEnabled\n ? html`\n
\n

\n +\n Flood Policy:\n ${this.flood}\n per year\n

\n
\n `\n : \"\"}\n `\n }\n }\n\n private onStoreUpdate = (state: PremiumStoreState) => {\n safeAssign(this, state)\n this.requestUpdate()\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\n\nexport const StepLabels: Record = {\n POLICY_SIGNING: \"policy_signed\",\n PASSWORD_SET: \"password_creation\",\n DECLARATION_PAGE: \"declaration_page\",\n WIND_MITIGATION: \"windstorm_mitigation\",\n PROOF_OF_REPAIRS: \"proof_of_repairs\",\n INSPECTION: \"self_inspection\"\n}\n\nexport const DocumentTypes: Record = {\n WIND_MITIGATION: \"windstorm_mitigation_form\",\n PROOF_OF_REPAIRS: \"roof_permit\",\n INSPECTION: \"self_inspection\"\n}\n\nexport interface Step {\n step_name: string\n step_description: string\n step_priority: number\n step_complete: boolean\n step_id: number\n step_label?: string\n document_id?: number\n inactive: boolean\n}\n\nexport interface StepData {\n user_id: string\n steps: Step[]\n dec_page_present?: boolean\n}\n\n@customElement(\"kin-policy-preparation-accordion\")\nexport class PolicyPreparationAccordionComponent extends LitElement {\n @state()\n private _currentStep: number | undefined = undefined\n @property({ type: Object }) stepData: StepData\n @property({ type: Number }) policyId: number\n @property() policyNumber: string\n @property() userId: string\n @property() effectiveDate: string\n @property() newPurchase: boolean\n @property() inspectionLink: string\n\n createRenderRoot() {\n return this\n }\n\n connectedCallback() {\n super.connectedCallback()\n this._currentStep = this.stepData?.steps.find((step: Step) => !step.step_complete)?.step_priority\n }\n\n renderContentComponent(step: Step): TemplateResult {\n if (!!step.step_complete) {\n return html``\n }\n switch (step.step_label) {\n case StepLabels.DECLARATION_PAGE: {\n return html``\n }\n case StepLabels.WIND_MITIGATION: {\n return html``\n }\n case StepLabels.PROOF_OF_REPAIRS: {\n return html``\n }\n default:\n return html``\n }\n }\n\n renderStatusComponent(stepComplete: boolean): TemplateResult {\n if (!!stepComplete) {\n return html``\n } else {\n return html``\n }\n }\n\n render() {\n return html`\n ${this.stepData?.steps.map((step: Step) => {\n if ((step.step_label == StepLabels.DECLARATION_PAGE && this.stepData.dec_page_present == false) || step.inactive) {\n return html``\n } else {\n const stepComplete: boolean = !!step.step_complete\n return html`\n ${this.renderStatusComponent(stepComplete)}\n
\n ${step.step_name} \n
\n ${this.renderContentComponent(step)}\n
`\n }\n })}\n
`\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property } from \"lit/decorators.js\"\nimport { StepData, Step } from \"../policy-preparation-accordion\"\n\n@customElement(\"kin-policy-preparation-completion-summary\")\nexport class PolicyAccordionCompletionSummaryComponent extends LitElement {\n @property({ type: Object }) stepData: StepData\n @property({ type: Number }) daysRemaining: number\n @property({ type: Number }) completedPercent: number\n\n createRenderRoot() {\n return this\n }\n\n render() {\n const daysLeftContent =\n this.completedPercent === 100\n ? \"-\"\n : this.daysRemaining === 0\n ? \"Due Today\"\n : this.daysRemaining > 0\n ? this.daysRemaining\n : \"Past Due\"\n const progressCircle =\n this.completedPercent !== 100\n ? html`
\n \n \n
`\n : null\n\n return html`
\n
\n Days Left To
Complete
\n ${daysLeftContent} \n
\n
\n
\n
\n
\n
\n Completion\n
\n
\n ${this.completedPercent}% \n ${progressCircle}\n
\n
\n
`\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property } from \"lit/decorators.js\"\n\n@customElement(\"kin-policy-preparation-completion-summary-progress-circle\")\nexport class PolicyAccordionCompletionSummaryProgressCircleComponent extends LitElement {\n @property({ type: Number }) completePercent: number\n\n createRenderRoot() {\n return this\n }\n\n render() {\n return html``\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\"\nimport { customElement, property } from \"lit/decorators.js\"\nimport { format } from \"date-fns\"\n\n@customElement(\"kin-policy-preparation-accordion-step-content\")\nexport class PolicyAccordionStepContent extends LitElement {\n @property() stepLabel: string\n @property() stepDescription: string\n @property() variant: \"warning\" | \"success\"\n @property() effectiveDate: string\n @property() newPurchase: boolean\n @property() inspectionLink: string\n\n createRenderRoot() {\n return this\n }\n\n getDescription(): string {\n const currentDate = new Date()\n const effectiveDate = new Date(this.effectiveDate)\n const formattedEffectiveDate = format(effectiveDate, \"MM/dd/yyyy\")\n if (effectiveDate > currentDate && this.newPurchase && this.stepLabel === \"self_inspection\") {\n return `Our partner National Insurance Inspection Services (NIIS) will send you a link when your policy starts on ${formattedEffectiveDate} by both email and text with detailed instructions to complete your self-inspection.`\n } else if (this.stepLabel === \"self_inspection\" && this.inspectionLink) {\n return `${this.stepDescription} Alternatively, click here to complete your self-inspection.`\n }\n return this.stepDescription\n }\n\n render() {\n return html`

${unsafeHTML(this.getDescription())}

`\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\nimport { FileDetail } from \"@kin/web-components/dist/external/kin-file-uploader/process-file\"\n\n@customElement(\"kin-policy-preparation-accordion-document-upload\")\nexport class PolicyAccordionDocumentUploadComponent extends LitElement {\n @property() description: string\n @property() type: string\n @property({ type: Number }) policyId: number\n @property() userId: string\n @property() documentType: string\n\n @state()\n private _documentForUpload: FileDetail\n @state()\n private _uploadSubmitting: boolean = false\n\n createRenderRoot() {\n return this\n }\n\n private fileAddedSuccessHandler({ detail }: { detail: FileDetail[] }) {\n this._documentForUpload = detail[0]\n }\n\n get token(): string {\n return (document.querySelector('meta[name=\"csrf-token\"]') as HTMLMetaElement)?.content ?? \"\"\n }\n\n private getUploadUrl(policyId: number): string {\n return `/portal/policies/${policyId}/documents`\n }\n\n private performExitActions() {\n // further exit actions can happen here\n this._documentForUpload = null\n window.location.reload()\n }\n\n private async uploadDocument() {\n const formData = new FormData()\n formData.append(\"document[documentable_id]\", this.policyId.toString())\n formData.append(\"document[documentable_type]\", \"BrightPolicy\")\n formData.append(\"document[label]\", this.documentType)\n formData.append(\"document[uploaded_by_id]\", this.userId)\n formData.append(\"document[saved_file]\", this._documentForUpload?.file)\n formData.append(\"document[show_in_portal]\", \"1\")\n formData.append(\"document[notify_customer]\", \"1\")\n const options = {\n method: \"POST\",\n headers: { \"X-Csrf-Token\": this.token },\n body: formData\n }\n try {\n this._uploadSubmitting = true\n const res = await fetch(this.getUploadUrl(this.policyId), options)\n if (res.ok) {\n this.performExitActions()\n }\n } catch (error) {\n // need to add in an error action here\n console.error(\"error\")\n } finally {\n this._uploadSubmitting = false\n }\n }\n\n toggleLoading() {\n this._uploadSubmitting = !this._uploadSubmitting\n }\n\n render() {\n const okButton = this._uploadSubmitting\n ? html`
`\n : html` Upload`\n return html`
\n

${this.description}

\n (this._documentForUpload = null)}\n renderButtonOnlyVersion=\"${true}\"\n buttonOnlyVersionText=\"Upload Document\"\n maxSize=\"20971520\"\n .validExtensions=${[\"pdf\", \"jpg\", \"png\", \"docx\"]}\n >\n ${!!this._documentForUpload ? okButton : null}\n
`\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\n\nconst COMPLETE_STEP_URL = \"/portal/policy_accordion_steps/complete_step\"\n\n@customElement(\"kin-policy-preparation-accordion-document-download\")\nexport class PolicyAccordionDocumentDownloadComponent extends LitElement {\n @property() description: string\n @property({ type: Number }) policyId: number\n @property() policyNumber: string\n @property({ type: Number }) documentId: number\n @property() stepName: string\n\n @state()\n private _downloadWaiting: boolean = false\n @state()\n private _skipWaiting: boolean = false\n\n createRenderRoot() {\n return this\n }\n\n get token(): string {\n return (document.querySelector('meta[name=\"csrf-token\"]') as HTMLMetaElement)?.content ?? \"\"\n }\n\n private getDownloadUrl(policyNumber: string, documentId: number): string {\n return `/portal/policies/${policyNumber}/documents/download_document?id=${documentId}&page=${\"/home\"}`\n }\n\n private performExitActions() {\n window.location.reload()\n }\n\n private async downloadDocument(isDownloadDocument: boolean) {\n if (isDownloadDocument) {\n window.open(this.getDownloadUrl(this.policyNumber, this.documentId))\n this._downloadWaiting = true\n } else {\n this._skipWaiting = true\n }\n try {\n const options = {\n method: \"POST\",\n headers: { \"X-Csrf-Token\": this.token },\n body: JSON.stringify({\n step_name: this.stepName,\n policy_id: this.policyId\n })\n }\n const res = await fetch(COMPLETE_STEP_URL, options)\n if (res.ok) {\n this.performExitActions()\n }\n } catch (error) {\n console.error(error)\n } finally {\n this._downloadWaiting = false\n this._skipWaiting = false\n }\n }\n\n render() {\n const downloadButton = this._downloadWaiting\n ? html`
`\n : html` Save Declarations Page`\n const skipButton = this._skipWaiting\n ? html`
`\n : html` Not Right Now`\n return html`
\n

${this.description}

\n
${downloadButton} ${skipButton}
\n
`\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property } from \"lit/decorators.js\"\n\n@customElement(\"kin-policy-preparation-accordion-confirm-document\")\nexport class PolicyPreparationAccordionConfirmDocumentComponent extends LitElement {\n @property() documentType: string\n @property({ type: Boolean }) isOpen: boolean = false\n @property({ type: Boolean }) isDocumentSubmitting: boolean = false\n\n createRenderRoot() {\n return this\n }\n\n handleCloseDialog() {\n this.dispatchEvent(\n new CustomEvent(\"kin-policy-preparation-accordion-confirm-document:close\", {\n bubbles: true,\n composed: true\n })\n )\n }\n\n handleConfirm() {\n this.dispatchEvent(\n new CustomEvent(\"kin-policy-preparation-accordion-confirm-document:confirm\", {\n bubbles: false,\n composed: true\n })\n )\n }\n\n render() {\n return html`\n

Attention

\n

Please confirm the document of type ${this.documentType} for upload

\n
\n Ok\n Cancel\n
\n
`\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\n\nconst VIEW_TO_SHOW_REQUIRED_DOCUMENTS = \"SlideCarousel::DocumentsSlide\"\n\nexport interface Slide {\n header_text: string\n ordering: number\n body_text: string\n image_uri: string\n view: string\n}\n\n@customElement(\"kin-slide-carousel\")\nexport class SlideCarouselComponent extends LitElement {\n @property() finalSlideCtaText = \"\"\n @property({ type: Array }) slides: Slide[] = []\n @property({ type: Array }) requiredDocuments: String[] = []\n @state()\n activeSlide = 1\n @state()\n open = true\n\n createRenderRoot() {\n return this\n }\n\n render() {\n if (this.open) {\n return html`\n \n
\n ${this.slides.map(slide => {\n const requiredDocumentsComponent: TemplateResult | null =\n VIEW_TO_SHOW_REQUIRED_DOCUMENTS === slide.view\n ? html`\n `\n : null\n return html`\n \n
\n \n \n
\n
\n `\n })}\n \n
\n `\n } else {\n return html``\n }\n }\n\n selectedPageChange({ detail: { currentPage } }) {\n this.activeSlide = currentPage\n }\n\n public close() {\n this.open = false\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property, query } from \"lit/decorators.js\"\nimport { Slide } from \"../slide-carousel\"\nimport type KinPagination from \"@kin/web-components/dist/external/kin-pagination/kin-pagination\"\n\n@customElement(\"kin-slide-carousel-controls\")\nexport class SlideCarouselControlsComponent extends LitElement {\n @property({ type: Array }) slides: Slide[] = []\n @property({ type: Number }) activeSlide\n\n @query(\"kin-pagination\") paginationComponent: KinPagination\n\n createRenderRoot() {\n return this\n }\n\n protected firstUpdated(): void {\n const resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n ;(entry.target.shadowRoot.querySelector(\".pagination__list\") as HTMLUListElement).style.flexWrap = \"nowrap\"\n resizeObserver.disconnect()\n }\n })\n resizeObserver.observe(this.paginationComponent)\n }\n\n handleCurrentSelectedChange({ detail: { currentPage } }) {\n this.dispatchEvent(\n new CustomEvent(\"kin-slide-carousel-controls:page-change\", {\n bubbles: true,\n composed: true,\n detail: { currentPage }\n })\n )\n }\n\n render() {\n return html`\n \n `\n }\n}\n","import { LitElement, html } from \"lit\"\nimport { customElement, property } from \"lit/decorators.js\"\n\nconst DOCUMENT_ICON = html`\n \n \n`\n\n@customElement(\"kin-slide-carousel-required-documents\")\nexport class SlideCarouselRequiredDocuments extends LitElement {\n @property({ type: Array }) requiredDocuments: String[] = []\n\n createRenderRoot() {\n return this\n }\n\n private generateDocumentKey(documentLabel: string, index: number) {\n return `${documentLabel.replace(\" \", \"_\")}-${index}`\n }\n\n render() {\n return html`\n \n `\n }\n}\n","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/assets/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n// See this blurg post for using Rails UJS from Shakapacker\n// https://learnetto.com/blog/how-to-make-ajax-calls-in-rails-5-1-with-or-without-jquery\nimport \"@kin/web-components/dist/external/index\"\n\nconst polyfills = []\n\n// This exports all of the web components (LitElements) into one file. This may need to be broken up later.\npolyfills.push(import(/* webpackChunkName: \"wc-library\" */ \"../javascript/components/index\"))\n\nimport Rails from \"rails-ujs\"\nRails.start()\n\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\n\n// Specific LitElements for the Funnel\nimport \"../javascript/components/quote/flood-premium\"\nimport \"../javascript/components/quote/policy-premium\"\n\n// Specific LitElements for the Customer Portal\nimport \"../javascript/components/portal\"\n\n// Once we've loaded all the necessary polyfills, load the application.\nPromise.all(polyfills)\n .then(() => {\n const application = Application.start()\n const context = require.context(\"../javascript/controllers\", true, /.js$|.ts$/)\n application.load(definitionsFromContext(context))\n })\n .catch(error => {\n console.error(\"Failed fetching polyfills\", error)\n })\n"],"names":["safeAssign","target","source","QuoteFloodPremiumComponent","flood","waiting","QuotePolicyPremiumComponent","state","StepLabels","DocumentTypes","PolicyPreparationAccordionComponent","step","stepComplete","PolicyAccordionCompletionSummaryComponent","daysLeftContent","progressCircle","PolicyAccordionCompletionSummaryProgressCircleComponent","PolicyAccordionStepContent","currentDate","effectiveDate","formattedEffectiveDate","format","PolicyAccordionDocumentUploadComponent","detail","policyId","formData","options","error","okButton","COMPLETE_STEP_URL","PolicyAccordionDocumentDownloadComponent","policyNumber","documentId","isDownloadDocument","downloadButton","skipButton","PolicyPreparationAccordionConfirmDocumentComponent","VIEW_TO_SHOW_REQUIRED_DOCUMENTS","SlideCarouselComponent","slide","requiredDocumentsComponent","currentPage","SlideCarouselControlsComponent","resizeObserver","entries","entry","DOCUMENT_ICON","SlideCarouselRequiredDocuments","documentLabel","index","polyfills","application","context"],"sourceRoot":""}