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EAAAA,SAAiB/R,GAIfyR,EAAkB1D,KAAKC,MACzBjJ,SAAS6I,eAAe,mBAAmBC,aAAa,0BAG1DmE,EAAEC,KAAKR,GAAiB,SAAUhR,EAAMyR,GACtC,IAAI5R,EAAWN,EAAOoR,kBAAkB3Q,GACpCH,IACFA,EAAS6R,aAAeD,EAE5B,IAAG,wBAAAzD,EAAA1B,OAAA,GAAAuB,EAAA,IAjEL,eAAAtG,EAAA,KAAArE,EAAAvC,UAAA,WAAAuL,SAAA,SAAA1E,EAAAG,GAAA,IAAAI,EAAA9F,EAAAoN,MAAA9H,EAAArE,GAAA,SAAAoM,EAAArN,GAAA2K,EAAA7E,EAAAP,EAAAG,EAAA2H,EAAAC,EAAA,OAAAtN,EAAA,UAAAsN,EAAAtN,GAAA2K,EAAA7E,EAAAP,EAAAG,EAAA2H,EAAAC,EAAA,QAAAtN,EAAA,CAAAqN,OAAA,QAkEC,gBAAAE,EAAAC,GAAA,OAAA7B,EAAAyB,MAAA,KAAA1O,UAAA,EA7DD","sources":["webpack://bare-core/./app/javascript/controllers/bare_forms/form_functions/addReviewStyling.js","webpack://bare-core/./app/javascript/controllers/bare_forms/form_functions/addStyling.js","webpack://bare-core/./app/javascript/controllers/bare_forms/form_functions/getDocuments.js","webpack://bare-core/./app/javascript/controllers/bare_forms/form_functions/handleAfterRenderQuestion.js"],"sourcesContent":["const EXCLUDED_KEYS = [\n \"applicant_signature\",\n \"applicant_id_photo\",\n \"applicant_signature_photo\",\n \"applicant_id_uploaded_file\",\n \"applicant_signature_uploaded_file\",\n \"review_stage_applicant_signature_photo\",\n \"john_tongue_centre\",\n \"john_tonge_centre\",\n \"transfer_business_operator_qld_coroner\",\n \"qld_independent_doctor_name\",\n \"qld_independent_doctor_address\",\n \"qld_coroner\",\n \"qld_independent_doctor_phone\",\n \"accompanying_documents\",\n \"ashes_return_type_crematorium_instructions\",\n];\n\nconst EXCLUDED_SUB_KEYS = [\"deceased_nearest_surviving _relative_instructions\"];\n\nconst SPECIAL_KEYS = {\n RELATIONSHIPS: [\n \"deceased_parents\",\n \"deceased_child\",\n \"deceased_children\",\n \"deceased_marriages\",\n \"deceased_registered_relationships\",\n \"nearest_surviving_relative\",\n ],\n TABLES: [\"deceased_death_not_natural_causes_causes\"],\n};\n\nconst EXCLUDED_SECTIONS = [\n \"Welcome\",\n \"Declaration\",\n \"Declaration Instructions\",\n \"Estate Administration - Next Steps\",\n \"Signature Review\",\n \"Upload Signature\",\n \"View Documents\",\n \"Review\",\n];\n\n/**\n * Processes each page of the survey.js and appends it to the container.\n *\n * @param {Object} survey - The main survey object containing pages to be processed.\n */\nexport default (survey) => {\n const checkForElement = setInterval(() => {\n const reviewPageContainer = document.querySelector(\".review-content\");\n\n if (reviewPageContainer) {\n if (survey && survey.pages) {\n survey.pages.forEach((page, index) =>\n processPage(survey, page, reviewPageContainer, index)\n );\n }\n clearInterval(checkForElement);\n }\n }, 500);\n};\n\n/**\n * Processes the survey object, creates a corresponding DOM element and appends it to the provided container.\n */\nfunction processPage(survey, page, container, pageNumber) {\n if (!page.elements) return;\n\n const pageElementDiv = createPageElementDiv(survey, page, pageNumber);\n if (pageElementDiv) {\n container.appendChild(pageElementDiv);\n }\n}\n\n/**\n * Creates a wrapper div for a given page element, except for the excluded sections.\n * The wrapper div contains the page title, the page elements and an edit button.\n */\nfunction createPageElementDiv(survey, page, pageNumber) {\n if (EXCLUDED_SECTIONS.includes(page.name)) {\n return null;\n }\n\n const wrapperDiv = createElement(\"div\", \"page-element\");\n const title = createElement(\"h2\");\n title.innerText = page.name;\n wrapperDiv.appendChild(title);\n\n if (page.elements) {\n page.elements.forEach((question) => {\n if (question.type === \"paneldynamic\") {\n return;\n }\n appendQuestion(survey, question, wrapperDiv);\n });\n }\n addEditButton(survey, wrapperDiv, pageNumber);\n\n return wrapperDiv;\n}\n\n/**\n * Appends a given question to the provided wrapper div.\n * If the question has sub-questions, it will append them as well.\n */\nfunction appendQuestion(survey, question, wrapperDiv) {\n if (!shouldAppendQuestion(question)) {\n return null;\n }\n\n const questionDiv = createQuestionDiv(survey, question);\n const answerWrapperDiv = createElement(\"div\", \"answer-wrapper\");\n let shouldAppend = true;\n\n if (question.templateElements) {\n question.templateElements.forEach((subQuestion) => {\n appendSubQuestion(survey, question, subQuestion, answerWrapperDiv);\n });\n } else if (question.items) {\n question.items.forEach((subQuestion) => {\n appendSubQuestion(survey, question, subQuestion, answerWrapperDiv);\n });\n } else {\n if (appendAnswer(survey, answerWrapperDiv, question) === null) {\n shouldAppend = false;\n }\n }\n\n if (shouldAppend) {\n questionDiv.appendChild(answerWrapperDiv);\n wrapperDiv.appendChild(questionDiv);\n }\n}\n\n/**\n * Determines if a question should be appended based on its properties.\n */\nfunction shouldAppendQuestion(question) {\n if (EXCLUDED_KEYS.includes(question.name) || question.visible === false) {\n return false;\n }\n return true;\n}\n\n/**\n * Creates a `div` element for a given question. Depending on whether the question\n * has more items or not, it assigns different class names to the `div`.\n */\nfunction createQuestionDiv(survey, question) {\n const isMultiQuestion = Boolean(question.items);\n const questionDiv = createElement(\n \"div\",\n isMultiQuestion ? \"question-wrapper multi-question\" : \"question-wrapper single-question\"\n );\n const questionTitle = createElement(isMultiQuestion ? \"h3\" : \"h4\");\n questionTitle.innerText = santizeQuestionTitle(survey, question.title);\n questionDiv.appendChild(questionTitle);\n return questionDiv;\n}\n\nfunction santizeQuestionTitle(survey, title) {\n if (title.includes(\"{loved_one_reference}\")) {\n title = title.replace(\"{loved_one_reference}\", survey.getValue(\"loved_one_reference\"));\n }\n if (title.includes(\"{was_is}\")) {\n title = title.replace(\"{was_is}\", survey.getValue(\"was_is\"));\n }\n if (title.includes(\"{at_the_time_of_their_death}\")) {\n title = title.replace(\n \"{at_the_time_of_their_death}\",\n survey.getValue(\"at_the_time_of_their_death\")\n );\n }\n if (title.includes(\"{was_is_capital}\")) {\n title = title.replace(\"{was_is_capital}\", survey.getValue(\"was_is_capital\"));\n }\n if (title.includes(\"{did_does_capital}\")) {\n title = title.replace(\"{did_does_capital}\", survey.getValue(\"did_does_capital\"));\n }\n\n return title;\n}\n\n/**\n * Creates an edit button. When the button is clicked, it navigates to the provided `pageNumber`.\n */\nfunction addEditButton(survey, wrapperDiv, pageNumber) {\n const editButton = createElement(\n \"button\",\n \"flex items-center justify-center gap-2 rounded-full font-bold w-fit duration-300 transition ease-in-out bg-mint-400 text-forest-600 px-3 py-2.5 hover:bg-mint-500\"\n );\n editButton.innerText = \"Edit this section\";\n editButton.addEventListener(\"click\", () => {\n survey.currentPageNo = pageNumber;\n });\n\n const buttonWrapper = createElement(\"div\", \"edit-button-wrapper\");\n buttonWrapper.appendChild(editButton);\n wrapperDiv.appendChild(buttonWrapper);\n}\n\n/**\n * Appends a sub-question to a given wrapperDiv based on provided survey and question data.\n */\nfunction appendSubQuestion(survey, question, subQuestion, wrapperDiv) {\n if (EXCLUDED_SUB_KEYS.includes(subQuestion.name)) {\n return false;\n }\n\n const subQuestionDiv = createElement(\"div\", \"sub-question\");\n\n if (subQuestion.title && !subQuestion.items) {\n const title = createElement(\"h4\");\n title.innerText = santizeQuestionTitle(survey, subQuestion.title);\n subQuestionDiv.appendChild(title);\n }\n\n const isAnswerAppended =\n appendAnswer(survey, subQuestionDiv, question, subQuestion.name) !== null;\n if (isAnswerAppended) {\n wrapperDiv.appendChild(subQuestionDiv);\n }\n\n return isAnswerAppended;\n}\n\n/**\n * Retrieves an answer value from the survey, processes it based on its type,\n * and appends it to the provided div.\n */\nfunction appendAnswer(survey, div, answerValue, subAnswerValue = null) {\n const surveyValue = survey.getValue(answerValue.name);\n let answerText = null;\n\n if (surveyValue) {\n answerText = subAnswerValue ? surveyValue[subAnswerValue] || null : surveyValue || null;\n\n if (Array.isArray(surveyValue) && !(typeof surveyValue[0] === \"string\")) {\n answerText = surveyValue.map((item) => item[subAnswerValue]);\n }\n\n if (typeof answerText === \"string\") {\n if (!answerText.includes(\"@\")) {\n answerText = transformString(answerText);\n }\n }\n\n if (answerText && typeof answerText === \"object\") {\n answerText = handleObjects(div, answerText, answerValue, subAnswerValue);\n }\n\n const answer = createElement(\"span\");\n answer.innerText = reformatIfDateString(answerText);\n div.appendChild(answer);\n }\n\n return answerText;\n}\n\n/**\n * Processes an `answerObject` based on certain conditions and appends relevant\n * details to a provided `div`.\n */\nfunction handleObjects(div, answerObject, answerValue, subAnswerValue) {\n if (answerObject.length === 1 && answerObject[0] && Object.keys(answerObject[0]).length === 0) {\n return null;\n } else {\n const container = createElement(\"div\");\n if (SPECIAL_KEYS.RELATIONSHIPS.includes(answerValue.name)) {\n getRelationDetails(div, container, answerObject, answerValue, subAnswerValue);\n return \"\";\n } else if (SPECIAL_KEYS.TABLES.includes(answerValue.name)) {\n getTableDetails(div, container, answerObject, answerValue);\n return \"\";\n }\n\n return answerObject;\n }\n}\n\n/**\n * Processes an array of data and appends the details to a provided `div`.\n */\nfunction getRelationDetails(div, container, relationsArray, templateData, templateName) {\n if (typeof relationsArray[0] === \"string\") {\n appendObject(container, div, relationsArray);\n } else {\n for (let relationData of relationsArray) {\n let relationDetails = [];\n\n for (let relationKey in relationData) {\n let templateItems =\n templateData.templateElements.find((element) => element.name === templateName)?.items ||\n [];\n\n const itemTitle = templateItems.find((item) => item.name === relationKey)?.title;\n if (itemTitle) {\n relationDetails.push(`${itemTitle}: ${reformatIfDateString(relationData[relationKey])}`);\n }\n }\n\n appendObject(container, div, relationDetails, transformString(templateName));\n }\n }\n}\n\n/**\n * Processes `answerObject` to extract table details and appends them\n * to a provided `div`.\n */\nfunction getTableDetails(div, container, answerObject, answerValue) {\n if (typeof answerObject[0] === \"string\") {\n appendObject(container, div, answerObject);\n } else {\n for (let row in answerObject) {\n const rowObject = answerValue.rows.find((item) => item.value === row);\n let details = [];\n let displayValue = answerObject[row].boolean ? \"Yes\" : \"No\";\n details.push(`${rowObject.text}: ${displayValue}`);\n\n appendObject(container, div, details);\n }\n }\n}\n\n/**\n * Appends a set of details to a provided `div`. If a title is provided,\n * it appends the title as well.\n */\nfunction appendObject(container, div, details, title = null) {\n if (title) {\n const objectTitle = createElement(\"h4\");\n objectTitle.innerText = title;\n container.appendChild(objectTitle);\n }\n\n const detailsWrapper = createElement(\"div\", \"details-wrapper\");\n\n details.forEach((detail) => {\n const detailSpan = createElement(\"span\");\n detailSpan.innerText = transformString(detail);\n detailsWrapper.appendChild(detailSpan);\n });\n\n container.appendChild(detailsWrapper);\n div.appendChild(container);\n}\n\n/**\n * Creates a new DOM element with an optional class name.\n */\nfunction createElement(tag, className) {\n const element = document.createElement(tag);\n if (className) element.className = className;\n return element;\n}\n\n/**\n * Transforms a string by splitting it at underscores and capitalizing the\n * first letter of each word.\n */\nfunction transformString(string) {\n return string\n .split(\"_\")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n}\n\n/**\n * Reformat date strings in the format \"2000-01-01\" to \"01-01-2000\"\n */\nfunction reformatIfDateString(input) {\n const datePattern = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n if (datePattern.test(input)) {\n const parts = input.split(\"-\");\n return parts[2] + \"-\" + parts[1] + \"-\" + parts[0];\n }\n\n return input;\n}\n","const COUNTRY_OF_BIRTH_SELECTOR = '[aria-label=\"What country were they born in?\"]';\n\n/**\n * Initializes specific behaviors for dropdown inputs.\n * - For dropdowns not related to the \"country of birth\" question, the input is made read-only.\n * - The caret color is changed on focus and blur to improve visibility.\n */\nexport default (_) => {\n const dropDownInputs = document.querySelectorAll(\".sd-dropdown__filter-string-input\");\n dropDownInputs.forEach((input) => {\n if (!input.closest(COUNTRY_OF_BIRTH_SELECTOR)) {\n input.readOnly = true;\n }\n\n input.addEventListener(\"focus\", function () {\n this.style.caretColor = \"transparent\";\n });\n\n input.addEventListener(\"blur\", function () {\n this.style.caretColor = \"auto\";\n });\n });\n};\n","import sendSentryError from \"./sendSentryError\";\n\nexport default (_options) => {\n document.querySelectorAll(\".view-document\").forEach((elem) => {\n elem.classList.add(\"flex\", \"justify-center\", \"w-full\", \"text-white\", \"bg-gray-300\", \"px-5\", \"py-4\", \"rounded-full\", \"pointer-events-none\", \"cursor-default\", \"hover:bg-gray-400\");\n elem.innerHTML = 'Loading';\n });\n\n var url = document.getElementById(\"surveyContainer\").getAttribute(\"data-response-documents-url\");\n var requiredWaDocuments = JSON.parse(\n document.getElementById(\"surveyContainer\").getAttribute(\"data-response-required-wa-documents\")\n );\n\n const request = new XMLHttpRequest();\n let attempts = 0;\n\n const executePoll = async (resolve, reject) => {\n request.open(\"POST\", url);\n request.setRequestHeader(\n \"X-CSRF-Token\",\n document.querySelector(\"meta[name=csrf-token]\")?.content\n );\n request.send();\n attempts++;\n\n request.onreadystatechange = () => {\n // readyState === 4 means operation is complete as per: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState\n if (request.readyState === 4) {\n if (\n request.status === 200 && JSON.parse(request.response).documents\n ? requiredWaDocuments.every((i) =>\n Object.keys(JSON.parse(request.response).documents).includes(i)\n )\n : false\n ) {\n const docs = JSON.parse(request.response).documents;\n document.querySelector(\".cremation-form-pdf\").href = docs[requiredWaDocuments[0]];\n document.querySelector(\".id-form-pdf\").href = docs[requiredWaDocuments[1]];\n document.querySelector(\".fourth-schedule-form-pdf\").href = docs[requiredWaDocuments[2]];\n document.querySelectorAll(\".view-document\").forEach((elem) => {\n elem.innerHTML = \"View document\";\n elem.classList.remove(\"bg-gray-300\", \"pointer-events-none\", \"cursor-default\");\n elem.classList.add(\"bg-forest-500\", \"hover:bg-forest-600\", \"pointer-events-auto\", \"cursor-pointer\");\n\n });\n } else if (attempts >= 5) {\n const errorCard = document.createElement(\"div\");\n errorCard.classList.add(\"error-card-review-pdfs\");\n errorCard.innerHTML =\n \"Something went wrong while fetching your documents. Please try again later, or ask your arranger to provide these documents.\";\n\n document\n .querySelector(\"table\")\n .parentNode.insertBefore(\n errorCard,\n document.querySelector(\"table\").nextSibling\n );\n\n document.querySelectorAll(\".view-document\").forEach((elem) => {\n elem.innerHTML = \"View document\";\n });\n\n // Double, but we want to leave the old way for now.\n sendSentryError(\"Exceeded max (5) attempts in getting WA docs to review.\");\n throw getError(\"Exceeded max (5) attempts in getting WA docs to review.\");\n } else {\n setTimeout(executePoll, 5000, resolve, reject);\n }\n }\n };\n };\n\n const getError = (error) => {\n let newError = new Error(error);\n newError.name = `NokPaperwork: ${error}`;\n\n return newError;\n };\n\n executePoll();\n};\n","/* global survey, $ */\nimport addStyling from \"./addStyling\";\nimport getDocuments from \"./getDocuments\";\nimport handlePartialSend from \"../form_events/handlePartialSend\";\nimport addReviewStyling from \"./addReviewStyling\";\n\nexport default async (survey, options) => {\n addStyling();\n let state = document.getElementById(\"surveyContainer\").getAttribute(\"data-response-state\");\n\n // File upload questions.\n if (\n options.question.name === \"review_stage_applicant_signature_photo\" ||\n options.question.name === \"applicant_signature_photo\" ||\n options.question.name === \"applicant_id_photo\" ||\n options.question.name === \"applicant_signature_uploaded_file\" ||\n options.question.name === \"applicant_id_uploaded_file\"\n ) {\n const questionElement = document.querySelector(`[data-name=\"${options.question.name}\"]`);\n if (questionElement.querySelector(\".sd-file__image-wrapper > img\")) {\n questionElement.querySelector(\".sd-file__image-wrapper > img\").src = _getPhotoIdInput();\n }\n }\n // Review PDFs page.\n const nextButton = document.querySelector(\".form-navigationNext\");\n if (options.question.name === \"review_stage_pdfs\") {\n if (nextButton) {\n nextButton.classList.add(\"hidden\");\n }\n\n handlePartialSend(survey, true);\n getDocuments(options);\n\n const yesButton = document.querySelector(\"#yes-button\");\n if (yesButton) {\n yesButton.addEventListener(\"click\", () => {\n survey.nextPage();\n });\n }\n } else {\n if (nextButton) {\n nextButton.classList.remove(\"hidden\");\n }\n }\n\n if (\n [\"SA\", \"NSW\", \"QLD\", \"VIC\", \"ACT\", \"TAS\"].includes(state) &&\n options.question.name == \"ashes_delivery\"\n ) {\n _updateAshesDelivery(survey);\n }\n\n if (options.question.name == \"end_of_form_review\") {\n addReviewStyling(survey);\n }\n\n // Add default value to question\n var defaultResponse = JSON.parse(\n document.getElementById(\"surveyContainer\").getAttribute(\"data-default-response\")\n );\n\n $.each(defaultResponse, function (name, val) {\n var question = survey.getQuestionByName(name);\n if (question) {\n question.defaultValue = val;\n }\n });\n};\n\nfunction _getPhotoIdInput() {\n return survey.getValue(\"applicant_id_upload_type\") === \"take_photo\"\n ? survey.getValue(\"applicant_id_photo\")[0].content\n : survey.getValue(\"applicant_id_uploaded_file\")[0].content;\n}\n\nfunction _updateAshesDelivery(survey) {\n _setQuestionValueOnItem(\n survey,\n \"ashes_delivery\",\n \"recipient_name_first\",\n survey.data.applicant_name.first\n );\n _setQuestionValueOnItem(\n survey,\n \"ashes_delivery\",\n \"recipient_name_last\",\n survey.data.applicant_name.last\n );\n _setQuestionValueOnItem(survey, \"ashes_delivery\", \"recipient_phone\", survey.data.applicant_phone);\n _setQuestionValueOnItem(survey, \"ashes_delivery\", \"street\", survey.data.applicant_address.street);\n _setQuestionValueOnItem(survey, \"ashes_delivery\", \"suburb\", survey.data.applicant_address.suburb);\n _setQuestionValueOnItem(survey, \"ashes_delivery\", \"state\", survey.data.applicant_address.state);\n _setQuestionValueOnItem(\n survey,\n \"ashes_delivery\",\n \"postcode\",\n survey.data.applicant_address.postcode\n );\n}\n\nfunction _setQuestionValueOnItem(survey, parentName, questionName, value) {\n let question = null;\n let items = survey.getQuestionByName(parentName).items;\n if (items.length > 0) {\n question = items.find((i) => i.name == questionName);\n if (\n question &&\n (question.value === undefined || question.value === null || question.value === \"\")\n ) {\n question.value = value;\n }\n }\n}\n"],"names":["EXCLUDED_KEYS","EXCLUDED_SUB_KEYS","SPECIAL_KEYS","RELATIONSHIPS","TABLES","EXCLUDED_SECTIONS","santizeQuestionTitle","survey","title","includes","replace","getValue","appendSubQuestion","question","subQuestion","wrapperDiv","name","subQuestionDiv","createElement","items","innerText","appendChild","isAnswerAppended","appendAnswer","div","answerValue","subAnswerValue","arguments","length","undefined","surveyValue","answerText","Array","isArray","map","item","transformString","answerObject","Object","keys","container","relationsArray","templateData","templateName","appendObject","_step","_iterator","_createForOfIteratorHelper","s","n","done","relationData","value","relationDetails","_loop","relationKey","_templateData$templat","_templateItems$find","itemTitle","templateElements","find","element","push","concat","reformatIfDateString","err","e","f","getRelationDetails","_loop2","row","rowObject","rows","details","displayValue","text","getTableDetails","handleObjects","answer","objectTitle","detailsWrapper","forEach","detail","detailSpan","tag","className","document","string","split","word","charAt","toUpperCase","slice","toLowerCase","join","input","test","parts","checkForElement","setInterval","reviewPageContainer","querySelector","pages","page","index","pageNumber","elements","pageElementDiv","type","visible","shouldAppendQuestion","questionDiv","isMultiQuestion","Boolean","questionTitle","createQuestionDiv","answerWrapperDiv","shouldAppend","appendQuestion","editButton","addEventListener","currentPageNo","buttonWrapper","addEditButton","createPageElementDiv","processPage","clearInterval","_","querySelectorAll","closest","readOnly","this","style","caretColor","_regeneratorRuntime","t","r","prototype","hasOwnProperty","o","defineProperty","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","arg","call","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","Error","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","pop","prev","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","_options","elem","classList","add","innerHTML","url","getElementById","getAttribute","requiredWaDocuments","JSON","parse","request","XMLHttpRequest","attempts","executePoll","_ref","_callee","reject","_document$querySelect","_context","open","setRequestHeader","content","send","onreadystatechange","readyState","status","response","documents","every","docs","href","remove","errorCard","parentNode","insertBefore","nextSibling","sendSentryError","getError","setTimeout","apply","_next","_throw","_x","_x2","error","newError","_getPhotoIdInput","_updateAshesDelivery","_setQuestionValueOnItem","data","applicant_name","first","last","applicant_phone","applicant_address","street","suburb","state","postcode","parentName","questionName","getQuestionByName","options","questionElement","nextButton","yesButton","defaultResponse","addStyling","src","handlePartialSend","getDocuments","nextPage","addReviewStyling","$","each","val","defaultValue"],"sourceRoot":""}