{"version":3,"file":"index-AGyI4CzJ.js","sources":["../../Client/business/CommonSets/BindingRequirement/index.ts","../../Client/webkit/common/fileUtils/index.ts","../../Client/api/BindingRequirementsApi/index.ts","../../Client/api/BindingRequirementsApi/context.ts","../../Client/business/Components/BindingRequirements/RequirementInfo/FormLink/hook.ts","../../Client/business/Components/BindingRequirements/RequirementInfo/FormLink/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/DiligentEffortFormLink/hook.ts","../../Client/business/Components/BindingRequirements/RequirementInfo/DiligentEffortFormLink/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/DiligentEffortInfo/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/UnsignedApplicationLink/hook.ts","../../Client/business/Components/BindingRequirements/RequirementInfo/UnsignedApplicationLink/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/SignedApplicationInfo/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/SurplusLinesDisclosureFormLink/hook.ts","../../Client/business/Components/BindingRequirements/RequirementInfo/SurplusLinesDisclosureFormLink/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/SurplusLinesDisclosureInfo/index.tsx","../../Client/business/Components/BindingRequirements/RequirementInfo/index.tsx"],"sourcesContent":["export class BindingRequirement {\r\n    readonly value: string;\r\n    readonly displayName: string;\r\n    readonly webId: string;\r\n\r\n    private constructor(value: string, displayName: string, webId: string) {\r\n        this.value = value;\r\n        this.displayName = displayName;\r\n        this.webId = webId;\r\n    }\r\n\r\n    public static readonly FloodDeclarationsPage = new BindingRequirement(\r\n        'FloodDeclarationsPage',\r\n        'Flood Declarations Page',\r\n        'flood-declarations-page',\r\n    );\r\n\r\n    public static readonly LossRuns = new BindingRequirement('LossRuns', 'Loss Runs', 'loss-runs');\r\n\r\n    public static readonly NoticeOfHomeownersInsurancePolicyDeductible = new BindingRequirement(\r\n        'NoticeOfHomeownersInsurancePolicyDeductible',\r\n        'Notice of Homeowners Insurance Policy Deductible',\r\n        'notice-of-homeowners-insurance-policy-deductible',\r\n    );\r\n\r\n    public static readonly ProofOfClosing = new BindingRequirement(\r\n        'ProofOfClosing',\r\n        'Proof of Closing',\r\n        'proof-of-closing',\r\n    );\r\n\r\n    public static readonly SeasonalOrSecondaryHomeQuestionnaire = new BindingRequirement(\r\n        'SeasonalOrSecondaryHomeQuestionnaire',\r\n        'Seasonal or Secondary Home Questionnaire',\r\n        'seasonal-or-secondary-home-questionnaire',\r\n    );\r\n\r\n    public static readonly SignedApplication = new BindingRequirement(\r\n        'SignedApplication',\r\n        'Signed Application',\r\n        'signed-application',\r\n    );\r\n\r\n    public static readonly StatementOfDiligentEffort = new BindingRequirement(\r\n        'StatementOfDiligentEffort',\r\n        'Statement of Diligent Effort',\r\n        'statement-of-diligent-effort',\r\n    );\r\n\r\n    public static readonly StatementOfInsured = new BindingRequirement(\r\n        'StatementOfInsured',\r\n        'Statement of Insured',\r\n        'statement-of-insured',\r\n    );\r\n\r\n    public static readonly StatementOfValues = new BindingRequirement(\r\n        'StatementOfValues',\r\n        'Statement of Values',\r\n        'statement-of-values',\r\n    );\r\n\r\n    public static readonly SurplusLinesDisclosure = new BindingRequirement(\r\n        'SurplusLinesDisclosure',\r\n        'Surplus Lines Disclosure',\r\n        'surplus-lines-disclosure',\r\n    );\r\n\r\n    public static readonly TerrorismDisclosure = new BindingRequirement(\r\n        'TerrorismDisclosure',\r\n        'Terrorism Coverage Disclosure',\r\n        'terrorism-disclosure',\r\n    );\r\n\r\n    public switch<T>({\r\n        onFloodDeclarationsPage,\r\n        onLossRuns,\r\n        onNoticeOfHomeownersInsurancePolicyDeductible,\r\n        onProofOfClosing,\r\n        onSeasonalOrSecondaryHomeQuestionnaire,\r\n        onSignedApplication,\r\n        onStatementOfDiligentEffort,\r\n        onStatementOfInsured,\r\n        onStatementOfValues,\r\n        onSurplusLinesDisclosure,\r\n        onTerrorismDisclosure,\r\n    }: {\r\n        onFloodDeclarationsPage: () => T;\r\n        onLossRuns: () => T;\r\n        onNoticeOfHomeownersInsurancePolicyDeductible: () => T;\r\n        onProofOfClosing: () => T;\r\n        onSeasonalOrSecondaryHomeQuestionnaire: () => T;\r\n        onSignedApplication: () => T;\r\n        onStatementOfDiligentEffort: () => T;\r\n        onStatementOfInsured: () => T;\r\n        onStatementOfValues: () => T;\r\n        onSurplusLinesDisclosure: () => T;\r\n        onTerrorismDisclosure: () => T;\r\n    }): T {\r\n        switch (this) {\r\n            case BindingRequirement.FloodDeclarationsPage:\r\n                return onFloodDeclarationsPage();\r\n            case BindingRequirement.LossRuns:\r\n                return onLossRuns();\r\n            case BindingRequirement.NoticeOfHomeownersInsurancePolicyDeductible:\r\n                return onNoticeOfHomeownersInsurancePolicyDeductible();\r\n            case BindingRequirement.ProofOfClosing:\r\n                return onProofOfClosing();\r\n            case BindingRequirement.SeasonalOrSecondaryHomeQuestionnaire:\r\n                return onSeasonalOrSecondaryHomeQuestionnaire();\r\n\r\n            case BindingRequirement.SignedApplication:\r\n                return onSignedApplication();\r\n            case BindingRequirement.StatementOfDiligentEffort:\r\n                return onStatementOfDiligentEffort();\r\n            case BindingRequirement.StatementOfInsured:\r\n                return onStatementOfInsured();\r\n            case BindingRequirement.StatementOfValues:\r\n                return onStatementOfValues();\r\n            case BindingRequirement.SurplusLinesDisclosure:\r\n                return onSurplusLinesDisclosure();\r\n            case BindingRequirement.TerrorismDisclosure:\r\n                return onTerrorismDisclosure();\r\n            default:\r\n                throw new Error(`Invalid BindingRequirement: ${this}`);\r\n        }\r\n    }\r\n}\r\n\r\nexport namespace BindingRequirement {\r\n    export function all(): BindingRequirement[] {\r\n        return [\r\n            BindingRequirement.FloodDeclarationsPage,\r\n            BindingRequirement.LossRuns,\r\n            BindingRequirement.NoticeOfHomeownersInsurancePolicyDeductible,\r\n            BindingRequirement.ProofOfClosing,\r\n            BindingRequirement.SeasonalOrSecondaryHomeQuestionnaire,\r\n            BindingRequirement.SignedApplication,\r\n            BindingRequirement.StatementOfDiligentEffort,\r\n            BindingRequirement.StatementOfInsured,\r\n            BindingRequirement.StatementOfValues,\r\n            BindingRequirement.SurplusLinesDisclosure,\r\n            BindingRequirement.TerrorismDisclosure,\r\n        ];\r\n    }\r\n\r\n    export function parseOrDefault(value: string): BindingRequirement | null {\r\n        const normalized = value.toLowerCase();\r\n        return (\r\n            all().find(\r\n                bindingRequirement =>\r\n                    bindingRequirement.value.toLowerCase() === normalized ||\r\n                    bindingRequirement.displayName.toLowerCase() === normalized ||\r\n                    bindingRequirement.webId.toLowerCase() === normalized,\r\n            ) || null\r\n        );\r\n    }\r\n\r\n    export function parse(value: string): BindingRequirement {\r\n        const bindingRequirement = parseOrDefault(value);\r\n        if (bindingRequirement === null) {\r\n            throw new Error(`Invalid BindingRequirement: ${value}`);\r\n        }\r\n\r\n        return bindingRequirement;\r\n    }\r\n}\r\n","/** Returns the file size with the correct unit label. */\r\nexport function getFileSize(bytes: number): string {\r\n    const unitSuffixes = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\r\n        powerValue = Math.floor(Math.log(bytes) / Math.log(1024));\r\n\r\n    if (bytes === undefined || bytes === 0) {\r\n        return '0';\r\n    }\r\n\r\n    const fileSize = (bytes / Math.pow(1024, powerValue)).toFixed(1);\r\n\r\n    return `${fileSize} ${unitSuffixes[powerValue]}`;\r\n}\r\n\r\nexport function getFileExtension(fileName: string) {\r\n    return fileName.includes('.') ? fileName.split('.').pop()?.toLowerCase() : undefined;\r\n}\r\n\r\n/* Record of supported MIME types keyed on file extension name. */\r\nexport const supportedFileMimeTypes: Record<string, string> = {\r\n    doc: 'application/msword',\r\n    docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n    gif: 'image/gif',\r\n    jpeg: 'image/jpeg',\r\n    jpg: 'image/jpeg',\r\n    odt: 'application/vnd.oasis.opendocument.text',\r\n    pdf: 'application/pdf',\r\n    png: 'image/png',\r\n    tiff: 'image/tiff',\r\n    tif: 'image/tiff',\r\n    txt: 'text/plain',\r\n    xls: 'application/vnd.ms-excel',\r\n    xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n};\r\n\r\n/* Returns true if the file's MIME type is included in the supported MIME types record. Optional mimeTypes parameter overrides which files are supported. */\r\nexport function isFileSupported(fileName: string, mimeTypes: Record<string, string> = supportedFileMimeTypes): boolean {\r\n    const fileExtension = getFileExtension(fileName);\r\n    if (fileExtension === undefined) {\r\n        return false;\r\n    }\r\n\r\n    const mimeType = mimeTypes[fileExtension];\r\n    return mimeType !== undefined;\r\n}\r\n\r\n/* Converts a base64 encoded string into a browser readable file. */\r\nexport function parseFilesFromObject(\r\n    sourceObj: Record<string, { FileContent: string; FileName: string }[]>,\r\n): Record<string, File[]> {\r\n    const parsedObj: Record<string, File[]> = {};\r\n    Object.keys(sourceObj).forEach(\r\n        key =>\r\n            (parsedObj[key] = sourceObj[key].map(file => {\r\n                const blob = base64ToBlob(file.FileContent, getMimeType(file.FileName));\r\n                return new File([blob], file.FileName, { type: blob.type });\r\n            })),\r\n    );\r\n    return parsedObj;\r\n}\r\n\r\n/* Converts a base64 encoded string to a Blob for the specified mime type. */\r\nexport function base64ToBlob(base64: string, mimeType: string) {\r\n    const byteCharacters = atob(base64);\r\n    const byteNumbers = new Array(byteCharacters.length);\r\n    for (let i = 0; i < byteCharacters.length; i++) {\r\n        byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n    }\r\n    const byteArray = new Uint8Array(byteNumbers);\r\n    return new Blob([byteArray], { type: mimeType });\r\n}\r\n\r\n/* Gets the mime type for a file based on the file extension from the file name. */\r\nexport function getMimeType(fileName: string) {\r\n    const mimeTypes = {\r\n        txt: 'text/plain',\r\n        html: 'text/html',\r\n        htm: 'text/html',\r\n        css: 'text/css',\r\n        js: 'application/javascript',\r\n        json: 'application/json',\r\n        xml: 'application/xml',\r\n        jpg: 'image/jpeg',\r\n        jpeg: 'image/jpeg',\r\n        png: 'image/png',\r\n        gif: 'image/gif',\r\n        bmp: 'image/bmp',\r\n        webp: 'image/webp',\r\n        svg: 'image/svg+xml',\r\n        pdf: 'application/pdf',\r\n        doc: 'application/msword',\r\n        docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n        xls: 'application/vnd.ms-excel',\r\n        xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n        ppt: 'application/vnd.ms-powerpoint',\r\n        pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n        mp3: 'audio/mpeg',\r\n        wav: 'audio/wav',\r\n        mp4: 'video/mp4',\r\n        avi: 'video/x-msvideo',\r\n        mov: 'video/quicktime',\r\n        zip: 'application/zip',\r\n        rar: 'application/x-rar-compressed',\r\n        '7z': 'application/x-7z-compressed',\r\n    };\r\n\r\n    const extension = (getFileExtension(fileName) || '') as keyof typeof mimeTypes;\r\n    return mimeTypes[extension] || 'application/octet-stream';\r\n}\r\n","import { upload } from '@api/Common';\r\nimport { fetchAndLog } from '@api/Fetch';\r\nimport { BindingRequirement } from '@business/CommonSets';\r\nimport { encodeQueryForRequest } from '@shared/Common';\r\nimport { parseFilesFromObject } from '@webkit/index';\r\nimport {\r\n    BindingRequirementsContextModel,\r\n    BindingRequirementsContextResponseModel,\r\n    BindingRequirementsRequestModel,\r\n} from './models';\r\n\r\nconst routePrefix = '/api/binding-requirements/';\r\n\r\nexport async function getBindingRequirementsContext(request: BindingRequirementsRequestModel) {\r\n    const query = encodeQueryForRequest(request);\r\n    const context = await fetchAndLog<BindingRequirementsContextResponseModel>(\r\n        `${routePrefix}get-context${query}`,\r\n        'get binding requirements context'\r\n    );\r\n\r\n    return {\r\n        ...context,\r\n        RequirementsFiles: parseFilesFromObject(context.RequirementsFiles),\r\n    } as BindingRequirementsContextModel;\r\n}\r\n\r\nexport async function uploadBindingRequirementFiles(\r\n    request: BindingRequirementsRequestModel,\r\n    requirement: BindingRequirement,\r\n    files: File[],\r\n    onError: (e: any) => void\r\n) {\r\n    await upload(`${routePrefix}store-files`, { ...request, Requirement: requirement.value }, files, onError);\r\n}\r\n\r\nexport async function deleteBindingRequirementFile(\r\n    request: BindingRequirementsRequestModel,\r\n    requirement: BindingRequirement,\r\n    fileName: string\r\n) {\r\n    const query = encodeQueryForRequest({ ...request, Requirement: requirement.value, FileName: fileName });\r\n    await fetchAndLog(`${routePrefix}delete-files${query}`, 'delete binding requirement files', {\r\n        method: 'POST',\r\n    });\r\n}\r\n\r\nexport function getUnsignedApplicationFileUrl(request: BindingRequirementsRequestModel) {\r\n    const query = encodeQueryForRequest(request);\r\n    return `${routePrefix}unsigned-application${query}`;\r\n}\r\n","import { BindingRequirement, ProductLine } from '@business/CommonSets';\r\nimport { useAsyncEffect } from '@shared/Hooks';\r\nimport { createContext, useMemo, useState } from 'react';\r\nimport { getBindingRequirementsContext } from '.';\r\nimport { BindingRequirementsContextModel, BindingRequirementsRequestModel } from './models';\r\n\r\nexport interface IBindingRequirementsContext {\r\n    productLine: ProductLine;\r\n    policyNumber?: string | null;\r\n    quoteId?: string | null;\r\n    context: BindingRequirementsContextModel | null;\r\n}\r\n\r\ninterface Output extends IBindingRequirementsContext {\r\n    loading: boolean;\r\n    onLoad: () => Promise<void>;\r\n    requirements: BindingRequirement[];\r\n}\r\n\r\nexport function useBindingRequirementsContext(\r\n    request: BindingRequirementsRequestModel,\r\n    onError?: (exception: Error) => void\r\n): Output {\r\n    const productLine = ProductLine.parse(request.ProductLine),\r\n        policyNumber = request.PolicyNumber,\r\n        quoteId = request.QuoteId;\r\n\r\n    const [loading, setLoading] = useState(false),\r\n        [context, setContext] = useState<BindingRequirementsContextModel | null>(null);\r\n\r\n    const requirements = useMemo(getRequirements, [context?.RequirementsFiles]);\r\n\r\n    useAsyncEffect(onLoad, [...Object.values(request)]);\r\n\r\n    return { productLine, policyNumber, quoteId, loading, context, onLoad, requirements };\r\n\r\n    async function onLoad() {\r\n        if (loading) {\r\n            return;\r\n        }\r\n\r\n        try {\r\n            setLoading(true);\r\n            setContext(await getBindingRequirementsContext(request));\r\n        } catch (e) {\r\n            let exception = new Error('We were unable to retrieve binding requirements information.');\r\n\r\n            if (e instanceof Response) {\r\n                const json = await e.json();\r\n\r\n                if (json?.ErrorMessage) {\r\n                    exception = new Error(json.ErrorMessage);\r\n                }\r\n            }\r\n\r\n            if (onError !== undefined) {\r\n                onError(exception);\r\n            }\r\n        } finally {\r\n            setLoading(false);\r\n        }\r\n    }\r\n\r\n    function getRequirements() {\r\n        if (context === null) {\r\n            return [];\r\n        }\r\n\r\n        return Object.keys(context.RequirementsFiles).map(key => BindingRequirement.parse(key));\r\n    }\r\n}\r\n\r\nexport const BindingRequirementsContext = createContext<IBindingRequirementsContext>({} as IBindingRequirementsContext);\r\n","import { getFileNameFromResponse } from '@api/Common';\r\nimport { fetchAndLogWithResponse } from '@api/Fetch';\r\nimport { handleFetchError } from '@shared/Common';\r\nimport { useToast } from '@shared/Hooks';\r\nimport { saveAs } from 'file-saver';\r\nimport { useState } from 'react';\r\nimport { BindingRequirementFormLinkProps } from '.';\r\n\r\nexport function useBindingRequirementFormLink(props: BindingRequirementFormLinkProps) {\r\n    const toast = useToast(),\r\n        [loading, setLoading] = useState(false);\r\n\r\n    return {\r\n        loading,\r\n        download,\r\n    };\r\n\r\n    async function download() {\r\n        if (loading || props.isExternalUrl) return;\r\n\r\n        try {\r\n            setLoading(true);\r\n            const response = await fetchAndLogWithResponse(props.url, 'fetch file'),\r\n                hasError = handleFetchError(response, toast);\r\n            if (hasError) {\r\n                return;\r\n            }\r\n\r\n            const blob = await response.blob(),\r\n                name = props.fileName || getFileNameFromResponse(response);\r\n\r\n            saveAs(blob, name);\r\n        } finally {\r\n            setLoading(false);\r\n        }\r\n    }\r\n}\r\n","import { Link, Spinner } from '@webkit/index';\r\nimport { PropsWithChildren } from 'react';\r\nimport { useBindingRequirementFormLink } from './hook';\r\n\r\nexport type BindingRequirementFormLinkProps = PropsWithChildren<{\r\n    url: string;\r\n    fileName?: string;\r\n    isExternalUrl?: boolean;\r\n}>;\r\n\r\nexport function BindingRequirementFormLink(props: BindingRequirementFormLinkProps) {\r\n    const { loading, download } = useBindingRequirementFormLink(props);\r\n\r\n    return (\r\n        <span className='inline-flex gap-2 items-center'>\r\n            <Link href={props.isExternalUrl ? props.url : undefined} newTab={true} download={true}>\r\n                <span className='text-sm' onClick={download}>\r\n                    {props.children}\r\n                </span>\r\n            </Link>\r\n            {loading && <Spinner size='sm' />}\r\n        </span>\r\n    );\r\n}\r\n","import { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport { StateCode } from '@business/CommonSets';\r\nimport { useContext, useMemo } from 'react';\r\n\r\nconst defaultFileName = 'Statement of Diligent Effort Form';\r\n\r\nexport function useDiligentEffortFormDownload() {\r\n    const { productLine, context } = useContext(BindingRequirementsContext),\r\n        stateCode = StateCode.parse(context?.Address.StateCode);\r\n\r\n    const { fileName, endpoint } = useMemo(\r\n        () => ({\r\n            fileName: getFileName(),\r\n            endpoint: getFileEndpoint(),\r\n        }),\r\n        [productLine, stateCode]\r\n    );\r\n\r\n    return {\r\n        fileName,\r\n        endpoint,\r\n    };\r\n\r\n    function getFileName() {\r\n        return productLine.switch({\r\n            onHomeowner: () => onHomeownerAndFlood(),\r\n            onCommercial: () => defaultFileName,\r\n            onFlood: () => onHomeownerAndFlood(),\r\n        });\r\n\r\n        function onHomeownerAndFlood() {\r\n            return stateCode.switch({\r\n                onCa: () => 'SL-2 Diligent Search Report',\r\n                onLa: () => 'LA Form 438 Affidavit',\r\n                onMa: () => 'BR-7 Affidavit Form',\r\n                onDefault: () => defaultFileName,\r\n            });\r\n        }\r\n    }\r\n\r\n    function getFileEndpoint() {\r\n        const defaultEndpoint = `/content/diligent-effort-forms/${productLine.value}-${stateCode.code}-Diligent-Effort.pdf`;\r\n        return productLine.switch({\r\n            onHomeowner: () => onHomeownerAndFlood(),\r\n            onCommercial: () => defaultEndpoint,\r\n            onFlood: () => onHomeownerAndFlood(),\r\n        });\r\n\r\n        function onHomeownerAndFlood() {\r\n            return stateCode.switch({\r\n                onCa: () => '/content/diligent-effort-forms/Form SL-2 01 24 Diligent Search Report.pdf',\r\n                onDefault: () => defaultEndpoint,\r\n            });\r\n        }\r\n    }\r\n}\r\n","import * as React from 'react';\r\nimport { BindingRequirementFormLink } from '../FormLink';\r\nimport { useDiligentEffortFormDownload } from './hook';\r\n\r\nexport function DiligentEffortFormLink() {\r\n    const { endpoint, fileName } = useDiligentEffortFormDownload();\r\n    return (\r\n        <BindingRequirementFormLink url={endpoint} fileName={fileName}>\r\n            {fileName}\r\n        </BindingRequirementFormLink>\r\n    );\r\n}\r\n","import { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport { StateCode } from '@business/CommonSets';\r\nimport { Link } from '@webkit/index';\r\nimport { useContext } from 'react';\r\nimport { DiligentEffortFormLink } from '../DiligentEffortFormLink';\r\n\r\nexport function DiligentEffortInfo() {\r\n    const { productLine, context } = useContext(BindingRequirementsContext),\r\n        stateCode = StateCode.parse(context?.Address.StateCode);\r\n\r\n    return (\r\n        <span id='diligent-effort-info'>\r\n            {productLine.switch({\r\n                onHomeowner: () => <HomeownerAndFloodDefaultInfo />,\r\n                onCommercial: () => <DefaultInfo />,\r\n                onFlood: () => <HomeownerAndFloodDefaultInfo />,\r\n            })}\r\n        </span>\r\n    );\r\n\r\n    function DefaultInfo() {\r\n        return (\r\n            <>\r\n                Swyfft is doing a proper surplus lines filing and processing the tax remittance with the appropriate\r\n                state surplus lines authority, but will need a signed <DiligentEffortFormLink />.\r\n            </>\r\n        );\r\n    }\r\n\r\n    function HomeownerAndFloodDefaultInfo() {\r\n        return stateCode.switch({\r\n            onAl: () => (\r\n                <>\r\n                    Swyfft is doing a proper surplus lines filing and processing the tax remittance with the appropriate\r\n                    state surplus lines authority, but because this risk is not South of I-10, Alabama requires a{' '}\r\n                    <DiligentEffortFormLink /> to be completed and signed.\r\n                </>\r\n            ),\r\n            onCa: () => (\r\n                <>\r\n                    Swyfft is doing a proper surplus lines filing and processing the tax remittance with the appropriate\r\n                    state surplus lines authority, but California requires a <DiligentEffortFormLink /> to be completed\r\n                    and signed. You may also use{' '}\r\n                    <Link href='https://www.slacal.com/brokers/broker-filing-forms/sl2-form1' newTab>\r\n                        <span className='text-sm'>California's online SL-2 generator</span>\r\n                    </Link>\r\n                    .\r\n                </>\r\n            ),\r\n            onDefault: () => <DefaultInfo />,\r\n        });\r\n    }\r\n}\r\n","import { getUnsignedApplicationFileUrl } from '@api/BindingRequirementsApi';\r\nimport { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport { useContext, useMemo } from 'react';\r\n\r\nexport function useUnsignedApplicationLink() {\r\n    const { productLine, policyNumber } = useContext(BindingRequirementsContext),\r\n        url = useMemo(\r\n            () => getUnsignedApplicationFileUrl({ ProductLine: productLine.key, PolicyNumber: policyNumber }),\r\n            [productLine, policyNumber]\r\n        );\r\n\r\n    return {\r\n        url,\r\n    };\r\n}\r\n","import * as React from 'react';\r\nimport { BindingRequirementFormLink } from '../FormLink';\r\nimport { useUnsignedApplicationLink } from './hook';\r\n\r\nexport function UnsignedApplicationLink() {\r\n    const { url } = useUnsignedApplicationLink();\r\n    return <BindingRequirementFormLink url={url}>Unsigned Application</BindingRequirementFormLink>;\r\n}\r\n","import { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport { useContext } from 'react';\r\nimport { UnsignedApplicationLink } from '../UnsignedApplicationLink';\r\n\r\nexport function SignedApplicationInfo() {\r\n    const { policyNumber, productLine } = useContext(BindingRequirementsContext);\r\n\r\n    return (\r\n        <span id='signed-application-info'>\r\n            {productLine.switch({\r\n                onHomeowner: () => <DefaultInfo />,\r\n                onCommercial: () => (\r\n                    <>Please provide a copy of an account Application (Acord or other) signed by the insured.</>\r\n                ),\r\n                onFlood: () => <DefaultInfo />,\r\n            })}\r\n        </span>\r\n    );\r\n\r\n    function DefaultInfo() {\r\n        return (\r\n            <>\r\n                This policy requires an application signed by the insured.{' '}\r\n                {policyNumber ? (\r\n                    <>\r\n                        Download the <UnsignedApplicationLink />, complete, sign, and then upload here.\r\n                    </>\r\n                ) : (\r\n                    <>\r\n                        We will generate the application once the policy is bound. You can download it from the binding\r\n                        requirements page after purchase.\r\n                    </>\r\n                )}\r\n            </>\r\n        );\r\n    }\r\n}\r\n","import { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport { StateCode } from '@business/CommonSets';\r\nimport { useContext } from 'react';\r\n\r\nexport function useSurplusLinesDisclosureFormLink() {\r\n    const { productLine, context } = useContext(BindingRequirementsContext),\r\n        stateCode = StateCode.parse(context?.Address.StateCode);\r\n\r\n    const endpoint = `/content/surplus-lines-disclosures/SurplusLinesDisclosure-${productLine.value}-${stateCode.code}.pdf`,\r\n        fileName = getFileName();\r\n\r\n    return {\r\n        endpoint,\r\n        fileName,\r\n    };\r\n\r\n    function getFileName() {\r\n        const defaultFileName = 'Surplus Lines Disclosure Form';\r\n        return productLine.switch({\r\n            onHomeowner: () =>\r\n                stateCode.switch({\r\n                    onCa: () => 'California Surplus Lines Disclosure Statement',\r\n                    onDefault: () => defaultFileName,\r\n                }),\r\n            onFlood: () =>\r\n                stateCode.switch({\r\n                    onFl: () => 'Surplus Lines Disclosure and Acknowledgement',\r\n                    onDefault: () => defaultFileName,\r\n                }),\r\n            onCommercial: () => defaultFileName,\r\n        });\r\n    }\r\n}\r\n","import * as React from 'react';\r\nimport { BindingRequirementFormLink } from '../FormLink';\r\nimport { useSurplusLinesDisclosureFormLink } from './hook';\r\n\r\nexport function SurplusLinesDisclosureFormLink() {\r\n    const { endpoint, fileName } = useSurplusLinesDisclosureFormLink();\r\n    return (\r\n        <BindingRequirementFormLink url={endpoint} fileName={fileName}>\r\n            {fileName}\r\n        </BindingRequirementFormLink>\r\n    );\r\n}\r\n","import { BindingRequirementsContext } from '@api/BindingRequirementsApi/context';\r\nimport * as React from 'react';\r\nimport { SurplusLinesDisclosureFormLink } from '../SurplusLinesDisclosureFormLink';\r\n\r\nexport function SurplusLinesDisclosureInfo() {\r\n    const { policyNumber } = React.useContext(BindingRequirementsContext);\r\n\r\n    return (\r\n        <span id='surplus-lines-disclosure-info'>\r\n            {policyNumber ? (\r\n                <>\r\n                    Please download the <SurplusLinesDisclosureFormLink />, review it with the insured and upload the\r\n                    completed and signed form.\r\n                </>\r\n            ) : (\r\n                <>\r\n                    This policy requires the insured to review and sign a <SurplusLinesDisclosureFormLink />. Please\r\n                    upload the completed and signed form on the binding requirements page after purchase.\r\n                </>\r\n            )}\r\n        </span>\r\n    );\r\n}\r\n","import { BindingRequirement } from '@business/CommonSets';\r\nimport { DiligentEffortInfo } from './DiligentEffortInfo';\r\nimport { BindingRequirementFormLink } from './FormLink';\r\nimport { SignedApplicationInfo } from './SignedApplicationInfo';\r\nimport { SurplusLinesDisclosureInfo } from './SurplusLinesDisclosureInfo';\r\n\r\ninterface Props {\r\n    requirement: BindingRequirement;\r\n    isProvided?: boolean;\r\n}\r\n\r\nexport function BindingRequirementInfo({ requirement, isProvided }: Props) {\r\n    return (\r\n        <div id={`${requirement.webId}-info`} className='max-w-prose'>\r\n            <p className={'!text-sm m-0 text-brand-gray-600'}>\r\n                {isProvided ? (\r\n                    <>{requirement.displayName} on file.</>\r\n                ) : (\r\n                    requirement.switch({\r\n                        onFloodDeclarationsPage: () => (\r\n                            <>\r\n                                Since this policy was designated as having an existing flood policy, please provide a\r\n                                copy of the flood policy declarations page.\r\n                            </>\r\n                        ),\r\n                        onLossRuns: () => <>Please provide hard copy loss runs from the expiring carrier(s).</>,\r\n                        onNoticeOfHomeownersInsurancePolicyDeductible: () => (\r\n                            <>\r\n                                According to La. R.S 22:1337(D), the insured has been requested to review and sign the{' '}\r\n                                <BindingRequirementFormLink\r\n                                    url='/content/la-notice-of-deductible/HO SW LA NHD 12 23 Notice Of Homeowners Insurance Policy Deductible.pdf'\r\n                                    fileName='Notice Of Homeowners Insurance Policy Deductible.pdf'\r\n                                >\r\n                                    Notice of Homeowners Insurance Policy Deductible\r\n                                </BindingRequirementFormLink>\r\n                                . By signing this document, the insured acknowledges receipt of this named storm,\r\n                                hurricane, wind, and hail deductible notice. Failure to sign this form does not create a\r\n                                cause of action not otherwise provided by law.\r\n                            </>\r\n                        ),\r\n                        onProofOfClosing: () => (\r\n                            <>Because this risk is a new purchase, please provide proof of closing.</>\r\n                        ),\r\n                        onSeasonalOrSecondaryHomeQuestionnaire: () => (\r\n                            <>\r\n                                Because this risk is designated as a seasonal or secondary home, we require the insured\r\n                                to complete and sign our{' '}\r\n                                <BindingRequirementFormLink\r\n                                    url='https://agentresources.swyfft.com/wp-content/uploads/2020/12/Secondary-Home-Questionnaire_12_2020.pdf'\r\n                                    fileName='Seasonal-Secondary-Home-Questionnaire.pdf'\r\n                                    isExternalUrl\r\n                                >\r\n                                    Seasonal/Secondary Home Questionnaire\r\n                                </BindingRequirementFormLink>\r\n                                .\r\n                            </>\r\n                        ),\r\n                        onSignedApplication: () => <SignedApplicationInfo />,\r\n                        onStatementOfDiligentEffort: () => <DiligentEffortInfo />,\r\n                        onStatementOfInsured: () => (\r\n                            <>\r\n                                Because this risk is not South of I-10, Alabama requires a{' '}\r\n                                <BindingRequirementFormLink\r\n                                    url='/content/statement-of-insured/StatementOfInsuredAL.pdf'\r\n                                    fileName='StatementOfInsuredAL.pdf'\r\n                                >\r\n                                    Statement of Insured\r\n                                </BindingRequirementFormLink>{' '}\r\n                                completed and signed by the insured.\r\n                            </>\r\n                        ),\r\n                        onStatementOfValues: () => (\r\n                            <>\r\n                                Because this risk has more than one building, please provide a statement of values\r\n                                signed by the insured.\r\n                            </>\r\n                        ),\r\n                        onSurplusLinesDisclosure: () => <SurplusLinesDisclosureInfo />,\r\n                        onTerrorismDisclosure: () => (\r\n                            <>\r\n                                Please provide a signed disclosure notice indicating your acceptance or rejection of\r\n                                terrorism coverage and one will be included with the policy you receive.\r\n                            </>\r\n                        ),\r\n                    })\r\n                )}\r\n            </p>\r\n        </div>\r\n    );\r\n}\r\n"],"names":["_BindingRequirement","value","displayName","webId","__publicField","onFloodDeclarationsPage","onLossRuns","onNoticeOfHomeownersInsurancePolicyDeductible","onProofOfClosing","onSeasonalOrSecondaryHomeQuestionnaire","onSignedApplication","onStatementOfDiligentEffort","onStatementOfInsured","onStatementOfValues","onSurplusLinesDisclosure","onTerrorismDisclosure","BindingRequirement","all","parseOrDefault","normalized","bindingRequirement","parse","getFileSize","bytes","unitSuffixes","powerValue","getFileExtension","fileName","_a","supportedFileMimeTypes","parseFilesFromObject","sourceObj","parsedObj","key","file","blob","base64ToBlob","getMimeType","base64","mimeType","byteCharacters","byteNumbers","i","byteArray","mimeTypes","extension","routePrefix","getBindingRequirementsContext","request","query","encodeQueryForRequest","context","fetchAndLog","uploadBindingRequirementFiles","requirement","files","onError","upload","deleteBindingRequirementFile","getUnsignedApplicationFileUrl","useBindingRequirementsContext","productLine","ProductLine","policyNumber","quoteId","loading","setLoading","useState","setContext","requirements","useMemo","getRequirements","useAsyncEffect","onLoad","e","exception","json","BindingRequirementsContext","createContext","useBindingRequirementFormLink","props","toast","useToast","download","response","fetchAndLogWithResponse","handleFetchError","name","getFileNameFromResponse","saveAs","BindingRequirementFormLink","jsxs","jsx","Link","Spinner","defaultFileName","useDiligentEffortFormDownload","useContext","stateCode","StateCode","endpoint","getFileName","getFileEndpoint","onHomeownerAndFlood","defaultEndpoint","DiligentEffortFormLink","DiligentEffortInfo","HomeownerAndFloodDefaultInfo","DefaultInfo","Fragment","useUnsignedApplicationLink","UnsignedApplicationLink","url","SignedApplicationInfo","useSurplusLinesDisclosureFormLink","SurplusLinesDisclosureFormLink","SurplusLinesDisclosureInfo","React.useContext","BindingRequirementInfo","isProvided"],"mappings":"6nBAAO,MAAMA,EAAN,MAAMA,CAAmB,CAKpB,YAAYC,EAAeC,EAAqBC,EAAe,CAJ9DC,EAAA,cACAA,EAAA,oBACAA,EAAA,cAGL,KAAK,MAAQH,EACb,KAAK,YAAcC,EACnB,KAAK,MAAQC,CAAA,CAiEV,OAAU,CACb,wBAAAE,EACA,WAAAC,EACA,8CAAAC,EACA,iBA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