{"version":3,"sources":["webpack:///./src/library/Helpers.ts","webpack:///./src/library/Exception.ts","webpack:///./src/views/SignUpView.vue?7560","webpack:///./src/repositories/UserRepository.ts","webpack:///./src/views/SignUpView.vue","webpack:///./src/views/SignUpView.vue?d13b"],"names":["toast","async","options","duration","color","t","create","present","handle","error","err","response","status","message","data","errors","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","key","_hoisted_5","render","_ctx","_cache","$props","$setup","$data","$options","_component_ion_label","_component_ion_input","_component_ion_item","_component_ion_text","_component_ion_col","_component_ion_row","_component_ion_spinner","_component_ion_button","_component_ion_grid","_component_ion_content","_component_ion_page","default","onSubmit","$event","position","_","modelValue","first_name","required","onIonFocus","last_name","userid","type","onKeyup","class","loading","btnColor","expand","disabled","multilines","btnText","split","line","index","signup","campaignId","tag","payload","http","post","components","IonPage","IonContent","IonItem","IonLabel","IonButton","IonInput","IonText","IonSpinner","IonGrid","IonRow","IonCol","route","state","params","btnText_sm","query","text_sm","btnText_md","text_md","includes","UserRepository","window","parent","location","href","Exception","__exports__"],"mappings":"kIAEO,MAAMA,EAAQC,UACnBC,EAAQC,SAAWD,EAAQC,UAAY,IACvCD,EAAQE,MAAQF,EAAQE,OAAS,SACjC,MAAMC,QAAU,OAAgBC,OAAOJ,GACvC,OAAOG,EAAEE,WCELC,EAASP,UACb,MAAMQ,EAAQC,EACd,GAAID,EAAME,SAAU,CAClB,MAAMC,EAASH,EAAME,SAASC,OACxBC,EAAUJ,EAAME,SAASG,KAAKD,QACpC,OAAQD,GACN,KAAK,IACH,OAAOH,EAAME,SAASG,KAAKC,OAC7B,KAAK,UACGf,EAAM,CAAEa,YACd,MACF,KAAK,UACGb,EAAM,CAAEa,QAAS,qBAAqBD,OAC5C,MACF,cACQZ,EAAM,CAAEa,QAASA,GAAW,iBAAiBD,UAK5C,QACbJ,W,2DC3BF,MAAMQ,EAA0B,eAAiB,cAC3CC,EAA0B,eAAiB,aAC3CC,EAA0B,eAAiB,SAC3CC,EAAa,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G,I,4BC7LP,MAAMmB,EAAS9D,MAAO+D,EAAoBC,EAAaC,IAC9CC,EAAA,KAAKC,KAAK,WAAWJ,KAAcC,IAAOC,GAGpC,OACbH,U,wBCAa,iBAAgB,CAC7BM,WAAY,CACVC,QAAA,OACAC,WAAA,OACAC,QAAA,OACAC,SAAA,OACAC,UAAA,OACAC,SAAA,OACAC,QAAA,OACAC,WAAA,OACAC,QAAA,OACAC,OAAA,OACAC,OAAA,QAGF,QACE,MAAMC,EAAQ,iBAERC,EAAQ,eAAS,CACrBhC,OAAQ,GACRJ,WAAY,GACZG,UAAW,GACXK,SAAS,EACTvC,OAAQ,KAGJiD,EAAaiB,EAAME,OAAOnB,WAC1BoB,EAAaH,EAAMI,MAAMC,QACzBC,EAAaN,EAAMI,MAAMG,QACzBjC,EAAW0B,EAAMI,MAAMjF,OAAS,YAChC6D,EAAOgB,EAAMI,MAAMpB,KAAkB,GAErCN,EAAU,IACV4B,EACK,eAAW,UAAYH,EAAaG,EAEtCH,EAGH1B,EAAa,IAAeC,IAAU8B,SAAS,KAE/ChD,EAAWxC,UACfiF,EAAM5B,SAAU,EAChB,UACQoC,EAAe3B,OAAOC,EAAYC,EAAK,CAC3Cf,OAAQgC,EAAMhC,OACdJ,WAAYoC,EAAMpC,WAClBG,UAAWiC,EAAMjC,YAEnB0C,OAAOC,OAAOC,SAASC,KAAO,2CAA2CZ,EAAMhC,YAAYe,IAM3F,MAAOxD,GACP,MAAMC,QAAYqF,EAAA,KAAUvF,OAAOC,GAC/BC,IACFwE,EAAMnE,OAASL,GAGnBwE,EAAM5B,SAAU,GAGlB,MAAO,IACF,eAAO4B,GACVzC,WACAkB,QAASA,IACTJ,WACAG,WAAYA,Q,qBCvElB,MAAMsC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS1E,KAErD","file":"js/chunk-363cf4d2.f8336db4.js","sourcesContent":["import { toastController } from \"@ionic/core\";\r\n\r\nexport const toast = async (options: { message: string; duration?: number; color?: string }): Promise => {\r\n options.duration = options.duration || 3000;\r\n options.color = options.color || \"danger\";\r\n const t = await toastController.create(options);\r\n return t.present();\r\n};\r\n","import { AxiosError } from \"axios\";\r\nimport { toast } from \"./Helpers\";\r\n\r\ntype Error = {\r\n message: string;\r\n errors: Record;\r\n};\r\n\r\nconst handle = async (err: unknown): Promise => {\r\n const error = err as AxiosError;\r\n if (error.response) {\r\n const status = error.response.status;\r\n const message = error.response.data.message;\r\n switch (status) {\r\n case 422:\r\n return error.response.data.errors;\r\n case 401:\r\n await toast({ message });\r\n break;\r\n case 404:\r\n await toast({ message: `Record not found (${status})` });\r\n break;\r\n default:\r\n await toast({ message: message || `Server error (${status})` });\r\n }\r\n }\r\n};\r\n\r\nexport default {\r\n handle,\r\n};\r\n","import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withKeys as _withKeys, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createTextVNode(\"First Name\")\nconst _hoisted_2 = /*#__PURE__*/_createTextVNode(\"Last Name\")\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\"Email\")\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_ion_label = _resolveComponent(\"ion-label\")!\n const _component_ion_input = _resolveComponent(\"ion-input\")!\n const _component_ion_item = _resolveComponent(\"ion-item\")!\n const _component_ion_text = _resolveComponent(\"ion-text\")!\n const _component_ion_col = _resolveComponent(\"ion-col\")!\n const _component_ion_row = _resolveComponent(\"ion-row\")!\n const _component_ion_spinner = _resolveComponent(\"ion-spinner\")!\n const _component_ion_button = _resolveComponent(\"ion-button\")!\n const _component_ion_grid = _resolveComponent(\"ion-grid\")!\n const _component_ion_content = _resolveComponent(\"ion-content\")!\n const _component_ion_page = _resolveComponent(\"ion-page\")!\n\n return (_openBlock(), _createBlock(_component_ion_page, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_content, { \"scroll-y\": false }, {\n default: _withCtx(() => [\n _createElementVNode(\"form\", {\n onSubmit: _cache[7] || (_cache[7] = _withModifiers(($event: any) => (_ctx.onSubmit()), [\"prevent\"]))\n }, [\n _createVNode(_component_ion_grid, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_row, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_col, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_item, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_label, { position: \"floating\" }, {\n default: _withCtx(() => [\n _hoisted_1\n ]),\n _: 1\n }),\n _createVNode(_component_ion_input, {\n modelValue: _ctx.first_name,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.first_name) = $event)),\n required: \"\",\n onIonFocus: _cache[1] || (_cache[1] = ($event: any) => (_ctx.errors.first_name = ''))\n }, null, 8, [\"modelValue\"])\n ]),\n _: 1\n }),\n (_ctx.errors.first_name)\n ? (_openBlock(), _createBlock(_component_ion_text, {\n key: 0,\n color: \"danger\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.errors.first_name[0]), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_col, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_item, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_label, { position: \"floating\" }, {\n default: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }),\n _createVNode(_component_ion_input, {\n modelValue: _ctx.last_name,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((_ctx.last_name) = $event)),\n required: \"\",\n onIonFocus: _cache[3] || (_cache[3] = ($event: any) => (_ctx.errors.last_name = ''))\n }, null, 8, [\"modelValue\"])\n ]),\n _: 1\n }),\n (_ctx.errors.last_name)\n ? (_openBlock(), _createBlock(_component_ion_text, {\n key: 0,\n color: \"danger\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.errors.last_name[0]), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_ion_row, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_col, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_item, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_label, { position: \"floating\" }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }),\n _createVNode(_component_ion_input, {\n modelValue: _ctx.userid,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((_ctx.userid) = $event)),\n type: \"email\",\n required: \"\",\n onIonFocus: _cache[5] || (_cache[5] = ($event: any) => (_ctx.errors.userid = '')),\n onKeyup: _cache[6] || (_cache[6] = _withKeys(($event: any) => (_ctx.onSubmit()), [\"enter\"]))\n }, null, 8, [\"modelValue\"])\n ]),\n _: 1\n }),\n (_ctx.errors.userid)\n ? (_openBlock(), _createBlock(_component_ion_text, {\n key: 0,\n color: \"danger\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.errors.userid[0]), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_ion_row, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_col, { class: \"ion-text-center\" }, {\n default: _withCtx(() => [\n (_ctx.loading)\n ? (_openBlock(), _createBlock(_component_ion_spinner, {\n key: 0,\n color: _ctx.btnColor\n }, null, 8, [\"color\"]))\n : (_openBlock(), _createBlock(_component_ion_button, {\n key: 1,\n type: \"submit\",\n expand: \"block\",\n color: _ctx.btnColor,\n disabled: _ctx.loading,\n class: _normalizeClass(['submit-button', { multilines: _ctx.multilines }])\n }, {\n default: _withCtx(() => [\n (_ctx.multilines)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.btnText.split('_'), (line, index) => {\n return (_openBlock(), _createElementBlock(\"span\", { key: index }, [\n _createTextVNode(_toDisplayString(line), 1),\n _hoisted_5\n ]))\n }), 128))\n ]))\n : (_openBlock(), _createBlock(_component_ion_text, { key: 1 }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.btnText), 1)\n ]),\n _: 1\n }))\n ]),\n _: 1\n }, 8, [\"color\", \"disabled\", \"class\"]))\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ], 32)\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n}","import http from \"@/library/http\";\r\n\r\nconst signup = async (campaignId: string, tag: string, payload: { userid: string; first_name: string; last_name: string }): Promise => {\r\n return http.post(`/signup/${campaignId}/${tag}`, payload);\r\n};\r\n\r\nexport default {\r\n signup,\r\n};\r\n","\r\nimport { defineComponent, reactive, toRefs } from \"vue\";\r\nimport { IonPage, IonContent, IonItem, IonLabel, IonButton, IonInput, IonText, IonSpinner, IonGrid, IonRow, IonCol, isPlatform } from \"@ionic/vue\";\r\nimport UserRepository from \"@/repositories/UserRepository\";\r\nimport Exception from \"@/library/Exception\";\r\nimport { useRoute } from \"vue-router\";\r\n\r\nexport default defineComponent({\r\n components: {\r\n IonPage,\r\n IonContent,\r\n IonItem,\r\n IonLabel,\r\n IonButton,\r\n IonInput,\r\n IonText,\r\n IonSpinner,\r\n IonGrid,\r\n IonRow,\r\n IonCol,\r\n },\r\n\r\n setup() {\r\n const route = useRoute();\r\n\r\n const state = reactive({\r\n userid: \"\",\r\n first_name: \"\",\r\n last_name: \"\",\r\n loading: false,\r\n errors: {},\r\n });\r\n\r\n const campaignId = route.params.campaignId as string;\r\n const btnText_sm = route.query.text_sm as string;\r\n const btnText_md = route.query.text_md as string;\r\n const btnColor = route.query.color || \"darkgreen\";\r\n const tag = (route.query.tag as string) || \"\";\r\n\r\n const btnText = () => {\r\n if (btnText_md) {\r\n return isPlatform(\"mobile\") ? btnText_sm : btnText_md;\r\n }\r\n return btnText_sm;\r\n };\r\n\r\n const multilines = (): boolean => btnText().includes(\"_\");\r\n\r\n const onSubmit = async (): Promise => {\r\n state.loading = true;\r\n try {\r\n await UserRepository.signup(campaignId, tag, {\r\n userid: state.userid,\r\n first_name: state.first_name,\r\n last_name: state.last_name,\r\n });\r\n window.parent.location.href = `https://www.wintick.com/users/verify/?u=${state.userid}&t=${tag}`;\r\n /*if (tag.toUpperCase() == \"MC_HOME\") {\r\n window.parent.location.href = \"https://www.wintick.com/users/signupMCOK/home\";\r\n } else {\r\n window.parent.location.href = `https://www.wintick.com/users/signupMCOK/${tag}`;\r\n }*/\r\n } catch (error) {\r\n const err = await Exception.handle(error);\r\n if (err) {\r\n state.errors = err;\r\n }\r\n }\r\n state.loading = false;\r\n };\r\n\r\n return {\r\n ...toRefs(state),\r\n onSubmit,\r\n btnText: btnText(),\r\n btnColor,\r\n multilines: multilines(),\r\n };\r\n },\r\n});\r\n","import { render } from \"./SignUpView.vue?vue&type=template&id=8f0d879a&ts=true\"\nimport script from \"./SignUpView.vue?vue&type=script&lang=ts\"\nexport * from \"./SignUpView.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"D:\\\\projects\\\\wintick\\\\wintick-applets-vue\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}