{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.promise.finally.js","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue","webpack:///resources/js/src/app/components/category/StepByStepNavigation.vue","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue?4c6a","webpack:///./resources/js/src/app/components/category/StepByStepNavigation.vue?358d"],"names":["$","IS_PURE","NativePromiseConstructor","fails","getBuiltIn","isCallable","speciesConstructor","promiseResolve","defineBuiltIn","NativePromisePrototype","prototype","target","proto","real","forced","call","then","onFinally","C","this","isFunction","x","e","method","unsafe","render","_vm","_c","_self","isInitiallyLoaded","_e","_t","_v","staticClass","_l","categoryChildren","category","class","columnDivider","attrs","href","getCategoryUrl","url","title","details","metaTitle","name","imageSource","src","alt","_s","length","childrenCount","disabled","isWaiting","type","on","click","$event","loadChunk","$translate","icon","loading","_withStripped","props","categoryId","required","chunkSize","default","columns","columnsMax","data","computed","mapState","created","methods","size","finally","component"],"mappings":"2FACA,IAAIA,EAAI,EAAQ,GACZC,EAAU,EAAQ,IAClBC,EAA2B,EAAQ,IACnCC,EAAQ,EAAQ,GAChBC,EAAa,EAAQ,IACrBC,EAAa,EAAQ,IACrBC,EAAqB,EAAQ,KAC7BC,EAAiB,EAAQ,KACzBC,EAAgB,EAAQ,IAExBC,EAAyBP,GAA4BA,EAAyBQ,UA0BlF,GAhBAV,EAAE,CAAEW,OAAQ,UAAWC,OAAO,EAAMC,MAAM,EAAMC,SAP5BZ,GAA4BC,GAAM,WAEpDM,EAAgC,QAAEM,KAAK,CAAEC,KAAM,eAA+B,mBAKT,CACrE,QAAW,SAAUC,GACnB,IAAIC,EAAIZ,EAAmBa,KAAMf,EAAW,YACxCgB,EAAaf,EAAWY,GAC5B,OAAOE,KAAKH,KACVI,EAAa,SAAUC,GACrB,OAAOd,EAAeW,EAAGD,KAAaD,MAAK,WAAc,OAAOK,MAC9DJ,EACJG,EAAa,SAAUE,GACrB,OAAOf,EAAeW,EAAGD,KAAaD,MAAK,WAAc,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B,CACzCN,EACE,SACA,CACEM,YAAa,+BACbI,MAAO,CAAEgB,SAAU3B,EAAI4B,WACvBf,MAAO,CAAEgB,KAAM,UACfC,GAAI,CACFC,MAAO,SAAUC,GACf,OAAOhC,EAAIiC,eAIjB,CACEhC,EAAG,OAAQ,CACTD,EAAIM,GACFN,EAAIwB,GACFxB,EAAIkC,WACF,oDAKRlC,EAAIM,GAAG,KACPL,EAAG,OAAQ,CACTM,YAAa,QACbM,MAAO,CACLsB,KAAM,cACN,gBAAiB,YACjBC,QAASpC,EAAI4B,cAInB,KAGJ5B,EAAII,MAEV,IAGJ,IAIJL,EAAOsC,eAAgB,E,+aChGR,IC5B6M,ED4B7M,CACfC,OACAC,WACA,CACAV,YACAW,aAEAC,UACA,CACAZ,YACAa,WAEArB,YACA,CACAQ,YACAa,qBAEAC,QACA,CACAd,YACAa,WAEAE,WACA,CACAf,YACAa,YAEAhB,cACA,CACAG,YACAW,cAIAK,gBAEA,OACAjB,aACAzB,uBAIA2C,S,+VAAAA,EAEAlC,yBAEA,sCAGAmC,aACAtC,6BAAA,yCAIAuC,mBAEA,kBAGAC,QACA,CACAhB,qBACA,WACA,iBAEA,kBAEA,iDACA,CAAAM,2BAAAW,sBACAC,oBAEA,eACA,4BAKApC,2BAEA,wBAGA,OAFA,gEAEA,K,OEvGIqC,EAAY,YACd,EACArD,EHkHoB,IGhHpB,EACA,KACA,KACA,MAIa,UAAAqD,E","file":"chunks/ceres-13.min.js","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromiseConstructor && fails(function () {\n  // eslint-disable-next-line unicorn/no-thenable -- required for testing\n  NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n  'finally': function (onFinally) {\n    var C = speciesConstructor(this, getBuiltIn('Promise'));\n    var isFunction = isCallable(onFinally);\n    return this.then(\n      isFunction ? function (x) {\n        return promiseResolve(C, onFinally()).then(function () { return x; });\n      } : onFinally,\n      isFunction ? function (e) {\n        return promiseResolve(C, onFinally()).then(function () { throw e; });\n      } : onFinally\n    );\n  }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n  var method = getBuiltIn('Promise').prototype['finally'];\n  if (NativePromisePrototype['finally'] !== method) {\n    defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });\n  }\n}\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\n    \"div\",\n    [\n      !_vm.isInitiallyLoaded ? _vm._t(\"default\") : _vm._e(),\n      _vm._v(\" \"),\n      _c(\n        \"div\",\n        { staticClass: \"row\" },\n        [\n          _vm._l(_vm.categoryChildren, function (category) {\n            return _c(\n              \"div\",\n              {\n                staticClass: \"mb-3 col-6\",\n                class: \"col-md-\" + _vm.columnDivider,\n              },\n              [\n                _c(\n                  \"a\",\n                  {\n                    attrs: {\n                      href: _vm.getCategoryUrl(category.url),\n                      title:\n                        category.details[0].metaTitle ||\n                        category.details[0].name,\n                    },\n                  },\n                  [\n                    _c(\n                      \"div\",\n                      {\n                        staticClass: \"nav-item border d-flex\",\n                        class: { \"no-img\": _vm.imageSource === \"none\" },\n                      },\n                      [\n                        category.details[0][_vm.imageSource]\n                          ? _c(\"div\", { staticClass: \"prop-1-1\" }, [\n                              _vm.imageSource !== \"none\"\n                                ? _c(\"img\", {\n                                    attrs: {\n                                      src:\n                                        \"/documents/\" +\n                                        category.details[0][_vm.imageSource],\n                                      alt:\n                                        category.details[0].metaTitle ||\n                                        category.details[0].name,\n                                    },\n                                  })\n                                : _vm._e(),\n                            ])\n                          : _vm._e(),\n                        _vm._v(\" \"),\n                        _c(\n                          \"div\",\n                          { staticClass: \"nav-text d-flex align-center p-2\" },\n                          [\n                            _c(\n                              \"span\",\n                              {\n                                staticClass:\n                                  \"text-appearance mx-auto text-truncate\",\n                              },\n                              [_vm._v(_vm._s(category.details[0].name))]\n                            ),\n                          ]\n                        ),\n                      ]\n                    ),\n                  ]\n                ),\n              ]\n            )\n          }),\n          _vm._v(\" \"),\n          _vm.categoryChildren.length &&\n          _vm.categoryChildren.length < _vm.childrenCount\n            ? _c(\"div\", { staticClass: \"mb-3 mx-auto\" }, [\n                _c(\n                  \"button\",\n                  {\n                    staticClass: \"btn btn-appearance px-4 py-3\",\n                    class: { disabled: _vm.isWaiting },\n                    attrs: { type: \"button\" },\n                    on: {\n                      click: function ($event) {\n                        return _vm.loadChunk()\n                      },\n                    },\n                  },\n                  [\n                    _c(\"span\", [\n                      _vm._v(\n                        _vm._s(\n                          _vm.$translate(\n                            \"Ceres::Template.stepByStepNavigationShowMore\"\n                          )\n                        )\n                      ),\n                    ]),\n                    _vm._v(\" \"),\n                    _c(\"icon\", {\n                      staticClass: \"fa-fw\",\n                      attrs: {\n                        icon: \"plus-circle\",\n                        \"class-loading\": \"fa-repeat\",\n                        loading: _vm.isWaiting,\n                      },\n                    }),\n                  ],\n                  1\n                ),\n              ])\n            : _vm._e(),\n        ],\n        2\n      ),\n    ],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","<template>\n    <div>\n        <slot v-if=\"!isInitiallyLoaded\"></slot>\n        <div class=\"row\">\n            <div class=\"mb-3 col-6\" :class=\"'col-md-' + columnDivider\" v-for=\"category in categoryChildren\">\n                <a :href=\"getCategoryUrl(category.url)\" :title=\"category.details[0].metaTitle || category.details[0].name\">\n                    <div class=\"nav-item border d-flex\" :class=\"{ 'no-img': imageSource === 'none' }\">\n                        <div v-if=\"category.details[0][imageSource]\" class=\"prop-1-1\">\n                            <img v-if=\"imageSource !== 'none'\" :src=\"'/documents/' + category.details[0][imageSource]\" :alt=\"category.details[0].metaTitle || category.details[0].name\">\n                        </div>\n                        <div class=\"nav-text d-flex align-center p-2\"><span class=\"text-appearance mx-auto text-truncate\">{{ category.details[0].name }}</span></div>\n                    </div>\n                </a>\n            </div>\n\n            <div class=\"mb-3 mx-auto\" v-if=\"categoryChildren.length && categoryChildren.length < childrenCount\">\n                <button type=\"button\" class=\"btn btn-appearance px-4 py-3\" @click=\"loadChunk()\" :class=\"{ 'disabled': isWaiting }\">\n                    <span>{{ $translate(\"Ceres::Template.stepByStepNavigationShowMore\") }}</span>\n                    <icon icon=\"plus-circle\" class=\"fa-fw\" class-loading=\"fa-repeat\" :loading=\"isWaiting\"></icon>\n                </button>\n            </div>\n        </div>\n    </div>\n</template>\n\n<script>\nimport { mapState } from \"vuex\";\n\nexport default {\n    props: {\n        categoryId:\n        {\n            type: Number,\n            required: true\n        },\n        chunkSize:\n        {\n            type: Number,\n            default: 8\n        },\n        imageSource:\n        {\n            type: String,\n            default: \"imagePath\"\n        },\n        columns:\n        {\n            type: Number,\n            default: 4\n        },\n        columnsMax:\n        {\n            type: Number,\n            default: 12\n        },\n        childrenCount:\n        {\n            type: Number,\n            required: true\n        }\n    },\n\n    data()\n    {\n        return {\n            isWaiting: false,\n            isInitiallyLoaded: false\n        };\n    },\n\n    computed:\n        {\n            columnDivider()\n            {\n                return this.columnsMax / this.columns;\n            },\n\n            ...mapState({\n                categoryChildren: state => state.navigation.categoryChildren\n            })\n        },\n\n    created()\n    {\n        this.loadChunk();\n    },\n\n    methods:\n    {\n        loadChunk()\n        {\n            if (!this.isWaiting)\n            {\n                this.isWaiting = true;\n\n                this.$store.dispatch(\"loadCategoryChildrenChunk\",\n                    { categoryId: this.categoryId, size: this.chunkSize })\n                    .finally(() =>\n                    {\n                        this.isWaiting = false;\n                        this.isInitiallyLoaded = true;\n                    });\n            }\n        },\n\n        getCategoryUrl(url)\n        {\n            const trailingSlash = url[0] === \"/\" ? \"\" : \"/\";\n            const prefix = App.urls.includeLanguage ? `/${ App.language }${ trailingSlash }` : \"\";\n\n            return prefix + url;\n        }\n    }\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StepByStepNavigation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StepByStepNavigation.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./StepByStepNavigation.vue?vue&type=template&id=4345d222&\"\nimport script from \"./StepByStepNavigation.vue?vue&type=script&lang=js&\"\nexport * from \"./StepByStepNavigation.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"],"sourceRoot":""}