{"version":3,"sources":["webpack:///./src/utils/growthReportsUtils.js","webpack:///./src/views/startup/growth-reports/GrowthReportForm.vue?2007","webpack:///src/views/startup/growth-reports/GrowthReportForm.vue","webpack:///./src/views/startup/growth-reports/GrowthReportForm.vue?0049","webpack:///./src/views/startup/growth-reports/GrowthReportForm.vue","webpack:///./src/graphql/growth-reports/queries.gql","webpack:///./src/graphql/growth-reports/mutations.gql"],"names":["isDateInFuture","dateStr","date","Date","now","Boolean","getFullYear","getMonth","getDate","generatePeriods","startDate","endDate","frequency","periods","currentDate","lastDate","push","formatDate","setMonth","getFinancialYearStartDate","dateString","datetime","DateTime","fromJSDate","fromISO","financialYearStart","month","year","fromObject","day","toFormat","formatPeriodDisplay","quarter","Math","floor","fyStartYear","startQ","startOf","endQ","endOf","exactMonths","concat","endMonth","render","_vm","this","_h","$createElement","_c","_self","attrs","$apollo","loading","mutationLoading","staticClass","scopedSlots","_u","key","fn","_v","_s","reportPeriod","proxy","canSubmit","formattedFormData","formattedFormResponse","on","submitAnswer","draftAnswer","staticRenderFns","components","FormResponse","PageHeader","data","applicationData","fetchedReport","computed","_objectSpread","mapGetters","userDetails","selectedOrg","groupFormData","id","section","question","options","inputType","isRequired","_this$fetchedReport","groupFormResponse","submission_responses","questionId","response","_this$fetchedReport2","submitted_at","_this$fetchedReport3","_this$fetchedReport4","report_start_date","methods","_this","flattenedResponse","flattenFormResponse","map","item","submission_id","$route","params","submissionId","mutate","mutation","UpdateGrowthReport","variables","submittedAt","toISOString","refetchQueries","awaitRefetchQueries","then","$router","name","showAlert","catch","_this2","DraftGrowthReport","query","GetGrowthReports","startupOrgId","apollo","GetGrowthReportsFormQuestion","update","growth_reports_form_question","GetGrowthReportsSubmissionResponse","fetchPolicy","growth_reports_submission_by_pk","component","doc","loc","source","collectFragmentReferences","node","refs","kind","add","value","type","selectionSet","selections","forEach","selection","variableDefinitions","def","definitions","definitionRefs","findOperation","i","length","element","oneQuery","operationName","newDoc","hasOwnProperty","opRefs","Set","allR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vB,IAAIM,EAAKlB,EAAclB,EAAK8B,GACxBM,GACFZ,EAAOR,YAAYtI,KAAK0J,MAIrBZ,GA9DT,WACExB,EAAIgB,YAAYJ,SAAQ,SAASG,GAC/B,GAAIA,EAAI/B,KAAM,CACZ,IAAIqB,EAAO,IAAIsB,IACfxB,EAA0BY,EAAKV,GAC/BY,EAAeF,EAAI/B,KAAKwB,OAASH,OALvC,GAiEAgC,EAAOC,QAAUtC,EAEbqC,EAAOC,QAAQ,sBAAwBhB,EAAStB,EAAK,sBAErDqC,EAAOC,QAAQ,qBAAuBhB,EAAStB,EAAK,qBAEpDqC,EAAOC,QAAQ,uBAAyBhB,EAAStB,EAAK,wB","file":"js/chunk-519b0ac4.65d51706.js","sourcesContent":["import { formatDate } from '@core/utils/utils'\nimport { DateTime } from 'luxon'\n\n/**\n * Checks if the date is in the future\n * @param dateStr {Date | string}\n * @returns {boolean}\n */\nexport function isDateInFuture(dateStr) {\n const date = dateStr instanceof Date ? dateStr : new Date(dateStr)\n const now = new Date()\n return Boolean(date > now || (\n date.getFullYear() === now.getFullYear()\n && date.getMonth() > now.getMonth()\n && date.getDate() > now.getDate()\n ))\n}\n\n/**\n * Generates the periods based on the start and end date\n * Returns an array of start dates in the format 'yyyy-MM-dd'\n * @param startDate {Date | string}\n * @param endDate {Date | string}\n * @param frequency {('monthly' | 'quarterly')}\n * @returns {string[]}\n */\nexport function generatePeriods(startDate, endDate, frequency) {\n const periods = []\n const currentDate = startDate instanceof Date ? startDate : new Date(startDate)\n const lastDate = endDate instanceof Date ? endDate : new Date(endDate)\n\n while (currentDate < lastDate) {\n periods.push(formatDate(currentDate, 'yyyy-MM-dd'))\n\n currentDate.setMonth(\n currentDate.getMonth() + (frequency === 'quarterly' ? 3 : 1),\n )\n }\n\n return periods\n}\n\n/**\n * Returns the financial year start date for the given date\n * @param dateString\n * @returns {string} - The financial year start date in the format 'yyyy-MM-dd'\n */\nexport function getFinancialYearStartDate(dateString) {\n let datetime = DateTime.now()\n if (dateString) {\n datetime = dateString instanceof Date ? DateTime.fromJSDate(dateString) : DateTime.fromISO(dateString)\n }\n\n const financialYearStart = datetime.month < 3 ? datetime.year - 1 : datetime.year\n return DateTime.fromObject({ year: financialYearStart, month: 4, day: 1 }).toFormat('yyyy-MM-dd')\n}\n\n/**\n * Formats the period display based on the frequency\n * @param dateString{string}\n * @param frequency {('monthly' | 'quarterly' | 'lifetime_till_quarter')}\n * @returns {string}\n */\nexport function formatPeriodDisplay(dateString, frequency) {\n const date = DateTime.fromISO(dateString)\n\n const quarter = Math.floor(((date.month + 9) % 12) / 3) + 1\n const fyStartYear = date.month < 3 ? date.year - 1 : date.year\n\n if (frequency === 'quarterly') {\n // Use Luxon to format the exact months\n const startQ = date.startOf('quarter')\n const endQ = date.endOf('quarter')\n const exactMonths = `${startQ.toFormat('MMM yy')}-${endQ.toFormat('MMM yy')}`\n\n return `Q${quarter} ${fyStartYear}-${fyStartYear + 1} (${exactMonths})`\n }\n\n if (frequency === 'lifetime_till_quarter') {\n const endMonth = date.endOf('quarter')\n return `Cumulative till ${endMonth.toFormat('MMM ʼyy')} (Q${quarter})`\n }\n\n return date.toFormat('MMMM yyyy')\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-overlay',{attrs:{\"show\":_vm.$apollo.loading || _vm.mutationLoading,\"rounded\":\"sm\",\"spinner-variant\":\"primary\"}},[_c('b-card',{attrs:{\"no-body\":\"\"}},[_c('page-header',{staticClass:\"pb-0\",attrs:{\"show-search\":false,\"page-title\":\"Growth Report Questionnaire\",\"show-back-button\":\"\"},scopedSlots:_vm._u([{key:\"after-page-title\",fn:function(){return [_c('div',{staticClass:\"h4 text-right\"},[_c('b-badge',{attrs:{\"variant\":\"light-primary\"}},[_vm._v(\" Period: \"+_vm._s(_vm.reportPeriod)+\" \")])],1)]},proxy:true}])}),_c('b-card-body',[_c('form-response',{attrs:{\"can-submit\":_vm.canSubmit,\"enable-draft\":\"\",\"form-data\":_vm.formattedFormData,\"responses\":_vm.formattedFormResponse},on:{\"submit\":_vm.submitAnswer,\"save-draft\":_vm.draftAnswer}})],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n \n \n Period: {{ reportPeriod }}\n \n \n \n \n \n \n \n \n \n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GrowthReportForm.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GrowthReportForm.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./GrowthReportForm.vue?vue&type=template&id=06ba193b\"\nimport script from \"./GrowthReportForm.vue?vue&type=script&lang=js\"\nexport * from \"./GrowthReportForm.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n var doc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetGrowthReports\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"startupOrgId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"bigint\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"growth_reports_submission\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"where\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"startup_org_id\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"_eq\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"startupOrgId\"}}}]}}]}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"order_by\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"created_at\"},\"value\":{\"kind\":\"EnumValue\",\"value\":\"desc\"}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updated_at\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updated_by_user\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"full_name\"},\"arguments\":[],\"directives\":[]}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"report_start_date\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"submitted_at\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"frequency\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"submission_id\"},\"arguments\":[],\"directives\":[]}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetGrowthReportsFormQuestion\"},\"variableDefinitions\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"growth_reports_form_question\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"order_by\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"order\"},\"value\":{\"kind\":\"EnumValue\",\"value\":\"asc_nulls_last\"}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"question\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"form_question_id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"input_type\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"is_required\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"options\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"section\"},\"arguments\":[],\"directives\":[]}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetGrowthReportsSubmissionResponse\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submissionId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"bigint\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"growth_reports_submission_by_pk\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"submission_id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submissionId\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"report_start_date\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"frequency\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"submitted_at\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"submission_responses\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"response\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"form_question_id\"},\"arguments\":[],\"directives\":[]}]}}]}}]}}],\"loc\":{\"start\":0,\"end\":865}};\n doc.loc.source = {\"body\":\"query GetGrowthReports($startupOrgId: bigint!) {\\n growth_reports_submission(where: { startup_org_id: { _eq: $startupOrgId } }, order_by: { created_at: desc }) {\\n updated_at\\n updated_by_user {\\n full_name\\n }\\n report_start_date\\n submitted_at\\n frequency\\n submission_id\\n }\\n}\\n\\nquery GetGrowthReportsFormQuestion {\\n growth_reports_form_question(order_by: { order: asc_nulls_last}) {\\n question\\n form_question_id\\n input_type\\n is_required\\n options\\n section\\n }\\n}\\n\\nquery GetGrowthReportsSubmissionResponse($submissionId: bigint!) {\\n growth_reports_submission_by_pk(submission_id: $submissionId) {\\n report_start_date\\n frequency\\n submitted_at\\n submission_responses{\\n response\\n form_question_id\\n }\\n }\\n}\\n\",\"name\":\"GraphQL request\",\"locationOffset\":{\"line\":1,\"column\":1}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"GetGrowthReports\"] = oneQuery(doc, \"GetGrowthReports\");\n \n module.exports[\"GetGrowthReportsFormQuestion\"] = oneQuery(doc, \"GetGrowthReportsFormQuestion\");\n \n module.exports[\"GetGrowthReportsSubmissionResponse\"] = oneQuery(doc, \"GetGrowthReportsSubmissionResponse\");\n \n","\n var doc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"UpdateGrowthReport\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"response\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"growth_reports_submission_response_insert_input\"}}}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submittedAt\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"timestamptz\"}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submissionId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"bigint\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"insert_growth_reports_submission_response\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"objects\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"response\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"on_conflict\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"constraint\"},\"value\":{\"kind\":\"EnumValue\",\"value\":\"submission_response_submission_id_form_question_id_key\"}},{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"update_columns\"},\"value\":{\"kind\":\"ListValue\",\"values\":[{\"kind\":\"EnumValue\",\"value\":\"response\"}]}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"affected_rows\"},\"arguments\":[],\"directives\":[]}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"update_growth_reports_submission\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"where\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"submission_id\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"_eq\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submissionId\"}}}]}}]}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"_set\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"submitted_at\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"submittedAt\"}}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"affected_rows\"},\"arguments\":[],\"directives\":[]}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"DraftGrowthReport\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"response\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"growth_reports_submission_response_insert_input\"}}}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"insert_growth_reports_submission_response\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"objects\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"response\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"on_conflict\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"constraint\"},\"value\":{\"kind\":\"EnumValue\",\"value\":\"submission_response_submission_id_form_question_id_key\"}},{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"update_columns\"},\"value\":{\"kind\":\"ListValue\",\"values\":[{\"kind\":\"EnumValue\",\"value\":\"response\"}]}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"affected_rows\"},\"arguments\":[],\"directives\":[]}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"AddGrowthSubmission\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"startupOrgId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"bigint\"}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"reportStartDate\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"date\"}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"frequency\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"insert_growth_reports_submission_one\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"object\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"startup_org_id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"startupOrgId\"}}},{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"report_start_date\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"reportStartDate\"}}},{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"frequency\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"frequency\"}}}]}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"on_conflict\"},\"value\":{\"kind\":\"ObjectValue\",\"fields\":[{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"constraint\"},\"value\":{\"kind\":\"EnumValue\",\"value\":\"submission_startup_org_id_report_start_date_frequency_key\"}},{\"kind\":\"ObjectField\",\"name\":{\"kind\":\"Name\",\"value\":\"update_columns\"},\"value\":{\"kind\":\"ListValue\",\"values\":[{\"kind\":\"EnumValue\",\"value\":\"startup_org_id\"}]}}]}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"submission_id\"},\"arguments\":[],\"directives\":[]}]}}]}}],\"loc\":{\"start\":0,\"end\":1288}};\n doc.loc.source = {\"body\":\"mutation UpdateGrowthReport($response: [growth_reports_submission_response_insert_input!]!, $submittedAt: timestamptz!, $submissionId: bigint!) {\\n insert_growth_reports_submission_response(\\n objects: $response, on_conflict: { constraint: submission_response_submission_id_form_question_id_key, update_columns: [response] }\\n ) {\\n affected_rows\\n }\\n update_growth_reports_submission(\\n where: { submission_id: { _eq: $submissionId } },\\n _set: { submitted_at: $submittedAt }\\n ) {\\n affected_rows\\n }\\n}\\nmutation DraftGrowthReport($response: [growth_reports_submission_response_insert_input!]!) {\\n insert_growth_reports_submission_response(\\n objects: $response, on_conflict: { constraint: submission_response_submission_id_form_question_id_key, update_columns: [response] }\\n ) {\\n affected_rows\\n }\\n}\\n\\nmutation AddGrowthSubmission($startupOrgId: bigint!, $reportStartDate: date!, $frequency: String!) {\\n insert_growth_reports_submission_one(\\n object: { startup_org_id: $startupOrgId, report_start_date: $reportStartDate, frequency: $frequency },\\n on_conflict: { constraint: submission_startup_org_id_report_start_date_frequency_key, update_columns: [startup_org_id] }\\n ) {\\n submission_id\\n }\\n}\\n\",\"name\":\"GraphQL request\",\"locationOffset\":{\"line\":1,\"column\":1}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"UpdateGrowthReport\"] = oneQuery(doc, \"UpdateGrowthReport\");\n \n module.exports[\"DraftGrowthReport\"] = oneQuery(doc, \"DraftGrowthReport\");\n \n module.exports[\"AddGrowthSubmission\"] = oneQuery(doc, \"AddGrowthSubmission\");\n \n"],"sourceRoot":""}