(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3eb5bf16"],{"1f16":function(t,e,s){"use strict";s("65ec")},2724:function(t,e,s){"use strict";s("33cb")},"2d41":function(t,e,s){},"33cb":function(t,e,s){},"3dd4":function(t,e){t.exports="data:image/webp;base64,UklGRgYMAABXRUJQVlA4WAoAAAAQAAAA8wAARQAAQUxQSD0JAAABsMfs/+02zWfUSAcROgs8LaxhsYYF2ZqpFndIpGaq2cK4BTVcG9ZMCdeUWZs37tB7U7CQtXlSLxkyUy9cerFGtEXMG57mMS5h8yQLIvCQy7IRtCDMsDoXTun3j/P9/M7JOa7yb0RMALw+b8Nf5j9/Z9sZWER/df8JUasP3750sbT8fZF3tt90TUNE5NOfLY6u+ESO3QMsK4r+9GLoW3X56ArgvA/E+dwrIsnFz+lVaV4AnHVE5NUL/yq7luyVox2Lnl+I3AsgL7IvhCflTVhH5JeLnW8fl98CuErkpSXAiHwM3CVHl+KcMxczv5NjnQDelE/OBvB9kRBO/5/8+Z/yxabFyyUiGQDfEXkEAHpFlnYNHxF146LloBxrB5CTT5c6LhZ5RQzHFynLbPk1gFM/kZ8DOOPGF8XlE4uTB0QuAXCxyOXLf/LS5+L+338/tH39factMv4hbwPAj0Q+kIX87uLiXJFHgMSeo7LA63zXvlI//+Swake5ISLV/Gq/3COy/ZkPZeG3+y4terr1XF0SKfWYfa8sPOOTy0vi04O+K5ChlvOAOO0LDUJpMb3FB2037v6X+PYt382TeKu5SPQ9LHRAjDsW7BtPNcTPx/zWIXoz1GomSJGlxbiGhd4sfj/bZwOkjFZbdNUj5s8u2H98t9Jn60mu5RRImpQNGtMz9rqFWnLcd3f7LE+SLecRzY5pq4Q2xiygLbxQ54jvt/psliRaTnjG0RyEvofYCfiy138v+CsiNNxyENlcLKZj0K0mycKfa/z3tr8SZBYtvl9o1CcP+e+Yv1JkstWNkzJ8utt/cravDpDNitXZ+WWPQp2dnW0LY3V2hhakQLJ++X0AVi7AWWt3lGq1Wq2Yu2uZNk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4WAoAAAAQAAAAHwAABQAAQUxQSF8AAAABcBUAoBnNVgRGWiMjxGIwjs94n4dZDSJCbds2DDWlXIK5l0+sQfOkCIBIguZp8efiYmE3VnBzeTcWz3FFNxaCSWfMyN0secboJuCwx3ygDgyY23xiff2Fg+bp8acxMQBWUDggJAAAALACAJ0BKiAABgA+bSyRRaQioZgEAEAGxLSAAD2QAAD++5zAAA=="},"627d":function(t,e){t.exports="data:image/webp;base64,UklGRrIBAABXRUJQVlA4WAoAAAAQAAAAIQAAIwAAQUxQSB0BAAABkHLb1rFt57Vt27bR+AOszvhGRn9WtBltIxrxNT9zhVvX87FGxASIRGx7ivKnu2JEpO4dNn3XJInvsPG7xP3YfP8c8KAwVnHhA2AOYFiUD2P4N1gDtqnbB8zdANYiVSV+Ak73AjwNVVMwB9Di+BLgaaiK5ncAD0RS3wE8DbU2jHYpUUQq3wE8jbDgeRjt20zRVi4BzKWYiniC9kqg6KfOAcylmCiZQ7vPUYxT5wDmQg0q3gF8GxTTqXMAx/VC1wDW6sVi6hxArs4+gKepYrlUM6NxfQe8DBSFV4A7mkyADlE5DrzV1GpSlQxbiP1f6LZd8xzwSZQOAXSXXEC7S02pxvCtrxo5b+JBpCj2vKK3Nugoyh17brzj5USoWAUAVlA4IG4AAABwBACdASoiACQAPmUokEWkIqGarqwAQAZEtIBmaBr7KQaJiwBKRlm+UhfeYAD++GLFoRfowk/GyKUZscD7+4fja61hDl2+md+NpsyOezB/FA2Tt/gCcoP8HGWnelSBL/gF5iejW9nwLtowUtsQAA=="},6443:function(t,e,s){},"65ec":function(t,e,s){},7184:function(t,e){t.exports="data:image/webp;base64,UklGRpIEAABXRUJQVlA4WAoAAAAQAAAANQAAPQAAQUxQSAsCAAABkC1JtmlbfXxt27bte59s27Zt27Zt27Ztbh27L+Zae68xfyAiJgCeLTLnYZBjeUrIzn6cyrd5AyRVsjNiS9P8a0nyTCkx5YJ4NTvi7qQyqr2Q7DYe9IfPYfLiHS7uHx5dXYTvbd6PB8w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X+CyuP/X8Lg2OjoTv57TkYuD6/Kc6RruiBjIwMAnUrtvH569PLqC86GI8/Y26UfV1s4Mkz2+ksA5VghX/WiRlE4QrnjX4AB0JFTj8NZQoT66y7dQUVgY3mQPSw1sPPngaA9HsNc1+nBudswzyPUG1zVQjodk6dlWV/TE4F93h1T98dQI4gpBYNEjVyEgWaJOSEI5pR5TmyNZIVbd51wRmfwBAyR1yY+k5APBw4Qc8ZF+pymCIMLJY5DWH26naVmOMVloTYXaTnVCLV0P5pal7uA+rkBZYicC0mXqMDEH8KemJa+77fbHQMxCVEugAA="},"72d8":function(t,e,s){"use strict";var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"stores-add-cards"},[t.app?t._e():o("div",{staticClass:"stores-add-card"},[o("img",{staticClass:"stores-add-img",attrs:{src:s("3dd4"),alt:"add store"}}),o("div",{staticClass:"stores-add-text"},[t._v("Support API")]),o("el-button",{staticClass:"stores-add-button",attrs:{type:"primary"},on:{click:t.showConnectShopifyFn}},[t._v("Add")])],1),o("div",{staticClass:"stores-add-card"},[o("img",{staticClass:"stores-add-img",attrs:{src:s("f900"),alt:"add store"}}),o("div",{staticClass:"stores-add-text"},[t._v("Support API")]),o("div",{staticClass:"stores-add-sub-text"},[t._v(" The term 'Etsy' is a trademark of Etsy, Inc. This application uses the Etsy API but is not endorsed or certified by Etsy, Inc. ")]),o("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.connectEtsyBtnLoading,expression:"connectEtsyBtnLoading"}],staticClass:"stores-add-button",staticStyle:{"margin-top":"0"},attrs:{type:"primary"},on:{click:t.toConnectEtsy}},[t._v("Add")])],1),o("div",{staticClass:"stores-add-card"},[o("img",{staticClass:"stores-add-img",attrs:{src:s("787d"),alt:"add store"}}),o("div",{staticClass:"stores-add-text"},[t._v("Support API")]),o("el-button",{staticClass:"stores-add-button",attrs:{type:"primary"},on:{click:t.toConnectWoo}},[t._v("Add")])],1)]),o("ConnectShopify",{attrs:{"shop-id":t.shopId},model:{value:t.showConnectShopify,callback:function(e){t.showConnectShopify=e},expression:"showConnectShopify"}}),o("ConnectWoo",{attrs:{"shop-id":t.shopId},model:{value:t.showConnectWoo,callback:function(e){t.showConnectWoo=e},expression:"showConnectWoo"}})],1)},i=[],a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close},nativeOn:{submit:function(e){return e.preventDefault(),t.save("storeForm")}}},[o("div",{staticClass:"store-form"},[o("img",{staticClass:"store-log",attrs:{src:s("7184"),alt:"store logo"}}),o("div",{staticClass:"store-title"},[t._v("Connect Shopify")]),o("div",{staticClass:"store-sub-title"},[t._v("Add your Shopify store URL to connect with Artshiney")]),o("el-form",{ref:"storeForm",attrs:{model:t.storeForm,rules:t.storeRules,"label-width":"100px","label-position":"top"}},[o("el-form-item",{attrs:{prop:"shopifyDomainName"}},[o("el-input",{model:{value:t.storeForm.shopifyDomainName,callback:function(e){t.$set(t.storeForm,"shopifyDomainName",e)},expression:"storeForm.shopifyDomainName"}})],1),o("el-form-item",{staticClass:"form-button"},[o("el-button",{on:{click:t.close}},[t._v("Back")]),o("el-button",{attrs:{type:"primary",loading:t.saveLoading},on:{click:function(e){return t.save("storeForm")}}},[t._v("Connect")])],1)],1)],1)])},n=[],r=s("35f2"),l={name:"ConnectShopify",props:{value:{type:Boolean,default:!1},shopId:{type:Number,default:null},shopUrl:{type:String,default:null}},data(){return{dialogVisible:!1,storeForm:{shopifyDomainName:""},storeRules:{shopifyDomainName:[{required:!0,message:"Please fill shopifyDomainName",trigger:"blur"}]},saveLoading:!1}},watch:{value(t){this.dialogVisible=t},dialogVisible(t){this.$emit("input",t)},shopUrl(t){this.storeForm.shopifyDomainName=t}},methods:{close(){this.dialogVisible=!1},save(t){this.$refs[t].validate(async t=>{if(!t)return;this.saveLoading=!0;const e=Object.assign({},this.storeForm);e.shopId=this.shopId;try{const t=await Object(r["b"])(e);window.open(t.data.redirectUrl,"_blank"),this.dialogVisible=!1}finally{this.saveLoading=!1}})}}},c=l,d=(s("2724"),s("2877")),u=Object(d["a"])(c,a,n,!1,null,"ef2d2e18",null),m=u.exports,p=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close},nativeOn:{submit:function(e){return e.preventDefault(),t.save("storeForm")}}},[o("div",{staticClass:"store-form"},[o("img",{staticClass:"store-log",attrs:{src:s("787d"),alt:"store logo"}}),o("div",{staticClass:"store-title"},[t._v("Connect Woocommerce")]),o("div",{staticClass:"store-sub-title"},[t._v("Add your Woocommerce store URL to connect with Artshiney")]),o("el-form",{ref:"storeForm",attrs:{model:t.storeForm,rules:t.storeRules,"label-width":"100px","label-position":"top"}},[o("el-form-item",{attrs:{prop:"url"}},[o("el-input",{model:{value:t.storeForm.url,callback:function(e){t.$set(t.storeForm,"url",e)},expression:"storeForm.url"}})],1),o("el-form-item",{staticClass:"form-button"},[o("el-button",{on:{click:t.close}},[t._v("Back")]),o("el-button",{attrs:{type:"primary",loading:t.saveLoading},on:{click:function(e){return t.save("storeForm")}}},[t._v("Connect")])],1)],1)],1)])},h=[],A={name:"ConnectWoo",props:{value:{type:Boolean,default:!1},shopId:{type:Number,default:null},shopUrl:{type:String,default:null}},data(){return{dialogVisible:!1,storeForm:{url:""},storeRules:{url:[{required:!0,message:"Please fill url",trigger:"blur"}]},saveLoading:!1}},watch:{value(t){this.dialogVisible=t},dialogVisible(t){this.$emit("input",t)},shopUrl(t){this.storeForm.url=t}},methods:{close(){this.dialogVisible=!1},save(t){this.$refs[t].validate(async t=>{if(!t)return;this.saveLoading=!0;const e=Object.assign({},this.storeForm);e.shopId=this.shopId;try{const t=await Object(r["j"])(e);window.open(t.data.redirectUrl,"_blank"),this.dialogVisible=!1}finally{this.saveLoading=!1}})}}},v=A,f=(s("1f16"),Object(d["a"])(v,p,h,!1,null,"055efc69",null)),b=f.exports,g=s("2f62"),y={name:"Connect",components:{ConnectShopify:m,ConnectWoo:b},props:{shopId:{type:Number,default:null}},data(){return{showConnectShopify:!1,connectEtsyBtnLoading:!1,showConnectWoo:!1,etsyCallbackUrl:"https://www.artshiney.com/etsy/install"}},computed:{...Object(g["b"])("user",{currentShop:"getCurrentShop"}),...Object(g["b"])("shopify",{app:"getApp"})},methods:{showConnectShopifyFn(){this.showConnectShopify=!0},async toConnectEtsy(){try{this.connectEtsyBtnLoading=!0;var t=await Object(r["d"])({callbackUrl:this.etsyCallbackUrl});200===t.code?window.open(t.data,"_blank"):this.$message.error(t.msg)}finally{this.connectEtsyBtnLoading=!1}},toConnectWoo(){this.showConnectWoo=!0}}},C=y,w=(s("ee44"),Object(d["a"])(C,o,i,!1,null,"20c38dc0",null));e["a"]=w.exports},"787d":function(t,e,s){t.exports=s.p+"static/img/woo.83c72012.svg"},"7a97":function(t,e,s){t.exports=s.p+"static/img/empty.74e11ed5.webp"},"9a7f":function(t,e,s){t.exports=s.p+"static/img/info-icon.4d73c4f7.svg"},af01:function(t,e,s){},bda2:function(t,e,s){t.exports=s.p+"static/img/stores-name-img.7203cbdd.webp"},c0e7:function(t,e,s){"use strict";s("af01")},dc1b:function(t,e,s){"use strict";s("2d41")},e4a7:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"stores-page"},[o("Connect"),o("div",{staticClass:"stores-content"},[o("div",{staticClass:"stores-title"},[t._v("My Stores")]),t.storesList.length?[o("div",{staticClass:"stores-list"},t._l(t.storesList,(function(e,i){return o("div",{key:e.shopId,staticClass:"stores-item"},[o("div",{staticClass:"stores-item-check-box",on:{click:function(s){!e.active&&t.selectStores(e.shopId)}}},[o("i",{class:["stores-item-check",e.active?"el-icon-check active":"div-hover"]})]),o("div",{staticClass:"stores-item-img-box"},[o("img",{staticClass:"stores-item-img",attrs:{src:t._f("shopIcon")(e),alt:"store logo"}})]),o("div",{staticClass:"stores-item-num-box"},[o("div",{staticClass:"stores-item-num"},[t._v(t._s(e.name))]),o("div",{staticClass:"stores-item-sub-title"},[t._v("Automatic,24h")])]),o("div",{staticClass:"stores-item-num-box",staticStyle:{"align-items":"center"}},[o("div",{staticClass:"stores-item-num"},[t._v(t._s(e.orderNum))]),o("div",{staticClass:"stores-item-sub-title"},[t._v("Orders")])]),o("div",{staticClass:"stores-item-num-box",staticStyle:{"align-items":"center"}},[o("div",{staticClass:"stores-item-num"},[t._v(t._s(e.productNum))]),o("div",{staticClass:"stores-item-sub-title"},[t._v("Products")])]),o("div",{staticClass:"stores-item-expire-box"},[5===e.type?o("div",{staticClass:"item-inner-box",style:{marginRight:e.expired?"15px":""}},[o("div",{staticClass:"item-inner-text",style:{color:e.expired?"red":"black",width:e.expired?"214px":"165px",marginRight:e.expired?"":"15px"}},[t._v(" "+t._s(e.expireText)+" ")]),o("ElPopover",{attrs:{placement:"bottom",trigger:"hover"}},[o("div",{staticClass:"tool-tip-box"},[o("div",{staticClass:"tool-tip-title"},[t._v(" Etsy officially requires re-authorization every 90 days. ")]),o("div",{staticClass:"tool-tip-content"},[t._v(" Once the authorization expires, please re- authorize ")]),o("div",{staticClass:"tool-tip-content"},[t._v(" as soon as possible to avoid affecting order receipt ")])]),o("img",{staticClass:"item-inner-icon",attrs:{slot:"reference",alt:"question-icon",src:s("9a7f")},slot:"reference"})])],1):t._e()]),o("div",{staticClass:"stores-item-visit"},[e.isConnect?o("el-button",{on:{click:function(s){return t.toUrl(e.url)}}},[t._v("Visit store")]):o("el-button",{attrs:{loading:t.connectLoading},on:{click:function(s){return t.connect(e)}}},[t._v("Connect")])],1),o("div",{staticClass:"stores-item-num-tool-box",on:{click:function(s){return t.showSetStoreNameFn(e.shopId)}}},[o("img",{staticClass:"stores-item-num-tool div-hover",attrs:{src:s("627d"),alt:"setting icon"}})]),o("div",{staticClass:"stores-item-num-tool-box",on:{click:function(e){return t.showToolFn(i)}}},[o("img",{staticClass:"stores-item-num-tool div-hover",attrs:{src:s("60fc"),alt:"more icon"}}),o("div",{directives:[{name:"show",rawName:"v-show",value:t.showTool&&t.showToolIndex===i,expression:"showTool && showToolIndex === index"}],staticClass:"tool-marks"}),o("transition",{attrs:{name:"el-zoom-in-top"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.showTool&&t.showToolIndex===i,expression:"showTool && showToolIndex === index"}],staticClass:"show-tool"},[o("div",{class:["show-tool-item","div-hover",{"no-click":2===e.type||!e.isConnect}],on:{click:function(s){e.type!==t.enums.shopTypeEnum.GENERAL.value&&e.isConnect&&t.disconnectStore(e.shopId)}}},[t._v("Disconnect")]),o("div",{class:["show-tool-item","div-hover",{"no-click":e.type===t.enums.shopTypeEnum.GENERAL.value||e.shopId===t.currentShop.shopId}],on:{click:function(s){e.type!==t.enums.shopTypeEnum.GENERAL.value&&e.shopId!==t.currentShop.shopId&&t.removeStore(e.shopId)}}},[t._v("Delete")])])])],1)])})),0)]:[o("el-empty",{staticStyle:{margin:"0 auto"},attrs:{image:s("7a97"),"image-size":300,description:"No store added yet"}})]],2),o("SetStoreName",{attrs:{"shop-id":t.selectShopId},model:{value:t.showSetStoreName,callback:function(e){t.showSetStoreName=e},expression:"showSetStoreName"}})],1)},i=[],a=s("35f2"),n=s("2f62"),r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close},nativeOn:{submit:function(e){return e.preventDefault(),t.save("storeForm")}}},[o("div",{staticClass:"store-form"},[o("img",{staticClass:"store-log",attrs:{src:s("bda2"),alt:"logo"}}),o("div",{staticClass:"store-right"},[o("div",{staticClass:"store-title"},[t._v("Store name")]),o("div",{staticClass:"store-sub-title"},[t._v("Your store name will be shown on the ship from field on shipping labels")]),o("el-form",{ref:"storeForm",attrs:{model:t.storeForm,rules:t.storeRules,"label-width":"100px","label-position":"top"}},[o("el-form-item",{attrs:{label:"Type in your store name",prop:"shopName"}},[o("el-input",{model:{value:t.storeForm.shopName,callback:function(e){t.$set(t.storeForm,"shopName",e)},expression:"storeForm.shopName"}})],1),o("el-form-item",{staticClass:"form-button"},[o("el-button",{on:{click:t.close}},[t._v("Back")]),o("el-button",{attrs:{type:"primary",loading:t.saveLoading},on:{click:function(e){return t.save("storeForm")}}},[t._v("Connect")])],1)],1)],1)])])},l=[],c={name:"SetStoreName",props:{value:{type:Boolean,default:!1},shopId:{type:Number,default:null}},inject:["reload"],data(){return{dialogVisible:!1,storeForm:{},storeRules:{shopName:[{required:!0,message:"Please fill shopName",trigger:"blur"}]},saveLoading:!1}},watch:{value(t){this.dialogVisible=t},dialogVisible(t){this.$emit("input",t)}},methods:{close(){this.dialogVisible=!1},save(t){this.$refs[t].validate(async t=>{if(!t)return;this.saveLoading=!0;const e=Object.assign({},this.storeForm);e.shopId=this.shopId;try{await Object(a["g"])(e),this.$message.success("Save success"),setTimeout(()=>{this.reload()},500)}finally{this.saveLoading=!1}})}}},d=c,u=(s("c0e7"),s("2877")),m=Object(u["a"])(d,r,l,!1,null,"28e0b133",null),p=m.exports,h=s("72d8"),A=s("e661"),v={name:"SetUpStores",components:{SetStoreName:p,Connect:h["a"]},filters:{shopIcon(t){return t.isConnect?t.type===A["a"].SHOPIFY.value?s("337c"):t.type===A["a"].ETSY.value?s("2582"):t.type===A["a"].WOOCOMMERCE.value?s("8f2b"):s("a129"):s("a129")}},data(){return{authExpired:"Authorization Expiration",storesList:[],selectShopId:null,selectShopUrl:null,showSetStoreName:!1,showTool:!1,showToolIndex:0,connectLoading:!1,enums:{shopTypeEnum:A["a"]}}},inject:["reload"],computed:{...Object(n["b"])("user",{currentShop:"getCurrentShop"}),...Object(n["b"])("shopify",{app:"getApp"})},mounted(){this.$nextTick(()=>{this.getStoresList()})},methods:{async getStoresList(){const t=await Object(a["e"])(),e=(new Date).getTime();this.storesList=t.data.records.map(t=>{var s;return(null===t||void 0===t?void 0:t.shopId)===(null===(s=this.currentShop)||void 0===s?void 0:s.shopId)&&(t.active=!0),5===t.type&&(t.authExpireAt?(t.expireText=this.formatAuthDate(e,t.authExpireAt),t.expired=t.expireText===this.authExpired):(t.expired=!0,t.expireText=this.authExpired)),t})},formatAuthDate(t,e){const s=Math.abs(t-e);if(s<1e3)return this.authExpired;let o=Math.floor(s/864e5);return o=o<1?1:o,"Authorization validity period: "+o+" days"},async connect(t){this.callNewPage("/SetUp/stores/reconnect/"+t.shopId)},showSetStoreNameFn(t){this.selectShopId=t,this.showSetStoreName=!0},showToolFn(t){this.showToolIndex=t,this.showTool=!this.showTool},disconnectStore(t){const e="Artshiney account won’t receive incoming orders for published products in your store.
You won’t be able to update products in your store from your Printify account.",s="Disconnect Your store?";this.$confirm(e,s,{confirmButtonText:"Disconnect",cancelButtonText:"Cancel",dangerouslyUseHTMLString:!0}).then(async()=>{await Object(a["c"])({shopId:t}),this.getStoresList(),this.$message({type:"success",message:"success!"})}).catch(()=>{this.$message({type:"info",message:"cancel"})})},removeStore(t){const e='This will irreversibly remove your store with all its products, orders and settings from Artshiney account.
Please note: If deleted, any existing orders will still be fulfilled.',s="Delete store from Artshiney?";this.$confirm(e,s,{confirmButtonText:"Yes, delete",cancelButtonText:"No, cancel",dangerouslyUseHTMLString:!0}).then(async()=>{await Object(a["f"])({shopId:t}),this.getStoresList(),this.$message({type:"success",message:"success!"})}).catch(()=>{this.$message({type:"info",message:"cancel"})})},async selectStores(t){await Object(a["a"])({shopId:t}),this.reload()},toUrl(t){window.open(t,"_blank")}}},f=v,b=(s("dc1b"),Object(u["a"])(f,o,i,!1,null,"a87536c8",null));e["default"]=b.exports},ee44:function(t,e,s){"use strict";s("6443")},f900:function(t,e,s){t.exports=s.p+"static/img/etsy.6adb84bf.svg"}}]);