@tech.gocase/prisma 1.0.0

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.
Binary file
@@ -0,0 +1,2 @@
1
+ (window["webpackJsonpPrisma"]=window["webpackJsonpPrisma"]||[]).push([["image-editor"],{"0ecd":function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 1000 1000"}},[t("path",{attrs:{d:"M25.598 0c-4.002 0-8.019 0.938-11.712 2.837-8.526 4.389-13.886 13.174-13.886 22.763v512c0 9.59 5.36 18.374 13.886 22.763 8.528 4.387 18.79 3.642 26.594-1.931l358.4-256c6.728-4.805 10.72-12.565 10.72-20.832s-3.994-16.027-10.72-20.832l-358.4-256c-4.424-3.16-9.642-4.768-14.882-4.768zM51.2 487.854v-412.509l288.757 206.254-288.757 206.254zM947.203 0c-5.242 0-10.458 1.608-14.883 4.768l-358.4 256c-6.728 4.805-10.72 12.565-10.72 20.832s3.992 16.027 10.72 20.832l358.4 256c7.803 5.573 18.066 6.318 26.594 1.931 8.526-4.389 13.886-13.173 13.886-22.763v-512c0-9.589-5.36-18.374-13.886-22.763-3.69-1.899-7.709-2.837-11.71-2.837zM632.843 281.6l288.757-206.254v412.509l-288.757-206.254zM486.4 460.8c-14.138 0-25.6 11.462-25.6 25.6v51.2c0 14.138 11.462 25.6 25.6 25.6s25.6-11.462 25.6-25.6v-51.2c0-14.138-11.462-25.6-25.6-25.6zM486.4 307.2c-14.138 0-25.6 11.461-25.6 25.6v51.2c0 14.139 11.462 25.6 25.6 25.6s25.6-11.461 25.6-25.6v-51.2c0-14.139-11.462-25.6-25.6-25.6zM486.4 153.6c-14.138 0-25.6 11.461-25.6 25.6v51.2c0 14.139 11.462 25.6 25.6 25.6s25.6-11.461 25.6-25.6v-51.2c0-14.139-11.462-25.6-25.6-25.6zM486.4 0c-14.138 0-25.6 11.461-25.6 25.6v51.2c0 14.139 11.462 25.6 25.6 25.6s25.6-11.461 25.6-25.6v-51.2c0-14.139-11.462-25.6-25.6-25.6zM896 921.6c-14.139 0-25.6-11.462-25.6-25.6v-135.757c-100.885 102.965-238.883 161.357-384 161.357-85.99 0-168.16-19.701-244.226-58.555-72.533-37.050-136.797-91.139-185.845-156.426-8.493-11.304-6.213-27.352 5.091-35.843 4.608-3.462 10.005-5.134 15.357-5.134 7.774 0 15.458 3.53 20.486 10.226 92.88 123.629 234.715 194.533 389.136 194.533 134.822 0 262.851-55.717 354.714-153.6h-149.914c-14.139 0-25.6-11.462-25.6-25.6s11.461-25.6 25.6-25.6h204.8c14.139 0 25.6 11.462 25.6 25.6v204.8c0 14.138-11.461 25.6-25.6 25.6z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-60331e80_0",{source:"svg[data-v-60331e80]{transform:scaleY(-1);width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-60331e80",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},"24fb9":function(e,t,a){var i=a("e579");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("499e").default;n("11b5bd6d",i,!0,{sourceMap:!1,shadowMode:!1})},"2d1f":function(e,t,a){var i=a("ac6d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("499e").default;n("68c3fe29",i,!0,{sourceMap:!1,shadowMode:!1})},4223:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("ul",{staticClass:"image-editor__nav"},[t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("rotate","l")}}},[t("icon-rotate",{staticClass:"image-editor__nav-li-svg",staticStyle:{transform:"scaleX(-1)"}}),t("span",[e._v("Rotate L")])],1),t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("rotate","r")}}},[t("icon-rotate",{staticClass:"image-editor__nav-li-svg"}),t("span",[e._v("Rotate R")])],1),t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("scale","i")}}},[t("icon-zoom-in",{staticClass:"image-editor__nav-li-svg"}),t("span",[e._v("Zoom I")])],1),t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("scale","o")}}},[t("icon-zoom-out",{staticClass:"image-editor__nav-li-svg"}),t("span",[e._v("Zoom O")])],1),t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("flip","h")}}},[t("icon-flip-h",{staticClass:"image-editor__nav-li-svg"}),t("span",[e._v("Flip H")])],1),t("li",{staticClass:"image-editor__nav-li",on:{click:function(t){return e.emit("flip","v")}}},[t("icon-flip-v",{staticClass:"image-editor__nav-li-svg"}),t("span",[e._v("Flip V")])],1),t("li",{staticClass:"image-editor__nav-li image-editor__done",on:{click:function(t){return e.$emit("done")}}},[t("icon-check",{staticClass:"image-editor__nav-li-svg"}),t("span",{},[e._v(" "+e._s(e.$t("done"))+" ")])],1)])},n=[],o=a("d9bf"),s=a.n(o),r=a("6507"),c=a.n(r),l=a("ca94"),d=a.n(l),u=a("7aa7"),h=a.n(u),p=a("0ecd"),f=a.n(p),m=a("54db"),v=a.n(m),g={components:{IconCheck:s.a,IconRotate:c.a,IconZoomIn:d.a,IconZoomOut:h.a,IconFlipH:f.a,IconFlipV:v.a},data:function(){return{i:0}},methods:{emit:function(e,t){this.i++,this.$emit(e,{value:t,i:this.i})}}},_=g,b=(a("adf3"),a("2877")),y=Object(b["a"])(_,i,n,!1,null,"76232326",null);t["default"]=y.exports},"54db":function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 1000 1000"}},[t("path",{attrs:{transform:"scale(1)",d:"M51.2 947.202c0 4.002 0.938 8.019 2.837 11.712 4.389 8.526 13.174 13.886 22.763 13.886h512c9.59 0 18.374-5.36 22.763-13.886 4.387-8.528 3.642-18.79-1.931-26.594l-256-358.4c-4.805-6.728-12.565-10.72-20.832-10.72s-16.027 3.994-20.832 10.72l-256 358.4c-3.16 4.424-4.768 9.642-4.768 14.882zM539.054 921.6h-412.509l206.254-288.757 206.254 288.757zM51.2 25.597c0 5.242 1.608 10.458 4.768 14.883l256 358.4c4.805 6.728 12.565 10.72 20.832 10.72s16.027-3.992 20.832-10.72l256-358.4c5.573-7.803 6.318-18.066 1.931-26.594-4.389-8.526-13.173-13.886-22.763-13.886h-512c-9.589 0-18.374 5.36-22.763 13.886-1.899 3.69-2.837 7.709-2.837 11.71zM332.8 339.957l-206.254-288.757h412.509l-206.254 288.757zM512 486.4c0 14.138 11.462 25.6 25.6 25.6h51.2c14.138 0 25.6-11.462 25.6-25.6s-11.462-25.6-25.6-25.6h-51.2c-14.138 0-25.6 11.462-25.6 25.6zM358.4 486.4c0 14.138 11.461 25.6 25.6 25.6h51.2c14.139 0 25.6-11.462 25.6-25.6s-11.461-25.6-25.6-25.6h-51.2c-14.139 0-25.6 11.462-25.6 25.6zM204.8 486.4c0 14.138 11.461 25.6 25.6 25.6h51.2c14.139 0 25.6-11.462 25.6-25.6s-11.461-25.6-25.6-25.6h-51.2c-14.139 0-25.6 11.462-25.6 25.6zM51.2 486.4c0 14.138 11.461 25.6 25.6 25.6h51.2c14.139 0 25.6-11.462 25.6-25.6s-11.461-25.6-25.6-25.6h-51.2c-14.139 0-25.6 11.462-25.6 25.6zM972.8 76.8c0 14.139-11.462 25.6-25.6 25.6h-135.757c102.965 100.885 161.357 238.883 161.357 384 0 85.99-19.701 168.16-58.555 244.226-37.050 72.533-91.139 136.797-156.426 185.845-11.304 8.493-27.352 6.213-35.843-5.091-3.462-4.608-5.134-10.005-5.134-15.357 0-7.774 3.53-15.458 10.226-20.486 123.629-92.88 194.533-234.715 194.533-389.136 0-134.822-55.717-262.851-153.6-354.714v149.914c0 14.139-11.462 25.6-25.6 25.6s-25.6-11.461-25.6-25.6v-204.8c0-14.139 11.462-25.6 25.6-25.6h204.8c14.138 0 25.6 11.461 25.6 25.6z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-0f9aedb0_0",{source:"svg[data-v-0f9aedb0]{transform:scaleY(-1);width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-0f9aedb0",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},"589a":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,'.editor__render[data-v-bd3f3120]{background:#222;position:relative;width:100%}.editor__render[data-v-bd3f3120]:after{content:"";display:block;padding-bottom:100%}.editor__render .editor__render-container[data-v-bd3f3120]{position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.editor__render .editor__render-container .editor__render-container__cropper[data-v-bd3f3120]{overflow:hidden;position:relative;-webkit-box-flex:0;-ms-flex:none;flex:none;cursor:-webkit-grab;cursor:grab;background:url(https://static-production.gocase.com.br/transparency.png) no-repeat;background-size:cover;background-position:50%}.editor__render .editor__render-container .editor__render-container__cropper .editor__render-container__mask[data-v-bd3f3120]{opacity:.9;position:absolute;top:0;left:0;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-ms-user-drag:none}',""]),e.exports=t},6507:function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 20 20"}},[t("path",{attrs:{d:"M2.49 4.49c1.605-1.605 3.74-2.49 6.010-2.49s4.405 0.884 6.010 2.49 2.49 3.74 2.49 6.010v1.293l2.146-2.146c0.195-0.195 0.512-0.195 0.707 0s0.195 0.512 0 0.707l-3 3c-0.098 0.098-0.226 0.146-0.354 0.146s-0.256-0.049-0.354-0.146l-3-3c-0.195-0.195-0.195-0.512 0-0.707s0.512-0.195 0.707 0l2.146 2.146v-1.293c0-4.136-3.364-7.5-7.5-7.5s-7.5 3.364-7.5 7.5c0 4.136 3.364 7.5 7.5 7.5 0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5c-2.27 0-4.405-0.884-6.010-2.49s-2.49-3.74-2.49-6.010c0-2.27 0.884-4.405 2.49-6.010z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-680cb834_0",{source:"svg[data-v-680cb834]{width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-680cb834",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},"765f":function(e,t,a){"use strict";a("dad7")},"79dc":function(e,t,a){"use strict";a.r(t);a("4de4"),a("d3b7");var i=function(){var e=this,t=e._self._c;return e.canvas?t("div",{staticClass:"editor__render"},[t("div",{staticClass:"editor__render-container"},[t("div",{staticClass:"editor__render-container__cropper",style:e.canvasStyle},[t("figure",{directives:[{name:"pan",rawName:"v-pan",value:e.onPan,expression:"onPan"}],ref:"imageCurrent",staticStyle:{margin:"0",position:"absolute",transition:"0.1s"},style:e.filter?e.filter.style:{}},[t("div",{staticStyle:{width:"100%, height: 100%",position:"relative"}},[e._l(e.filter&&e.filter.overlays||[],(function(e,a){return t("div",{key:a,style:{position:"absolute","mix-blend-mode":e.mixBlendMode,background:e.color,opacity:e.opacity,width:"100%",height:"100%"}})})),t("img",{ref:"imageElement",attrs:{crossorigin:"Anonymous",src:e.imageCurrent},on:{load:e.adjustmentScale}})],2)]),t("img",{directives:[{name:"pan",rawName:"v-pan",value:e.onPan,expression:"onPan"}],ref:"imageBefore",staticClass:"editor__render-container__mask",attrs:{crossorigin:"Anonymous",src:e.imageBefore,width:e.imageBeforeWidth,height:e.imageBeforeHeight,draggable:"false",onmousedown:"return false"}})])])]):e._e()},n=[],o=(a("a9e3"),a("99af"),a("159b"),{props:{sizeSquare:Number,imageBeforeWidth:Number,imageBeforeHeight:Number,imageBeforeIsMask:Boolean,imageBeforePadding:Object,imageBefore:String,imageCurrent:String,filter:Object,setFlip:Object,setScale:Object,setRotation:Object},data:function(){return{lastPosX:0,lastPosY:0,scaleX:1,scaleY:1,rotation:0,canvas:null,isFlipped:!1,panFrame:null}},computed:{generalScale:function(){var e=this.imageBeforeWidth,t=this.imageBeforeHeight,a=t>e?t:e;return this.sizeSquare/a},canvasStyle:function(){var e=this.imageBeforeWidth,t=this.imageBeforeHeight,a=this.generalScale;return{width:"".concat(e,"px"),height:"".concat(t,"px"),transform:"scale(".concat(a,")")}}},watch:{setFlip:function(e){"h"===e.value&&(this.isFlippedH=!this.isFlippedH,this.scaleX=this.isFlippedH?-Math.abs(this.scaleX):Math.abs(this.scaleX)),"v"===e.value&&(this.isFlippedV=!this.isFlippedV,this.scaleY=this.isFlippedV?-Math.abs(this.scaleY):Math.abs(this.scaleY)),this.refresh()},setScale:function(e){var t=.02,a=20,i=Math.abs(this.scaleX);i+="i"===e.value?.1:-.1,i<t||i>a||(this.scaleX=this.isFlippedH?-i:i,this.scaleY=this.isFlippedV?-i:i,this.refresh())},setRotation:function(e){"l"===e.value&&(this.rotation-=15),"r"===e.value&&(this.rotation+=15),this.adjustmentScale(),this.refresh()}},methods:{imageCurrentDimensions:function(){var e,t,a=null===(e=this.$refs)||void 0===e||null===(t=e.imageCurrent)||void 0===t?void 0:t.getBoundingClientRect();return a?{width:a.width/this.generalScale,height:a.height/this.generalScale}:null},transform:function(e,t,a,i,n,o){e.style.left=t?"".concat(t,"px"):"50%",e.style.top=a?"".concat(a,"px"):"50%",e.style.transform="translate(-50%, -50%) rotate(".concat(i,"deg) scale(").concat(n,", ").concat(o,")")},refresh:function(){var e=this;this.update(),setTimeout((function(){return e.update()}),220)},update:function(){var e;null!==(e=this.$refs)&&void 0!==e&&e.imageCurrent&&this.transform(this.$refs.imageCurrent,this.lastPosX,this.lastPosY,this.rotation,this.scaleX,this.scaleY)},onPan:function(e){var t=this,a=this.$refs.imageCurrent,i=e.deltaX+this.lastPosX,n=e.deltaY+this.lastPosY;null===this.panFrame&&(this.panFrame=requestAnimationFrame((function(){t.panFrame=null,a.style.transition=null,t.transform(a,t._panPosX,t._panPosY,t.rotation,t.scaleX,t.scaleY)}))),this._panPosX=i,this._panPosY=n,e.isFinal&&(null!==this.panFrame&&(cancelAnimationFrame(this.panFrame),this.panFrame=null),this.lastPosX=i,this.lastPosY=n,a.style.transition="0.1s",this.update())},cropper:function(e){var t=this,a=this.imageCurrentDimensions();a&&this.beforeDraw({img:this.$refs.imageElement,width:a.width,height:a.height},(function(i){t.finalDraw({maskSrc:t.$refs.imageBefore,imageSrc:i,imageCenterWidth:a.width/2,imageCenterHeight:a.height/2,imageWidth:i.width,imageHeight:i.height,canvasWidth:t.imageBeforeWidth,canvasHeight:t.imageBeforeHeight},e)}))},beforeDraw:function(e,t){var a,i=e.img,n=e.width,o=e.height,s=this.scaleX,r=this.scaleY,c=this.rotation,l=this.filter,d=this.canvas.cloneNode();d.width=n/Math.abs(s),d.height=o/Math.abs(r);var u=d.getContext("2d");u.translate(d.width/2,d.height/2),u.rotate(c*(Math.PI/180)),u.scale(s<0?-1:1,r<0?-1:1),u.filter=null===l||void 0===l?void 0:l.value,u.globalCompositeOperation="source-over",u.drawImage(i,-i.offsetWidth/2,-i.offsetHeight/2),null===l||void 0===l||null===(a=l.overlays)||void 0===a||a.forEach((function(e){u.globalAlpha=e.opacity,u.fillStyle=e.color,u.globalCompositeOperation=e.mixBlendMode,u.fillRect(-d.width/2,-d.height/2,d.width,d.height)})),t(d)},finalDraw:function(e,t){var a=e.maskSrc,i=e.imageSrc,n=e.imageCenterWidth,o=e.imageCenterHeight,s=e.imageWidth,r=e.imageHeight,c=e.canvasWidth,l=e.canvasHeight,d=this.canvas.cloneNode(),u=d.getContext("2d");d.width=c,d.height=l;var h=this.lastPosX-n,p=this.lastPosY-o,f=s*Math.abs(this.scaleX),m=r*Math.abs(this.scaleY);this.imageBeforeIsMask?(u.drawImage(a,0,0,d.width,d.height),u.globalCompositeOperation="source-out",u.drawImage(i,h,p,f,m)):(u.drawImage(i,h,p,f,m),u.drawImage(a,0,0,d.width,d.height)),d.toBlob(t,"image/png",1)},adjustmentScale:function(){var e=this.imageCurrentDimensions();if(e){e.width/=Math.abs(this.scaleX),e.height/=Math.abs(this.scaleY);var t=Math.min(e.width,e.height),a=this.sizeSquare/t/this.generalScale;this.scaleX=this.isFlippedH?-a:a,this.scaleY=this.isFlippedV?-a:a,this.refresh()}},_zoomBoundFunc:function(e){return!0},_dragBoundFuncFor:function(e,t,a,i,n){var o=this.imageCurrentDimensions();if(o){var s=o.width/2,r=o.height/2,c=a-s,l=i-r;s+=a*n.left,r+=i*n.top,c-=a*n.right,l-=i*n.bottom;var d=e,u=t;d=e>s?e>s?s:e:e<c?c:e,u=t>r?t>r?r:t:t<l?l:t,this.lastPosX=d,this.lastPosY=u}},centerImage:function(){this.lastPosX=this.imageBeforeWidth/2,this.lastPosY=this.imageBeforeHeight/2}},mounted:function(){this.canvas=document.createElement("canvas"),this.centerImage(),this.$emit("cropper",this.cropper),this.refresh()},destroyed:function(){null!==this.panFrame&&(cancelAnimationFrame(this.panFrame),this.panFrame=null),delete this.canvas}}),s=o,r=(a("765f"),a("2877")),c=Object(r["a"])(s,i,n,!1,null,"bd3f3120",null);t["default"]=c.exports},"7aa7":function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 20 20"}},[t("path",{attrs:{d:"M18.869 19.162l-5.943-6.484c1.339-1.401 2.075-3.233 2.075-5.178 0-2.003-0.78-3.887-2.197-5.303s-3.3-2.197-5.303-2.197-3.887 0.78-5.303 2.197-2.197 3.3-2.197 5.303 0.78 3.887 2.197 5.303 3.3 2.197 5.303 2.197c1.726 0 3.362-0.579 4.688-1.645l5.943 6.483c0.099 0.108 0.233 0.162 0.369 0.162 0.121 0 0.242-0.043 0.338-0.131 0.204-0.187 0.217-0.503 0.031-0.706zM1 7.5c0-3.584 2.916-6.5 6.5-6.5s6.5 2.916 6.5 6.5-2.916 6.5-6.5 6.5-6.5-2.916-6.5-6.5z",fill:"currentColor"}}),this._v(" "),t("path",{attrs:{d:"M11.5 8h-8c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h8c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-8b3d011e_0",{source:"svg[data-v-8b3d011e]{width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-8b3d011e",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},ac6d:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".image-editor__nav[data-v-76232326]{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(7,1fr);font-size:10px;background:#333}.image-editor__nav .image-editor__nav-li[data-v-76232326]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;fill:#fff;color:#fff;cursor:pointer;padding:12px 0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.image-editor__nav .image-editor__nav-li[data-v-76232326]:hover{background:rgba(34,34,34,.6)}.image-editor__nav .image-editor__done[data-v-76232326]{background:#f37053}.image-editor__nav .image-editor__done[data-v-76232326]:hover{background:rgba(243,112,83,.8)}.image-editor__nav .image-editor__nav-li-svg[data-v-76232326]{width:45%;max-width:26px;margin-bottom:6px}",""]),e.exports=t},adf3:function(e,t,a){"use strict";a("2d1f")},c062:function(e,t,a){"use strict";a.r(t);a("b0c0");var i=function(){var e=this,t=e._self._c;return e.showFilters?t("div",{staticClass:"image-editor__filters"},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isFilterAllowed,expression:"isFilterAllowed"}],staticClass:"image-editor__filters-list"},e._l(e.presets,(function(a){return t("figure",{directives:[{name:"show",rawName:"v-show",value:e.available,expression:"available"}],key:a.name,staticClass:"image-editor__filters-figure",staticStyle:{position:"relative"},style:e.figureStyle(a),on:{click:function(t){e.$emit("filter",e.format(a))}}},[e._l(a.overlays||[],(function(e,a){return t("div",{key:a,staticClass:"image-editor__filters-overlay",style:{"mix-blend-mode":e.mixBlendMode,background:e.color,opacity:e.opacity}})})),t("div",[t("img",{attrs:{src:e.image},on:{load:e.loaded}})])],2)})),0)]):e._e()},n=[],o=a("5530"),s=(a("ac1f"),a("00b4"),a("d3b7"),a("ddb0"),a("99af"),a("d4ec")),r=a("bee2"),c=function(){function e(){Object(s["a"])(this,e)}return Object(r["a"])(e,null,[{key:"values",value:function(){return[{name:"none",description:"",values:{sepia:0,contrast:1,brightness:1,grayscale:0,saturate:1,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"1977",description:"",values:{sepia:0,contrast:1.1,brightness:1.1,grayscale:0,saturate:1.3,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[{opacity:.5,color:"rgba(243, 106, 188, 0.3)",mixBlendMode:"screen"}]},{name:"Valencia",description:"",values:{sepia:.08,contrast:1.08,brightness:1.08,grayscale:0,saturate:1,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[{opacity:.5,color:"rgba(58, 3, 57, 1)",mixBlendMode:"exclusion"}]},{name:"sepia",description:"",values:{sepia:1,contrast:1,brightness:1,grayscale:0,saturate:1,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"grayscale",description:"",values:{sepia:0,contrast:1,brightness:1,grayscale:1,saturate:1,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"watercolor",description:"",values:{sepia:.25,contrast:1,brightness:1.3,grayscale:0,saturate:2.6,opacity:1,invert:.17,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"faded-photo",description:"",values:{sepia:.4,contrast:1,brightness:1.1,grayscale:0,saturate:1.3,opacity:.9,invert:0,blur:"".concat(.2,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(5,"deg")},overlays:[]},{name:"old-horror",description:"",values:{sepia:.5,contrast:1,brightness:1.3,grayscale:1,saturate:1,opacity:1,invert:.8,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"old-grainy",description:"",values:{sepia:.5,contrast:1,brightness:1.5,grayscale:.6,saturate:1,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]},{name:"fade-out",description:"",values:{sepia:0,contrast:.6,brightness:.8,grayscale:0,saturate:3,opacity:1,invert:0,blur:"".concat(8,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(350,"deg")},overlays:[]},{name:"mist",description:"",values:{sepia:0,contrast:1,brightness:.8,grayscale:0,saturate:.8,opacity:1,invert:0,blur:"".concat(0,"px"),dropShadow:"".concat(0,"px ",0,"px ",0,"px"),dropShadowColor:"",hueRotate:"".concat(0,"deg")},overlays:[]}]}}]),e}(),l=a("2f62"),d={props:{image:String},data:function(){return{presets:null,available:!1}},computed:Object(o["a"])({showFilters:function(){return!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},isFilterAllowed:function(){return!this.isCorporativeSales}},Object(l["b"])(["isCorporativeSales"])),methods:{loaded:function(){this.available=!0},figureStyle:function(e){var t=this.formatValues(e.values);return{"-webkit-filter":t,"-moz-filter":t,"-o-filter":t,"-ms-filter":t,filter:t}},format:function(e){return{preset:e,style:this.figureStyle(e),overlays:e.overlays,value:this.formatValues(e.values)}},formatValues:function(e){return"sepia(".concat(e.sepia,") contrast(").concat(e.contrast,") brightness(").concat(e.brightness,") grayscale(").concat(e.grayscale,") saturate(").concat(e.saturate,") opacity(").concat(e.opacity,") invert(").concat(e.invert,") blur(").concat(e.blur,") drop-shadow(").concat(e.dropShadow," ").concat(e.dropShadowColor,") hue-rotate(").concat(e.hueRotate,")")}},mounted:function(){this.presets=c.values()}},u=d,h=(a("c08c"),a("2877")),p=Object(h["a"])(u,i,n,!1,null,"326db2e2",null);t["default"]=p.exports},c08c:function(e,t,a){"use strict";a("24fb9")},ca94:function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 20 20"}},[t("path",{attrs:{d:"M18.869 19.162l-5.943-6.484c1.339-1.401 2.075-3.233 2.075-5.178 0-2.003-0.78-3.887-2.197-5.303s-3.3-2.197-5.303-2.197-3.887 0.78-5.303 2.197-2.197 3.3-2.197 5.303 0.78 3.887 2.197 5.303 3.3 2.197 5.303 2.197c1.726 0 3.362-0.579 4.688-1.645l5.943 6.483c0.099 0.108 0.233 0.162 0.369 0.162 0.121 0 0.242-0.043 0.338-0.131 0.204-0.187 0.217-0.503 0.031-0.706zM1 7.5c0-3.584 2.916-6.5 6.5-6.5s6.5 2.916 6.5 6.5-2.916 6.5-6.5 6.5-6.5-2.916-6.5-6.5z",fill:"currentColor"}}),this._v(" "),t("path",{attrs:{d:"M11.5 7h-3.5v-3.5c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v3.5h-3.5c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5h3.5v3.5c0 0.276 0.224 0.5 0.5 0.5s0.5-0.224 0.5-0.5v-3.5h3.5c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-23000ba7_0",{source:"svg[data-v-23000ba7]{width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-23000ba7",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},d9bf:function(e,t,a){!function(e,a){a(t)}(0,(function(e){"use strict";function t(e,t,a,i,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);var d,u="function"==typeof a?a.options:a;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),d)if(u.functional){var h=u.render;u.render=function(e,t){return d.call(t),h(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,d):[d]}return a}var a,i="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function n(e){return function(e,t){return function(e,t){var n=i?t.media||"default":e,s=o[n]||(o[n]={ids:new Set,styles:[]});if(!s.ids.has(e)){s.ids.add(e);var r=t.source;if(t.map&&(r+="\n/*# sourceURL="+t.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),s.element||(s.element=document.createElement("style"),s.element.type="text/css",t.media&&s.element.setAttribute("media",t.media),void 0===a&&(a=document.head||document.getElementsByTagName("head")[0]),a.appendChild(s.element)),"styleSheet"in s.element)s.styles.push(r),s.element.styleSheet.cssText=s.styles.filter(Boolean).join("\n");else{var c=s.ids.size-1,l=document.createTextNode(r),d=s.element.childNodes;d[c]&&s.element.removeChild(d[c]),d.length?s.element.insertBefore(l,d[c]):s.element.appendChild(l)}}}(e,t)}}var o={},s=t({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{viewBox:"0 0 20 20"}},[t("path",{attrs:{d:"M5.5 17.5c-0.128 0-0.256-0.049-0.354-0.146l-5-5c-0.195-0.195-0.195-0.512 0-0.707s0.512-0.195 0.707 0l4.646 4.646 13.646-13.646c0.195-0.195 0.512-0.195 0.707 0s0.195 0.512 0 0.707l-14 14c-0.098 0.098-0.226 0.146-0.354 0.146z",fill:"currentColor"}})])},staticRenderFns:[]},(function(e){e&&e("data-v-7035bbda_0",{source:"svg[data-v-7035bbda]{width:100%;height:auto}",map:void 0,media:void 0})}),{},"data-v-7035bbda",!1,void 0,!1,n,void 0,void 0);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}))},dad7:function(e,t,a){var i=a("589a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("499e").default;n("6b895fe0",i,!0,{sourceMap:!1,shadowMode:!1})},e579:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".image-editor__filters[data-v-326db2e2]{overflow-x:auto;overflow-y:hidden;width:100%}.image-editor__filters-list[data-v-326db2e2]{display:grid;grid-template-columns:repeat(auto-fit,60px);grid-auto-rows:1fr;grid-gap:12px;position:relative;padding:10px 12px;width:-webkit-min-content;width:-moz-min-content;width:min-content;height:60px}.image-editor__filters-list .image-editor__filters-figure[data-v-326db2e2]{cursor:pointer;grid-row:1;width:60px;height:60px;border-radius:4px;margin:0;overflow:hidden}.image-editor__filters-list .image-editor__filters-figure img[data-v-326db2e2]{width:100%;pointer-events:none}.image-editor__filters-list .image-editor__filters-overlay[data-v-326db2e2]{width:100%;height:100%;position:absolute}",""]),e.exports=t}}]);
2
+ //# sourceMappingURL=image-editor.js.map
@@ -0,0 +1,132 @@
1
+ <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.png"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&family=Recursive:wght@400;800&display=swap" rel="stylesheet"><title>Gocase | Prisma</title><style>#spree-html {
2
+ width: 100%;
3
+ margin: 0 auto;
4
+ }
5
+ #material-dev-prisma {
6
+ width: 100%;
7
+ font-size: 16px;
8
+ padding: 9px;
9
+ border-radius: 4px;
10
+ display: none;
11
+ }
12
+ .prisma-dev {
13
+ max-width: 600px;
14
+ margin: 0 auto;
15
+ padding: 10px;
16
+ }
17
+ .prisma-dev__header {
18
+ border-bottom: .3px solid rgba(0, 0, 0, .1);
19
+ top: 0;
20
+ }
21
+ .prisma-dev__logo {
22
+ display: flex;
23
+ justify-content: center;
24
+ margin: 10px 0 10px 0;
25
+ }
26
+ .prisma-dev__logo-link {
27
+ cursor: pointer;
28
+ }
29
+
30
+ @media (max-width: 768px) {
31
+ .prisma-dev {
32
+ max-width: 400px;
33
+ width: 100%;
34
+ overflow: hidden;
35
+ }
36
+ }</style><link href="/image-editor.js" rel="prefetch"><link href="/app.js" rel="preload" as="script"></head><body class="prisma-dev"><noscript><strong>We're sorry but prisma doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="spree-html" class="prisma-dev__header"><div class="prisma-dev__logo"><a class="prisma-dev__logo-link" href="https://www.gocase.com.br/" target="_blank" rel="noreferrer noopener nofollow" aria-label="Redirecionar para site da Gocase"><svg xmlns="http://www.w3.org/2000/svg" width="90" viewBox="0 0 228 65" fill="#005BAA"><path d="M59.1999 3.49976C53.9999 3.49976 49.4999 5.29976 45.8999 8.89976C42.2999 12.4998 40.3999 16.8998 40.3999 22.1998C40.3999 27.4998 42.1999 31.8998 45.8999 35.4998C49.4999 39.0998 53.9999 40.8998 59.1999 40.8998C64.4999 40.8998 68.8999 39.0998 72.4999 35.4998C76.0999 31.8998 77.9999 27.4998 77.9999 22.1998C77.9999 16.8998 76.1999 12.4998 72.4999 8.89976C68.8999 5.29976 64.4999 3.49976 59.1999 3.49976ZM67.0999 30.1998C64.9999 32.2998 62.2999 33.3998 59.1999 33.3998C56.0999 33.3998 53.4999 32.2998 51.2999 30.1998C49.1999 28.0998 48.0999 25.3998 48.0999 22.1998C48.0999 18.9998 49.1999 16.2998 51.2999 14.1998C53.3999 12.0998 56.0999 10.9998 59.1999 10.9998C62.2999 10.9998 64.8999 12.0998 67.0999 14.1998C69.2999 16.2998 70.2999 18.9998 70.2999 22.1998C70.2999 25.3998 69.2999 28.0998 67.0999 30.1998Z"/><path d="M99.3998 33.2999C96.2998 33.2999 93.6998 32.1999 91.4998 30.0999C89.3998 27.9999 88.3998 25.2999 88.3998 22.1999C88.3998 18.9999 89.4998 16.3999 91.4998 14.2999C93.5998 12.1999 96.2998 11.0999 99.3998 11.0999C103.7 11.0999 107.1 13.1999 108.7 16.5999L115.3 12.7999C112.5 7.19985 106.4 3.59985 99.4998 3.59985C94.1998 3.59985 89.6998 5.39985 86.0998 8.99985C82.5998 12.4999 80.7998 16.8999 80.7998 22.2999C80.7998 27.5999 82.5998 31.9999 86.0998 35.5999C89.6998 39.1999 94.1998 40.9999 99.4998 40.9999C106.4 40.9999 112.4 37.4999 115.5 31.7999L108.9 27.9999C107.2 31.1999 103.6 33.2999 99.3998 33.2999Z"/><path d="M147.7 9.49976C144.8 5.49976 140.7 3.49976 135.3 3.49976C130.4 3.49976 126.3 5.29976 122.8 8.89976C119.3 12.4998 117.6 16.8998 117.6 22.1998C117.6 27.3998 119.3 31.8998 122.8 35.4998C126.3 39.0998 130.4 40.8998 135.3 40.8998C140.7 40.8998 144.8 38.8998 147.7 34.8998V39.9998H155.4V4.39976H147.7V9.49976ZM144.5 30.2998C142.4 32.3998 139.7 33.4998 136.5 33.4998C133.3 33.4998 130.6 32.3998 128.5 30.2998C126.4 28.0998 125.3 25.3998 125.3 22.0998C125.3 18.7998 126.4 16.0998 128.5 13.9998C130.6 11.7998 133.3 10.6998 136.5 10.6998C139.7 10.6998 142.4 11.7998 144.5 13.9998C146.6 16.0998 147.7 18.7998 147.7 22.0998C147.7 25.3998 146.7 28.0998 144.5 30.2998Z"/><path d="M175.8 18.7997C172.1 17.6997 169.1 16.4997 169.1 14.1997C169.1 11.6997 171.4 10.3997 174.3 10.3997C177.5 10.3997 179.8 11.6997 181 14.3997L187.5 10.7997C185 6.19966 180.3 3.39966 174.4 3.39966C170.7 3.39966 167.6 4.39966 165.1 6.39966C162.6 8.39966 161.4 10.9997 161.4 14.2997C161.3 21.7997 168.4 23.8997 173.7 25.1997C177.5 26.0997 180.4 27.4997 180.4 29.6997C180.4 32.2997 178.4 33.6997 174.4 33.6997C170.4 33.6997 167.7 31.9997 166.5 28.5997L159.9 32.3997C162.2 37.5997 167.4 40.6997 174.4 40.6997C178.4 40.6997 181.6 39.6997 184.3 37.7997C186.9 35.8997 188.3 33.1997 188.3 29.7997C188.3 22.2997 181.2 20.0997 175.8 18.7997Z"/><path d="M228 21.8999C228 16.6999 226.3 12.1999 223 8.59985C219.7 4.99985 215.4 3.09985 210.2 3.09985C204.7 3.09985 200.2 4.89985 196.7 8.49985C193.2 11.9999 191.4 16.3999 191.4 21.7999C191.4 27.1999 193.2 31.6999 196.7 35.1999C200.2 38.6999 204.9 40.4999 210.7 40.4999C217.6 40.4999 222.8 37.8999 226.2 32.7999L219.9 29.0999C217.8 31.9999 214.8 33.4999 210.7 33.4999C204.8 33.4999 200.5 30.4999 199.3 25.0999H227.5C227.9 23.7999 228 22.6999 228 21.8999ZM199.4 18.8999C200.5 13.4999 204.4 10.1999 210.1 10.1999C215.1 10.1999 219.2 13.1999 220.2 18.8999H199.4Z"/><path d="M30.6 36.8998L31 36.5998C31.4 36.2998 31.7 35.9998 32.1 35.5998C35.7 31.9998 37.6 27.5998 37.6 22.2998C37.6 19.1998 36.9 16.3998 35.7 13.8998L29.1 17.6998C29.7 19.0998 30 20.5998 30 22.2998C30 25.4998 28.9 28.1998 26.8 30.2998C24.7 32.3998 22 33.4998 18.9 33.4998C15.8 33.4998 13.2 32.3998 11 30.2998C8.9 28.1998 7.8 25.4998 7.8 22.2998C7.8 19.0998 8.9 16.3998 11 14.2998C13.1 12.1998 15.8 11.0998 18.9 11.0998H25.5C26.4 11.1998 29.5 10.9998 32.3 9.19976C32.6 8.99976 32.9 8.69976 33.3 8.39976C34.8 6.99976 36.6 4.39976 36.6 -0.000244141H29C29 1.39976 28.7 2.39976 28.1 2.89976C27.3 3.69976 25.9 3.69976 25.7 3.69976H18.8C13.6 3.59976 9.1 5.39976 5.5 8.99976C1.8 12.6998 0 17.0998 0 22.2998C0 27.5998 1.8 31.9998 5.5 35.5998C9.1 39.1998 13.6 40.9998 18.8 40.9998C20.1 40.9998 21.4 40.8998 22.7 40.6998C26 41.6998 29.1 44.0998 29.1 48.4998C29.1 53.7998 24.9 57.3998 18.8 57.3998C12.9 57.1998 8.4 53.7998 8 48.9998H0C0.3 58.2998 7.9 64.6998 18.7 64.6998C29.7 64.6998 37.1 58.0998 37.1 48.3998C37.1 43.0998 35 39.3998 30.6 36.8998Z"/></svg></a></div><select name="device" id="material-dev-prisma" class="prisma-dev__material"><option value=""></option><option value="standard-iphonexr">IPhone XR</option><option value="standard-iphone8">IPhone 8</option><option value="standard-iphone11">IPhone 11</option><option value="caseimpactslimstandard-iphone11">Impact Slim IPhone 11</option><option value="caseimpactslimpink-iphone11">Impact Slim Pink IPhone 11</option><option value="caseimpactslimglitter-iphone11">Impact Slim Glitter IPhone 11</option><option value="standard-galaxys20">Galaxy S20</option><option value="standard-galaxya10">Galaxy A10</option><option value="standard-motog7plus">Moto G7 Plus</option><option value="standard-mia3">Redmi A3</option><option value="antishock-iphone7plus">Antishock iPhone 7 Plus</option><option value="deluxe-iphone6">Deluxe Iphone 6</option><option value="wireless-charger">Wireless Charger</option><option value="gripwhite">Go Grip</option></select></div><div id="e-app"></div><script src="/app.js"></script></body><script>var url_string = window.location.href;
37
+ var url = new URL(url_string);
38
+ var material = url.searchParams.get("material");
39
+ var identifier = url.searchParams.get("identifier");
40
+ var image_src = url.searchParams.get("image_src");
41
+ var store = url.searchParams.get("store");
42
+
43
+ if (identifier === null) identifier = 'warner-hp-garota-bg';
44
+
45
+ function paramsEngine(identifier, material, image_src) {
46
+ return {
47
+ admin: true,
48
+ appMountId: "e-app",
49
+ liteMode: {
50
+ previewHeight: document.body.offsetWidth - 16,
51
+ previewMountId: "e-preview",
52
+ inputsMountId: "e-inputs",
53
+ exportMountId: "e-export",
54
+ },
55
+ devMode: {
56
+ showTextBorder: false,
57
+ },
58
+ // first setup engine boot
59
+ boot: {
60
+ material: "caseimpactslimstandard-iphone12pro",
61
+ },
62
+ product: {
63
+ material,
64
+ identifier,
65
+ store: store || "br",
66
+ mockups: ["accessorybag"],
67
+ },
68
+ events: {
69
+ exportImage: "exportImage",
70
+ },
71
+ exportBtn: {
72
+ btnText: "Criar imagem e baixar estampa",
73
+ btnDisabledFunc: () => alert("select a material"),
74
+ },
75
+ editMode: { image_src },
76
+ language: "pt-br",
77
+ productBackViewEnabled: true
78
+ }
79
+ }
80
+
81
+ window.bootstrapEngine(paramsEngine(identifier, material, image_src));
82
+
83
+ if (identifier) window.updateIdentifierOnStore(identifier);
84
+
85
+ window.addEventListener("exportImage", e => {
86
+ download(e.detail.img, material)
87
+ let link = document.createElement("a")
88
+ link.target = "_blank"
89
+ link.href = e.detail.img
90
+ link.click();
91
+ });
92
+
93
+ const s = document.getElementById("material-dev-prisma")
94
+ s.onchange = function (e) {
95
+ material = e.target.value;
96
+ window.bootstrapEngine(paramsEngine(identifier, e.target.value))
97
+ }
98
+
99
+ function download(src, code) {
100
+ fetch(
101
+ "https://factory.gocase.com.br/api/v1/customizr_formatted_structure?material_slug=" + code,
102
+ { method: "get" }
103
+ )
104
+ .then((response) => response.json())
105
+ .then((res) => {
106
+ const image = new Image();
107
+ const mask = new Image();
108
+ image.crossOrigin = "Anonymous";
109
+ mask.crossOrigin = "Anonymous";
110
+
111
+ mask.onload = () => {
112
+ const canvas = document.createElement("canvas");
113
+ canvas.width = mask.width;
114
+ canvas.height = mask.height;
115
+ let ctx = canvas.getContext("2d");
116
+ image.onload = () => {
117
+ ctx.drawImage(mask, 0, 0, canvas.width, canvas.height);
118
+ ctx.globalCompositeOperation = "source-in";
119
+ ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
120
+ var a = document.createElement("a");
121
+ a.setAttribute("download", code + '-' + identifier);
122
+ a.setAttribute("href", canvas.toDataURL("image/png", 1));
123
+ a.click();
124
+ };
125
+ image.src = src;
126
+ return true;
127
+ };
128
+ mask.src = res.mask_data.image;
129
+ return true;
130
+ })
131
+ .catch((error) => Promise.reject(error));
132
+ }</script></html>
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "author": "Djheyson Oliveira <djheyson.oliveira@gocase.com.br",
3
+ "name": "@tech.gocase/prisma",
4
+ "main": "dist/app.js",
5
+ "version": "1.0.0",
6
+ "scripts": {
7
+ "start": "yarn build && serve -s dist",
8
+ "dev": "vue-cli-service serve",
9
+ "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
10
+ "serve_ubuntu": "vue-cli-service serve",
11
+ "build": "vue-cli-service build",
12
+ "test": "vue-cli-service test:unit --coverage",
13
+ "test:unit": "vue-cli-service test:unit",
14
+ "test:e2e": "vue-cli-service test:e2e",
15
+ "lint": "vue-cli-service lint",
16
+ "update:version": "V=\"$(npm view @tech.gocase/prisma version 2>/dev/null || true)\"; if [ -n \"$V\" ]; then npm version \"$V\" --allow-same-version; else echo 'update:version: @tech.gocase/prisma not published yet, keeping local version'; fi",
17
+ "dev-deploy": "git fetch && git stash -u && git checkout dev && git pull && npm run update:version && npm version minor && git push",
18
+ "release:prepare": "git fetch && git stash -u && npm run update:version && npm version minor && npm run build && npm run airbrake && rm -f dist/*.map",
19
+ "deploy": "npm run release:prepare && npm publish --access=public",
20
+ "stg": "vue-cli-service build && firebase deploy -P staging",
21
+ "airbrake": "./scripts/airbrake.sh"
22
+ },
23
+ "dependencies": {
24
+ "@airbrake/browser": "1.4.2",
25
+ "@gocasebr/go-shared": "0.221.0",
26
+ "axios": "0.21.4",
27
+ "core-js": "3.27.2",
28
+ "hammerjs": "2.0.8",
29
+ "vue": "2.7.14",
30
+ "vue-i18n": "8.28.2",
31
+ "vuex": "3.6.2"
32
+ },
33
+ "devDependencies": {
34
+ "@vue/cli-plugin-babel": "^4.5.4",
35
+ "@vue/cli-plugin-e2e-cypress": "^4.5.4",
36
+ "@vue/cli-plugin-eslint": "^4.5.4",
37
+ "@vue/cli-plugin-unit-jest": "^4.5.4",
38
+ "@vue/cli-plugin-vuex": "^4.5.4",
39
+ "@vue/cli-service": "^4.5.4",
40
+ "@vue/eslint-config-prettier": "^6.0.0",
41
+ "@vue/test-utils": "1.0.4",
42
+ "babel-eslint": "^10.1.0",
43
+ "envfile": "^6.13.0",
44
+ "eslint": "^7.7.0",
45
+ "eslint-plugin-prettier": "^3.1.4",
46
+ "eslint-plugin-vue": "^6.2.2",
47
+ "isomorphic-fetch": "^2.2.1",
48
+ "lint-staged": "^10.2.13",
49
+ "prettier": "^2.1.0",
50
+ "sass": "^1.26.10",
51
+ "sass-loader": "^10.0.1",
52
+ "serve": "14.2.3",
53
+ "vue-template-compiler": "2.7.14"
54
+ },
55
+ "gitHooks": {
56
+ "pre-commit": "lint-staged",
57
+ "pre-push": "yarn run lint && yarn run test"
58
+ },
59
+ "lint-staged": {
60
+ "*.{js,vue}": [
61
+ "vue-cli-service lint",
62
+ "git add"
63
+ ]
64
+ },
65
+ "files": [
66
+ "dist/*"
67
+ ],
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/goca-se/prisma.git"
71
+ },
72
+ "engines": {
73
+ "node": "14.17"
74
+ }
75
+ }