{"version":3,"sources":["webpack:///./src/components/ui/ToggleButton.vue?c635","webpack:///./src/components/ui/ToggleButton.vue","webpack:///./src/components/ui/ToggleButton.vue?09e8","webpack:///./src/components/ui/input/CheckboxInput.vue?3fc0","webpack:///./src/components/ui/input/CheckboxInput.vue","webpack:///./src/components/ui/input/CheckboxInput.vue?bcd1","webpack:///./src/components/ui/modals/SelectBuildersLotModal.vue?7269","webpack:///./src/features/plural.ts","webpack:///./src/components/ui/modals/SelectBuildersLotModal.vue?233e","webpack:///./src/components/ui/modals/SelectBuildersLotModal.vue","webpack:///./src/components/ui/modals/SelectBuildersLotModal.vue?0869"],"names":["_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","class","_normalizeClass","toggleClass","_createElementVNode","disabled","labelBold","labelClass","labelHidden","_createTextVNode","_toDisplayString","label","type","value","modelValue","checked","onClick","toggleSelection","additionalClass","_defineComponent","__name","props","Boolean","String","Array","required","emits","setup","__props","expose","__expose","emit","event","__returned__","Object","defineProperty","enumerable","__exports__","_hoisted_2","_hoisted_3","key","onChange","$event","$emit","partial","checkedPartial","_createCommentVNode","plural","number","word","withNumber","cov_1quwmciphk","b","f","s","toLocaleLowerCase","firstChar","_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_createBlock","isOpen","onClose","classes","content","_withCtx","builders","getBuildersSelectedCount","length","_Fragment","_renderList","buildersList","builder","idx","_createVNode","name","_withModifiers","isSelected","houses","house","getSiteCosts","e","updatePriceInput","placeholder","canSave","onSave","_","buildersLot","computed","selectedBuilders","filter","buildersWithHousesSelected","flatMap","_houseWithSiteCosts2","siteCosts","formatPriceTrim","houseWithSiteCosts","undefined","_houseWithSiteCosts","some","housesIds","houseId","_id","map","builderId","PropType","Modal","CheckboxInput","BuilderInterfaceWithHouseDesig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,wBAE7gB,OADA9D,OAAOC,eAAeF,EAAc,kBAAmB,CAAEG,YAAY,EAAOvB,OAAO,IAC5EoB,K,iCCrGP,MAAMI,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7C,GAAQ,CAAC,YAAY,qBAE1E,gB","file":"js/admin18~admin22.e89fb117.js","sourcesContent":["import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"value\", \"checked\", \"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"toggle-wr\", [$props.toggleClass]])\n }, [\n _createElementVNode(\"label\", {\n class: _normalizeClass([{ disabled: $props.disabled }, $props.labelBold, $props.labelClass, $props.labelHidden])\n }, [\n _createTextVNode(_toDisplayString($props.label), 1),\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n value: $props.modelValue,\n checked: $props.modelValue,\n onClick: $setup.toggleSelection,\n disabled: $props.disabled\n }, null, 8, _hoisted_1),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"slider\", $props.additionalClass])\n }, null, 2)\n ], 2)\n ], 2))\n}","import { defineComponent as _defineComponent } from 'vue'\n\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'ToggleButton',\n props: {\n modelValue: Boolean,\n label: String,\n disabled: Boolean,\n additionalClass: [String, Array],\n labelBold: String,\n labelClass: { type: String, required: false },\n labelHidden: { type: String, required: false },\n toggleClass: { type: String, required: false },\n },\n emits: [\"update:modelValue\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n \n \n\n const toggleSelection = (event: Event) => {\n emits(\"update:modelValue\", !props.modelValue);\n };\n\nconst __returned__ = { props, emits, toggleSelection }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./ToggleButton.vue?vue&type=template&id=59ba2580&ts=true&lang=pug\"\nimport script from \"./ToggleButton.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ToggleButton.vue?vue&type=script&lang=ts&setup=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"checkbox-wr\" }\nconst _hoisted_2 = [\"value\", \"checked\", \"disabled\"]\nconst _hoisted_3 = {\n key: 0,\n class: \"label\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"label\", {\n class: _normalizeClass({ disabled: $props.disabled })\n }, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n value: $props.modelValue,\n checked: $props.modelValue,\n onChange: _cache[0] || (_cache[0] = ($event: any) => (_ctx.$emit('update:modelValue', !$props.modelValue))),\n disabled: $props.disabled\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"box\", { partial: $props.checkedPartial }])\n }, null, 2),\n ($props.label)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString($props.label), 1))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\n\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CheckboxInput',\n props: {\n modelValue: Boolean,\n label: String,\n disabled: Boolean,\n checkedPartial: Boolean,\n},\n emits: [\"update:modelValue\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n\n\n\nconst __returned__ = { props, emits }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./CheckboxInput.vue?vue&type=template&id=1d6c41a5&ts=true&lang=pug\"\nimport script from \"./CheckboxInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CheckboxInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./SelectBuildersLotModal.vue?vue&type=style&index=0&id=6a89c9a0&lang=scss&scoped=true\"","const plural = (number: number, word: string, withNumber = true): string => {\n if (word.toLocaleLowerCase() === \"this\") {\n const firstChar = word[0];\n return number > 1 ? `${firstChar}hese` : `${firstChar}his`;\n }\n if (!number) {\n return `0 ${word}s`;\n } else return `${withNumber ? number : \"\"} ${word}${number < 2 ? \"\" : \"s\"}`;\n};\n\nexport default plural;\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6a89c9a0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"modal-wrapper\"\n}\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-title\" }, \"Select Builders(s)\")\n], -1))\nconst _hoisted_3 = { class: \"listings scroll-wrapper\" }\nconst _hoisted_4 = { class: \"listings-header\" }\nconst _hoisted_5 = {\n key: 0,\n class: \"items-count\"\n}\nconst _hoisted_6 = {\n key: 1,\n class: \"items-count\"\n}\nconst _hoisted_7 = { class: \"wrapper-table\" }\nconst _hoisted_8 = { class: \"table-scroll\" }\nconst _hoisted_9 = { class: \"table-default\" }\nconst _hoisted_10 = { class: \"checkbox\" }\nconst _hoisted_11 = { class: \"checkbox house\" }\nconst _hoisted_12 = {\n key: 0,\n class: \"site-costs\"\n}\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Site costs:\", -1))\nconst _hoisted_14 = [\"value\", \"onChange\"]\nconst _hoisted_15 = { class: \"controls\" }\nconst _hoisted_16 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createBlock($setup[\"Modal\"], {\n isOpen: $props.isOpen,\n onClose: $setup.onClose,\n classes: \"select-imported-listing-modal height-limited\"\n }, {\n content: _withCtx(() => [\n ($props.builders)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n ($setup.getBuildersSelectedCount > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString($setup.plural($setup.getBuildersSelectedCount, \"Builder\")) + \" selected\", 1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, _toDisplayString($setup.plural($props.builders.length, \"Builder\")), 1)),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"table\", _hoisted_9, [\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.buildersList, (builder, idx) => {\n return (_openBlock(), _createElementBlock(\"tr\", { key: idx }, [\n _createElementVNode(\"td\", _hoisted_10, [\n _createVNode($setup[\"CheckboxInput\"], {\n label: builder.name,\n onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n modelValue: builder.isSelected,\n \"onUpdate:modelValue\": ($event: any) => (builder.isSelected = $event),\n disabled: !builder.houses.length\n }, null, 8, [\"label\", \"modelValue\", \"onUpdate:modelValue\", \"disabled\"]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(builder.houses, (house, idx) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n class: \"house\",\n key: idx\n }, [\n _createElementVNode(\"td\", _hoisted_11, [\n _createVNode($setup[\"CheckboxInput\"], {\n checkedPartial: true,\n label: house.name,\n disabled: !builder.isSelected,\n onClick: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\"])),\n modelValue: house.isSelected && builder.isSelected,\n \"onUpdate:modelValue\": ($event: any) => (house.isSelected = $event)\n }, null, 8, [\"label\", \"disabled\", \"modelValue\", \"onUpdate:modelValue\"]),\n (house.isSelected)\n ? (_openBlock(), _createElementBlock(\"td\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"input\", {\n class: \"input\",\n value: $setup.getSiteCosts(house),\n onChange: (e) => $setup.updatePriceInput(e, house, 'siteCosts'),\n type: \"text\",\n placeholder: \"$14,000\"\n }, null, 40, _hoisted_14)\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ])\n ])\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"button\", {\n class: \"button default\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => ($setup.onClose()))\n }, \"Cancel\"),\n _createElementVNode(\"button\", {\n class: \"button default primary send\",\n disabled: !$setup.canSave,\n onClick: $setup.onSave\n }, \"Save\", 8, _hoisted_16)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"isOpen\"]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { PropType, computed } from \"vue\";\nimport Modal from \"@/components/ui/Modal.vue\";\nimport plural from \"@/features/plural\";\nimport CheckboxInput from \"../input/CheckboxInput.vue\";\nimport { BuilderInterfaceWithHouseDesigns } from \"@/types/BuilderInterface\";\nimport { HouseDesignInterface } from \"@/types/HouseDesignInterface\";\nimport { BuilderAndHouses, HousesAndSiteCosts } from \"@/types/LotInterface\";\nimport { formatPriceTrim, updatePriceInput } from \"@/helpers/transformation/price\";\n\ninterface House extends HouseDesignInterface {\n isSelected: boolean;\n siteCosts: number;\n}\ninterface BuilderProp extends BuilderInterfaceWithHouseDesigns {\n isSelected: boolean;\n houses: House[];\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SelectBuildersLotModal',\n props: {\n isOpen: {\n type: Boolean,\n required: true,\n },\n builders: {\n type: Array as PropType,\n required: true,\n },\n buildersLot: {\n type: Array as PropType,\n required: false,\n }\n},\n emits: [\"close\", \"save\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n\n\nconst buildersList = computed(() => props.builders);\n\n\nconst canSave = computed(() => {\n const selectedBuilders = buildersList.value.filter(\n (builder) => builder.isSelected\n );\n const buildersWithHousesSelected = selectedBuilders.flatMap((builder) =>\n builder.houses.filter((house) => house.isSelected)\n );\n return buildersWithHousesSelected.length;\n});\n\n\nconst getSiteCosts = (house: House) => {\n if(house.siteCosts || house.siteCosts === 0) {\n return formatPriceTrim(house.siteCosts)\n }\n if(!props.buildersLot) {\n return '$0';\n }\n let houseWithSiteCosts : HousesAndSiteCosts | undefined = undefined;\n props.buildersLot.some(builder => {\n return builder.housesIds.some(houseId => {\n if (houseId.houseId === house._id) {\n houseWithSiteCosts = houseId;\n return true;\n }\n return false;\n });\n });\n \n if(houseWithSiteCosts) {\n house.siteCosts = houseWithSiteCosts?.siteCosts;\n }\n return formatPriceTrim(houseWithSiteCosts?.siteCosts);\n}\n\nconst getBuildersSelectedCount = computed(() => {\n return buildersList.value.filter((builder: BuilderProp) => builder.isSelected)\n .length;\n});\nconst onSave = () => {\n const selectedBuilders = buildersList.value\n .filter((builder) => builder.isSelected)\n .map((builder) => ({\n builderId: builder._id,\n housesIds: builder.houses\n .filter((house) => house.isSelected)\n .map((house) => ({\n houseId: house._id,\n siteCosts: house.siteCosts || null,\n })),\n }));\n emits(\"save\", selectedBuilders);\n emits(\"close\");\n};\n\nconst onClose = () => {\n emits(\"close\");\n};\n\nconst __returned__ = { props, buildersList, emits, canSave, getSiteCosts, getBuildersSelectedCount, onSave, onClose, PropType, computed, Modal, get plural() { return plural }, CheckboxInput, get BuilderInterfaceWithHouseDesigns() { return BuilderInterfaceWithHouseDesigns }, get HouseDesignInterface() { return HouseDesignInterface }, get BuilderAndHouses() { return BuilderAndHouses }, get HousesAndSiteCosts() { return HousesAndSiteCosts }, get formatPriceTrim() { return formatPriceTrim }, get updatePriceInput() { return updatePriceInput } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./SelectBuildersLotModal.vue?vue&type=template&id=6a89c9a0&scoped=true&ts=true&lang=pug\"\nimport script from \"./SelectBuildersLotModal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SelectBuildersLotModal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SelectBuildersLotModal.vue?vue&type=style&index=0&id=6a89c9a0&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6a89c9a0\"]])\n\nexport default __exports__"],"sourceRoot":""}