@tiddh/brave-vue 1.93.211 → 1.93.213

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1771,7 +1771,7 @@ color:{type:String,default:"#DFDAE4"}},data:function(){return{colorDefault:"#DFD
1771
1771
  **/
1772
1772
  visible:{type:Boolean,default:!0,required:!0},title:{type:String,default:"default",required:!0},description:{type:String,default:"default",required:!0},type:{type:String,default:"success",required:!0}},watch:{visible:{
1773
1773
  // the callback will be called immediately after the start of the observation
1774
- immediate:!0,handler:function(t,e){var a=this;!0===t&&setTimeout((function(){a.displayVisible=!0}),300)}}},data:function(){return{displayVisible:!1}},methods:{closeFeedBack:function(){this.$emit("closeFeedBack")}}},"data-v-0399859d",!1,void 0,!1,g,void 0,void 0),Dt=u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"slide-fade"}},[a("div",{key:t.categoryId,staticClass:"category-customizations",class:t.isDisabled(t.categoryId,t.disabledCategories)?"disabled":null},[t.isDisabled(t.categoryId,t.disabledCategories)?a("div",{staticClass:"category-disabled"}):t._e(),t._v(" "),!t.isDisabled(t.categoryId,t.disabledCategories)&&t.visibleColors?a("div",{key:t.categoryId,staticClass:"category-customizations-colors"},t._l(t.visibleColors,(function(e){return a("ToggleColor",{key:e.id,attrs:{selected:e===t.selectedColor,"primary-color":e.hexa,"secondary-color":e.auxiliary},on:{click:function(a){return t.handleColorClick(e)}}})})),1):t._e(),t._v(" "),a("div",{staticClass:"category-customizations-subcategories"},t._l(t.visibleSubcategories,(function(e){return a("ToggleSubcategory",{key:e.id,attrs:{selected:!t.isDisabled(t.categoryId,t.disabledCategories)&&e===t.selectedSubcategory,"image-path":e.assets.icon,glasses:t.category.code},on:{click:function(a){!t.isDisabled(t.categoryId,t.disabledCategories)&&t.handleSubcategoryClick(e)}}})})),1)])])},staticRenderFns:[]},(function(t){t&&t("data-v-21176132_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.slide-fade-enter-active{transition:all 1s ease;z-index:99}.slide-fade-leave-active{transition:all 0s;opacity:0;z-index:0}.slide-fade-enter,.slide-fade-leave-to{opacity:0;position:absolute}.category-customizations{background:#f8f7fc;padding:1.1428571429rem 1.1428571429rem 0 1.1428571429rem}@media (max-width:992px){.category-customizations{padding-top:10px;padding-bottom:0}}.category-customizations-title{font-weight:700;font-size:16px;letter-spacing:.89px}@media (max-width:992px){.category-customizations-title{margin-bottom:15px;font-size:12px}}.category-customizations-colors{display:flex;flex-wrap:wrap;margin:5px -5px!important}@media (max-width:992px){.category-customizations-colors{flex-wrap:unset;overflow-x:scroll;margin:5px -25px!important;-webkit-overflow-scrolling:touch}.category-customizations-colors button:first-child{margin-left:25px}.category-customizations-colors button:last-child{margin-right:25px}.category-customizations-colors::-webkit-scrollbar{display:none}.category-customizations-colors::after{content:"";flex:0 0 1px}}.category-customizations-subcategories{display:flex;flex-wrap:wrap;justify-content:space-between}@media (max-width:992px){.category-customizations-subcategories{flex-wrap:unset;overflow-x:scroll;margin:5px -25px 0;-webkit-overflow-scrolling:touch;padding-bottom:15px}.category-customizations-subcategories button:first-child{margin-left:25px}.category-customizations-subcategories button:last-child{margin-right:25px}.category-customizations-subcategories::-webkit-scrollbar{display:none}.category-customizations-subcategories::after{content:"";flex:0 0 1px}.category-customizations-subcategories .toggle-subcategory-icon{border:1px solid #dfdae4;border-radius:100px!important;margin:0 auto}.category-customizations-subcategories .toggle-subcategory-icon img{height:100%}}.category-customizations-subcategories .toggle-button{-webkit-box-flex:0;-ms-flex:0 0 calc(20% - 10px);flex:0 0 calc(20% - 10px);max-width:calc(20% - 10px);margin:5px!important}.category-customizations-subcategories .toggle-button.is-selected,.category-customizations-subcategories .toggle-button:active{background:#fff}.category-customizations-subcategories .toggle-button-disabled{cursor:default;box-shadow:unset}.category-customizations-subcategories .toggle-button-disabled:active{border-color:#dfdae4}.category-customizations-subcategories .toggle-button.is-selected{box-shadow:unset!important;border:2px solid #12d3db!important}@media (max-width:992px){.category-customizations-subcategories .toggle-button{border-width:2px!important;flex:unset!important;max-width:unset!important;border-radius:100px!important;flex-shrink:0!important;padding:5px!important}.category-customizations-subcategories .toggle-button.selected{box-shadow:0 8px 14px 0 #cec5d6!important;border-color:#2dd4d9!important}.category-customizations-subcategories .toggle-button:hover{box-shadow:unset;border-color:#dfdae4}.category-customizations-subcategories .toggle-button .toggle-subcategory-icon{border:0 solid transparent!important}.category-customizations-subcategories .toggle-button.is-selected .toggle-subcategory-icon,.category-customizations-subcategories .toggle-button.selected .toggle-subcategory-icon{border:0 solid transparent!important}.category-customizations-subcategories .toggle-button-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}}.category-customizations-colors{padding-bottom:.7619047619rem}.category-customizations-colors .toggle-button{display:inline-block;margin:4px}.category-customizations-wrapper{margin-top:20px;margin-bottom:20px}.category-customizations.disabled{position:relative;opacity:.4}.category-disabled{width:100%;height:100%;position:absolute;top:0;left:0}',map:void 0,media:void 0})}),{name:"CategoryCustomizations",components:{ToggleSubcategory:u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",t._g({staticClass:"toggle-button",class:t.selected?"selected close-icon":""},t.$listeners),[t.showPlaceholder?a("span",{staticClass:"toggle-subcategory-icon toggle-subcategory-icon-placeholder"}):a("div",{staticClass:"toggle-subcategory-icon"},[a("img",{staticClass:"toggle-subcategory-image",attrs:{src:t.imagePath}})]),t._v(" "),!t.selected||"oculos"!==t.glasses&&"cabeca"!==t.glasses&&"acessorios"!==t.glasses?t._e():a("div",{staticClass:"close-absolute"},[a("span",{staticClass:"shape-svg-close"},[a("svg",{attrs:{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.771 3.57408C4.45001 3.2531 3.92959 3.2531 3.60861 3.57408C3.28762 3.89507 3.28762 4.41549 3.60861 4.73647L6.83751 7.96538L3.57399 11.2289C3.25301 11.5499 3.25301 12.0703 3.57399 12.3913C3.89498 12.7123 4.4154 12.7123 4.73638 12.3913L7.9999 9.12777L11.2634 12.3913C11.5844 12.7123 12.1048 12.7123 12.4258 12.3913C12.7468 12.0703 12.7468 11.5499 12.4258 11.2289L9.16229 7.96538L12.3912 4.73647C12.7122 4.41549 12.7122 3.89507 12.3912 3.57408C12.0702 3.2531 11.5498 3.2531 11.2288 3.57408L7.9999 6.80299L4.771 3.57408Z"}})])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-7e73f4a9_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);[data-v-7e73f4a9]:root{--column-width:6.6666666667vw}@media (min-width:0px){[data-v-7e73f4a9]:root{--column-width:6.6666666667vw}}@media (min-width:480px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:0px){html[data-v-7e73f4a9]{font-size:2.9166666667vw}}@media (min-width:480px){html[data-v-7e73f4a9]{font-size:14px}}@media (min-width:1024px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:1920px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:2620px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html[data-v-7e73f4a9]{font-size:1.5648854962vw}}@media (min-width:2620px){html[data-v-7e73f4a9]{font-size:1.56vw}}html[data-v-7e73f4a9]{box-sizing:border-box}*[data-v-7e73f4a9],[data-v-7e73f4a9]::after,[data-v-7e73f4a9]::before{box-sizing:border-box}.toggle-button[data-v-7e73f4a9]{position:relative;font-family:Roboto,sans-serif;box-sizing:border-box;padding:0;margin:0;background-color:#fff;border:2px solid #dfdae4;display:flex;flex-direction:column;justify-items:center;align-items:center;transition:all .1s cubic-bezier(.4,0,.2,1);border-radius:7%;margin-bottom:.380952381rem}.toggle-button[data-v-7e73f4a9]:hover{cursor:pointer}@media (max-width:1023px){.toggle-button[data-v-7e73f4a9]{border-width:2px;-webkit-box-flex:unset;flex:unset;width:12vh;height:12vh;max-width:unset;border-radius:10px!important;flex-shrink:0;padding:5px}}.toggle-button.selected[data-v-7e73f4a9],.toggle-button[data-v-7e73f4a9]:hover{border-color:#2dd4d9}.toggle-button[data-v-7e73f4a9]:focus{outline:0}.toggle-subcategory[data-v-7e73f4a9]{padding:1px}.toggle-subcategory-icon[data-v-7e73f4a9]{height:82px;width:82px;display:flex}@media (max-width:479px){.toggle-subcategory-icon[data-v-7e73f4a9]{height:100%;width:unset}}.toggle-subcategory-icon img[data-v-7e73f4a9]{border-radius:100px;display:block;max-width:85%;margin:0 auto}.toggle-subcategory-icon-placeholder[data-v-7e73f4a9]{background-color:#dfdae4}.toggle-subcategory-image[data-v-7e73f4a9]{width:100%}.close-icon .close-absolute[data-v-7e73f4a9]{position:absolute;display:flex;align-items:center;justify-content:center;right:-4px;top:-6px}.close-icon .shape-svg-close[data-v-7e73f4a9]{width:18px;height:18px;color:#fff;background-color:red;border-radius:40.1px;box-shadow:0 2px 4px 0 rgba(206,197,214,.8);display:flex;justify-content:center;align-items:center}.close-icon .shape-svg-close svg[data-v-7e73f4a9]{width:14px;height:14px;fill:#fff}',map:void 0,media:void 0})}),{name:"ToggleSubcategory",props:{imagePath:{type:String,default:""},selected:{type:Boolean,required:!1,default:!1},glasses:{type:String,required:!1}},computed:{showPlaceholder:function(){return""===this.imagePath}}},"data-v-7e73f4a9",!1,void 0,!1,g,void 0,void 0),ToggleColor:u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",t._g({staticClass:"toggle-color",class:t.selected?"selected":""},t.$listeners),[t.showPlaceholder?a("span",{staticClass:"toggle-color-primary toggle-color-placeholder"}):a("div",{staticClass:"toggle-color-primary",style:{backgroundColor:t.primaryColor}},[t.secondaryColor?a("span",{staticClass:"toggle-color-secondary",style:{backgroundColor:t.secondaryColor}}):t._e()])])},staticRenderFns:[]},(function(t){t&&t("data-v-c83826de_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);[data-v-c83826de]:root{--column-width:6.6666666667vw}@media (min-width:0px){[data-v-c83826de]:root{--column-width:6.6666666667vw}}@media (min-width:480px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:0px){html[data-v-c83826de]{font-size:2.9166666667vw}}@media (min-width:480px){html[data-v-c83826de]{font-size:14px}}@media (min-width:1024px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:1920px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:2620px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html[data-v-c83826de]{font-size:1.5648854962vw}}@media (min-width:2620px){html[data-v-c83826de]{font-size:1.56vw}}html[data-v-c83826de]{box-sizing:border-box}*[data-v-c83826de],[data-v-c83826de]::after,[data-v-c83826de]::before{box-sizing:border-box}.toggle-color[data-v-c83826de]{padding:5px;font-family:Roboto,sans-serif;box-sizing:border-box;background-color:#fff;border:1px solid #dfdae4;display:flex;flex-direction:column;justify-items:center;align-items:center;transition:all .1s cubic-bezier(.4,0,.2,1);border-radius:50%;margin:0 4px}.toggle-color[data-v-c83826de]:hover{cursor:pointer}.toggle-color.selected[data-v-c83826de],.toggle-color[data-v-c83826de]:hover{border-color:#2dd4d9}.toggle-color[data-v-c83826de]:focus{outline:0}@media (max-width:479px){.toggle-color[data-v-c83826de]{padding:3px}}.toggle-color-primary[data-v-c83826de]{position:relative;height:32px;width:32px;border-radius:100%;overflow:hidden;display:block}@media (max-width:479px){.toggle-color-primary[data-v-c83826de]{width:22px;height:22px}}.toggle-color-primary-placeholder[data-v-c83826de]{background-color:#afa2ba}.toggle-color-secondary[data-v-c83826de]{position:absolute;left:0;top:0;height:100%;width:50%;display:block}.toggle-color-placeholder[data-v-c83826de]{background-color:red}',map:void 0,media:void 0})}),{name:"ToggleColor",props:{primaryColor:{type:String,required:!0},secondaryColor:{type:String,required:!1},selected:{type:Boolean,required:!1,default:!1}},computed:{showPlaceholder:function(){return""===this.primaryColor}}},"data-v-c83826de",!1,void 0,!1,g,void 0,void 0)},props:{categoryId:{type:Number,required:!0,default:null},title:{type:String,required:!0},category:{type:Object,required:!0},customization:{type:Object,required:!1,default:function(){}},relatedCustomization:{type:Object,required:!1,default:null},disabledCategories:{type:Array,required:!1,default:function(){return[]}},removableCategory:{type:Boolean,required:!1,default:!1}},data:function(){return{clickedSubcategory:null,glasses:null}},computed:{subcategoriesAssets:function(){var t=this,e=this.category.assets.subcategories;if(this.category.depends_category){var a=this.category.assets.categories.find((function(e){return e.parent_id===t.relatedCustomization.optionId}));a&&(e=a.assets.subcategories)}return e},selectedSubcategory:function(){var t=this;if(this.isDisabled(this.categoryId,this.disabledCategories))return!1;if(this.clickedSubcategory)return this.clickedSubcategory;var e=!1;if(this.customization&&(e=this.subcategoriesAssets.find((function(e){return e.id===t.customization.optionId})),!e)){this.subcategoriesAssets.forEach((function(a){a.assets.colors.find((function(e){return e.id===t.customization.optionId}))&&(e=a)}))}return e},selectedColor:function(){var t=this,e=null;return this.customization&&(
1774
+ immediate:!0,handler:function(t,e){var a=this;!0===t&&setTimeout((function(){a.displayVisible=!0}),300)}}},data:function(){return{displayVisible:!1}},methods:{closeFeedBack:function(){this.$emit("closeFeedBack")}}},"data-v-0399859d",!1,void 0,!1,g,void 0,void 0),Dt=u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"slide-fade"}},[a("div",{key:t.categoryId,staticClass:"category-customizations",class:t.isDisabled(t.categoryId,t.disabledCategories)?"disabled":null},[t.isDisabled(t.categoryId,t.disabledCategories)?a("div",{staticClass:"category-disabled"}):t._e(),t._v(" "),!t.isDisabled(t.categoryId,t.disabledCategories)&&t.visibleColors?a("div",{key:t.categoryId,staticClass:"category-customizations-colors"},t._l(t.visibleColors,(function(e){return a("ToggleColor",{key:e.id,attrs:{selected:e===t.selectedColor,"primary-color":e.hexa,"secondary-color":e.auxiliary},on:{click:function(a){return t.handleColorClick(e)}}})})),1):t._e(),t._v(" "),a("div",{staticClass:"category-customizations-subcategories"},t._l(t.visibleSubcategories,(function(e){return a("ToggleSubcategory",{key:e.id,attrs:{selected:!t.isDisabled(t.categoryId,t.disabledCategories)&&e===t.selectedSubcategory,"image-path":e.assets.icon,glasses:t.category.code},on:{click:function(a){!t.isDisabled(t.categoryId,t.disabledCategories)&&t.handleSubcategoryClick(e)}}})})),1)])])},staticRenderFns:[]},(function(t){t&&t("data-v-1d0a88a7_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.slide-fade-enter-active{transition:all 1s ease;z-index:99}.slide-fade-leave-active{transition:all 0s;opacity:0;z-index:0}.slide-fade-enter,.slide-fade-leave-to{opacity:0;position:absolute}.category-customizations{background:#f8f7fc;padding:1.1428571429rem 1.1428571429rem 0 1.1428571429rem}@media (max-width:992px){.category-customizations{padding-top:10px;padding-bottom:0}}.category-customizations-title{font-weight:700;font-size:16px;letter-spacing:.89px}@media (max-width:992px){.category-customizations-title{margin-bottom:15px;font-size:12px}}.category-customizations-colors{display:flex;flex-wrap:wrap;margin:5px -5px!important}@media (max-width:992px){.category-customizations-colors{flex-wrap:unset;overflow-x:scroll;margin:5px -25px!important;-webkit-overflow-scrolling:touch}.category-customizations-colors button:first-child{margin-left:25px!important}.category-customizations-colors button:last-child{margin-right:25px!important}.category-customizations-colors::-webkit-scrollbar{display:none}.category-customizations-colors::after{content:"";flex:0 0 1px}}.category-customizations-subcategories{display:flex;flex-wrap:wrap;justify-content:space-between}@media (max-width:992px){.category-customizations-subcategories{flex-wrap:unset;overflow-x:scroll;margin:5px -25px 0;-webkit-overflow-scrolling:touch;padding-bottom:15px}.category-customizations-subcategories button:first-child{margin-left:25px!important}.category-customizations-subcategories button:last-child{margin-right:25px!important}.category-customizations-subcategories::-webkit-scrollbar{display:none}.category-customizations-subcategories::after{content:"";flex:0 0 1px}.category-customizations-subcategories .toggle-subcategory-icon{border:1px solid #dfdae4;border-radius:100px!important;margin:0 auto}.category-customizations-subcategories .toggle-subcategory-icon img{height:100%}}.category-customizations-subcategories .toggle-button{-webkit-box-flex:0;-ms-flex:0 0 calc(20% - 10px);flex:0 0 calc(20% - 10px);max-width:calc(20% - 10px);margin:5px!important}.category-customizations-subcategories .toggle-button.is-selected,.category-customizations-subcategories .toggle-button:active{background:#fff}.category-customizations-subcategories .toggle-button-disabled{cursor:default;box-shadow:unset}.category-customizations-subcategories .toggle-button-disabled:active{border-color:#dfdae4}.category-customizations-subcategories .toggle-button.is-selected{box-shadow:unset!important;border:2px solid #12d3db!important}@media (max-width:992px){.category-customizations-subcategories .toggle-button{border-width:2px!important;flex:unset!important;max-width:unset!important;border-radius:100px!important;flex-shrink:0!important;padding:5px!important}.category-customizations-subcategories .toggle-button.selected{box-shadow:0 8px 14px 0 #cec5d6!important;border-color:#2dd4d9!important}.category-customizations-subcategories .toggle-button:hover{box-shadow:unset;border-color:#dfdae4}.category-customizations-subcategories .toggle-button .toggle-subcategory-icon{border:0 solid transparent!important}.category-customizations-subcategories .toggle-button.is-selected .toggle-subcategory-icon,.category-customizations-subcategories .toggle-button.selected .toggle-subcategory-icon{border:0 solid transparent!important}.category-customizations-subcategories .toggle-button-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}}.category-customizations-colors{padding-bottom:.7619047619rem}.category-customizations-colors .toggle-button{display:inline-block;margin:4px}.category-customizations-wrapper{margin-top:20px;margin-bottom:20px}.category-customizations.disabled{position:relative;opacity:.4}.category-disabled{width:100%;height:100%;position:absolute;top:0;left:0}',map:void 0,media:void 0})}),{name:"CategoryCustomizations",components:{ToggleSubcategory:u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",t._g({staticClass:"toggle-button",class:t.selected?"selected close-icon":""},t.$listeners),[t.showPlaceholder?a("span",{staticClass:"toggle-subcategory-icon toggle-subcategory-icon-placeholder"}):a("div",{staticClass:"toggle-subcategory-icon"},[a("img",{staticClass:"toggle-subcategory-image",attrs:{src:t.imagePath}})]),t._v(" "),!t.selected||"oculos"!==t.glasses&&"cabeca"!==t.glasses&&"acessorios"!==t.glasses?t._e():a("div",{staticClass:"close-absolute"},[a("span",{staticClass:"shape-svg-close"},[a("svg",{attrs:{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.771 3.57408C4.45001 3.2531 3.92959 3.2531 3.60861 3.57408C3.28762 3.89507 3.28762 4.41549 3.60861 4.73647L6.83751 7.96538L3.57399 11.2289C3.25301 11.5499 3.25301 12.0703 3.57399 12.3913C3.89498 12.7123 4.4154 12.7123 4.73638 12.3913L7.9999 9.12777L11.2634 12.3913C11.5844 12.7123 12.1048 12.7123 12.4258 12.3913C12.7468 12.0703 12.7468 11.5499 12.4258 11.2289L9.16229 7.96538L12.3912 4.73647C12.7122 4.41549 12.7122 3.89507 12.3912 3.57408C12.0702 3.2531 11.5498 3.2531 11.2288 3.57408L7.9999 6.80299L4.771 3.57408Z"}})])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-7e73f4a9_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);[data-v-7e73f4a9]:root{--column-width:6.6666666667vw}@media (min-width:0px){[data-v-7e73f4a9]:root{--column-width:6.6666666667vw}}@media (min-width:480px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:0px){html[data-v-7e73f4a9]{font-size:2.9166666667vw}}@media (min-width:480px){html[data-v-7e73f4a9]{font-size:14px}}@media (min-width:1024px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:1920px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:2620px){[data-v-7e73f4a9]:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html[data-v-7e73f4a9]{font-size:1.5648854962vw}}@media (min-width:2620px){html[data-v-7e73f4a9]{font-size:1.56vw}}html[data-v-7e73f4a9]{box-sizing:border-box}*[data-v-7e73f4a9],[data-v-7e73f4a9]::after,[data-v-7e73f4a9]::before{box-sizing:border-box}.toggle-button[data-v-7e73f4a9]{position:relative;font-family:Roboto,sans-serif;box-sizing:border-box;padding:0;margin:0;background-color:#fff;border:2px solid #dfdae4;display:flex;flex-direction:column;justify-items:center;align-items:center;transition:all .1s cubic-bezier(.4,0,.2,1);border-radius:7%;margin-bottom:.380952381rem}.toggle-button[data-v-7e73f4a9]:hover{cursor:pointer}@media (max-width:1023px){.toggle-button[data-v-7e73f4a9]{border-width:2px;-webkit-box-flex:unset;flex:unset;width:12vh;height:12vh;max-width:unset;border-radius:10px!important;flex-shrink:0;padding:5px}}.toggle-button.selected[data-v-7e73f4a9],.toggle-button[data-v-7e73f4a9]:hover{border-color:#2dd4d9}.toggle-button[data-v-7e73f4a9]:focus{outline:0}.toggle-subcategory[data-v-7e73f4a9]{padding:1px}.toggle-subcategory-icon[data-v-7e73f4a9]{height:82px;width:82px;display:flex}@media (max-width:479px){.toggle-subcategory-icon[data-v-7e73f4a9]{height:100%;width:unset}}.toggle-subcategory-icon img[data-v-7e73f4a9]{border-radius:100px;display:block;max-width:85%;margin:0 auto}.toggle-subcategory-icon-placeholder[data-v-7e73f4a9]{background-color:#dfdae4}.toggle-subcategory-image[data-v-7e73f4a9]{width:100%}.close-icon .close-absolute[data-v-7e73f4a9]{position:absolute;display:flex;align-items:center;justify-content:center;right:-4px;top:-6px}.close-icon .shape-svg-close[data-v-7e73f4a9]{width:18px;height:18px;color:#fff;background-color:red;border-radius:40.1px;box-shadow:0 2px 4px 0 rgba(206,197,214,.8);display:flex;justify-content:center;align-items:center}.close-icon .shape-svg-close svg[data-v-7e73f4a9]{width:14px;height:14px;fill:#fff}',map:void 0,media:void 0})}),{name:"ToggleSubcategory",props:{imagePath:{type:String,default:""},selected:{type:Boolean,required:!1,default:!1},glasses:{type:String,required:!1}},computed:{showPlaceholder:function(){return""===this.imagePath}}},"data-v-7e73f4a9",!1,void 0,!1,g,void 0,void 0),ToggleColor:u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",t._g({staticClass:"toggle-color",class:t.selected?"selected":""},t.$listeners),[t.showPlaceholder?a("span",{staticClass:"toggle-color-primary toggle-color-placeholder"}):a("div",{staticClass:"toggle-color-primary",style:{backgroundColor:t.primaryColor}},[t.secondaryColor?a("span",{staticClass:"toggle-color-secondary",style:{backgroundColor:t.secondaryColor}}):t._e()])])},staticRenderFns:[]},(function(t){t&&t("data-v-c83826de_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);[data-v-c83826de]:root{--column-width:6.6666666667vw}@media (min-width:0px){[data-v-c83826de]:root{--column-width:6.6666666667vw}}@media (min-width:480px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:0px){html[data-v-c83826de]{font-size:2.9166666667vw}}@media (min-width:480px){html[data-v-c83826de]{font-size:14px}}@media (min-width:1024px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:1920px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:2620px){[data-v-c83826de]:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html[data-v-c83826de]{font-size:1.5648854962vw}}@media (min-width:2620px){html[data-v-c83826de]{font-size:1.56vw}}html[data-v-c83826de]{box-sizing:border-box}*[data-v-c83826de],[data-v-c83826de]::after,[data-v-c83826de]::before{box-sizing:border-box}.toggle-color[data-v-c83826de]{padding:5px;font-family:Roboto,sans-serif;box-sizing:border-box;background-color:#fff;border:1px solid #dfdae4;display:flex;flex-direction:column;justify-items:center;align-items:center;transition:all .1s cubic-bezier(.4,0,.2,1);border-radius:50%;margin:0 4px}.toggle-color[data-v-c83826de]:hover{cursor:pointer}.toggle-color.selected[data-v-c83826de],.toggle-color[data-v-c83826de]:hover{border-color:#2dd4d9}.toggle-color[data-v-c83826de]:focus{outline:0}@media (max-width:479px){.toggle-color[data-v-c83826de]{padding:3px}}.toggle-color-primary[data-v-c83826de]{position:relative;height:32px;width:32px;border-radius:100%;overflow:hidden;display:block}@media (max-width:479px){.toggle-color-primary[data-v-c83826de]{width:22px;height:22px}}.toggle-color-primary-placeholder[data-v-c83826de]{background-color:#afa2ba}.toggle-color-secondary[data-v-c83826de]{position:absolute;left:0;top:0;height:100%;width:50%;display:block}.toggle-color-placeholder[data-v-c83826de]{background-color:red}',map:void 0,media:void 0})}),{name:"ToggleColor",props:{primaryColor:{type:String,required:!0},secondaryColor:{type:String,required:!1},selected:{type:Boolean,required:!1,default:!1}},computed:{showPlaceholder:function(){return""===this.primaryColor}}},"data-v-c83826de",!1,void 0,!1,g,void 0,void 0)},props:{categoryId:{type:Number,required:!0,default:null},title:{type:String,required:!0},category:{type:Object,required:!0},customization:{type:Object,required:!1,default:function(){}},relatedCustomization:{type:Object,required:!1,default:null},disabledCategories:{type:Array,required:!1,default:function(){return[]}},removableCategory:{type:Boolean,required:!1,default:!1}},data:function(){return{clickedSubcategory:null,glasses:null}},computed:{subcategoriesAssets:function(){var t=this,e=this.category.assets.subcategories;if(this.category.depends_category){var a=this.category.assets.categories.find((function(e){return e.parent_id===t.relatedCustomization.optionId}));a&&(e=a.assets.subcategories)}return e},selectedSubcategory:function(){var t=this;if(this.isDisabled(this.categoryId,this.disabledCategories))return!1;if(this.clickedSubcategory)return this.clickedSubcategory;var e=!1;if(this.customization&&(e=this.subcategoriesAssets.find((function(e){return e.id===t.customization.optionId})),!e)){this.subcategoriesAssets.forEach((function(a){a.assets.colors.find((function(e){return e.id===t.customization.optionId}))&&(e=a)}))}return e},selectedColor:function(){var t=this,e=null;return this.customization&&(
1775
1775
  // Caso haja uma subcategoria selecionada +++ melhor dos mundos
1776
1776
  this.selectedSubcategory?e=this.selectedSubcategory.assets.colors.find((function(e){return e.id===t.customization.optionId})):this.subcategoriesAssets.forEach((function(a){e=a.assets.colors.find((function(e){return e.id===t.customization.optionId}))}))),e},visibleSubcategories:function(){var t=this;if(!this.category.depends_category)return this.subcategoriesAssets;var e=this.category.assets.categories.find((function(e){return e.parent_id===t.relatedCustomization.optionId}));return e?e.assets.subcategories:null},visibleColors:function(){return this.selectedSubcategory&&this.selectedSubcategory.assets.colors.length>1?(screen.width<=1023&&(document.getElementById("customization-panel-body").style.height="16rem"),this.selectedSubcategory.assets.colors):(screen.width<=1023&&(document.getElementById("customization-panel-body").style.height="12rem"),null)},showPlaceholder:function(){return""===this.imagePath}},mounted:function(){this.isSelected=this.selectedSubcategory},methods:{handleSubcategoryClick:function(t){var e=this;if(this.glasses=t.assets.icon,t.assets.colors&&t.assets.colors.length>0)
1777
1777
  // Caso a cor já houver sido selecionada, buscamos a cor mais parecida
@@ -1786,7 +1786,7 @@ this.handleCustomizationUpdate(i.id,i.hexa,i.assets.asset,t.z_index,t.disable,nu
1786
1786
  // quiser alterar o valor de data deixe a alteração da data por ultimo
1787
1787
  // pois ao fazer a alterção é possível que suas computed properties estejam sendo
1788
1788
  // recalculadas ou já possuam um valor diferente
1789
- this.clickedSubcategory=t}else this.handleCustomizationUpdate(t.id,t.name,t.assets.asset,t.z_index,t.disable,null,!!this.removableCategory||null)},handleColorClick:function(t){this.handleCustomizationUpdate(t.id,t.hexa,t.assets.asset,this.selectedSubcategory.z_index,this.selectedSubcategory.disable)},handleCustomizationUpdate:function(t,e,a,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],d=arguments.length>6&&void 0!==arguments[6]&&arguments[6],n=arguments.length>7&&void 0!==arguments[7]&&arguments[7],s=this.customization;s||(s={categoryId:this.category.id,categoryZIndex:this.category.z_index,relatedCategoryId:this.category.depends_category},this.removableCategory&&(s.categoryId=n)),s.optionId=t,s.optionName=e,s.optionAsset=a,s.optionZIndex=i,this.removableCategory&&(this.customization=s),this.$emit("update:customization",{customization:s,categoriesToDisable:o,removeGroup:r,firstGroup:d,removableCategory:!!this.removableCategory})},isDisabled:function(t,e){var a=!1;if(a=e.find((function(e){if(e.categoryId===t)return!0})),a)return this.clickedSubcategory=null,!0}}},void 0,!1,void 0,!1,g,void 0,void 0),Rt=require("axios"),jt=u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"customization-panel",class:"rtl"===t.dir?"rtl":""},[a("div",{staticClass:"overlay-opacity"}),t._v(" "),a("div",{staticClass:"customization-panel-head"},[a("div",{staticClass:"customization-panel-heading"},[t._v("\n "+t._s(t.lang.editCharacter)+" "+t._s(t.characterIsMale?t.lang.do:t.lang.da)+"\n "),a("b",[t._v(t._s(t.characterName))])]),t._v(" "),a("div",{staticClass:"customization-categories"},[t._l(t.categoriesAssets.categories,(function(e){return a("a",{directives:[{name:"show",rawName:"v-show",value:"mooner"!==e.code&&"pet"!==e.code,expression:"category.code !== 'mooner' && category.code !== 'pet'"}],key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedCategory,"is-disabled":t.isCategoryDisabled(e)},"category-"+e.code],attrs:{id:e.code},on:{click:function(a){return t.handleSelectCategory(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n "+t._s(t.lang[e.name])+"\n ")])],1)})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("a",{key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedGroup},"category-"+e.code],on:{click:function(a){return t.handleSelectGroup(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n "+t._s(t.lang[e.name])+"\n ")])],1)}))],2)]),t._v(" "),a("div",{staticClass:"customization-panel-body",attrs:{id:"customization-panel-body"}},[t._l(t.visibleCategoriesCustomizations,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedCategory,expression:"selectedCategory"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.id),relatedCustomization:t.getCustomizationByCategoryId(e.depends_category),disabledCategories:t.disabledCategories,removableCategory:!e.required},on:{"update:customization":t.handleUpdateCustomization}})})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedGroup,expression:"selectedGroup"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.assets.subcategories[0].parent_id),removableCategory:!e.required,customizations:t.customizations},on:{"update:customization":t.handleUpdateCustomization}})}))],2),t._v(" "),a("div",{staticClass:"helper"},[a("div",{ref:"error",staticClass:"error",domProps:{innerHTML:t._s(t.error)}}),t._v(" "),a("div",{staticClass:"btn-avatar",class:t.dir,on:{click:t.generateAvatar}},[a("div",{staticClass:"btn-avatar-preload"},[a("span",[t._v(t._s(t.lang.continue))]),t._v(" "),a("Icon",{attrs:{name:"chevron-right",fill:"#fff",size:"md",stroke:"transparent"}})],1),t._v(" "),a("div",{staticClass:"btn-avatar-loading"},[a("span",{staticClass:"btn-avatar-loading-content",domProps:{innerHTML:t._s(t.loadingContent)}}),t._v(" "),a("span",{staticClass:"btn-avatar-loading-icon"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36"}},[a("path",{attrs:{fill:"#000","fill-rule":"evenodd",d:"M26.383 12.728c-.433-.47-.986-.727-1.48-.728-.293 0-.569.092-.776.29l-2.306 2.179v-.002l-3.136 2.963c-.055.052-.093.109-.13.16l-3.008 2.841-3.545-3.855c-.217-.235-.526-.347-.858-.347-.47 0-.992.217-1.424.625-.465.44-.719 1-.72 1.5 0 .298.092.576.287.788l3.25 3.533 1.823 1.981c.214.235.52.344.85.344.147 0 .295-.021.448-.061l.085.002c.292.001.566-.087.776-.284l5.44-5.14c.054-.052.094-.11.13-.162l4.567-4.315c.234-.22.344-.532.344-.87 0-.474-.215-1.002-.617-1.442z"}})])])])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-2ca543a8_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.postingCharacter{height:100vh}.customization-panel-heading b{font-weight:400;color:#923fda;text-transform:capitalize}.customization-panel{z-index:100;position:fixed;width:520px;height:100%;top:0;right:0;background:#f8f7fc;border-left:1px solid #dfdae4;transition:all .3s;overflow:hidden}.customization-panel.rtl{left:0;right:auto}.customization-panel.rtl .btn-avatar .icon{right:auto;left:0;transform:rotate(180deg)}@media (max-width:992px){.customization-panel{width:100%;bottom:0;top:unset;min-height:180px;height:auto}}.customization-panel-head{background:#fff;border-bottom:1px solid #f0ebf5;box-shadow:0 10px 26px 0 #d7d1ef;position:relative;z-index:150}@media (max-width:992px){.customization-panel-head{box-shadow:0 0 26px 0 #d7d1ef}}.customization-panel-heading{height:80px;max-width:100%;line-height:80px;text-align:center;font-family:Roboto,sans-serif;color:#afa2ba;background:#fff;border-bottom:1px solid #dfdae4;font-size:16px}@media (max-width:992px){.customization-panel-heading{display:none}}.customization-panel-body{height:70%;scroll-behavior:smooth;padding-bottom:70px;z-index:20;overflow-y:auto;position:relative}.customization-panel-body::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.customization-panel-body::-webkit-scrollbar{width:7px;background-color:transparent}.customization-panel-body::-webkit-scrollbar-thumb{border-radius:20px;background-color:#e4e4e4}@media (max-width:992px){.customization-panel-body{padding-bottom:0;z-index:0}}.customization-panel .helper{position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #dfdae4;box-shadow:0 0 26px 0 #d7d1ef;padding:.7619047619rem 1.1428571429rem;display:flex;align-items:center;justify-content:center;z-index:999}@media (max-width:992px){.customization-panel .helper{display:none;z-index:0}}.customization-panel .helper .error{background:red;width:100%;color:#fff;font-family:Roboto,sans-serif;font-size:14px;padding:15px 0;text-align:center;text-transform:uppercase;position:absolute;transition:all .3s;top:-45px;opacity:0}.btn-avatar{width:100%;height:65px;font-family:Nunito;font-weight:900;padding:0!important;background:#12d3db;background-size:200%;background-position-x:99%;box-shadow:0 .2381rem .95238rem 0 #89e6e8;border-radius:1.90476rem;color:#fff;transition:all .2s cubic-bezier(.4,0,.2,1);border:0;font-size:14px;letter-spacing:.0381rem;line-height:1.2rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-avatar:hover{box-shadow:0 .2381rem .95238rem 0 #89e6e8;-webkit-transform:translateY(-.09524rem);transform:translateY(-.09524rem);cursor:pointer;background-position-x:0;-webkit-transform:translateY(-.14286rem);transform:translateY(-.14286rem);color:#fff}.btn-avatar:active,.btn-avatar:focus{outline:0;box-shadow:0 0 0 #89e6e8;background-position-x:0;-webkit-transform:translateY(.14286rem) scale(.97);transform:translateY(.14286rem) scale(.97)}.btn-avatar .icon{position:absolute;display:flex;justify-content:center;align-items:center;right:0;top:0;margin:15px!important;bottom:0}.btn-avatar .icon path,.btn-avatar .icon svg{fill:#fff;stroke:#fff}@media (max-width:992px){.btn-avatar{display:none!important}}.btn-avatar-mobile{display:none!important;border:500px;background:#12d3db;border-radius:500px;position:fixed;overflow:hidden;font-family:Nunito,sans-serif;font-weight:900;text-transform:uppercase;font-size:.5714285714rem;color:#fff;line-height:1;height:2rem;padding:0 .7619047619rem!important;font-size:.4761904762rem;padding:.7619047619rem 1.1428571429rem;width:fit-content;box-shadow:none}@media (max-width:479px){.btn-avatar-mobile{display:flex!important;font-size:1.1214953271rem;padding:1.4953271028rem 2.2429906542rem!important;height:3.9252336449rem;font-size:.9345794393rem;padding:0 1.4953271028rem!important;top:.7476635514rem!important;right:2.2429906542rem!important;z-index:9999}.btn-avatar-mobile .icon{display:none!important}}.btn-avatar-mobile.width-circle{line-height:1;width:2.0952380952rem;height:2.0952380952rem;display:flex;align-items:center;justify-content:center}@media (max-width:479px){.btn-avatar-mobile.width-circle{width:4.1121495327rem;height:4.1121495327rem}}.btn-avatar-mobile.is-inverted{background:#fff;color:#12d3db}.btn-avatar-mobile.is-inverted path,.btn-avatar-mobile.is-inverted svg{fill:#12d3db;stroke:transparent}.btn-avatar-mobile:hover{cursor:pointer}.btn-avatar-mobile:hover:not(.is-inverted){background:#17b8bc}.btn-avatar-mobile:hover.is-inverted{opacity:.8}.btn-avatar-mobile:active,.btn-avatar-mobile:focus{outline:0}.btn-avatar-mobile:active:not(.is-inverted),.btn-avatar-mobile:focus:not(.is-inverted){background:#17b8bc}.btn-avatar-mobile:active.is-inverted,.btn-avatar-mobile:focus.is-inverted{opacity:.8}.btn-avatar-mobile.is-disabled,.btn-avatar-mobile[disabled]{pointer-events:none;background-color:#dfdae4;color:#fff}.btn-avatar-mobile.is-disabled path,.btn-avatar-mobile.is-disabled svg,.btn-avatar-mobile[disabled] path,.btn-avatar-mobile[disabled] svg{fill:#fff;stroke:transparent}.btn-avatar-mobile.rtl{right:0;margin-left:8px}.customization-categories{display:flex;align-items:center;align-content:center;padding:.7619047619rem .7619047619rem}@media (max-width:992px){.customization-categories{padding:0}}.customization-categories .category-vestuario{display:none!important}.customization-categories-item{position:relative;font-size:inherit;flex-basis:0;flex-grow:1;max-width:100%;height:100%;text-align:center}.customization-categories-item:hover{cursor:pointer}.customization-categories-item:hover .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item{height:50px;display:flex;justify-content:center;align-items:center;border:0}}.customization-categories-item-icon{height:52px;width:52px;display:block;border-radius:30px;margin:auto}.customization-categories-item-icon-placeholder{background-color:#dfdae4;border-radius:2px}@media (max-width:992px){.customization-categories-item-icon{display:none}}.customization-categories-item-label{font-weight:400;display:block;font-size:12px;color:#000;text-transform:capitalize!important;font-family:Roboto;padding-top:.380952381rem}@media (max-width:992px){.customization-categories-item-label{margin:0}}.customization-categories-item:first-child{border-left:none}.customization-categories-item.is-selected .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item.is-selected:after{content:"";position:absolute;left:0;bottom:-2px;width:100%;height:3px;background:#12d3db}}@media (max-width:992px) and (max-width:992px){.customization-categories-item.is-selected:after{bottom:0}}.customization-categories-item.is-disabled{opacity:.6}.btn-avatar-reduced{background:#2dd4d9!important;width:65px!important;cursor:wait}@media (max-width:479px){.btn-avatar-reduced{width:40px!important;height:40px!important}}.btn-avatar-loading-completed{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-position:0 0;background-repeat:no-repeat;-webkit-animation:1s loadingCompleted;-moz-animation:1s loadingCompleted;animation:1s loadingCompleted;cursor:wait}@-webkit-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@-moz-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}.btn-avatar-loading-started{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-repeat:no-repeat;background-position:41% 0;-webkit-animation:4s loadingPosition;-moz-animation:4s loadingPosition;animation:4s loadingPosition;transition:.3s;cursor:wait}@-webkit-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@-moz-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}.btn-avatar-loading{font-size:1.4285714286rem;display:none;opacity:0;transition:all .3s;font-size:14px;cursor:wait}.btn-avatar-loading .btn-avatar-loading-icon{display:none;opacity:0;align-items:center;justify-content:center}.btn-avatar-loading .btn-avatar-loading-icon svg{width:2.1904761905rem;height:2.1904761905rem}@media (max-width:479px){.btn-avatar-loading .btn-avatar-loading-icon svg{width:3.5514018692rem;height:3.5514018692rem}}.btn-avatar-loading .btn-avatar-loading-icon path,.btn-avatar-loading .btn-avatar-loading-icon svg{fill:#fff;stroke:#fff}@media (max-width:479px){.btn-avatar-loading{font-size:12px}.btn-avatar-loading .btn-avatar-loading-content{font-size:12px}}',map:void 0,media:void 0})}),{name:"CustomizationPanel",components:{CategoryCustomizations:Dt,Caption:ut,Icon:w},props:{builderApi:{type:String,default:"https://builder.dentrodahistoria.com.br/api"},selectedCharacter:{type:Object,default:{}},characterSlug:{type:String,required:!0},characterId:{type:[Number,String],required:!0},characterTypeId:{type:[Number,String],required:!0},characterName:{type:String,required:!0},characterIsMale:{type:Boolean,required:!0},categoriesAssets:{type:Object,required:!0},disabledCategories:{type:Array,required:!1,default:function(){return[]}},customizations:{type:Array,required:!0},builderProductId:{type:[String,Number],required:!1,default:null},subscriptionId:{type:[Number,String],required:!0},stackId:{type:[Number,String],required:!0},userDataProperties:{type:Object,required:!0},builderLayoutId:{type:[Number,String],required:!1},language:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt"},dir:{type:String,default:"ltr",required:!1}},data:function(){return{selectedCategory:null,selectedGroup:null,selectedCollection:null,error:null,isMobile:null,lang:st[this.typeLanguage],loadingContent:screen.width<1023?"ENVIANDO":"ENVIANDO PERSONAGEM"}},mounted:function(){if(!document.body.getElementsByClassName("btn-avatar-mobile")[0]){var t=document.getElementsByClassName("btn-avatar")[0].cloneNode(!0);t.classList.add("btn-avatar-mobile"),document.body.appendChild(t),document.body.getElementsByClassName("btn-avatar-mobile")[0].addEventListener("click",this.generateAvatar)}var e=document.getElementsByClassName("top-bar")[0];if(screen.width<=1023&&e&&!e.getElementsByClassName("overlay-opacity")[0]){var a=document.getElementsByClassName("overlay-opacity")[0].cloneNode(!0);e.appendChild(a)}if(!document.body.getElementsByClassName("error-mobile")[0]){var i=document.getElementsByClassName("error")[0].cloneNode(!0);i.classList.add("error-mobile"),document.body.appendChild(i)}window.addEventListener("resize",this.screenResize),screen.width>1023?this.isMobile=!1:this.isMobile=!0},beforeDestroy:function(){document.body.getElementsByClassName("btn-avatar-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("btn-avatar-mobile")[0]),document.body.getElementsByClassName("error-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("error-mobile")[0])},computed:{showColorsCustomizations:function(){return!1},showSubcategoriesCustomizations:function(){return!1},visibleCategoriesCustomizations:function(){var t=this,e=[];return this.selectedCategory?e.push(this.selectedCategory):this.selectedCollection&&this.selectedCollection.categories.forEach((function(a){var i=t.categoriesAssets.categories.find((function(t){return t.id===a}));i&&e.push(i)})),e}},methods:{monthsHelper:function(t){switch(t){case 1:return"Janeiro";case 2:return"Fevereiro";case 3:return"Março";case 4:return"Abril";case 5:return"Maio";case 6:return"Junho";case 7:return"Julho";case 8:return"Agosto";case 9:return"Setembro";case 10:return"Outubro";case 11:return"Novembro";case 12:return"Dezembro"}},generateAvatar:function(){var t=this;return B(T().mark((function e(){var a,i,o,r,d,n,s,l,c,p,m,u;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t,o=!1,t.categoriesAssets.categories.forEach((function(e){e.required?((i=t.customizations.find((function(t){return e.id===t.categoryId})))||(i=t.disabledCategories.find((function(t){return e.id===t.categoryId}))),i||(o=!0,r=e)):(e.code.includes("mooner")||e.code.includes("pet"))&&(i=t.disabledCategories.find((function(t){return e.id===t.categoryId})))})),o){e.next=18;break}return t.$emit("startedMethod"),d=null,n=[],t.customizations.forEach((function(t){var e={parent_id:t.categoryId,id:t.optionId?t.optionId:t.relatedCategoryId};e.parent_id&&e.id&&n.push(e)})),s={properties:a.userDataProperties,type:t.characterTypeId},l={custom_character:{character_id:t.characterId,product_id:t.builderProductId,type_id:t.characterTypeId,categories:n,user_data:s}},t.builderLayoutId&&(l.custom_character.layout_id=t.builderLayoutId),t.language&&(l.custom_character.language=t.language),e.next=14,Rt({method:"POST",url:"".concat(t.builderApi,"/customs_characters/"),headers:{"Content-Type":"application/json"},data:l}).then((function(t){return t})).catch((function(t){return t}));case 14:(c=e.sent)&&(200===c.status?t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:n,success:!0}):(console.log("tentou pegar o segundo request"),c&&c.response&&c.response.reques&&(p=JSON.parse(c.response.request.responseText),d=p?p.error:"Não foi possível gerar o avatar. Tente novamente."),d&&(t.error=d,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)),t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:n,success:!1}))),e.next=22;break;case 18:m=r.code,u="pele"===m?"Necessário selecionar um tom de pele":"Necessário selecionar um tipo de ".concat(m),screen.width>1023&&("roupa"===m||"tenis"===m)?(t.error=u,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)):(document.getElementsByClassName("error")[0].style.opacity="1",document.getElementsByClassName("error")[0].textContent=u,setTimeout((function(){document.getElementsByClassName("error")[0].style.opacity="0",document.getElementsByClassName("error")[0].textContent=""}),5e3)),t.$refs[m][0].click();case 22:case"end":return e.stop()}}),e)})))()},getCustomizationTitle:function(t){var e=t?t.toLowerCase():"";switch(e){case"pele":return"Tons de pele";default:return"Tipos de ".concat(e)}},getCustomizationByCategoryId:function(t){return this.customizations.find((function(e){return e.categoryId===t}))},handleSelectCategory:function(t){if(!this.isCategoryDisabled(t)&&this.selectedCategory!==t){this.selectedCharacter.slug;var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];"cabelo"===t.code||"olhos"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):"roupa"===t.code||"tenis"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-out"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0})),this.selectedGroup=null,this.selectedCollection=null,this.selectedCategory=t}},handleSelectGroup:function(t){if(this.selectedGroup!==t){if(screen.width<=1023){var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];this.selectedCharacter.slug;"acessorio"===t.code||"acessorios"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0}))}this.selectedCategory=null,this.selectedCollection=null,this.selectedGroup=t}},handleSelectCollection:function(t){this.selectedCollection!==t&&(this.selectedCategory=null,this.selectedGroup=null,this.selectedCollection=t)},handleUpdateCustomization:function(t){this.$emit("update:customization",t)},isCategoryDisabled:function(t){return void 0!==this.disabledCategories.find((function(e){return e.categoryId===t.id}))},screenResize:function(){if(screen.width>1023){document.getElementsByClassName("customization-preview-asset");
1789
+ this.clickedSubcategory=t}else this.handleCustomizationUpdate(t.id,t.name,t.assets.asset,t.z_index,t.disable,null,!!this.removableCategory||null)},handleColorClick:function(t){this.handleCustomizationUpdate(t.id,t.hexa,t.assets.asset,this.selectedSubcategory.z_index,this.selectedSubcategory.disable)},handleCustomizationUpdate:function(t,e,a,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],d=arguments.length>6&&void 0!==arguments[6]&&arguments[6],n=arguments.length>7&&void 0!==arguments[7]&&arguments[7],s=this.customization;s||(s={categoryId:this.category.id,categoryZIndex:this.category.z_index,relatedCategoryId:this.category.depends_category},this.removableCategory&&(s.categoryId=n)),s.optionId=t,s.optionName=e,s.optionAsset=a,s.optionZIndex=i,this.removableCategory&&(this.customization=s),this.$emit("update:customization",{customization:s,categoriesToDisable:o,removeGroup:r,firstGroup:d,removableCategory:!!this.removableCategory})},isDisabled:function(t,e){var a=!1;if(a=e.find((function(e){if(e.categoryId===t)return!0})),a)return this.clickedSubcategory=null,!0}}},void 0,!1,void 0,!1,g,void 0,void 0),Rt=require("axios"),jt=u({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"customization-panel",class:"rtl"===t.dir?"rtl":""},[a("div",{staticClass:"overlay-opacity"}),t._v(" "),a("div",{staticClass:"customization-panel-head"},[a("div",{staticClass:"customization-panel-heading"},[t._v("\n "+t._s(t.lang.editCharacter)+" "+t._s(t.characterIsMale?t.lang.do:t.lang.da)+"\n "),a("b",[t._v(t._s(t.characterName))])]),t._v(" "),a("div",{staticClass:"customization-categories"},[t._l(t.categoriesAssets.categories,(function(e){return a("a",{directives:[{name:"show",rawName:"v-show",value:"mooner"!==e.code&&"pet"!==e.code,expression:"category.code !== 'mooner' && category.code !== 'pet'"}],key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedCategory,"is-disabled":t.isCategoryDisabled(e)},"category-"+e.code],attrs:{id:e.code},on:{click:function(a){return t.handleSelectCategory(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n "+t._s(t.lang[e.name])+"\n ")])],1)})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("a",{key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedGroup},"category-"+e.code],on:{click:function(a){return t.handleSelectGroup(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n "+t._s(t.lang[e.name])+"\n ")])],1)}))],2)]),t._v(" "),a("div",{staticClass:"customization-panel-body",attrs:{id:"customization-panel-body"}},[t._l(t.visibleCategoriesCustomizations,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedCategory,expression:"selectedCategory"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.id),relatedCustomization:t.getCustomizationByCategoryId(e.depends_category),disabledCategories:t.disabledCategories,removableCategory:!e.required},on:{"update:customization":t.handleUpdateCustomization}})})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedGroup,expression:"selectedGroup"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.assets.subcategories[0].parent_id),removableCategory:!e.required,customizations:t.customizations},on:{"update:customization":t.handleUpdateCustomization}})}))],2),t._v(" "),a("div",{staticClass:"helper"},[a("div",{ref:"error",staticClass:"error",domProps:{innerHTML:t._s(t.error)}}),t._v(" "),a("div",{staticClass:"btn-avatar",class:t.dir,on:{click:t.generateAvatar}},[a("div",{staticClass:"btn-avatar-preload"},[a("span",[t._v(t._s(t.lang.continue))]),t._v(" "),a("Icon",{attrs:{name:"chevron-right",fill:"#fff",size:"md",stroke:"transparent"}})],1),t._v(" "),a("div",{staticClass:"btn-avatar-loading"},[a("span",{staticClass:"btn-avatar-loading-content",domProps:{innerHTML:t._s(t.loadingContent)}}),t._v(" "),a("span",{staticClass:"btn-avatar-loading-icon"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36"}},[a("path",{attrs:{fill:"#000","fill-rule":"evenodd",d:"M26.383 12.728c-.433-.47-.986-.727-1.48-.728-.293 0-.569.092-.776.29l-2.306 2.179v-.002l-3.136 2.963c-.055.052-.093.109-.13.16l-3.008 2.841-3.545-3.855c-.217-.235-.526-.347-.858-.347-.47 0-.992.217-1.424.625-.465.44-.719 1-.72 1.5 0 .298.092.576.287.788l3.25 3.533 1.823 1.981c.214.235.52.344.85.344.147 0 .295-.021.448-.061l.085.002c.292.001.566-.087.776-.284l5.44-5.14c.054-.052.094-.11.13-.162l4.567-4.315c.234-.22.344-.532.344-.87 0-.474-.215-1.002-.617-1.442z"}})])])])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-de21edac_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.postingCharacter{height:100vh}.customization-panel-heading b{font-weight:400;color:#923fda;text-transform:capitalize}.customization-panel{z-index:100;position:fixed;width:520px;height:100%;top:0;right:0;background:#f8f7fc;border-left:1px solid #dfdae4;transition:all .3s;overflow:hidden}.customization-panel.rtl{left:0;right:auto}.customization-panel.rtl .btn-avatar .icon{right:auto;left:0;transform:rotate(180deg)}@media (max-width:992px){.customization-panel{width:100%;bottom:0;top:unset;min-height:180px;height:auto}}.customization-panel-head{background:#fff;border-bottom:1px solid #f0ebf5;box-shadow:0 10px 26px 0 #d7d1ef;position:relative;z-index:150}@media (max-width:992px){.customization-panel-head{box-shadow:0 0 26px 0 #d7d1ef}}.customization-panel-heading{height:80px;max-width:100%;line-height:80px;text-align:center;font-family:Roboto,sans-serif;color:#afa2ba;background:#fff;border-bottom:1px solid #dfdae4;font-size:16px}@media (max-width:992px){.customization-panel-heading{display:none}}.customization-panel-body{height:70%;scroll-behavior:smooth;padding-bottom:70px;z-index:20;overflow-y:auto;position:relative}.customization-panel-body::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.customization-panel-body::-webkit-scrollbar{width:7px;background-color:transparent}.customization-panel-body::-webkit-scrollbar-thumb{border-radius:20px;background-color:#e4e4e4}@media (max-width:992px){.customization-panel-body{padding-bottom:0;z-index:0}}.customization-panel .helper{position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #dfdae4;box-shadow:0 0 26px 0 #d7d1ef;padding:.7619047619rem 1.1428571429rem;display:flex;align-items:center;justify-content:center;z-index:999}@media (max-width:992px){.customization-panel .helper{display:none;z-index:0}}.customization-panel .helper .error{background:red;width:100%;color:#fff;font-family:Roboto,sans-serif;font-size:14px;padding:15px 0;text-align:center;text-transform:uppercase;position:absolute;transition:all .3s;top:-45px;opacity:0}.btn-avatar{width:100%;height:65px;font-family:Nunito;font-weight:900;padding:0!important;background:#12d3db;background-size:200%;background-position-x:99%;box-shadow:0 .2381rem .95238rem 0 #89e6e8;border-radius:1.90476rem;color:#fff;transition:all .2s cubic-bezier(.4,0,.2,1);border:0;font-size:14px;letter-spacing:.0381rem;line-height:1.2rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-avatar:hover{box-shadow:0 .2381rem .95238rem 0 #89e6e8;-webkit-transform:translateY(-.09524rem);transform:translateY(-.09524rem);cursor:pointer;background-position-x:0;-webkit-transform:translateY(-.14286rem);transform:translateY(-.14286rem);color:#fff}.btn-avatar:active,.btn-avatar:focus{outline:0;box-shadow:0 0 0 #89e6e8;background-position-x:0;-webkit-transform:translateY(.14286rem) scale(.97);transform:translateY(.14286rem) scale(.97)}.btn-avatar .icon{position:absolute;display:flex;justify-content:center;align-items:center;right:0;top:0;margin:15px!important;bottom:0}.btn-avatar .icon path,.btn-avatar .icon svg{fill:#fff;stroke:#fff}@media (max-width:992px){.btn-avatar{display:none!important}}.btn-avatar-mobile{display:none!important;border:500px;background:#12d3db;border-radius:500px;position:fixed;overflow:hidden;font-family:Nunito,sans-serif;font-weight:900;text-transform:uppercase;font-size:.5714285714rem;color:#fff;line-height:1;height:2rem;padding:0 .7619047619rem!important;font-size:.4761904762rem;padding:.7619047619rem 1.1428571429rem;width:fit-content;box-shadow:none}@media (max-width:479px){.btn-avatar-mobile{display:flex!important;font-size:1.1214953271rem;padding:1.4953271028rem 2.2429906542rem!important;height:3.738317757rem;font-size:.9345794393rem;padding:0 1.4953271028rem!important;top:.7476635514rem!important;right:2.2429906542rem!important;z-index:9999}.btn-avatar-mobile .icon{display:none!important}}.btn-avatar-mobile.width-circle{line-height:1;width:2.0952380952rem;height:2.0952380952rem;display:flex;align-items:center;justify-content:center}@media (max-width:479px){.btn-avatar-mobile.width-circle{width:4.1121495327rem;height:4.1121495327rem}}.btn-avatar-mobile.is-inverted{background:#fff;color:#12d3db}.btn-avatar-mobile.is-inverted path,.btn-avatar-mobile.is-inverted svg{fill:#12d3db;stroke:transparent}.btn-avatar-mobile:hover{cursor:pointer}.btn-avatar-mobile:hover:not(.is-inverted){background:#17b8bc}.btn-avatar-mobile:hover.is-inverted{opacity:.8}.btn-avatar-mobile:active,.btn-avatar-mobile:focus{outline:0}.btn-avatar-mobile:active:not(.is-inverted),.btn-avatar-mobile:focus:not(.is-inverted){background:#17b8bc}.btn-avatar-mobile:active.is-inverted,.btn-avatar-mobile:focus.is-inverted{opacity:.8}.btn-avatar-mobile.is-disabled,.btn-avatar-mobile[disabled]{pointer-events:none;background-color:#dfdae4;color:#fff}.btn-avatar-mobile.is-disabled path,.btn-avatar-mobile.is-disabled svg,.btn-avatar-mobile[disabled] path,.btn-avatar-mobile[disabled] svg{fill:#fff;stroke:transparent}.btn-avatar-mobile.rtl{right:0;margin-left:8px}.customization-categories{display:flex;align-items:center;align-content:center;padding:.7619047619rem .7619047619rem}@media (max-width:992px){.customization-categories{padding:0}}.customization-categories .category-vestuario{display:none!important}.customization-categories-item{position:relative;font-size:inherit;flex-basis:0;flex-grow:1;max-width:100%;height:100%;text-align:center}.customization-categories-item:hover{cursor:pointer}.customization-categories-item:hover .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item{height:50px;display:flex;justify-content:center;align-items:center;border:0}}.customization-categories-item-icon{height:52px;width:52px;display:block;border-radius:30px;margin:auto}.customization-categories-item-icon-placeholder{background-color:#dfdae4;border-radius:2px}@media (max-width:992px){.customization-categories-item-icon{display:none}}.customization-categories-item-label{font-weight:400;display:block;font-size:12px;color:#000;text-transform:capitalize!important;font-family:Roboto;padding-top:.380952381rem}@media (max-width:992px){.customization-categories-item-label{margin:0}}.customization-categories-item:first-child{border-left:none}.customization-categories-item.is-selected .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item.is-selected:after{content:"";position:absolute;left:0;bottom:-2px;width:100%;height:3px;background:#12d3db}}@media (max-width:992px) and (max-width:992px){.customization-categories-item.is-selected:after{bottom:0}}.customization-categories-item.is-disabled{opacity:.6}.btn-avatar-reduced{background:#2dd4d9!important;width:65px!important;cursor:wait}@media (max-width:479px){.btn-avatar-reduced{width:40px!important;height:40px!important}}.btn-avatar-loading-completed{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-position:0 0;background-repeat:no-repeat;-webkit-animation:1s loadingCompleted;-moz-animation:1s loadingCompleted;animation:1s loadingCompleted;cursor:wait}@-webkit-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@-moz-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}.btn-avatar-loading-started{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-repeat:no-repeat;background-position:41% 0;-webkit-animation:4s loadingPosition;-moz-animation:4s loadingPosition;animation:4s loadingPosition;transition:.3s;cursor:wait}@-webkit-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@-moz-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}.btn-avatar-loading{font-size:1.4285714286rem;display:none;opacity:0;transition:all .3s;font-size:14px;cursor:wait}.btn-avatar-loading .btn-avatar-loading-icon{display:none;opacity:0;align-items:center;justify-content:center}.btn-avatar-loading .btn-avatar-loading-icon svg{width:2.1904761905rem;height:2.1904761905rem}@media (max-width:479px){.btn-avatar-loading .btn-avatar-loading-icon svg{width:3.5514018692rem;height:3.5514018692rem}}.btn-avatar-loading .btn-avatar-loading-icon path,.btn-avatar-loading .btn-avatar-loading-icon svg{fill:#fff;stroke:#fff}@media (max-width:479px){.btn-avatar-loading{font-size:12px}.btn-avatar-loading .btn-avatar-loading-content{font-size:12px}}',map:void 0,media:void 0})}),{name:"CustomizationPanel",components:{CategoryCustomizations:Dt,Caption:ut,Icon:w},props:{builderApi:{type:String,default:"https://builder.dentrodahistoria.com.br/api"},selectedCharacter:{type:Object,default:{}},characterSlug:{type:String,required:!0},characterId:{type:[Number,String],required:!0},characterTypeId:{type:[Number,String],required:!0},characterName:{type:String,required:!0},characterIsMale:{type:Boolean,required:!0},categoriesAssets:{type:Object,required:!0},disabledCategories:{type:Array,required:!1,default:function(){return[]}},customizations:{type:Array,required:!0},builderProductId:{type:[String,Number],required:!1,default:null},subscriptionId:{type:[Number,String],required:!0},stackId:{type:[Number,String],required:!0},userDataProperties:{type:Object,required:!0},builderLayoutId:{type:[Number,String],required:!1},language:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt"},dir:{type:String,default:"ltr",required:!1}},data:function(){return{selectedCategory:null,selectedGroup:null,selectedCollection:null,error:null,isMobile:null,lang:st[this.typeLanguage],loadingContent:screen.width<1023?"ENVIANDO":"ENVIANDO PERSONAGEM"}},mounted:function(){if(!document.body.getElementsByClassName("btn-avatar-mobile")[0]){var t=document.getElementsByClassName("btn-avatar")[0].cloneNode(!0);t.classList.add("btn-avatar-mobile"),document.body.appendChild(t),document.body.getElementsByClassName("btn-avatar-mobile")[0].addEventListener("click",this.generateAvatar)}var e=document.getElementsByClassName("top-bar")[0];if(screen.width<=1023&&e&&!e.getElementsByClassName("overlay-opacity")[0]){var a=document.getElementsByClassName("overlay-opacity")[0].cloneNode(!0);e.appendChild(a)}if(!document.body.getElementsByClassName("error-mobile")[0]){var i=document.getElementsByClassName("error")[0].cloneNode(!0);i.classList.add("error-mobile"),document.body.appendChild(i)}window.addEventListener("resize",this.screenResize),screen.width>1023?this.isMobile=!1:this.isMobile=!0},beforeDestroy:function(){document.body.getElementsByClassName("btn-avatar-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("btn-avatar-mobile")[0]),document.body.getElementsByClassName("error-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("error-mobile")[0])},computed:{showColorsCustomizations:function(){return!1},showSubcategoriesCustomizations:function(){return!1},visibleCategoriesCustomizations:function(){var t=this,e=[];return this.selectedCategory?e.push(this.selectedCategory):this.selectedCollection&&this.selectedCollection.categories.forEach((function(a){var i=t.categoriesAssets.categories.find((function(t){return t.id===a}));i&&e.push(i)})),e}},methods:{monthsHelper:function(t){switch(t){case 1:return"Janeiro";case 2:return"Fevereiro";case 3:return"Março";case 4:return"Abril";case 5:return"Maio";case 6:return"Junho";case 7:return"Julho";case 8:return"Agosto";case 9:return"Setembro";case 10:return"Outubro";case 11:return"Novembro";case 12:return"Dezembro"}},generateAvatar:function(){var t=this;return B(T().mark((function e(){var a,i,o,r,d,n,s,l,c,p,m,u;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t,o=!1,t.categoriesAssets.categories.forEach((function(e){e.required?((i=t.customizations.find((function(t){return e.id===t.categoryId})))||(i=t.disabledCategories.find((function(t){return e.id===t.categoryId}))),i||(o=!0,r=e)):(e.code.includes("mooner")||e.code.includes("pet"))&&(i=t.disabledCategories.find((function(t){return e.id===t.categoryId})))})),o){e.next=18;break}return t.$emit("startedMethod"),d=null,n=[],t.customizations.forEach((function(t){var e={parent_id:t.categoryId,id:t.optionId?t.optionId:t.relatedCategoryId};e.parent_id&&e.id&&n.push(e)})),s={properties:a.userDataProperties,type:t.characterTypeId},l={custom_character:{character_id:t.characterId,product_id:t.builderProductId,type_id:t.characterTypeId,categories:n,user_data:s}},t.builderLayoutId&&(l.custom_character.layout_id=t.builderLayoutId),t.language&&(l.custom_character.language=t.language),e.next=14,Rt({method:"POST",url:"".concat(t.builderApi,"/customs_characters/"),headers:{"Content-Type":"application/json"},data:l}).then((function(t){return t})).catch((function(t){return t}));case 14:(c=e.sent)&&(200===c.status?t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:n,success:!0}):(console.log("tentou pegar o segundo request"),c&&c.response&&c.response.reques&&(p=JSON.parse(c.response.request.responseText),d=p?p.error:"Não foi possível gerar o avatar. Tente novamente."),d&&(t.error=d,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)),t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:n,success:!1}))),e.next=22;break;case 18:m=r.code,u="pele"===m?"Necessário selecionar um tom de pele":"Necessário selecionar um tipo de ".concat(m),screen.width>1023&&("roupa"===m||"tenis"===m)?(t.error=u,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)):(document.getElementsByClassName("error")[0].style.opacity="1",document.getElementsByClassName("error")[0].textContent=u,setTimeout((function(){document.getElementsByClassName("error")[0].style.opacity="0",document.getElementsByClassName("error")[0].textContent=""}),5e3)),t.$refs[m][0].click();case 22:case"end":return e.stop()}}),e)})))()},getCustomizationTitle:function(t){var e=t?t.toLowerCase():"";switch(e){case"pele":return"Tons de pele";default:return"Tipos de ".concat(e)}},getCustomizationByCategoryId:function(t){return this.customizations.find((function(e){return e.categoryId===t}))},handleSelectCategory:function(t){if(!this.isCategoryDisabled(t)&&this.selectedCategory!==t){this.selectedCharacter.slug;var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];"cabelo"===t.code||"olhos"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):"roupa"===t.code||"tenis"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-out"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0})),this.selectedGroup=null,this.selectedCollection=null,this.selectedCategory=t}},handleSelectGroup:function(t){if(this.selectedGroup!==t){if(screen.width<=1023){var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];this.selectedCharacter.slug;"acessorio"===t.code||"acessorios"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0}))}this.selectedCategory=null,this.selectedCollection=null,this.selectedGroup=t}},handleSelectCollection:function(t){this.selectedCollection!==t&&(this.selectedCategory=null,this.selectedGroup=null,this.selectedCollection=t)},handleUpdateCustomization:function(t){this.$emit("update:customization",t)},isCategoryDisabled:function(t){return void 0!==this.disabledCategories.find((function(e){return e.categoryId===t.id}))},screenResize:function(){if(screen.width>1023){document.getElementsByClassName("customization-preview-asset");
1790
1790
  // const transform = "scale(1) translateY(0)"
1791
1791
  // Array.from(avatar).forEach(piece => {
1792
1792
  // piece.style.transform = transform