pages-user-draw-draw.6d41d8d7.js 116 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-draw-draw","pages-user-commission-apply~pages-user-public-agreement"],{"0007":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d3b7"),n("c975"),n("ac1f"),n("5319");var r=i(n("c7eb")),a=i(n("1da1")),s=i(n("5530")),o=n("26cb"),c={data:function(){return{tobheight:45,platform:this.$platform.get(),isLoading:!0,drawList:[],showPoster:!1,posterheight:"",qrcode:"",posterObj:{},subsectionlist:["第1张图片","第2张图片","第3张图片"],current:0}},computed:(0,s.default)({},(0,o.mapGetters)(["appInfo","userInfo","isLogin"])),onLoad:function(){if("wxMiniProgram"==this.platform){var t=uni.getMenuButtonBoundingClientRect().top-uni.getSystemInfoSync().statusBarHeight,e=uni.getSystemInfoSync().statusBarHeight+t;this.tobheight=t+e+uni.getMenuButtonBoundingClientRect().height}this.posterheight=uni.$u.sys().windowHeight-this.tobheight,this.commonqrcodePath()},methods:{queryList:function(t,e){var n=this,i={page:t,limit:e};this.$http("gallery.list",i).then((function(t){0==t.code&&(uni.setNavigationBarTitle({title:n.appInfo.site_name}),n.$refs.paging.complete(t.data.data),n.isLoading=!1)}))},commonqrcodePath:function(){var t=this,e=this.userInfo.id+".1.0."+this.spmplatform+".1";this.$http("common.qrcodePath",{spm:e}).then((function(e){0==e.code&&(t.qrcode=e.data)}))},getdownload:function(t,e){return new Promise((function(n,i){uni.request({url:t,method:"GET",responseType:"arraybuffer",success:function(t){var e=wx.arrayBufferToBase64(t.data);e="data:image/jpeg;base64,"+e,n(e)},fail:function(t){n(1==e?"/static/images/head.jpg":"/static/images/open.png")}})}))},toSave:function(){var t=this;uni.showLoading({title:"海报生成中"}),this.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(e){t.showPoster=!1,uni.hideLoading(),uni.showModal({confirmColor:"#26B3A0",confirmText:"查看图片",title:"提示",content:"查看图片后长按图片即可保存或分享",success:function(t){t.confirm?uni.previewImage({urls:[e.tempFilePath]}):t.cancel&&(this.showPoster=!0)}})}})},posterSuccess:function(){uni.hideLoading()},tnproduct:function(t,e){uni.navigateTo({url:"sd"==e?"/pages/painting/details?urls="+t:"/pages/painting/generate?urls="+t})},createPoster:function(t,e){var n=this;return(0,a.default)((0,r.default)().mark((function i(){var a,s,o,c,h;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=n,s="",o="",uni.showLoading({title:"海报渲染中"}),c="sd"==a.drawList[t].engine?"StableDiffusion绘图":"MidJourney绘图",!a.userInfo.avatar){i.next=11;break}return i.next=8,n.getdownload(a.userInfo.avatar,1);case 8:i.t0=i.sent,i.next=12;break;case 11:i.t0="/static/images/head.jpg";case 12:if(h=i.t0,!(a.appInfo.site_logo_path.indexOf("https")<0)){i.next=24;break}if(!a.appInfo.site_logo_path){i.next=20;break}return i.next=17,a.getdownload(a.appInfo.site_logo_path.replace("http:","https:"),2);case 17:i.t1=i.sent,i.next=21;break;case 20:i.t1="/static/images/open.png";case 21:o=i.t1,i.next=32;break;case 24:if(!a.appInfo.site_logo_path){i.next=30;break}return i.next=27,a.getdownload(a.appInfo.site_logo_path,2);case 27:i.t2=i.sent,i.next=31;break;case 30:i.t2="/static/images/open.png";case 31:o=i.t2;case 32:if(!(a.drawList[t].imgs_file[e].indexOf("https")<0)){i.next=38;break}return i.next=35,a.getdownload(a.drawList[t].imgs_file[e].replace("http:","https:"),2);case 35:s=i.sent,i.next=41;break;case 38:return i.next=40,a.getdownload(a.drawList[t].imgs_file[e],2);case 40:s=i.sent;case 41:if("/static/images/open.png"!=s){i.next=45;break}return uni.hideLoading(),uni.showToast({title:"生成失败",icon:"none"}),i.abrupt("return");case 45:a.posterObj={width:uni.$u.sys().windowWidth+"px",background:"linear-gradient(to right, #00ca88 0%, #00BCD4 100%)",css:{width:uni.$u.sys().windowWidth+"px"},views:[{type:"view",css:{marginTop:"20rpx",paddingLeft:"10rpx",display:"flex"},views:[{type:"image",src:h,css:{marginTop:"10rpx",marginLeft:"20rpx",borderRadius:"16rpx",width:"80rpx",height:"80rpx",border:"2rpx solid #fff",objectFit:"cover"}},{type:"view",css:{marginTop:"10rpx",marginLeft:"20rpx"},views:[{type:"view",views:[{type:"text",text:n.userInfo.nickname?n.userInfo.nickname:"提问者",css:{marginTop:"10rpx",fontSize:"28rpx",fontWeight:"bold",color:"#32324A",lineHeight:"28rpx"}}]},{type:"view",views:[{type:"text",text:"绘图描述词📝",css:{marginTop:"15rpx",fontSize:"20rpx",color:"#fff",lineHeight:"25rpx"}}]}]}]},{type:"view",css:{marginTop:"20rpx",width:uni.$u.sys().windowWidth-48+"px",padding:"15rpx",background:"#fff",borderRadius:"16rpx",marginLeft:"30rpx"},views:[{type:"text",text:a.drawList[t].prompt,css:{fontSize:"28rpx",color:"#000",width:uni.$u.sys().windowWidth-48+"px"}}]},{type:"view",css:{marginTop:"20rpx",paddingLeft:"10rpx",display:"flex"},views:[{type:"image",src:o,css:{marginTop:"10rpx",marginLeft:"20rpx",borderRadius:"16rpx",width:"80rpx",height:"80rpx",border:"2rpx solid #fff",objectFit:"cover"}},{type:"view",css:{marginTop:"10rpx",marginLeft:"20rpx"},views:[{type:"view",views:[{type:"text",text:n.appInfo.site_name?n.appInfo.site_name:"AI智能问答机器人",css:{marginTop:"10rpx",fontSize:"28rpx",fontWeight:"bold",color:"#32324A",lineHeight:"28rpx"}}]},{type:"view",views:[{type:"text",text:c+"结果📝",css:{marginTop:"15rpx",fontSize:"20rpx",color:"#fff",lineHeight:"25rpx"}}]}]}]},{type:"image",src:s,css:{marginTop:"20rpx",width:uni.$u.sys().windowWidth-32+"px",objectFit:"contain",borderRadius:"16rpx",marginLeft:"30rpx"}},{type:"view",css:{marginTop:"30rpx",width:"100%",textAlign:"center"},views:[{type:"qrcode",text:n.qrcode,css:{width:"200rpx",height:"200rpx",borderRadius:"16rpx"}}]},{type:"text",text:"———— 长按识别 | 欢迎使用 ————",css:{marginTop:"20rpx",marginBottom:"20rpx",width:"100%",textAlign:"center",fontSize:"24rpx",color:"#fff",lineHeight:"33rpx"}}]},n.showPoster=!0;case 46:case"end":return i.stop()}}),i)})))()},preview:function(t){1==this.drawList[t].done&&1==this.drawList[t].status&&uni.previewImage({urls:this.drawList[t].imgs_file,current:0})},gallerydel:function(t){var e=this;uni.showModal({confirmText:"删除",content:"是否删除此绘画记录",title:"提示",confirmColor:"#26B3A0",success:function(n){n.confirm&&e.$http("gallery.del",{id:e.drawList[t].id}).then((function(t){0==t.code?(uni.showToast({title:"删除成功"}),e.$refs.paging.reload(!0)):uni.showToast({title:"删除失败",icon:"none"})}))}})}}};e.default=c},"0543":function(t,e,n){"use strict";e["a"]=function(t){(t.options.wxs||(t.options.wxs={}))["handler"]=function(t){var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};return t.exports={use:function(t){return!e[t.name]&&-1==(t.attrs.style||"").indexOf("display:inline")&&!t.c}},t.exports}({exports:{}})}},"0659":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,"\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/* 根节点样式 */._root[data-v-55ff4e76]{overflow:auto;-webkit-overflow-scrolling:touch}\r\n/* 长按复制 */._select[data-v-55ff4e76]{-webkit-user-select:text;user-select:text}\r\n",""]),t.exports=e},"0cfa":function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("a9e3");var i={props:{board:Object,pathType:String,fileType:{type:String,default:"png"},quality:{type:Number,default:1},css:[String,Object],width:[Number,String],height:[Number,String],pixelRatio:Number,customStyle:String,isCanvasToTempFilePath:Boolean,sleep:{type:Number,default:1e3/30},beforeDelay:{type:Number,default:100},afterDelay:{type:Number,default:100},useCORS:Boolean}};e.default=i},1976:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{class:"_"+t.name+" "+t.attrs.class,style:t.attrs.style,attrs:{id:t.attrs.id}},[t._l(t.childs,(function(e,i){return["img"==e.name&&(t.opts[1]&&!t.ctrl[i]||t.ctrl[i]<0)?n("v-uni-image",{key:i+"_0",staticClass:"_img",style:e.attrs.style,attrs:{src:t.ctrl[i]<0?t.opts[2]:t.opts[1],mode:"widthFix"}}):t._e(),"img"==e.name?n("img",{key:i+"_1",class:"_img "+e.attrs.class,style:(-1==t.ctrl[i]?"display:none;":"")+e.attrs.style,attrs:{id:e.attrs.id,src:e.attrs.src||(t.ctrl.load?e.attrs["data-src"]:""),"data-i":i},on:{load:function(e){arguments[0]=e=t.$handleEvent(e),t.imgLoad.apply(void 0,arguments)},error:function(e){arguments[0]=e=t.$handleEvent(e),t.mediaError.apply(void 0,arguments)},longpress:function(e){arguments[0]=e=t.$handleEvent(e),t.imgLongTap.apply(void 0,arguments)},click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.imgTap.apply(void 0,arguments)}}}):"text"==e.type?n("v-uni-text",{attrs:{decode:!0}},[t._v(t._s(e.text))]):"br"==e.name?n("v-uni-text",[t._v("\\n")]):"a"==e.name?n("v-uni-view",{class:(e.attrs.href?"_a ":"")+e.attrs.class,style:"display:inline;"+e.attrs.style,attrs:{id:e.attrs.id,"hover-class":"_hover","data-i":i},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.linkTap.apply(void 0,arguments)}}},[n("node",{staticStyle:{display:"inherit"},attrs:{name:"span",childs:e.children,opts:t.opts}})],1):"video"==e.name?n("v-uni-video",{class:e.attrs.class,style:e.attrs.style,attrs:{id:e.attrs.id,autoplay:e.attrs.autoplay,controls:e.attrs.controls,loop:e.attrs.loop,muted:e.attrs.muted,poster:e.attrs.poster,src:e.src[t.ctrl[i]||0],"data-i":i},on:{play:function(e){arguments[0]=e=t.$handleEvent(e),t.play.apply(void 0,arguments)},error:function(e){arguments[0]=e=t.$handleEvent(e),t.mediaError.apply(void 0,arguments)}}}):"iframe"==e.name?n("iframe",{style:e.attrs.style,attrs:{allowfullscreen:e.attrs.allowfullscreen,frameborder:e.attrs.frameborder,src:e.attrs.src}}):"embed"==e.name?n("embed",{style:e.attrs.style,attrs:{src:e.attrs.src}}):"audio"==e.name?n("v-uni-audio",{class:e.attrs.class,style:e.attrs.style,attrs:{id:e.attrs.id,author:e.attrs.author,controls:e.attrs.controls,loop:e.attrs.loop,name:e.attrs.name,poster:e.attrs.poster,src:e.src[t.ctrl[i]||0],"data-i":i},on:{play:function(e){arguments[0]=e=t.$handleEvent(e),t.play.apply(void 0,arguments)},error:function(e){arguments[0]=e=t.$handleEvent(e),t.mediaError.apply(void 0,arguments)}}}):"table"==e.name&&e.c||"li"==e.name?n("v-uni-view",{class:"_"+e.name+" "+e.attrs.class,style:e.attrs.style,attrs:{id:e.attrs.id}},["li"==e.name?n("node",{attrs:{childs:e.children,opts:t.opts}}):t._l(e.children,(function(e,i){return n("v-uni-view",{key:i,class:"_"+e.name+" "+e.attrs.class,style:e.attrs.style},["td"==e.name||"th"==e.name?n("node",{attrs:{childs:e.children,opts:t.opts}}):t._l(e.children,(function(e,i){return["td"==e.name||"th"==e.name?n("v-uni-view",{key:i+"_0",class:"_"+e.name+" "+e.attrs.class,style:e.attrs.style},[n("node",{attrs:{childs:e.children,opts:t.opts}})],1):n("v-uni-view",{class:"_"+e.name+" "+e.attrs.class,style:e.attrs.style},t._l(e.children,(function(e,i){return n("v-uni-view",{key:i,class:"_"+e.name+" "+e.attrs.class,style:e.attrs.style},[n("node",{attrs:{childs:e.children,opts:t.opts}})],1)})),1)]}))],2)}))],2):t.handler.use(e)?n("v-uni-rich-text",{style:e.f,attrs:{id:e.attrs.id,nodes:[e]}}):2==e.c?n("v-uni-view",{class:"_"+e.name+" "+e.attrs.class,style:e.f+";"+e.attrs.style,attrs:{id:e.attrs.id}},t._l(e.children,(function(e,i){return n("node",{key:i,style:e.f,attrs:{name:e.name,attrs:e.attrs,childs:e.children,opts:t.opts}})})),1):n("node",{style:e.f,attrs:{name:e.name,attrs:e.attrs,childs:e.children,opts:t.opts}})]}))],2)},r=[]},"231a":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("c7eb")),a=i(n("1da1"));n("99af"),n("b64b"),n("e9c4"),n("d3b7"),n("ac1f"),n("d9e2"),n("d401"),n("5319");var s=n("b9a8"),o=i(n("0cfa")),c=n("8cfe"),h=i(n("a626")),l={name:"lime-painter",mixins:[o.default,(0,s.parent)("painter"),{}],data:function(){return{use2dCanvas:!1,canvasHeight:150,canvasWidth:null,parentWidth:0,inited:!1,progress:0,firstRender:0,done:!1}},computed:{styles:function(){return"".concat(this.size).concat(this.customStyle||"",";")},canvasId:function(){return"l-painter".concat(this._uid||this._.uid)},size:function(){if(this.boardWidth&&this.boardHeight)return"width:".concat(this.boardWidth,"px; height: ").concat(this.boardHeight,"px;")},dpr:function(){return this.pixelRatio||uni.getSystemInfoSync().pixelRatio},boardWidth:function(){var t=this.elements&&this.elements.css||this.elements||this,e=t.width,n=void 0===e?0:e,i=(0,c.toPx)(n||this.width);return i||Math.max(i,(0,c.toPx)(this.canvasWidth))},boardHeight:function(){var t=this.elements&&this.elements.css||this.elements||this,e=t.height,n=void 0===e?0:e,i=(0,c.toPx)(n||this.height);return i||Math.max(i,(0,c.toPx)(this.canvasHeight))},hasBoard:function(){return this.board&&Object.keys(this.board).length},elements:function(){return this.hasBoard?this.board:JSON.parse(JSON.stringify(this.el))}},watch:{},created:function(){var t=uni.getSystemInfoSync();t.SDKVersion,t.version,t.platform},mounted:function(){var t=this;return(0,a.default)((0,r.default)().mark((function e(){return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,c.sleep)(30);case 2:return e.next=4,t.getParentWeith();case 4:t.$nextTick((function(){setTimeout((function(){t.$watch("elements",t.watchRender,{deep:!0,immediate:!0})}),30)}));case 5:case"end":return e.stop()}}),e)})))()},methods:{watchRender:function(t,e){var n=this;return(0,a.default)((0,r.default)().mark((function i(){return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(t&&t.views&&(n.firstRender?n.firstRender:t.views.length)&&Object.keys(t).length&&JSON.stringify(t)!=JSON.stringify(e)){i.next=2;break}return i.abrupt("return");case 2:n.firstRender=1,clearTimeout(n.rendertimer),n.rendertimer=setTimeout((function(){n.render(t)}),n.beforeDelay);case 5:case"end":return i.stop()}}),i)})))()},setFilePath:function(t,e){var n=this;return(0,a.default)((0,r.default)().mark((function i(){var a,s,o,h;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=t,s=e||n,o=s.pathType,h=void 0===o?n.pathType:o,"base64"!=h||(0,c.isBase64)(t)){i.next=8;break}return i.next=5,(0,c.pathToBase64)(t);case 5:a=i.sent,i.next=12;break;case 8:if("url"!=h||!(0,c.isBase64)(t)){i.next=12;break}return i.next=11,(0,c.base64ToPath)(t);case 11:a=i.sent;case 12:return e&&e.isEmit&&n.$emit("success",a),i.abrupt("return",a);case 14:case"end":return i.stop()}}),i)})))()},getSize:function(t){var e=this;return(0,a.default)((0,r.default)().mark((function n(){var i,a,s,o;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.css||t,a=i.width,s=t.css||t,o=s.height,e.size){n.next=12;break}if(!a&&!o){n.next=10;break}return e.canvasWidth=a||e.canvasWidth,e.canvasHeight=o||e.canvasHeight,n.next=8,(0,c.sleep)(30);case 8:n.next=12;break;case 10:return n.next=12,e.getParentWeith();case 12:case"end":return n.stop()}}),n)})))()},canvasToTempFilePathSync:function(t){var e=this;this.stopWatch=this.$watch("done",(function(n){n&&(e.canvasToTempFilePath(t),e.stopWatch&&e.stopWatch())}),{immediate:!0})},getParentWeith:function(){var t=this;return new Promise((function(e){uni.createSelectorQuery().in(t).select(".lime-painter").boundingClientRect().exec((function(n){var i=n[0]||{},r=i.width,a=i.height;t.parentWidth=Math.ceil(r||0),t.canvasWidth=t.parentWidth||300,t.canvasHeight=a||t.canvasHeight||150,e(n[0])}))}))},render:function(){var t=arguments,e=this;return(0,a.default)((0,r.default)().mark((function n(){var i,a,s,o,l,d,u,f,p,g,v,m,b,y;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.length>0&&void 0!==t[0]?t[0]:{},Object.keys(i).length){n.next=3;break}return n.abrupt("return",console.error("空对象"));case 3:return e.progress=0,e.done=!1,n.next=7,e.getSize(i);case 7:return n.next=9,e.getContext();case 9:if(a=n.sent,s=e.use2dCanvas,o=e.boardWidth,l=e.boardHeight,d=e.canvas,u=e.afterDelay,!s||d){n.next=13;break}return n.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 13:return e.boundary={top:0,left:0,width:o,height:l},e.painter=null,e.painter||(f=i.css||i,p=f.width,g=i.css||i,g.height,!p&&e.parentWidth&&Object.assign(i,{width:e.parentWidth}),v={context:a,canvas:d,width:o,height:l,pixelRatio:e.dpr,useCORS:e.useCORS,createImage:c.getImageInfo.bind(e),listen:{onProgress:function(t){e.progress=t,e.$emit("progress",t)},onEffectFail:function(t){e.$emit("faill",t)}}},e.painter=new h.default(v)),n.next=18,e.painter.source(JSON.parse(JSON.stringify(i)));case 18:return m=n.sent,b=m.width,y=m.height,e.boundary.height=e.canvasHeight=y,e.boundary.width=e.canvasWidth=b,n.next=25,(0,c.sleep)(e.sleep);case 25:return e.painter.setContext(e.ctx),n.next=28,e.painter.render();case 28:return n.next=30,new Promise((function(t){return e.$nextTick(t)}));case 30:if(s){n.next=33;break}return n.next=33,e.canvasDraw();case 33:if(!u||!s){n.next=36;break}return n.next=36,(0,c.sleep)(u);case 36:return e.$emit("done"),e.done=!0,e.isCanvasToTempFilePath&&e.canvasToTempFilePath().then((function(t){e.$emit("success",t.tempFilePath)})).catch((function(t){e.$emit("fail",new Error(JSON.stringify(t)))})),n.abrupt("return",Promise.resolve({ctx:a,draw:e.painter,node:e.node}));case 40:case"end":return n.stop()}}),n)})))()},canvasDraw:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n,i){return t.ctx.draw(e,(function(){return setTimeout((function(){return n()}),t.afterDelay)}))}))},getContext:function(){var t=this;return(0,a.default)((0,r.default)().mark((function e(){var n,i,a;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.canvasWidth){e.next=4;break}return t.$emit("fail","painter no size"),console.error("painter no size: 请给画板或父级设置尺寸"),e.abrupt("return",Promise.reject());case 4:if(!t.ctx||!t.inited){e.next=6;break}return e.abrupt("return",Promise.resolve(t.ctx));case 6:if(n=t.type,i=t.use2dCanvas,t.dpr,t.boardWidth,t.boardHeight,a=function(){return new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).boundingClientRect().exec((function(n){if(n){var i=uni.createCanvasContext(t.canvasId,t);t.inited||(t.inited=!0,t.use2dCanvas=!1,t.canvas=n),t.ctx=i,e(t.ctx)}}))}))},i){e.next=10;break}return e.abrupt("return",a());case 10:return e.abrupt("return",new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).node().exec((function(i){var r=i[0].node;r||(t.use2dCanvas=!1,e(t.getContext()));var a=r.getContext(n);t.inited||(t.inited=!0,t.use2dCanvas=!0,t.canvas=r),t.ctx=a,e(t.ctx)}))})));case 11:case"end":return e.stop()}}),e)})))()},canvasToTempFilePath:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(){var n=(0,a.default)((0,r.default)().mark((function n(i,s){var o,c,h,l,d,u,f,p,g,v,m,b,y,w,x,S,k;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=t.use2dCanvas,c=t.canvasId,h=t.dpr,l=t.fileType,d=t.quality,u=function(){var e=(0,a.default)((0,r.default)().mark((function e(n){var a;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.setFilePath(n.tempFilePath||n);case 3:a=e.sent,i(Object.assign(n,{tempFilePath:a})),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$emit("fail",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),f=t.boundary||t,p=f.top,g=void 0===p?0:p,v=f.left,m=void 0===v?0:v,b=f.width,y=f.height,w=b*h,x=y*h,S=Object.assign({x:m,y:g,width:b,height:y,destWidth:w,destHeight:x,canvasId:c,fileType:l,quality:d,success:u,fail:s},e),!o){n.next=22;break}return n.prev=7,e.pathType||t.pathType||(e.pathType="url"),n.next=11,t.setFilePath(t.canvas.toDataURL("image/".concat(e.fileType||l).replace(/pg/,"peg"),e.quality||d),e);case 11:k=n.sent,e.success&&e.success({tempFilePath:k}),i({tempFilePath:k}),n.next=20;break;case 16:n.prev=16,n.t0=n["catch"](7),e.fail&&e.fail(n.t0),s(n.t0);case 20:n.next=23;break;case 22:uni.canvasToTempFilePath(S,t);case 23:case"end":return n.stop()}}),n,null,[[7,16]])})));return function(t,e){return n.apply(this,arguments)}}())}}};e.default=l},"364d":function(t,e,n){"use strict";n.r(e);var i=n("231a"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},"3e22":function(t,e,n){"use strict";n.r(e);var i=n("1976"),r=n("b14e");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("b4f3");var s=n("f0c5"),o=n("0543"),c=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"143368c6",null,!1,i["a"],void 0);"function"===typeof o["a"]&&Object(o["a"])(c),e["default"]=c.exports},"5b58":function(t,e,n){var i=n("0659");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("4f06").default;r("9b14cae8",i,!0,{sourceMap:!1,shadowMode:!1})},7275:function(t,e,n){"use strict";n.r(e);var i=n("8b7f"),r=n("364d");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("970f");var s=n("f0c5"),o=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"0fba428e",null,!1,i["a"],void 0);e["default"]=o.exports},7956:function(t,e,n){var i=n("9fd6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("4f06").default;r("095e3b7b",i,!0,{sourceMap:!1,shadowMode:!1})},"7b2f":function(t,e,n){"use strict";var i=n("7956"),r=n.n(i);r.a},"8b7f":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{ref:"limepainter",staticClass:"lime-painter"},[t.canvasId&&t.size?n("v-uni-view",{style:t.styles},[t.use2dCanvas?n("v-uni-canvas",{staticClass:"lime-painter__canvas",style:t.size,attrs:{id:t.canvasId,type:"2d"}}):n("v-uni-canvas",{staticClass:"lime-painter__canvas",style:t.size,attrs:{"canvas-id":t.canvasId,id:t.canvasId,width:t.boardWidth*t.dpr,height:t.boardHeight*t.dpr}})],1):t._e(),t._t("default")],2)},r=[]},"8cfe":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=function(t){var e=/^data:image\/(\w+);base64,/.exec(t)||[],n=(0,o.default)(e,2);n[1];return new Promise((function(e,n){for(var i=t.split(",")[0].split(":")[1].split(";")[0],r=atob(t.split(",")[1]),a=new ArrayBuffer(r.length),s=new Uint8Array(a),o=0;o<r.length;o++)s[o]=r.charCodeAt(o);e(URL.createObjectURL(new Blob([s],{type:i})))}))},e.compareVersion=function(t,e){t=t.split("."),e=e.split(".");var n=Math.max(t.length,e.length);while(t.length<n)t.push("0");while(e.length<n)e.push("0");for(var i=0;i<n;i++){var r=parseInt(t[i],10),a=parseInt(e[i],10);if(r>a)return 1;if(r<a)return-1}return 0},e.downloadFile=function(t){return t?new Promise((function(e,n){if(h[t])return n();h[t]=1,uni.downloadFile({url:t,success:function(t){e(t)},fail:function(t){n(t)}})})):Promise.reject({err:"no url"})},e.getImageInfo=function(t,e){var n=this;return new Promise(function(){var i=(0,s.default)((0,r.default)().mark((function i(s,o){var l;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(l=t,!h[t]||!h[t].errMsg){i.next=5;break}s(h[t]),i.next=16;break;case 5:if(i.prev=5,!e){i.next=10;break}return i.next=9,d(t);case 9:l=i.sent;case 10:i.next=15;break;case 12:i.prev=12,i.t0=i["catch"](5),o((0,a.default)((0,a.default)({},i.t0),{},{src:l}));case 15:uni.getImageInfo({src:l,success:function(e){if(e.path=e.path.replace(/^\./,window.location.origin),n.canvas.createImage){var i=n.canvas.createImage();i.src=e.path,i.onload=function(){e.path=i,h[t]=e,s(h[t])},i.onerror=function(e){o({err:e,path:t})}}else c?s(e):(h[t]=e,s(h[t]))},fail:function(e){console.error({err:e,path:t}),o({err:e,path:t})}});case 16:case"end":return i.stop()}}),i,null,[[5,12]])})));return function(t,e){return i.apply(this,arguments)}}())},e.isBase64=void 0,e.isNumber=l,e.networkReg=void 0,e.pathToBase64=d,e.sleep=function(t){return new Promise((function(e){return setTimeout(e,t)}))},e.toPx=function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"===typeof e)return e;if(l(e))return 1*e;if("string"===typeof e){var r=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g,a=r.exec(e);if(!e||!a)return 0;var s=a[3];e=parseFloat(e);var o=0;return"rpx"===s?o=uni.upx2px(e):"px"===s?o=1*e:"%"===s?o=e*t(n)/100:"em"===s&&(o=e*t(n||14)),i?1*o.toFixed(2):Math.round(o)}return 0};var r=i(n("c7eb")),a=i(n("5530")),s=i(n("1da1")),o=i(n("3835"));n("ac1f"),n("00b4"),n("d3b7"),n("caad"),n("acd8"),n("14d9"),n("e25e"),n("c19f"),n("ace4"),n("c975"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("b39a"),n("72f7"),n("5319"),n("d401"),n("81b2"),n("0eb6"),n("b7ef"),n("8bd4"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861");e.networkReg=/^(http|\/\/)/;e.isBase64=function(t){return/^data:image\/(\w+);base64/.test(t)};var c=["devtools"].includes(uni.getSystemInfoSync().platform),h={};function l(t){return/^-?\d+(\.\d+)?$/.test(t)}function d(t){return/^data:/.test(t)?t:new Promise((function(e,n){var i=new Image;i.setAttribute("crossOrigin","Anonymous"),i.onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(i,0,0);var n=t.toDataURL("image/png");e(n),t.height=t.width=0},i.src=t+"?v="+Math.random(),i.onerror=function(t){n(t)}}))}},9652:function(t,e,n){"use strict";var i=n("ded3").default;n("c975"),n("e25e"),n("99af"),n("caad"),n("2532"),n("acd8"),n("498a"),n("baa5"),n("ac1f"),n("5319"),n("14d9"),n("d401"),n("d3b7"),n("25f0"),n("a434");var r={trustTags:h("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:h("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:h("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:h("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",u:"text-decoration:underline"}},a=uni.getSystemInfoSync(),s=a.windowWidth,o=h(" ,\r,\n,\t,\f"),c=0;function h(t){for(var e=Object.create(null),n=t.split(","),i=n.length;i--;)e[n[i]]=!0;return e}function l(t,e){var n=t.indexOf("&");while(-1!=n){var i=t.indexOf(";",n+3),a=void 0;if(-1==i)break;"#"==t[n+1]?(a=parseInt(("x"==t[n+2]?"0":"")+t.substring(n+2,i)),isNaN(a)||(t=t.substr(0,n)+String.fromCharCode(a)+t.substr(i+1))):(a=t.substring(n+1,i),(r.entities[a]||"amp"==a&&e)&&(t=t.substr(0,n)+(r.entities[a]||"&")+t.substr(i+1))),n=t.indexOf("&",n+1)}return t}function d(t){this.options=t||{},this.tagStyle=Object.assign(r.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[]}function u(t){this.handler=t}r.ignoreTags.iframe=void 0,r.trustTags.iframe=!0,r.ignoreTags.embed=void 0,r.trustTags.embed=!0,d.prototype.parse=function(t){for(var e=this.plugins.length;e--;)this.plugins[e].onUpdate&&(t=this.plugins[e].onUpdate(t,r)||t);new u(this).parse(t);while(this.stack.length)this.popNode();return this.nodes},d.prototype.expose=function(){for(var t=this.stack.length;t--;){var e=this.stack[t];if("a"==e.name||e.c)return;e.c=1}},d.prototype.hook=function(t){for(var e=this.plugins.length;e--;)if(this.plugins[e].onParse&&0==this.plugins[e].onParse(t,this))return!1;return!0},d.prototype.getUrl=function(t){var e=this.options.domain;return"/"==t[0]?"/"==t[1]?t="".concat(e?e.split("://")[0]:"http",":").concat(t):e&&(t=e+t):!e||t.includes("data:")||t.includes("://")||(t="".concat(e,"/").concat(t)),t},d.prototype.parseStyle=function(t){var e=t.attrs,n=(this.tagStyle[t.name]||"").split(";").concat((e.style||"").split(";")),i={},r="";e.id&&(this.options.useAnchor?this.expose():"img"!=t.name&&"a"!=t.name&&"video"!=t.name&&"audio"!=t.name&&(e.id=void 0)),e.width&&(i.width=parseFloat(e.width)+(e.width.includes("%")?"%":"px"),e.width=void 0),e.height&&(i.height=parseFloat(e.height)+(e.height.includes("%")?"%":"px"),e.height=void 0);for(var a=0,c=n.length;a<c;a++){var h=n[a].split(":");if(!(h.length<2)){var l=h.shift().trim().toLowerCase(),d=h.join(":").trim();if("-"==d[0]&&d.lastIndexOf("-")>0||d.includes("safe"))r+=";".concat(l,":").concat(d);else if(!i[l]||d.includes("import")||!i[l].includes("import")){if(d.includes("url")){var u=d.indexOf("(")+1;if(u){while('"'==d[u]||"'"==d[u]||o[d[u]])u++;d=d.substr(0,u)+this.getUrl(d.substr(u))}}else d.includes("rpx")&&(d=d.replace(/[0-9.]+\s*rpx/g,(function(t){return"".concat(parseFloat(t)*s/750,"px")})));i[l]=d}}}return t.attrs.style=r,i},d.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"==this.tagName&&(this.xml=!0)},d.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"==t.substr(0,5)?"data-src"!=t||this.attrs.src?"img"==this.tagName||"a"==this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},d.prototype.onAttrVal=function(t){var e=this.attrName||"";"style"==e||"href"==e?this.attrs[e]=l(t,!0):e.includes("src")?this.attrs[e]=this.getUrl(l(t,!0)):e&&(this.attrs[e]=t)},d.prototype.onOpenTag=function(t){var e=Object.create(null);e.name=this.tagName,e.attrs=this.attrs,this.attrs=Object.create(null);var n=e.attrs,i=this.stack[this.stack.length-1],a=i?i.children:this.nodes,o=this.xml?t:r.voidTags[e.name];if("embed"==e.name&&this.expose(),"video"!=e.name&&"audio"!=e.name||("video"!=e.name||n.id||(n.id="v".concat(c++)),n.controls||n.autoplay||(n.controls="T"),e.src=[],n.src&&(e.src.push(n.src),n.src=void 0),this.expose()),o){if(!this.hook(e)||r.ignoreTags[e.name])return void("base"!=e.name||this.options.domain?"source"==e.name&&i&&("video"==i.name||"audio"==i.name)&&n.src&&i.src.push(n.src):this.options.domain=n.href);var h=this.parseStyle(e);if("img"==e.name){if(n.src&&(n.src.includes("webp")&&(e.webp="T"),n.src.includes("data:")&&!n["original-src"]&&(n.ignore="T"),!n.ignore||e.webp||n.src.includes("cloud://"))){for(var l=this.stack.length;l--;){var d=this.stack[l];if("a"==d.name){e.a=d.attrs;break}d.c=1}n.i=this.imgList.length.toString();var u=n["original-src"]||n.src;this.imgList.push(u),this.options.lazyLoad&&(n["data-src"]=n.src,n.src=void 0)}"inline"==h.display&&(h.display=""),n.ignore&&(h["max-width"]=h["max-width"]||"100%",n.style+=";-webkit-touch-callout:none"),parseInt(h.width)>s&&(h.height=void 0),h.width&&(h.width.includes("auto")?h.width="":(e.w="T",h.height&&!h.height.includes("auto")&&(e.h="T")))}else if("svg"==e.name)return a.push(e),this.stack.push(e),void this.popNode();for(var f in h)h[f]&&(n.style+=";".concat(f,":").concat(h[f].replace(" !important","")));n.style=n.style.substr(1)||void 0}else("pre"==e.name||(n.style||"").includes("white-space")&&n.style.includes("pre"))&&(this.pre=e.pre=!0),e.children=[],this.stack.push(e);a.push(e)},d.prototype.onCloseTag=function(t){var e;for(t=this.xml?t:t.toLowerCase(),e=this.stack.length;e--;)if(this.stack[e].name==t)break;if(-1!=e)while(this.stack.length>e)this.popNode();else if("p"==t||"br"==t){var n=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;n.push({name:t,attrs:{}})}},d.prototype.popNode=function(){var t=this.stack.pop(),e=t.attrs,n=t.children,a=this.stack[this.stack.length-1],o=a?a.children:this.nodes;if(!this.hook(t)||r.ignoreTags[t.name])return"title"==t.name&&n.length&&"text"==n[0].type&&this.options.setTitle&&uni.setNavigationBarTitle({title:n[0].text}),void o.pop();if(t.pre){t.pre=this.pre=void 0;for(var c=this.stack.length;c--;)this.stack[c].pre&&(this.pre=!0)}var h={};if("svg"==t.name){var l="",d=e,u=d.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function t(e){for(var n in l+="<".concat(e.name),e.attrs){var i=e.attrs[n];i&&("viewbox"==n&&(n="viewBox"),l+=" ".concat(n,'="').concat(i,'"'))}if(e.children){l+=">";for(var r=0;r<e.children.length;r++)t(e.children[r]);l+="</".concat(e.name,">")}else l+="/>"}(t),t.name="img",t.attrs={src:"data:image/svg+xml;utf8,".concat(l.replace(/#/g,"%23")),style:u,ignore:"T"},t.children=void 0,void(this.xml=!1)}if(e.align&&("table"==t.name?"center"==e.align?h["margin-inline-start"]=h["margin-inline-end"]="auto":h.float=e.align:h["text-align"]=e.align,e.align=void 0),"font"==t.name&&(e.color&&(h.color=e.color,e.color=void 0),e.face&&(h["font-family"]=e.face,e.face=void 0),e.size)){var f=parseInt(e.size);isNaN(f)||(f<1?f=1:f>7&&(f=7),h["font-size"]=["xx-small","x-small","small","medium","large","x-large","xx-large"][f-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(h["text-align"]="center"),Object.assign(h,this.parseStyle(t)),parseInt(h.width)>s&&(h["max-width"]="100%",h["box-sizing"]="border-box"),r.blockTags[t.name]?t.name="div":r.trustTags[t.name]||this.xml||(t.name="span"),"a"==t.name||"ad"==t.name||"iframe"==t.name)this.expose();else if("ul"!=t.name&&"ol"!=t.name||!t.c){if("table"==t.name){var p=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),v=parseFloat(e.border);if(t.c&&(isNaN(p)&&(p=2),isNaN(g)&&(g=2)),v&&(e.style+=";border:".concat(v,"px solid gray")),t.flag&&t.c){h.display="grid",g?(h["grid-gap"]="".concat(g,"px"),h.padding="".concat(g,"px")):v&&(e.style+=";border-left:0;border-top:0");var m=[],b=[],y=[],w={};(function t(e){for(var n=0;n<e.length;n++)"tr"==e[n].name?b.push(e[n]):t(e[n].children||[])})(n);for(var x=1;x<=b.length;x++){for(var S=1,k=0;k<b[x-1].children.length;k++,S++){var _=b[x-1].children[k];if("td"==_.name||"th"==_.name){while(w["".concat(x,".").concat(S)])S++;var T=_.attrs.style||"",O=T.indexOf("width")?T.indexOf(";width"):0;if(-1!=O){var P=T.indexOf(";",O+6);-1==P&&(P=T.length),_.attrs.colspan||(m[S]=T.substring(O?O+7:6,P)),T=T.substr(0,O)+T.substr(P)}if(T+=(v?";border:".concat(v,"px solid gray")+(g?"":";border-right:0;border-bottom:0"):"")+(p?";padding:".concat(p,"px"):""),_.attrs.colspan&&(T+=";grid-column-start:".concat(S,";grid-column-end:").concat(S+parseInt(_.attrs.colspan)),_.attrs.rowspan||(T+=";grid-row-start:".concat(x,";grid-row-end:").concat(x+1)),S+=parseInt(_.attrs.colspan)-1),_.attrs.rowspan){T+=";grid-row-start:".concat(x,";grid-row-end:").concat(x+parseInt(_.attrs.rowspan)),_.attrs.colspan||(T+=";grid-column-start:".concat(S,";grid-column-end:").concat(S+1));for(var z=1;z<_.attrs.rowspan;z++)w["".concat(x+z,".").concat(S)]=1}T&&(_.attrs.style=T),y.push(_)}}if(1==x){for(var I="",M=1;M<S;M++)I+="".concat(m[M]?m[M]:"auto"," ");h["grid-template-columns"]=I}}t.children=y}else t.c&&(h.display="table"),isNaN(g)||(h["border-spacing"]="".concat(g,"px")),(v||p)&&function t(e){for(var n=0;n<e.length;n++){var i=e[n];"th"==i.name||"td"==i.name?(v&&(i.attrs.style="border:".concat(v,"px solid gray;").concat(i.attrs.style||"")),p&&(i.attrs.style="padding:".concat(p,"px;").concat(i.attrs.style||""))):i.children&&t(i.children)}}(n);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var L=i({},t);t.name="div",t.attrs={style:"overflow:auto"},t.children=[L],e=L.attrs}}else if("td"!=t.name&&"th"!=t.name||!e.colspan&&!e.rowspan){if("ruby"==t.name){t.name="span";for(var B=0;B<n.length-1;B++)"text"==n[B].type&&"rt"==n[B+1].name&&(n[B]={name:"div",attrs:{style:"display:inline-block"},children:[{name:"div",attrs:{style:"font-size:50%;text-align:start"},children:n[B+1].children},n[B]]},n.splice(B+1,1))}else if(t.c){t.c=2;for(var C=t.children.length;C--;)t.children[C].c&&"table"!=t.children[C].name||(t.c=1)}}else for(var j=this.stack.length;j--;)if("table"==this.stack[j].name){this.stack[j].flag=1;break}}else{var R={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};R[e.type]&&(e.style+=";list-style-type:".concat(R[e.type]),e.type=void 0);for(var W=n.length;W--;)"li"==n[W].name&&(n[W].c=1)}if((h.display||"").includes("flex")&&!t.c)for(var $=n.length;$--;){var F=n[$];F.f&&(F.attrs.style=(F.attrs.style||"")+F.f,F.f=void 0)}var A=a&&(a.attrs.style||"").includes("flex")&&!t.c;for(var E in A&&(t.f=";max-width:100%"),h)if(h[E]){var N=";".concat(E,":").concat(h[E].replace(" !important",""));A&&(E.includes("flex")&&"flex-direction"!=E||"align-self"==E||"-"==h[E][0]||"width"==E&&N.includes("%"))?(t.f+=N,"width"==E&&(e.style+=";width:100%")):e.style+=N}e.style=e.style.substr(1)||void 0},d.prototype.onText=function(t){if(!this.pre){for(var e,n="",i=0,r=t.length;i<r;i++)o[t[i]]?(" "!=n[n.length-1]&&(n+=" "),"\n"!=t[i]||e||(e=!0)):n+=t[i];if(" "==n&&e)return;t=n}var a=Object.create(null);if(a.type="text",a.text=l(t),this.hook(a)){var s=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;s.push(a)}},u.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var e=this.content.length;-1!=this.i&&this.i<e;)this.state()},u.prototype.checkClose=function(t){var e="/"==this.content[this.i];return!!(">"==this.content[this.i]||e&&">"==this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=e?2:1,this.start=this.i,this.handler.onOpenTag(e),"script"==this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!=this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},u.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1!=this.i){var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!=this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"==t||"!"==t||"?"==t){this.start!=this.i&&this.handler.onText(this.content.substring(this.start,this.i));var e=this.content[this.i+2];if("/"==t&&(e>="a"&&e<="z"||e>="A"&&e<="Z"))return this.i+=2,this.start=this.i,this.state=this.endTag;var n="--\x3e";"!"==t&&"-"==this.content[this.i+2]&&"-"==this.content[this.i+3]||(n=">"),this.i=this.content.indexOf(n,this.i),-1!=this.i&&(this.i+=n.length,this.start=this.i)}else this.i++}else this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length))},u.prototype.tagName=function(){if(o[this.content[this.i]]){this.handler.onTagName(this.content.substring(this.start,this.i));while(o[this.content[++this.i]]);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},u.prototype.attrName=function(){var t=this.content[this.i];if(o[t]||"="==t){this.handler.onAttrName(this.content.substring(this.start,this.i));var e="="==t,n=this.content.length;while(++this.i<n)if(t=this.content[this.i],!o[t]){if(this.checkClose())return;if(e)return this.start=this.i,this.state=this.attrVal;if("="!=this.content[this.i])return this.start=this.i,this.state=this.attrName;e=!0}}else this.checkClose("onAttrName")||this.i++},u.prototype.attrVal=function(){var t=this.content[this.i],e=this.content.length;if('"'==t||"'"==t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1==this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<e;this.i++){if(o[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}while(o[this.content[++this.i]]);this.i<e&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},u.prototype.endTag=function(){var t=this.content[this.i];if(o[t]||">"==t||"/"==t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!=t&&(this.i=this.content.indexOf(">",this.i),-1==this.i))return;this.start=++this.i,this.state=this.text}else this.i++},t.exports=d},"970f":function(t,e,n){"use strict";var i=n("f148"),r=n.n(i);r.a},"9a3c":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{class:(t.selectable?"_select ":"")+"_root",attrs:{id:"_root"}},[t.nodes[0]?n("node",{attrs:{childs:t.nodes,opts:[t.lazyLoad,t.loadingImg,t.errorImg,t.showImgMenu]}}):t._t("default")],2)},r=[]},"9a87":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("14d9"),n("e25e"),n("caad"),n("2532");var r=i(n("3e22")),a={name:"node",data:function(){return{ctrl:{}}},props:{name:String,attrs:{type:Object,default:function(){return{}}},childs:Array,opts:Array},components:{node:r.default},mounted:function(){var t=this;for(this.root=this.$parent;"mp-html"!=this.root.$options.name;this.root=this.root.$parent);if(this.opts[0]){for(var e=this.childs.length;e--;)if("img"==this.childs[e].name)break;-1!=e&&(this.observer=uni.createIntersectionObserver(this).relativeToViewport({top:500,bottom:500}),this.observer.observe("._img",(function(e){e.intersectionRatio&&(t.$set(t.ctrl,"load",1),t.observer.disconnect())})))}},beforeDestroy:function(){this.observer&&this.observer.disconnect()},methods:{play:function(t){if(this.root.pauseVideo){for(var e=!1,n=t.target.id,i=this.root._videos.length;i--;)this.root._videos[i].id==n?e=!0:this.root._videos[i].pause();if(!e){var r=uni.createVideoContext(n,this);r.id=n,this.root._videos.push(r)}}},imgTap:function(t){var e=this.childs[t.currentTarget.dataset.i];if(e.a)return this.linkTap(e.a);e.attrs.ignore||(e.attrs.src=e.attrs.src||e.attrs["data-src"],this.root.$emit("imgTap",e.attrs),this.root.previewImg&&uni.previewImage({current:parseInt(e.attrs.i),urls:this.root.imgList}))},imgLongTap:function(t){},imgLoad:function(t){var e=t.currentTarget.dataset.i;(this.opts[1]&&!this.ctrl[e]||-1==this.ctrl[e])&&this.$set(this.ctrl,e,1)},linkTap:function(t){var e=t.currentTarget?this.childs[t.currentTarget.dataset.i].attrs:t,n=e.href;this.root.$emit("linkTap",e),n&&("#"==n[0]?this.root.navigateTo(n.substring(1)).catch((function(){})):n.includes("://")?this.root.copyLink&&window.open(n):uni.navigateTo({url:n,fail:function(){uni.switchTab({url:n,fail:function(){}})}}))},mediaError:function(t){var e=t.currentTarget.dataset.i,n=this.childs[e];if("video"==n.name||"audio"==n.name){var i=(this.ctrl[e]||0)+1;if(i>n.src.length&&(i=0),i<n.src.length)return this.$set(this.ctrl,e,i)}else"img"==n.name&&this.opts[2]&&this.$set(this.ctrl,e,-1);this.root&&this.root.$emit("error",{source:n.name,attrs:n.attrs,errMsg:t.detail.errMsg})}}};e.default=a},"9fd6":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";uni-page-body[data-v-78c80054]{background:#f6f7fb}body.?%PAGE?%[data-v-78c80054]{background:#f6f7fb}.draw_view[data-v-78c80054]{margin:%?30?%;width:100%;background:#fff;border-radius:%?20?%;position:relative}.draw_view .draw_image[data-v-78c80054]{position:relative}.draw_view .draw_image uni-image[data-v-78c80054]{width:100%;height:%?280?%;border-radius:%?20?% %?20?% 0 0}.draw_view .sheets[data-v-78c80054]{position:absolute;z-index:9;padding:4px 12px;background:rgba(0,0,0,.49019607843137253);color:#fff;top:15px;left:15px;border-radius:48px;font-size:13px}.draw_view .draw_done[data-v-78c80054]{height:%?280?%;font-size:30px;border-radius:11px 11px 0 0;background:#000;color:#fff}.draw_view .prompt[data-v-78c80054]{padding:%?20?% %?30?% %?30?%}.draw_view .create_time[data-v-78c80054]{font-size:%?26?%;color:#9e9e9e;padding:%?0?% %?30?% %?30?%}.draw_view .operate[data-v-78c80054]{padding:0 16px 16px}.draw_view .onekey[data-v-78c80054]{background:linear-gradient(90deg,#00ca88,#00bcd4);color:#fff;padding:%?15?%;border-radius:%?10?%;text-align:center;font-size:%?24?%;width:48%}.draw_view .hoversubmit[data-v-78c80054]{background:#f7f7f7;color:#acacb3}.draw_view .circle[data-v-78c80054]{position:absolute;right:%?-14?%;top:%?-14?%;background:#fff;border-radius:50%}.draw_view .imgs_arrow[data-v-78c80054]{position:absolute;width:92%;margin:0 %?30?%}.draw_view .imgs_arrow .arrow[data-v-78c80054]{background:rgba(0,0,0,.49019607843137253);border-radius:50%;padding:%?10?%}.dygbhg[data-v-78c80054]{background:#fff;border-radius:%?15?% %?15?% 0 0;position:fixed;bottom:0;left:0;width:100%;box-shadow:0 0 10px rgba(0,0,0,.1411764705882353);display:flex;align-items:center;justify-content:space-evenly}.whole[data-v-78c80054]{width:45%;height:%?88?%;display:flex;color:#fff;align-items:center;justify-content:center;background:#f3f3f3;font-weight:700;border-radius:%?60?%;color:#3d7eff}.distinguish[data-v-78c80054]{width:45%;height:%?88?%;display:flex;color:#fff;align-items:center;justify-content:center;background:#3d7eff;font-weight:700;border-radius:%?60?%;margin:%?38?% 0;margin-left:4%}\n/* 全屏轮播 start*/.card-swiper[data-v-78c80054]{height:100vh!important}.card-swiper uni-swiper-item[data-v-78c80054]{width:%?750?%!important;left:%?0?%;box-sizing:border-box;overflow:initial;background:#000}.card-swiper uni-swiper-item .swiper-item[data-v-78c80054]{display:flex;align-items:center;justify-content:center;height:100%;background:#000}.card-swiper uni-swiper-item.cur .swiper-item[data-v-78c80054]{-webkit-transform:scale(1);transform:scale(1);transition:all .2s ease-in 0s;will-change:transform}',""]),t.exports=e},a626:function(t,e,n){"use strict";var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Painter=void 0;var r=i(n("53ca"));n("d3b7"),n("a4d3"),n("e01a"),n("d28b"),n("3ca3"),n("ddb0"),n("d9e2"),n("d401"),n("14d9"),n("ac1f"),n("00b4"),n("acd8"),n("2ca0"),n("466d"),n("c975"),n("498a"),n("baa5"),n("7a82"),n("131a"),n("fb6a"),n("a630"),n("caad"),n("2532"),n("4e82"),n("159b"),n("13d5"),n("b64b"),n("d81d"),n("7db0"),n("5319"),n("99af"),n("4ec9"),n("cb29"),n("4de4"),n("e9c4"),n("07ac");var a=function(){return a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},a.apply(this,arguments)};function s(t,e,n,i){return new(n||(n=Promise))((function(r,a){function s(t){try{c(i.next(t))}catch(t){a(t)}}function o(t){try{c(i.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}c((i=i.apply(t,e||[])).next())}))}function o(t,e){var n,i,r,a,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!((r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}var c={MP_WEIXIN:"mp-weixin",MP_QQ:"mp-qq",MP_ALIPAY:"mp-alipay",MP_BAIDU:"mp-baidu",MP_TOUTIAO:"mp-toutiao",MP_DINGDING:"mp-dingding",H5:"h5",WEB:"web",PLUS:"plus"},h=["contentSize","clientSize","borderSize","offsetSize"],l="view",d="text",u="image",f="qrcode",p="block",g={display:p,color:"#000000",lineHeight:"1.4em",fontSize:14,fontWeight:400,fontFamily:"sans-serif",lineCap:"butt",flexDirection:"row",flexWrap:"nowrap",textAlign:"left",alignItems:"flex-start",justifyContent:"flex-start",position:"static",transformOrigin:"center center"},v={upx2px:function(t){return window.innerWidth/750*t},getSystemInfoSync:function(){return{screenWidth:window.innerWidth}},getImageInfo:function(t){var e=t.src,n=t.success,i=t.fail,r=new Image;r.onload=function(){n({width:r.naturalWidth,height:r.naturalHeight,path:r.src,src:e})},r.onerror=i,r.src=e}},m="object"==("undefined"===typeof window?"undefined":(0,r.default)(window))?"undefined"==typeof uni||"undefined"!=typeof uni&&!uni.addInterceptor?c.WEB:c.H5:"object"==("undefined"===typeof swan?"undefined":(0,r.default)(swan))?c.MP_BAIDU:"object"==("undefined"===typeof tt?"undefined":(0,r.default)(tt))?c.MP_TOUTIAO:"object"==("undefined"===typeof plus?"undefined":(0,r.default)(plus))?c.PLUS:"object"==("undefined"===typeof wx?"undefined":(0,r.default)(wx))?c.MP_WEIXIN:void 0,b=m==c.MP_WEIXIN?wx:"undefined"!=typeof uni?uni.getImageInfo?{upx2px:function(t){return uni.upx2px(t)},getSystemInfoSync:function(){return uni.getSystemInfoSync()},getImageInfo:function(t){return uni.getImageInfo(t)},downloadFile:function(t){return uni.downloadFile(t)}}:Object.assign(uni,v):"undefined"!=typeof window?v:uni;if(!b.upx2px){var y=((b.getSystemInfoSync&&uni.getSystemInfoSync()).screenWidth||375)/750;b.upx2px=function(t){return y*t}}function w(t){return/^-?\d+(\.\d+)?$/.test(t)}function x(t,e,n){if("number"==typeof t)return t;if(w(t))return 1*t;if("string"==typeof t){var i=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g.exec(t);if(!t||!i)return 0;var r=i[3];t=parseFloat(t);var a=0;return"rpx"===r?a=b.upx2px(t):"px"===r?a=1*t:"%"===r&&e?a=t*x(e)/100:"em"===r&&e&&(a=t*x(e||14)),1*a.toFixed(2)}return 0}function S(t){return/%$/.test(t)}function k(t){for(var e=[],n=[],i=0,r=t.substring(0,t.length-1).split("%,");i<r.length;i++){var a=r[i];e.push(a.substring(0,a.lastIndexOf(" ")).trim()),n.push(a.substring(a.lastIndexOf(" "),a.length)/100)}return{colors:e,percents:n}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(){return T=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},T.apply(this,arguments)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function z(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(t){return"number"==typeof t}function M(t){return"auto"===t||null===t}function L(t){return/%$/.test(t)}var B,C=0,j=function(){function t(){_(this,"elements",[]),_(this,"afterElements",[]),_(this,"beforeElements",[]),_(this,"ids",[]),_(this,"width",0),_(this,"height",0),_(this,"top",0),_(this,"left",0),_(this,"pre",null),_(this,"offsetX",0),_(this,"offsetY",0),C++,this.id=C}var e=t.prototype;return e.fixedBind=function(t,e){void 0===e&&(e=0),this.container=e?t.parent:t.root,this.container.fixedLine=this,this.fixedAdd(t)},e.fixedAdd=function(t){this.elements.push(t);var e=t.computedStyle.zIndex;(void 0===e?0:e)>=0?this.afterElements.push(t):this.beforeElements.push(t),this.refreshLayout()},e.bind=function(t){this.container=t.parent,this.container.line=null,this.container.lines?(this.container.lines.push(this),this.pre=this.getPreLine(),this.top=this.pre.top+this.pre.height,this.left=this.container.contentSize.left):(this.top=this.container.contentSize.top,this.left=this.container.contentSize.left,this.container.lines=[this]),this.isInline=t.isInline(),this.container.line=this,this.outerWidth=t.parent&&t.parent.contentSize.width?t.parent.contentSize.width:1/0,this.add(t)},e.getPreLine=function(){return this.container.lines[this.container.lines.length-2]},e.canIEnter=function(t){return this.outerWidth||t.parent&&t.parent.contentSize.width,!((100*t.offsetSize.width+100*this.width)/100>this.outerWidth)||(this.closeLine(),!1)},e.closeLine=function(){delete this.container.line},e.add=function(t){this.ids.includes(t.id)||(this.ids.push(t.id),this.elements.push(t),this.refreshWidthHeight(t))},e.refreshWidthHeight=function(t){t.offsetSize.height>this.height&&(this.height=t.offsetSize.height),this.width+=t.offsetSize.width||0,(this.container.lineMaxWidth||0)<this.width&&(this.container.lineMaxWidth=this.width)},e.refreshXAlign=function(){if(this.isInline){var t=this.container.contentSize.width-this.width,e=this.container.style.textAlign;"center"===e?t/=2:"left"===e&&(t=0),this.offsetX=t}},e.getOffsetY=function(t){if(!t||!t.style)return 0;var e=(t.style||{}).verticalAlign;return"bottom"===e?this.height-t.contentSize.height:"middle"===e?(this.height-t.contentSize.height)/2:0},e.layout=function(t,e){for(var n in this.refreshXAlign(),this.pre?(this.top=this.pre.top+this.pre.height+this.offsetY,this.left=e+this.offsetX):(this.top=Math.max(this.top,this.container.contentSize.top,t)+this.offsetY,this.left=Math.max(this.left,this.container.contentSize.left,e)+this.offsetX),this.elements){var i=this.elements[n],r=this.elements[n-1],a=this.getOffsetY(i);i.style.top=this.top+a,i.style.left=r?r.offsetSize.left+r.offsetSize.width:this.left,i.getBoxPosition2()}},e.refreshLayout=function(){this.afterElements=this.afterElements.sort((function(t,e){return t.computedStyle.zIndex-e.computedStyle.zIndex})),this.beforeElements=this.beforeElements.sort((function(t,e){return t.computedStyle.zIndex-e.computedStyle.zIndex}))},t}(),R=((B={})["row"]={width:"width",contentWidth:"width",x:"x",y:"y",contentX:"left",height:"height",contentHeight:"height",marginLeft:"marginLeft"},B["column"]={width:"height",contentWidth:"height",x:"y",y:"x",contentX:"top",height:"width",contentHeight:"width",marginLeft:"marginTop"},B),W=function(t){var e,n;function i(){var e;return _(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e=t.call(this)||this),"outerWidth",0),e.exactValue=0,e.flexTotal=0,e.key=null,e}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,O(e,n);var r=i.prototype;return r.bind=function(t){console.warn("[painter] flex-box 功能未完善谨慎使用"),this.container=t.parent,this.container.line=this,this.container.lines?(this.container.lines.push(this),this.pre=this.getPreLine(),this.top=this.pre.top+this.pre.height,this.left=this.container.contentSize.left):(this.top=this.container.contentSize.top,this.left=this.container.contentSize.left,this.container.lines=[this]),t.parent&&(this.key=R[t.parent.style.flexDirection]),this.initHeight(t),this.outerWidth=t.parent&&t.parent.contentSize[this.key.contentWidth]?t.parent.contentSize[this.key.contentWidth]:1/0,this.add(t)},r.add=function(t){this.ids.push(t.id),I(t.style.flex)?this.flexTotal+=t.style.flex:I(t.style[this.key.width])&&(this.exactValue+=t.contentSize[this.key.width]),this.elements.push(t),this.refreshWidthHeight(t),t.next||this.closeLine()},r.closeLine=function(){this.calcFlex()},r.initHeight=function(t){this[this.key.height]=0},r.calcFlex=function(){var t=this,e=this.container.contentSize[this.key.contentWidth];this.elements.forEach((function(n){var i=n.style.width||0;I(n.style.flex)&&(i=n.style.flex/t.flexTotal*(e-t.exactValue)),n.computedStyle[t.key.width]=i,delete n.line,delete n.lines,delete n.lineMaxWidth,n.getBoxWidthHeight()}))},r.refreshWidthHeight=function(t){this.container.style.alignItems&&!t.style.alignSelf&&(t.style.alignSelf=this.container.style.alignItems),t.contentSize[this.key.height]>this[this.key.height]&&(this[this.key.height]=t.offsetSize[this.key.height]),this[this.key.width]+=t.offsetSize[this.key.width];var e=Math.min(this[this.key.width],this.container.contentSize[this.key.width]);(this.container.lineMaxWidth||0)<e&&(this.container.lineMaxWidth=e)},r.refreshXAlign=function(){var t=this,e=this.elements.reduce((function(e,n){return e+n.offsetSize[t.key.width]}),0),n=this.outerWidth==1/0?0:this.outerWidth-Math.max(this[this.key.width],e),i=this.container.style.justifyContent;"center"===i?n/=2:"flex-start"===i?n=0:["space-between","space-around"].includes(i)&&(function(e,n){void 0===n&&(n=0),n/=t.elements.length+(e?-1:1),t.elements.forEach((function(i,r){var a;e&&!r||(i.style.margin?i.style.margin[t.key.marginLeft]+=n:i.style.margin=((a={})[t.key.marginLeft]=n,a))})),n=0}("space-between"==i,n),n=0),this.offsetX=n||0,this.refreshYAlign()},r.refreshYAlign=function(){if(1==this.container.lines.length)return 0;var t=this.container.lines.reduce((function(t,e){return t+e.height}),0);if("center"===this.container.style.alignItems){var e=(this.container.contentSize[this.key.contentHeight]-t)/(this.container.lines.length+1);this.container.lines.forEach((function(t){t.offsetY=e}))}if("flex-end"===this.container.style.alignItems){var n=this.container.contentSize[this.key.contentHeight]-t;this.container.lines[0].offsetY=n}},r.getOffsetY=function(t){return this.container.lines.length>1?0:"flex-end"===t.style.alignSelf?this.container.contentSize[this.key.contentHeight]-t.contentSize[this.key.height]:"center"===t.style.alignSelf?(this.container.contentSize[this.key.contentHeight]-t.contentSize[this.key.height])/2:0},i}(j),$=u,F=d,A=l,E=f,N="inline-block",H="flex",D="absolute",U="fixed",q=0,V={left:null,top:null,width:null,height:null},Y=function(){function t(t,e,n,i){var r=this;_(this,"id",q++),_(this,"style",{left:null,top:null,width:null,height:null}),_(this,"computedStyle",{}),_(this,"originStyle",{}),_(this,"children",{}),_(this,"layoutBox",T({},V)),_(this,"contentSize",T({},V)),_(this,"clientSize",T({},V)),_(this,"borderSize",T({},V)),_(this,"offsetSize",T({},V)),this.ctx=i,this.root=n,e&&(this.parent=e),this.name=t.name||t.type,this.attributes=this.getAttributes(t);var a=this.getComputedStyle(t,e&&e.computedStyle);this.isAbsolute=a.position==D,this.isFixed=a.position==U,this.originStyle=a,Object.keys(a).forEach((function(t){Object.defineProperty(r.style,t,{configurable:!0,enumerable:!0,get:function(){return a[t]},set:function(e){a[t]=e}})}));var s={contentSize:T({},this.contentSize),clientSize:T({},this.clientSize),borderSize:T({},this.borderSize),offsetSize:T({},this.offsetSize)};Object.keys(s).forEach((function(t){Object.keys(r[t]).forEach((function(e){Object.defineProperty(r[t],e,{configurable:!0,enumerable:!0,get:function(){return s[t][e]},set:function(n){s[t][e]=n}})}))})),this.computedStyle=this.style}var e=t.prototype;return e.add=function(t){t.parent=this,this.children[t.id]=t},e.getChildren=function(){var t=this;return Object.keys(this.children).map((function(e){return t.children[e]}))},e.getLineRect=function(t,e){var n=e?e.lines:this.parent&&this.parent.lines;return n&&n.find((function(e){return e.ids.includes(t)}))||{width:0,height:0}},e.getComputedStyle=function(t,e){var n=["color","fontSize","lineHeight","verticalAlign","fontWeight","textAlign"],i=t.css,a=void 0===i?{}:i,s=t.type,o=void 0===s?A:s,c=T({},g);if([F,$,E].includes(o)&&!a.display&&(c.display=N),e)for(var h=0;h<n.length;h++){var l=n[h];(a[l]||e[l])&&(a[l]=a[l]||e[l])}for(var d=function(){var t=f[u],e=a[t];if(/-/.test(t)&&(t=t.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()})),c.key=e),/^(box|text)?shadow$/i.test(t)){var n=[];return e.replace(/((\d+(rpx|px)?\s+?){3})(.+)/,(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n=e[1].match(/\d+(rpx|px)?/g).map((function(t){return x(t)})).concat(e[4])})),/^text/.test(t)?c.textShadow=n:c.boxShadow=n,"continue"}if(/^border/i.test(t)&&!/radius$/i.test(t)){var i,s=t.match(/^border([BTRLa-z]+)?/)[0],h=t.match(/[W|S|C][a-z]+/),l=e.replace(/([\(,])\s+|\s+([\),])/g,"$1$2").split(" ").map((function(t){return/^\d/.test(t)?x(t,""):t}));return c[s]=((i={})[s+"Width"]=w(l[0])?l[0]:0,i[s+"Style"]=l[1]||"solid",i[s+"Color"]=l[2]||"black",i),1==l.length&&h&&(c[s][s+h[0]]=l[0]),"continue"}if(/^background(color)?$/i.test(t))return c.backgroundColor=e,"continue";if(/^objectPosition$/i.test(t))return c[t]=e.split(" "),"continue";if(/padding|margin|radius/i.test(t)){var d=/radius$/i.test(t),p=d?"borderRadius":t.match(/[a-z]+/)[0],g=[0,0,0,0].map((function(t,e){return d?["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"][e]:[p+"Top",p+"Right",p+"Bottom",p+"Left"][e]})),v="margin";if("padding"===t||t===v||/^(border)?radius$/i.test(t)){var m,b=(""+e).split(" ").map((function(e){return/^\d+(rpx|px)?$/.test(e)?x(e):t!=v&&/auto/.test(e)?0:e}),[])||[0],y=d?"borderRadius":t,S=b[0],k=b[1],_=b[2],T=b[3];c[y]=((m={})[g[0]]=M(S)?0:S,m[g[1]]=w(k)||M(k)?k:S,m[g[2]]=M(w(_)?_:S)?0:w(_)?_:S,m[g[3]]=w(T)?T:k||S,m)}else{var O;"object"==(0,r.default)(c[p])||(c[p]=((O={})[g[0]]=c[p]||0,O[g[1]]=c[p]||0,O[g[2]]=c[p]||0,O[g[3]]=c[p]||0,O)),c[p][t]=p==v&&M(e)||L(e)?e:x(e)}return"continue"}if(/^transform$/i.test(t))return c[t]={},e.replace(/([a-zA-Z]+)\(([0-9,-\.%rpxdeg\s]+)\)/g,(function(e,n,i){var r=i.split(",").map((function(t){return t.replace(/(^\s*)|(\s*$)/g,"")})),s=function(t,e){return t.includes("deg")?1*t:e&&!L(e)?x(t,e):t};n.includes("matrix")?c[t][n]=r.map((function(t){return 1*t})):n.includes("rotate")?c[t][n]=1*i.match(/^-?\d+(\.\d+)?/)[0]:/[X, Y]/.test(n)?c[t][n]=/[X]/.test(n)?s(r[0],a.width):s(r[0],a.height):(c[t][n+"X"]=s(r[0],a.width),c[t][n+"Y"]=s(r[1]||r[0],a.height))})),"continue";/^font$/i.test(t)&&console.warn("font 不支持简写"),/^left|top$/i.test(t)&&![D,U].includes(a.position)?c[t]=0:c[t]=/^[\d\.]+(px|rpx)?$/.test(e)?x(e):/em$/.test(e)&&o==F?x(e,a.fontSize):e},u=0,f=Object.keys(a);u<f.length;u++)d();return c},e.setPosition=function(t,e){var n={left:"width",top:"height",right:"width",bottom:"height"};Object.keys(n).forEach((function(i){var r="right"==i?"left":"top";["right","bottom"].includes(i)&&void 0!==t.style[i]&&"number"!=typeof t.originStyle[r]?t.style[r]=e[n[i]]-t.offsetSize[n[i]]-x(t.style[i],e[n[i]]):t.style[i]=x(t.style[i],e[n[i]])}))},e.getAttributes=function(t){var e=t.attributes||{};return(t.url||t.src)&&(e.src=e.src||t.url||t.src),t.replace&&(e.replace=t.replace),t.text&&(e.text=t.text),e},e.getOffsetSize=function(t,e,n){void 0===n&&(n=h[3]);var i=e||{},r=i.margin,a=(r=void 0===r?{}:r).marginLeft,s=void 0===a?0:a,o=r.marginTop,c=void 0===o?0:o,l=r.marginRight,d=void 0===l?0:l,u=r.marginBottom,f=void 0===u?0:u,p=i.padding,g=(p=void 0===p?{}:p).paddingLeft,v=void 0===g?0:g,m=p.paddingTop,b=void 0===m?0:m,y=p.paddingRight,w=void 0===y?0:y,x=p.paddingBottom,S=void 0===x?0:x,k=i.border,_=(k=void 0===k?{}:k).borderWidth,T=void 0===_?0:_,O=i.borderTop,P=(O=void 0===O?{}:O).borderTopWidth,z=void 0===P?T:P,I=i.borderBottom,M=(I=void 0===I?{}:I).borderBottomWidth,L=void 0===M?T:M,B=i.borderRight,C=(B=void 0===B?{}:B).borderRightWidth,j=void 0===C?T:C,R=i.borderLeft,W=(R=void 0===R?{}:R).borderLeftWidth,$=void 0===W?T:W,F=s<0&&d<0?Math.abs(s+d):0,A=c<0&&f<0?Math.abs(c+f):0,E=s>=0&&d<0,N=c>=0&&f<0;return n==h[0]&&(this[n].left=t.left+s+v+$+(E?2*-d:0),this[n].top=t.top+c+b+z+(N?2*-f:0),this[n].width=t.width+(this[n].widthAdd?0:F),this[n].height=t.height+(this[n].heightAdd?0:A),this[n].widthAdd=F,this[n].heightAdd=A),n==h[1]&&(this[n].left=t.left+s+$+(E<0?-d:0),this[n].top=t.top+c+z+(N?-f:0),this[n].width=t.width+v+w,this[n].height=t.height+b+S),n==h[2]&&(this[n].left=t.left+s+$/2+(E<0?-d:0),this[n].top=t.top+c+z/2+(N?-f:0),this[n].width=t.width+v+w+$/2+j/2,this[n].height=t.height+b+S+L/2+z/2),n==h[3]&&(this[n].left=t.left+(E<0?-d:0),this[n].top=t.top+(N?-f:0),this[n].width=t.width+v+w+$+j+s+d,this[n].height=t.height+b+S+L+z+f+c),this[n]},e.layoutBoxUpdate=function(t,e,n,i){var r=this;if(void 0===n&&(n=-1),"border-box"==e.boxSizing){var a=e||{},s=a.border,o=(s=void 0===s?{}:s).borderWidth,c=void 0===o?0:o,l=a.borderTop,d=(l=void 0===l?{}:l).borderTopWidth,u=void 0===d?c:d,f=a.borderBottom,p=(f=void 0===f?{}:f).borderBottomWidth,g=void 0===p?c:p,v=a.borderRight,m=(v=void 0===v?{}:v).borderRightWidth,b=void 0===m?c:m,y=a.borderLeft,w=(y=void 0===y?{}:y).borderLeftWidth,x=void 0===w?c:w,S=a.padding,k=(S=void 0===S?{}:S).paddingTop,_=void 0===k?0:k,T=S.paddingRight,O=void 0===T?0:T,P=S.paddingBottom,z=void 0===P?0:P,I=S.paddingLeft,M=void 0===I?0:I;n||(t.width-=M+O+b+x),1!==n||i||(t.height-=_+z+u+g)}this.layoutBox&&(h.forEach((function(n){return r.layoutBox[n]=r.getOffsetSize(t,e,n)})),this.layoutBox=Object.assign({},this.layoutBox,this.layoutBox.borderSize))},e.getBoxPosition2=function(){var t=this.computedStyle,e=this.fixedLine,n=this.lines,i=t.left,r=void 0===i?0:i,a=t.top,s=void 0===a?0:a,o=t.padding||{},c=o.paddingBottom,h=void 0===c?0:c,l=o.paddingRight,d=void 0===l?0:l,u=T({},this.contentSize,{left:r,top:s}),f=this.contentSize.top-this.offsetSize.top,p=this.contentSize.left-this.offsetSize.left;if(this.root.fixedLine&&!this.root.isDone){this.root.isDone=!0;for(var g,v=z(this.root.fixedLine.elements);!(g=v()).done;){var m=g.value;m.setPosition(m,this.root.offsetSize),m.getBoxPosition2()}}if(e)for(var b,y=z(e.elements);!(b=y()).done;){var w=b.value;w.setPosition(w,u),w.style.left+=r+p+d,w.style.top+=s+f+h,w.getBoxPosition2()}if(n)for(var x,S=z(n);!(x=S()).done;)x.value.layout(u.top+f,u.left+p);return this.layoutBoxUpdate(u,t),this.layoutBox},e.getBoxState=function(t,e){return this.isBlock(t)||this.isBlock(e)},e.isBlock=function(t){return void 0===t&&(t=this),t&&"block"==t.style.display},e.isFlex=function(t){return void 0===t&&(t=this),t&&t.style.display==H},e.isInFlow=function(){return!(this.isAbsolute||this.isFixed)},e.inFlexBox=function(t){return void 0===t&&(t=this),!!t.isInFlow()&&!!t.parent&&(!(!t.parent||t.parent.style.display!==H)||void 0)},e.isInline=function(t){return void 0===t&&(t=this),t&&t.style.display==N},e.contrastSize=function(t,e,n){var i=t;return n&&(i=Math.min(i,n)),e&&(i=Math.max(i,e)),i},e.measureText=function(t,e){var n=this.ctx.measureText(t),i=n.width,r=n.actualBoundingBoxAscent,a=n.actualBoundingBoxDescent;return{ascent:r,descent:a,width:i,fontHeight:r+a||.7*e+1}},e.getBoxWidthHeight=function(){var t=this,e=this.name,n=this.computedStyle,i=this.attributes,r=this.parent,a=void 0===r?{}:r,s=this.ctx,o=this.getChildren(),c=n.left,h=void 0===c?0:c,l=n.top,d=void 0===l?0:l,u=n.bottom,f=n.right,p=n.width,g=void 0===p?0:p,v=n.minWidth,m=n.maxWidth,b=n.minHeight,y=n.maxHeight,w=n.height,S=void 0===w?0:w,k=n.fontSize,_=void 0===k?14:k,T=n.fontWeight,O=n.fontFamily,P=n.fontStyle,z=n.position,I=n.lineClamp,M=n.lineHeight,B=n.padding,C=void 0===B?{}:B,R=n.margin,E=void 0===R?{}:R,N=n.border,H=(N=void 0===N?{}:N).borderWidth,U=void 0===H?0:H,q=n.borderRight,V=(q=void 0===q?{}:q).borderRightWidth,Y=void 0===V?U:V,X=n.borderLeft,J=(X=void 0===X?{}:X).borderLeftWidth,G=void 0===J?U:J,Q=a.contentSize&&a.contentSize.width,Z=a.contentSize&&a.contentSize.height;if(L(g)&&Q&&(g=x(g,Q)),L(g)&&!Q&&(g=null),L(S)&&Z&&(S=x(S,Z)),L(S)&&!Z&&(S=null),L(v)&&Q&&(v=x(v,Q)),L(m)&&Q&&(m=x(m,Q)),L(b)&&Z&&(b=x(b,Z)),L(y)&&Z&&(y=x(y,Z)),n.padding&&Q)for(var K in n.padding)Object.hasOwnProperty.call(n.padding,K)&&(n.padding[K]=x(n.padding[K],Q));var tt=C.paddingRight,et=void 0===tt?0:tt,nt=C.paddingLeft,it=void 0===nt?0:nt;if(n.margin&&[n.margin.marginLeft,n.margin.marginRight].includes("auto"))if(g){var rt=Q&&Q-g-et-it-G-Y||0;n.margin.marginLeft==n.margin.marginRight?n.margin.marginLeft=n.margin.marginRight=rt/2:"auto"==n.margin.marginLeft?n.margin.marginLeft=rt:n.margin.marginRight=rt}else n.margin.marginLeft=n.margin.marginRight=0;var at=E.marginRight,st=void 0===at?0:at,ot=E.marginLeft,ct={width:g,height:S,left:0,top:0},ht=it+et+G+Y+(void 0===ot?0:ot)+st;if(e==F&&!this.attributes.widths){var lt=i.text||"";s.save(),s.setFonts({fontFamily:O,fontSize:_,fontWeight:T,fontStyle:P});var dt=new Map;lt.split("\n").map((function(e){var n=e.split("").map((function(e){var n=dt.get(e);if(n)return n;var i=t.measureText(e,_).width;return dt.set(e,i),i})),i=t.measureText(e,_),r=i.fontHeight,a=i.ascent,s=i.descent;t.attributes.fontHeight=r,t.attributes.ascent=a,t.attributes.descent=s,t.attributes.widths||(t.attributes.widths=[]),t.attributes.widths.push({widths:n,total:n.reduce((function(t,e){return t+e}),0)})})),s.restore()}if(e==$&&null==g){var ut=i.width,ft=i.height;ct.width=this.contrastSize(Math.round(ut*S/ft)||0,v,m),this.layoutBoxUpdate(ct,n,0)}if(e==F&&null==g){var pt=this.attributes.widths,gt=Math.max.apply(Math,pt.map((function(t){return t.total})));a&&Q>0&&(gt>Q||this.isBlock(this))&&!this.isAbsolute&&!this.isFixed&&(gt=Q-ht),ct.width=this.contrastSize(gt,v,m),this.layoutBoxUpdate(ct,n,0)}if(e==F&&(a.style.flex||!this.attributes.lines)){var vt=this.attributes.widths.length;this.attributes.widths.forEach((function(t){return t.widths.reduce((function(t,e,n){return t+e>ct.width?(vt++,e):t+e}),0)})),vt=I&&vt>I?I:vt,this.attributes.lines=vt}if(e==$&&null==S){var mt=i.width,bt=i.height;ct.height=this.contrastSize(x(ct.width*bt/mt)||0,b,y),this.layoutBoxUpdate(ct,n,1)}e==F&&null==S&&(M=x(M,_),ct.height=this.contrastSize(x(this.attributes.lines*M),b,y),this.layoutBoxUpdate(ct,n,1,!0)),a&&a.children&&Q&&([A,F].includes(e)&&this.isFlex()||e==A&&this.isBlock(this)&&this.isInFlow())&&(ct.width=this.contrastSize(Q-ht,v,m),this.layoutBoxUpdate(ct,n)),g&&!L(g)&&(ct.width=this.contrastSize(g,v,m),this.layoutBoxUpdate(ct,n,0)),S&&!L(S)&&(ct.height=this.contrastSize(ct.height,b,y),this.layoutBoxUpdate(ct,n,1));var yt=0;if(o.length){var wt=null;o.forEach((function(e,i){e.getBoxWidthHeight();var r=o[i+1];if(r&&r.isInFlow()&&(e.next=r),e.isInFlow()&&!e.inFlexBox()){var a=t.getBoxState(wt,e);t.line&&t.line.canIEnter(e)&&!a?t.line.add(e):(new j).bind(e),wt=e}else e.inFlexBox()?t.line&&(t.line.canIEnter(e)||"nowrap"==n.flexWrap)?t.line.add(e):(new W).bind(e):e.isFixed?t.root.fixedLine?t.root.fixedLine.fixedAdd(e):(new j).fixedBind(e):t.fixedLine?t.fixedLine.fixedAdd(e):(new j).fixedBind(e,1)})),this.lines&&(yt=this.lines.reduce((function(t,e){return t+e.height}),0))}var xt=0,St=0;if(!g&&(this.isAbsolute||this.isFixed)&&Q){var kt=z==D?Q:this.root.width,_t=kt-(L(h)?x(h,kt):h)-(L(f)?x(f,kt):f);xt=n.left?_t:this.lineMaxWidth}if(!S&&(null!=d?d:this.isAbsolute||this.isFixed&&Z)){var Tt=z==D?Z:this.root.height,Ot=Tt-(L(d)?x(d,Tt):d)-(L(u)?x(u,Tt):u);St=n.top?Ot:0}if(g&&!L(g)||ct.width||(ct.width=xt||this.contrastSize((this.isBlock(this)&&!this.isInFlow()?Q||a.lineMaxWidth:this.lineMaxWidth)||this.lineMaxWidth,v,m),this.layoutBoxUpdate(ct,n,0)),S||!yt&&!St||(ct.height=St||this.contrastSize(yt,b,y),this.layoutBoxUpdate(ct,n)),n.borderRadius&&this.borderSize&&this.borderSize.width)for(var K in n.borderRadius)Object.hasOwnProperty.call(n.borderRadius,K)&&(n.borderRadius[K]=x(n.borderRadius[K],this.borderSize.width));return this.layoutBox},e.layout=function(){return this.getBoxWidthHeight(),this.root.offsetSize=this.offsetSize,this.getBoxPosition2(),this.offsetSize},t}(),X=function(){var t,e,n,i,r,a,s=[0,11,15,19,23,27,31,16,18,20,22,24,26,28,20,22,24,24,26,28,28,22,24,24,26,26,28,28,24,24,26,26,26,28,28,24,26,26,26,28,28],o=[3220,1468,2713,1235,3062,1890,2119,1549,2344,2936,1117,2583,1330,2470,1667,2249,2028,3780,481,4011,142,3098,831,3445,592,2517,1776,2234,1951,2827,1070,2660,1345,3177],c=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107],h=[1,0,19,7,1,0,16,10,1,0,13,13,1,0,9,17,1,0,34,10,1,0,28,16,1,0,22,22,1,0,16,28,1,0,55,15,1,0,44,26,2,0,17,18,2,0,13,22,1,0,80,20,2,0,32,18,2,0,24,26,4,0,9,16,1,0,108,26,2,0,43,24,2,2,15,18,2,2,11,22,2,0,68,18,4,0,27,16,4,0,19,24,4,0,15,28,2,0,78,20,4,0,31,18,2,4,14,18,4,1,13,26,2,0,97,24,2,2,38,22,4,2,18,22,4,2,14,26,2,0,116,30,3,2,36,22,4,4,16,20,4,4,12,24,2,2,68,18,4,1,43,26,6,2,19,24,6,2,15,28,4,0,81,20,1,4,50,30,4,4,22,28,3,8,12,24,2,2,92,24,6,2,36,22,4,6,20,26,7,4,14,28,4,0,107,26,8,1,37,22,8,4,20,24,12,4,11,22,3,1,115,30,4,5,40,24,11,5,16,20,11,5,12,24,5,1,87,22,5,5,41,24,5,7,24,30,11,7,12,24,5,1,98,24,7,3,45,28,15,2,19,24,3,13,15,30,1,5,107,28,10,1,46,28,1,15,22,28,2,17,14,28,5,1,120,30,9,4,43,26,17,1,22,28,2,19,14,28,3,4,113,28,3,11,44,26,17,4,21,26,9,16,13,26,3,5,107,28,3,13,41,26,15,5,24,30,15,10,15,28,4,4,116,28,17,0,42,26,17,6,22,28,19,6,16,30,2,7,111,28,17,0,46,28,7,16,24,30,34,0,13,24,4,5,121,30,4,14,47,28,11,14,24,30,16,14,15,30,6,4,117,30,6,14,45,28,11,16,24,30,30,2,16,30,8,4,106,26,8,13,47,28,7,22,24,30,22,13,15,30,10,2,114,28,19,4,46,28,28,6,22,28,33,4,16,30,8,4,122,30,22,3,45,28,8,26,23,30,12,28,15,30,3,10,117,30,3,23,45,28,4,31,24,30,11,31,15,30,7,7,116,30,21,7,45,28,1,37,23,30,19,26,15,30,5,10,115,30,19,10,47,28,15,25,24,30,23,25,15,30,13,3,115,30,2,29,46,28,42,1,24,30,23,28,15,30,17,0,115,30,10,23,46,28,10,35,24,30,19,35,15,30,17,1,115,30,14,21,46,28,29,19,24,30,11,46,15,30,13,6,115,30,14,23,46,28,44,7,24,30,59,1,16,30,12,7,121,30,12,26,47,28,39,14,24,30,22,41,15,30,6,14,121,30,6,34,47,28,46,10,24,30,2,64,15,30,17,4,122,30,29,14,46,28,49,10,24,30,24,46,15,30,4,18,122,30,13,32,46,28,48,14,24,30,42,32,15,30,20,4,117,30,40,7,47,28,43,22,24,30,10,67,15,30,19,6,118,30,18,31,47,28,34,34,24,30,20,61,15,30],l=[255,0,1,25,2,50,26,198,3,223,51,238,27,104,199,75,4,100,224,14,52,141,239,129,28,193,105,248,200,8,76,113,5,138,101,47,225,36,15,33,53,147,142,218,240,18,130,69,29,181,194,125,106,39,249,185,201,154,9,120,77,228,114,166,6,191,139,98,102,221,48,253,226,152,37,179,16,145,34,136,54,208,148,206,143,150,219,189,241,210,19,92,131,56,70,64,30,66,182,163,195,72,126,110,107,58,40,84,250,133,186,61,202,94,155,159,10,21,121,43,78,212,229,172,115,243,167,87,7,112,192,247,140,128,99,13,103,74,222,237,49,197,254,24,227,165,153,119,38,184,180,124,17,68,146,217,35,32,137,46,55,63,209,91,149,188,207,205,144,135,151,178,220,252,190,97,242,86,211,171,20,42,93,158,132,60,57,83,71,109,65,162,31,45,67,216,183,123,164,118,196,23,73,236,127,12,111,246,108,161,59,82,41,157,85,170,251,96,134,177,187,204,62,90,203,89,95,176,156,169,160,81,11,245,22,235,122,117,44,215,79,174,213,233,230,231,173,232,116,214,244,234,168,80,88,175],d=[1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38,76,152,45,90,180,117,234,201,143,3,6,12,24,48,96,192,157,39,78,156,37,74,148,53,106,212,181,119,238,193,159,35,70,140,5,10,20,40,80,160,93,186,105,210,185,111,222,161,95,190,97,194,153,47,94,188,101,202,137,15,30,60,120,240,253,231,211,187,107,214,177,127,254,225,223,163,91,182,113,226,217,175,67,134,17,34,68,136,13,26,52,104,208,189,103,206,129,31,62,124,248,237,199,147,59,118,236,197,151,51,102,204,133,23,46,92,184,109,218,169,79,158,33,66,132,21,42,84,168,77,154,41,82,164,85,170,73,146,57,114,228,213,183,115,230,209,191,99,198,145,63,126,252,229,215,179,123,246,241,255,227,219,171,75,150,49,98,196,149,55,110,220,165,87,174,65,130,25,50,100,200,141,7,14,28,56,112,224,221,167,83,166,81,162,89,178,121,242,249,239,195,155,43,86,172,69,138,9,18,36,72,144,61,122,244,245,247,243,251,235,203,139,11,22,44,88,176,125,250,233,207,131,27,54,108,216,173,71,142,0],u=[],f=[],p=[],g=[],v=[],m=2;function b(t,e){var n;t>e&&(n=t,t=e,e=n),n=e,n*=e,n+=e,n>>=1,g[n+=t]=1}function y(t,n){var i;for(p[t+e*n]=1,i=-2;i<2;i++)p[t+i+e*(n-2)]=1,p[t-2+e*(n+i+1)]=1,p[t+2+e*(n+i)]=1,p[t+i+1+e*(n+2)]=1;for(i=0;i<2;i++)b(t-1,n+i),b(t+1,n-i),b(t-i,n-1),b(t+i,n+1)}function w(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t}var x=[];function S(t,e,n,i){var r,a,s;for(r=0;r<i;r++)u[n+r]=0;for(r=0;r<e;r++){if(255!=(s=l[u[t+r]^u[n]]))for(a=1;a<i;a++)u[n+a-1]=u[n+a]^d[w(s+x[i-a])];else for(a=n;a<n+i;a++)u[a]=u[a+1];u[n+i-1]=255==s?0:d[w(s+x[0])]}}function k(t,e){var n;return t>e&&(n=t,t=e,e=n),n=e,n+=e*e,n>>=1,g[n+=t]}function _(t){var n,i,r,a;switch(t){case 0:for(i=0;i<e;i++)for(n=0;n<e;n++)n+i&1||k(n,i)||(p[n+i*e]^=1);break;case 1:for(i=0;i<e;i++)for(n=0;n<e;n++)1&i||k(n,i)||(p[n+i*e]^=1);break;case 2:for(i=0;i<e;i++)for(r=0,n=0;n<e;n++,r++)3==r&&(r=0),r||k(n,i)||(p[n+i*e]^=1);break;case 3:for(a=0,i=0;i<e;i++,a++)for(3==a&&(a=0),r=a,n=0;n<e;n++,r++)3==r&&(r=0),r||k(n,i)||(p[n+i*e]^=1);break;case 4:for(i=0;i<e;i++)for(r=0,a=i>>1&1,n=0;n<e;n++,r++)3==r&&(r=0,a=!a),a||k(n,i)||(p[n+i*e]^=1);break;case 5:for(a=0,i=0;i<e;i++,a++)for(3==a&&(a=0),r=0,n=0;n<e;n++,r++)3==r&&(r=0),(n&i&1)+!(!r|!a)||k(n,i)||(p[n+i*e]^=1);break;case 6:for(a=0,i=0;i<e;i++,a++)for(3==a&&(a=0),r=0,n=0;n<e;n++,r++)3==r&&(r=0),(n&i&1)+(r&&r==a)&1||k(n,i)||(p[n+i*e]^=1);break;case 7:for(a=0,i=0;i<e;i++,a++)for(3==a&&(a=0),r=0,n=0;n<e;n++,r++)3==r&&(r=0),(r&&r==a)+(n+i&1)&1||k(n,i)||(p[n+i*e]^=1)}}function T(t){var e,n=0;for(e=0;e<=t;e++)v[e]>=5&&(n+=3+v[e]-5);for(e=3;e<t-1;e+=2)v[e-2]==v[e+2]&&v[e+2]==v[e-1]&&v[e-1]==v[e+1]&&3*v[e-1]==v[e]&&(0==v[e-3]||e+3>t||3*v[e-3]>=4*v[e]||3*v[e+3]>=4*v[e])&&(n+=40);return n}function O(){var t,n,i,r,a,s=0,o=0;for(n=0;n<e-1;n++)for(t=0;t<e-1;t++)(p[t+e*n]&&p[t+1+e*n]&&p[t+e*(n+1)]&&p[t+1+e*(n+1)]||!(p[t+e*n]||p[t+1+e*n]||p[t+e*(n+1)]||p[t+1+e*(n+1)]))&&(s+=3);for(n=0;n<e;n++){for(v[0]=0,i=r=t=0;t<e;t++)(a=p[t+e*n])==r?v[i]++:v[++i]=1,o+=(r=a)?1:-1;s+=T(i)}o<0&&(o=-o);var c=o,h=0;for(c+=c<<2,c<<=1;c>e*e;)c-=e*e,h++;for(s+=10*h,t=0;t<e;t++){for(v[0]=0,i=r=n=0;n<e;n++)(a=p[t+e*n])==r?v[i]++:v[++i]=1,r=a;s+=T(i)}return s}var P=null;return{api:{get ecclevel(){return m},set ecclevel(t){m=t},get size(){return _size},set size(t){_size=t},get canvas(){return P},set canvas(t){P=t},getFrame:function(v){return function(v){var T,P,z,I,M,L,B,C;I=v.length,t=0;do{if(t++,z=4*(m-1)+16*(t-1),n=h[z++],i=h[z++],r=h[z++],a=h[z],I<=(z=r*(n+i)+i-3+(t<=9)))break}while(t<40);for(e=17+4*t,M=r+(r+a)*(n+i)+i,I=0;I<M;I++)f[I]=0;for(u=v.slice(0),I=0;I<e*e;I++)p[I]=0;for(I=0;I<(e*(e+1)+1)/2;I++)g[I]=0;for(I=0;I<3;I++){for(z=0,P=0,1==I&&(z=e-7),2==I&&(P=e-7),p[P+3+e*(z+3)]=1,T=0;T<6;T++)p[P+T+e*z]=1,p[P+e*(z+T+1)]=1,p[P+6+e*(z+T)]=1,p[P+T+1+e*(z+6)]=1;for(T=1;T<5;T++)b(P+T,z+1),b(P+1,z+T+1),b(P+5,z+T),b(P+T+1,z+5);for(T=2;T<4;T++)p[P+T+e*(z+2)]=1,p[P+2+e*(z+T+1)]=1,p[P+4+e*(z+T)]=1,p[P+T+1+e*(z+4)]=1}if(t>1)for(I=s[t],P=e-7;;){for(T=e-7;T>I-3&&(y(T,P),!(T<I));)T-=I;if(P<=I+9)break;y(6,P-=I),y(P,6)}for(p[8+e*(e-8)]=1,P=0;P<7;P++)b(7,P),b(e-8,P),b(7,P+e-7);for(T=0;T<8;T++)b(T,7),b(T+e-8,7),b(T,e-8);for(T=0;T<9;T++)b(T,8);for(T=0;T<8;T++)b(T+e-8,8),b(8,T);for(P=0;P<7;P++)b(8,P+e-7);for(T=0;T<e-14;T++)1&T?(b(8+T,6),b(6,8+T)):(p[8+T+6*e]=1,p[6+e*(8+T)]=1);if(t>6)for(I=o[t-7],z=17,T=0;T<6;T++)for(P=0;P<3;P++,z--)1&(z>11?t>>z-12:I>>z)?(p[5-T+e*(2-P+e-11)]=1,p[2-P+e-11+e*(5-T)]=1):(b(5-T,2-P+e-11),b(2-P+e-11,5-T));for(P=0;P<e;P++)for(T=0;T<=P;T++)p[T+e*P]&&b(T,P);for(M=u.length,L=0;L<M;L++)f[L]=u.charCodeAt(L);if(u=f.slice(0),M>=(T=r*(n+i)+i)-2&&(M=T-2,t>9&&M--),L=M,t>9){for(u[L+2]=0,u[L+3]=0;L--;)I=u[L],u[L+3]|=255&I<<4,u[L+2]=I>>4;u[2]|=255&M<<4,u[1]=M>>4,u[0]=64|M>>12}else{for(u[L+1]=0,u[L+2]=0;L--;)I=u[L],u[L+2]|=255&I<<4,u[L+1]=I>>4;u[1]|=255&M<<4,u[0]=64|M>>4}for(L=M+3-(t<10);L<T;)u[L++]=236,u[L++]=17;for(x[0]=1,L=0;L<a;L++){for(x[L+1]=1,B=L;B>0;B--)x[B]=x[B]?x[B-1]^d[w(l[x[B]]+L)]:x[B-1];x[0]=d[w(l[x[0]]+L)]}for(L=0;L<=a;L++)x[L]=l[x[L]];for(z=T,P=0,L=0;L<n;L++)S(P,r,z,a),P+=r,z+=a;for(L=0;L<i;L++)S(P,r+1,z,a),P+=r+1,z+=a;for(P=0,L=0;L<r;L++){for(B=0;B<n;B++)f[P++]=u[L+B*r];for(B=0;B<i;B++)f[P++]=u[n*r+L+B*(r+1)]}for(B=0;B<i;B++)f[P++]=u[n*r+L+B*(r+1)];for(L=0;L<a;L++)for(B=0;B<n+i;B++)f[P++]=u[T+L+B*a];for(u=f,T=P=e-1,z=M=1,C=(r+a)*(n+i)+i,L=0;L<C;L++)for(I=u[L],B=0;B<8;B++,I<<=1){128&I&&(p[T+e*P]=1);do{M?T--:(T++,z?0!=P?P--:(z=!z,6==(T-=2)&&(T--,P=9)):P!=e-1?P++:(z=!z,6==(T-=2)&&(T--,P-=8))),M=!M}while(k(T,P))}for(u=p.slice(0),I=0,P=3e4,z=0;z<8&&(_(z),(T=O())<P&&(P=T,I=z),7!=I);z++)p=u.slice(0);for(I!=z&&_(I),P=c[I+(m-1<<3)],z=0;z<8;z++,P>>=1)1&P&&(p[e-1-z+8*e]=1,z<6?p[8+e*z]=1:p[8+e*(z+1)]=1);for(z=0;z<7;z++,P>>=1)1&P&&(p[8+e*(e-7+z)]=1,z?p[6-z+8*e]=1:p[7+8*e]=1);return p}(v)},utf16to8:function(t){var e,n,i,r;for(e="",i=t.length,n=0;n<i;n++)(r=t.charCodeAt(n))>=1&&r<=127?e+=t.charAt(n):r>2047?(e+=String.fromCharCode(224|r>>12&15),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|r>>0&63)):(e+=String.fromCharCode(192|r>>6&31),e+=String.fromCharCode(128|r>>0&63));return e},draw:function(t,n,i,r,a){n.drawView(i,r);var s=n.ctx,o=i.contentSize,c=o.width,h=o.height,l=o.left,d=o.top;r.borderRadius,r.backgroundColor;var u=r.color,f=void 0===u?"#000000":u;if(r.border,i.contentSize.left,i.borderSize.left,i.contentSize.top,i.borderSize.top,m=a||m,s){s.save(),n.setOpacity(r),n.setTransform(i,r);var p=Math.min(c,h);t=this.utf16to8(t);var g=this.getFrame(t),v=p/e;s.setFillStyle(f);for(var b=0;b<e;b++)for(var y=0;y<e;y++)g[y*e+b]&&s.fillRect(l+v*b,d+v*y,v,v);s.restore(),n.setBorder(i,r)}else console.warn("No canvas provided to draw QR code in!")}}}}(),J=d,G=f,Q=l,Z="middle",K=function(){function t(t){var e,n=this;this.v="1.9.3.5",this.id=null,this.pixelRatio=1,this.width=0,this.height=0,this.sleep=1e3/30,this.count=0,this.isRate=!1,this.isDraw=!0,this.isCache=!0,this.fixed="",this.useCORS=!1,this.imageBus=[],this.createImage=function(t,e){return new Promise((function(n,i){if(window){var r=new Image;e&&r.setAttribute("crossOrigin","Anonymous"),r.src=t,r.onload=function(){n({width:r.naturalWidth||r.width,height:r.naturalHeight||r.height,path:r,src:this.src})},r.onerror=function(t){i(t)}}else i({fail:"getImageInfo fail",src:t})}))},this.options=t,Object.assign(this,t),this.ctx=((e=t.context).setFonts=function(t){var n=t.fontFamily,i=void 0===n?"sans-serif":n,r=t.fontSize,a=void 0===r?14:r,s=t.fontWeight,o=void 0===s?"normal":s,h=t.fontStyle,l=void 0===h?"normal":h;m==c.MP_TOUTIAO&&(o="bold"==o?"bold":"",l="italic"==l?"italic":""),e.font="".concat(l," ").concat(o," ").concat(Math.round(a),"px ").concat(i)},e.draw&&e.setFillStyle?e:Object.assign(e,{setStrokeStyle:function(t){e.strokeStyle=t},setLineWidth:function(t){e.lineWidth=t},setLineCap:function(t){e.lineCap=t},setFillStyle:function(t){e.fillStyle=t},setFontSize:function(t){e.font="".concat(String(t),"px sans-serif")},setGlobalAlpha:function(t){e.globalAlpha=t},setLineJoin:function(t){e.lineJoin=t},setTextAlign:function(t){e.textAlign=t},setMiterLimit:function(t){e.miterLimit=t},setShadow:function(t,n,i,r){e.shadowOffsetX=t,e.shadowOffsetY=n,e.shadowBlur=i,e.shadowColor=r},setTextBaseline:function(t){e.textBaseline=t},createCircularGradient:function(){},draw:function(){}})),this.progress=0,this.root={width:t.width,height:t.height,fontSizeRate:1,fixedLine:null},this.size=this.root;var i=0;Object.defineProperty(this,"progress",{configurable:!0,set:function(t){i=t,n.lifecycle("onProgress",t/n.count)},get:function(){return i||0}})}return t.prototype.lifecycle=function(t,e){this.options.listen&&this.options.listen[t]&&this.options.listen[t](e)},t.prototype.setContext=function(t){t&&(this.ctx=t)},t.prototype.init=function(){(this.canvas.height||c.WEB==m)&&(this.canvas.height=this.size.height*this.pixelRatio,this.canvas.width=this.size.width*this.pixelRatio,this.ctx.scale(this.pixelRatio,this.pixelRatio))},t.prototype.clear=function(){this.ctx.clearRect(0,0,this.size.width,this.size.height)},t.prototype.clipPath=function(t,e,n,i,r,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var o=this.ctx;if(/polygon/.test(r)){var c=r.match(/-?\d+(rpx|px|%)?\s+-?\d+(rpx|px|%)?/g)||[];o.beginPath(),c.map((function(r){var a=r.split(" "),s=a[0],o=a[1];return[x(s,n)+t,x(o,i)+e]})).forEach((function(t,e){0==e?o.moveTo(t[0],t[1]):o.lineTo(t[0],t[1])})),o.closePath(),s&&o.stroke(),a&&o.fill()}},t.prototype.roundRect=function(t,e,n,i,r,a,s){if(void 0===a&&(a=!1),void 0===s&&(s=!1),!(r<0)){var o=this.ctx;if(o.beginPath(),r){var c=r||{},h=c.borderTopLeftRadius,l=void 0===h?r||0:h,d=c.borderTopRightRadius,u=void 0===d?r||0:d,f=c.borderBottomRightRadius,p=void 0===f?r||0:f,g=c.borderBottomLeftRadius,v=void 0===g?r||0:g;o.arc(t+n-p,e+i-p,p,0,.5*Math.PI),o.lineTo(t+v,e+i),o.arc(t+v,e+i-v,v,.5*Math.PI,Math.PI),o.lineTo(t,e+l),o.arc(t+l,e+l,l,Math.PI,1.5*Math.PI),o.lineTo(t+n-u,e),o.arc(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI),o.lineTo(t+n,e+i-p)}else o.rect(t,e,n,i);o.closePath(),s&&o.stroke(),a&&o.fill()}},t.prototype.setTransform=function(t,e){var n=e.transform,i=e.transformOrigin,r=this.ctx,a=n||{},s=a.scaleX,o=void 0===s?1:s,c=a.scaleY,h=void 0===c?1:c,l=a.translateX,d=void 0===l?0:l,u=a.translateY,f=void 0===u?0:u,p=a.rotate,g=void 0===p?0:p,v=a.skewX,m=void 0===v?0:v,b=a.skewY,y=void 0===b?0:b,S=t.left,k=t.top,_=t.width,T=t.height;d=x(d,_)||0,f=x(f,T)||0;var O={top:x("0%",1),center:x("50%",1),bottom:x("100%",1)},P={left:x("0%",1),center:x("50%",1),right:x("100%",1)};if(i=i.split(" ").filter((function(t,e){return e<2})).reduce((function(t,e){if(/\d+/.test(e)){var n=x(e,1)/(/px|rpx$/.test(e)?w(t.x)?T:_:1);return w(t.x)?Object.assign(t,{y:n}):Object.assign(t,{x:n})}return w(P[e])&&!w(t.x)?Object.assign(t,{x:P[e]}):Object.assign(t,{y:O[e]||.5})}),{}),(d||f)&&r.translate(d,f),(o||h)&&r.scale(o,h),g){var z=S+_*i.x,I=k+T*i.y;r.translate(z,I),r.rotate(g*Math.PI/180),r.translate(-z,-I)}(m||y)&&r.transform(1,Math.tan(y*Math.PI/180),Math.tan(m*Math.PI/180),1,0,0)},t.prototype.setBackground=function(t,e,n,i,r){var a=this.ctx;t&&"transparent"!=t?function(t){return!(!t||!t.startsWith("linear")&&!t.startsWith("radial"))}(t)?function(t,e,n,i,r,a){t.startsWith("linear")?function(t,e,n,i,r,a){for(var s=function(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var a=t.match(/([-]?\d{1,3})deg/),s=a&&a[1]?parseFloat(a[1]):0;if(s>=360&&(s-=360),s<0&&(s+=360),0===(s=Math.round(s)))return{x0:Math.round(e/2)+i,y0:n+r,x1:Math.round(e/2)+i,y1:r};if(180===s)return{x0:Math.round(e/2)+i,y0:r,x1:Math.round(e/2)+i,y1:n+r};if(90===s)return{x0:i,y0:Math.round(n/2)+r,x1:e+i,y1:Math.round(n/2)+r};if(270===s)return{x0:e+i,y0:Math.round(n/2)+r,x1:i,y1:Math.round(n/2)+r};var o=Math.round(180*Math.asin(e/Math.sqrt(Math.pow(e,2)+Math.pow(n,2)))/Math.PI);if(s===o)return{x0:i,y0:n+r,x1:e+i,y1:r};if(s===180-o)return{x0:i,y0:r,x1:e+i,y1:n+r};if(s===180+o)return{x0:e+i,y0:r,x1:i,y1:n+r};if(s===360-o)return{x0:e+i,y0:n+r,x1:i,y1:r};var c,h=0,l=0,d=0,u=0;if(s<o||s>180-o&&s<180||s>180&&s<180+o||s>360-o){var f=s*Math.PI/180,p=s<o||s>360-o?n/2:-n/2,g=Math.tan(f)*p,v=s<o||s>180-o&&s<180?e/2-g:-e/2-g;h=-(d=g+(c=Math.pow(Math.sin(f),2)*v)),l=-(u=p+c/Math.tan(f))}(s>o&&s<90||s>90&&s<90+o||s>180+o&&s<270||s>270&&s<360-o)&&(f=(90-s)*Math.PI/180,g=s>o&&s<90||s>90&&s<90+o?e/2:-e/2,p=Math.tan(f)*g,v=s>o&&s<90||s>270&&s<360-o?n/2-p:-n/2-p,h=-(d=g+(c=Math.pow(Math.sin(f),2)*v)/Math.tan(f)),l=-(u=p+c));return h=Math.round(h+e/2)+i,l=Math.round(n/2-l)+r,d=Math.round(d+e/2)+i,u=Math.round(n/2-u)+r,{x0:h,y0:l,x1:d,y1:u}}(r,t,e,n,i),o=s.x0,c=s.y0,h=s.x1,l=s.y1,d=a.createLinearGradient(o,c,h,l),u=r.match(/linear-gradient\((.+)\)/)[1],f=k(u.substring(u.indexOf(",")+1)),p=0;p<f.colors.length;p++)d.addColorStop(f.percents[p],f.colors[p]);a.setFillStyle(d)}(e,n,i,r,t,a):t.startsWith("radial")&&function(t,e,n,i,r,a){for(var s=k(r.match(/radial-gradient\((.+)\)/)[1]),o=Math.round(t/2)+n,c=Math.round(e/2)+i,h=a.createRadialGradient(o,c,0,o,c,Math.max(t,e)/2),l=0;l<s.colors.length;l++)h.addColorStop(s.percents[l],s.colors[l]);a.setFillStyle(h)}(e,n,i,r,t,a)}(t,e,n,i,r,a):a.setFillStyle(t):[c.MP_TOUTIAO,c.MP_BAIDU].includes(m)?a.setFillStyle("rgba(0,0,0,0)"):a.setFillStyle("transparent")},t.prototype.setShadow=function(t){var e=t.boxShadow,n=void 0===e?[]:e,i=this.ctx;if(n.length){var r=n[0],a=n[1],s=n[2],o=n[3];i.setShadow(r,a,s,o)}},t.prototype.setBorder=function(t,e){var n=this.ctx,i=t.width,r=t.height,a=t.left,s=t.top,o=e.border,c=e.borderBottom,h=e.borderTop,l=e.borderRight,d=e.borderLeft,u=e.borderRadius,f=e.lineCap,p=o||{},g=p.borderWidth,v=void 0===g?0:g,b=p.borderStyle,y=p.borderColor,w=c||{},x=w.borderBottomWidth,S=void 0===x?v:x,k=w.borderBottomStyle,_=void 0===k?b:k,T=w.borderBottomColor,O=void 0===T?y:T,P=h||{},z=P.borderTopWidth,I=void 0===z?v:z,M=P.borderTopStyle,L=void 0===M?b:M,B=P.borderTopColor,C=void 0===B?y:B,j=l||{},R=j.borderRightWidth,W=void 0===R?v:R,$=j.borderRightStyle,F=void 0===$?b:$,A=j.borderRightColor,E=void 0===A?y:A,N=d||{},H=N.borderLeftWidth,D=void 0===H?v:H,U=N.borderLeftStyle,q=void 0===U?b:U,V=N.borderLeftColor,Y=void 0===V?y:V,X=u||{},J=X.borderTopLeftRadius,G=void 0===J?u||0:J,Q=X.borderTopRightRadius,Z=void 0===Q?u||0:Q,K=X.borderBottomRightRadius,tt=void 0===K?u||0:K,et=X.borderBottomLeftRadius,nt=void 0===et?u||0:et;if(c||d||h||l||o){var it=function(t,e,i){"dashed"==e?/mp/.test(m)?n.setLineDash([Math.ceil(4*t/3),Math.ceil(4*t/3)]):n.setLineDash([Math.ceil(6*t),Math.ceil(6*t)]):"dotted"==e&&n.setLineDash([t,t]),n.setStrokeStyle(i)},rt=function(t,e,i,r,a,s,o,c,h,l,d,u,p,g,v){n.save(),n.setLineCap(v?"square":f),n.setLineWidth(u),it(u,p,g),n.beginPath(),n.arc(t,e,o,Math.PI*h,Math.PI*l),n.lineTo(i,r),n.arc(a,s,c,Math.PI*l,Math.PI*d),n.stroke(),n.restore()};if(n.save(),o&&!c&&!d&&!h&&!l)return n.setLineWidth(v),it(v,b,y),this.roundRect(a,s,i,r,u,!1,!!y),void n.restore();S&&rt(a+i-tt,s+r-tt,a+nt,s+r,a+nt,s+r-nt,tt,nt,.25,.5,.75,S,_,O,D&&W),D&&rt(a+nt,s+r-nt,a,s+G,a+G,s+G,nt,G,.75,1,1.25,D,q,Y,I&&S),I&&rt(a+G,s+G,a+i-Z,s,a+i-Z,s+Z,G,Z,1.25,1.5,1.75,I,L,C,D&&W),W&&rt(a+i-Z,s+Z,a+i,s+r-tt,a+i-tt,s+r-tt,Z,tt,1.75,2,.25,W,F,E,I&&S)}},t.prototype.setOpacity=function(t){var e=t.opacity,n=void 0===e?1:e;this.ctx.setGlobalAlpha(n)},t.prototype.drawPattern=function(t,e,n){return s(this,void 0,void 0,(function(){var i=this;return o(this,(function(r){return[2,new Promise((function(r,a){i.drawView(e,n,!0,!1,!0);var s=i,o=s.ctx;s.canvas;var c=e.width,h=e.height,l=e.left,d=e.top,u=n||{},f=u.borderRadius,p=void 0===f?0:f,g=u.backgroundImage,v=u.backgroundRepeat,m=void 0===v?"repeat":v;g&&function(t){var a=o.createPattern(t.src,m);o.setFillStyle(a),i.roundRect(l,d,c,h,p,!0,!1),i.setBorder(e,n),r()}(t)}))]}))}))},t.prototype.drawView=function(t,e,n,i,r){void 0===n&&(n=!0),void 0===i&&(i=!0),void 0===r&&(r=!0);var a=this.ctx,s=t.width,o=t.height,c=t.left,h=t.top,l=e||{},d=l.borderRadius,u=void 0===d?0:d,f=l.backgroundColor,p=void 0===f?"transparent":f,g=l.overflow;e.opacity&&this.setOpacity(e),this.setTransform(t,e),r&&(a.save(),this.setShadow(e)),n&&this.setBackground(p,s,o,c,h),e.clipPath?this.clipPath(c,h,s,o,e.clipPath,n,!1):this.roundRect(c,h,s,o,u,n,!1),r&&a.restore(),i&&this.setBorder(t,e),"hidden"==g&&a.clip()},t.prototype.drawImage=function(t,e,n,i){return void 0===e&&(e={}),void 0===n&&(n={}),void 0===i&&(i=!0),s(this,void 0,void 0,(function(){var r=this;return o(this,(function(a){switch(a.label){case 0:return[4,new Promise((function(a,h){return s(r,void 0,void 0,(function(){var r,s,h,l,d,u,f,p,g,v,b,y,w,k,_,T,O,P,z,I,M,L=this;return o(this,(function(o){return r=this.ctx,s=n.borderRadius,h=void 0===s?0:s,l=n.backgroundColor,d=void 0===l?"transparent":l,u=n.objectFit,f=void 0===u?"fill":u,p=n.backgroundSize,g=void 0===p?"fill":p,v=n.objectPosition,b=n.backgroundPosition,y=n.boxShadow,n.backgroundImage&&(f=g,v=b),y&&this.drawView(e,Object.assign(n,{backgroundColor:d||y&&(d||"#ffffff")}),!0,!1,!0),w=e.width,k=e.height,_=e.left,T=e.top,r.save(),O=e.contentSize.left-e.borderSize.left,P=e.contentSize.top-e.borderSize.top,i||(this.setOpacity(n),this.setTransform(e,n),this.setBackground(d,w,k,_,T),this.roundRect(_,T,w,k,h,!!(h||!y&&d),!1)),_+=O,T+=P,r.clip(),z=function(t){if("fill"!==f){var n=function(t,e,n){var i=t.objectFit,r=t.objectPosition,a=e.width/e.height,s=n.width/n.height,o=1;"contain"==i&&a>=s||"cover"==i&&a<s?o=e.height/n.height:("contain"==i&&a<s||"cover"==i&&a>=s)&&(o=e.width/n.width);var c=n.width*o,h=n.height*o,l=r||[],d=l[0],u=l[1],f=/^\d+px|rpx$/.test(d)?x(d,e.width):(e.width-c)*(S(d)?x(d,1):{left:0,center:.5,right:1}[d||"center"]),p=/^\d+px|rpx$/.test(u)?x(u,e.height):(e.height-h)*(S(u)?x(u,1):{top:0,center:.5,bottom:1}[u||"center"]),g=function(t,e){return[(t-f)/o,(e-p)/o]},v=g(0,0),m=v[0],b=v[1],y=g(e.width,e.height),w=y[0],k=y[1];return{sx:Math.max(m,0),sy:Math.max(b,0),sw:Math.min(w-m,n.width),sh:Math.min(k-b,n.height),dx:Math.max(f,0),dy:Math.max(p,0),dw:Math.min(c,e.width),dh:Math.min(h,e.height)}}({objectFit:f,objectPosition:v},e.contentSize,t),i=n.sx,a=n.sy,s=n.sh,o=n.sw,h=n.dx,l=n.dy,d=n.dh,u=n.dw;m==c.MP_BAIDU?r.drawImage(t.src,h+_,l+T,u,d,i,a,o,s):r.drawImage(t.src,i,a,o,s,h+_,l+T,u,d)}else r.drawImage(t.src,_,T,w,k)},I=function(){r.restore(),L.drawView(e,n,!1,!0,!1),a(1)},M=function(t){z(t),I()},M(t),[2]}))}))}))];case 1:return a.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,n,i){var r=this.ctx,a=e.borderSize,s=e.contentSize,o=e.left,c=e.top,h=s.width,l=s.height,d=s.left-a.left,u=s.top-a.top,f=n.color,p=void 0===f?"#000000":f,g=n.lineHeight,v=void 0===g?"1.4em":g,m=n.fontSize,b=void 0===m?14:m,y=n.fontWeight,w=n.fontFamily,S=n.fontStyle,k=n.textAlign,_=void 0===k?"left":k,T=n.verticalAlign,O=void 0===T?Z:T,P=n.backgroundColor,z=n.lineClamp,I=n.backgroundClip,M=n.textShadow,L=n.textDecoration;if(this.drawView(e,n,I!=J),v=x(v,b),t){r.save(),this.setShadow({boxShadow:M}),o+=d,c+=u;var B=i.fontHeight,C=i.descent+i.ascent;switch(r.setFonts({fontFamily:w,fontSize:b,fontWeight:y,fontStyle:S}),r.setTextBaseline(C?Z:O),r.setTextAlign(_),I?this.setBackground(P,h,l,o,c):r.setFillStyle(p),_){case"left":break;case"center":o+=.5*h;break;case"right":o+=h}var j=i.lines*v,R=Math.ceil((l-j)/2);switch(R<0&&(R=0),O){case"top":break;case Z:c+=R;break;case"bottom":c+=2*R}var W=(v-B)/2,$=function(t){var e=r.measureText(t),n=e.actualBoundingBoxDescent,i=void 0===n?0:n,a=e.actualBoundingBoxAscent;return"top"==O?{fix:C?void 0===a?0:a:0,lineY:C?2*W:W}:O==Z?{fix:C?v/2+i/4:v/2,lineY:(v-B)/2}:"bottom"==O?{fix:C?v-i:v+W,lineY:0}:{fix:0,height:0,lineY:0}},F=function(t,e,n){var a=t;switch(_){case"left":a+=n;break;case"center":a=(t-=n/2)+n;break;case"right":a=t,t-=n}if(L){r.setLineWidth(b/13),r.beginPath();var s=.1*i.fontHeight;/\bunderline\b/.test(L)&&(r.moveTo(t,e+s),r.lineTo(a,e+s)),/\boverline\b/.test(L)&&(C||(e-=W),r.moveTo(t,e-i.fontHeight-s),r.lineTo(a,e-i.fontHeight-s)),/\bline-through\b/.test(L)&&(r.moveTo(t,e-.5*i.fontHeight),r.lineTo(a,e-.5*i.fontHeight)),r.closePath(),r.setStrokeStyle(p),r.stroke()}};if(!i.widths||1==i.widths.length&&i.widths[0].total<=s.width){var A=$(t),E=A.fix,N=A.lineY;return r.fillText(t,o,c+E),F(o,(c+=v)-N,i&&i.widths&&i.widths[0].total||i.text),r.restore(),void this.setBorder(e,n)}for(var H=t.split(""),D=c,U=o,q="",V=0,Y=0;Y<=H.length;Y++){var X=H[Y]||"",G="\n"===X,Q=""==X,K=q+(X=G?"":X),tt=r.measureText(K).width;if(V>=z)break;if(U=o,tt>s.width||G||Q){if(V++,q=Q&&tt<=s.width?K:q,V===z&&tt>h){for(;r.measureText("".concat(q,"...")).width>s.width&&!(q.length<=1);)q=q.substring(0,q.length-1);q+="..."}var et=$(q);if(E=et.fix,N=et.lineY,r.fillText(q,U,c+E),F(U,(c+=v)-N,tt),q=X,c>D+l)break}else q=K}r.restore()}},t.prototype.source=function(t){return s(this,void 0,void 0,(function(){var e,n,i,r=this;return o(this,(function(a){switch(a.label){case 0:if(this.node=null,e=+new Date,"{}"==JSON.stringify(t))return[2];if(!t.type)for(n in t.type=Q,t.css=t.css||{},t)["views","children","type","css"].includes(n)||(t.css[n]=t[n],delete t[n]);return t.css&&!t.css.width&&(t.css||(t.css={})),[4,this.create(t)];case 1:return(i=a.sent())?(this.size=i.layout()||{},this.node=i,this.onEffectFinished().then((function(t){return r.lifecycle("onEffectSuccess",t)})).catch((function(t){return r.lifecycle("onEffectFail",t)})),console.log("布局用时:"+(+new Date-e)+"ms"),[2,this.size]):[2,console.warn("no node")]}}))}))},t.prototype.getImageInfo=function(t){return this.imageBus[t]||(this.imageBus[t]=this.createImage(t,this.useCORS)),this.imageBus[t]},t.prototype.create=function(t,e){return s(this,void 0,void 0,(function(){var n,i,r,s,c,h,l,d,u,f,p,g,v,m,b,y,w;return o(this,(function(o){switch(o.label){case 0:if(n="image"==t.type,i=[J,G].includes(t.type),r=t.css||{},s=r.backgroundImage,c=r.display,n&&!t.src&&!t.url||i&&!t.text)return[2];if("none"==c)return[2];if(i&&(t.text=String(t.text)),!(n||t.type==Q&&s))return[3,4];h=n?t.src:"",l=/url\((.+)\)/.exec(s),s&&l&&l[1]&&(h=l[1]||""),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.getImageInfo(h)];case 2:return d=o.sent(),u=d.width,f=d.height,!(p=d.path)&&n?[2]:(p&&(t.attributes=Object.assign(t.attributes||{},{width:u,height:f,path:p,src:p,naturalSrc:h})),[3,4]);case 3:return g=o.sent(),t.type!=Q?[2]:(this.lifecycle("onEffectFail",a(a({},g),{src:h})),[3,4]);case 4:if(this.count+=1,v=new Y(t,e,this.root,this.ctx),!(m=t.views||t.children))return[3,8];b=0,o.label=5;case 5:return b<m.length?(y=m[b],[4,this.create(y,v)]):[3,8];case 6:(w=o.sent())&&v.add(w),o.label=7;case 7:return b++,[3,5];case 8:return[2,v]}}))}))},t.prototype.drawNode=function(t,e){return void 0===e&&(e=!1),s(this,void 0,void 0,(function(){var n,i,r,a,s,c,h,l,d,u,f,p,g,v,m,b,y,w,x,S;return o(this,(function(o){switch(o.label){case 0:return n=t.layoutBox,i=t.computedStyle,r=t.attributes,a=t.name,s=t.children,c=t.fixedLine,h=t.attributes,l=h.src,d=h.text,["fixed"].includes(i.position)&&!e?[2]:(this.ctx.save(),a!==Q?[3,7]:l?i.backgroundRepeat?[4,this.drawPattern(r,n,i)]:[3,2]:[3,5]);case 1:return o.sent(),[3,4];case 2:return[4,this.drawImage(r,n,i,!1)];case 3:o.sent(),o.label=4;case 4:return[3,6];case 5:this.drawView(n,i),o.label=6;case 6:return[3,10];case 7:return"image"===a&&l?[4,this.drawImage(r,n,i,!1)]:[3,9];case 8:return o.sent(),[3,10];case 9:a===J?this.drawText(d,n,i,r):a===G&&X.api&&X.api.draw(d,this,n,i),o.label=10;case 10:if(this.progress+=1,f=(u=c||{}).beforeElements,p=u.afterElements,!f)return[3,14];g=0,v=f,o.label=11;case 11:return g<v.length?(S=v[g],[4,this.drawNode(S)]):[3,14];case 12:o.sent(),o.label=13;case 13:return g++,[3,11];case 14:if(!s)return[3,18];m=Object.values?Object.values(s):Object.keys(s).map((function(t){return s[t]})),b=0,y=m,o.label=15;case 15:return b<y.length?"absolute"===(S=y[b]).computedStyle.position?[3,17]:[4,this.drawNode(S)]:[3,18];case 16:o.sent(),o.label=17;case 17:return b++,[3,15];case 18:if(!p)return[3,22];w=0,x=p,o.label=19;case 19:return w<x.length?(S=x[w],[4,this.drawNode(S)]):[3,22];case 20:o.sent(),o.label=21;case 21:return w++,[3,19];case 22:return this.ctx.restore(),[2]}}))}))},t.prototype.render=function(t){var e=this;return void 0===t&&(t=30),new Promise((function(n,i){return s(e,void 0,void 0,(function(){var e,r,a,s,c,h,l,d,u,f;return o(this,(function(o){switch(o.label){case 0:return e=+new Date,this.init(),[4,(p=t,void 0===p&&(p=0),new Promise((function(t){return setTimeout(t,p)})))];case 1:o.sent(),o.label=2;case 2:if(o.trys.push([2,14,,15]),!this.node)return[3,12];if(r=this.root.fixedLine||{},a=r.beforeElements,s=r.afterElements,!a)return[3,6];c=0,h=a,o.label=3;case 3:return c<h.length?(u=h[c],[4,this.drawNode(u,!0)]):[3,6];case 4:o.sent(),o.label=5;case 5:return c++,[3,3];case 6:return[4,this.drawNode(this.node)];case 7:if(o.sent(),!s)return[3,11];l=0,d=s,o.label=8;case 8:return l<d.length?(u=d[l],[4,this.drawNode(u,!0)]):[3,11];case 9:o.sent(),o.label=10;case 10:return l++,[3,8];case 11:return n(this.node),[3,13];case 12:this.lifecycle("onEffectFail","node is empty"),o.label=13;case 13:return[3,15];case 14:return f=o.sent(),this.lifecycle("onEffectFail",f),i(f),[3,15];case 15:return console.log("渲染用时:"+(+new Date-e-30)+"ms"),[2]}var p}))}))}))},t.prototype.onEffectFinished=function(){var t=this,e=Object.keys(this.imageBus).map((function(e){return t.imageBus[e]}));return Promise.all(e)},t.prototype.destroy=function(){this.node=[]},t.prototype.save=function(t){try{var e=t||{},n=e.fileType,i=void 0===n?"png":n,r=e.quality,a=void 0===r?1:r;return this.canvas.toDataURL("image/".concat(i),a)}catch(t){return this.lifecycle("onEffectFail","image cross domain"),t}},t}();e.default=e.Painter=K,c.WEB==m&&(window.Painter=K)},a6c1:function(t,e,n){"use strict";n.r(e);var i=n("0007"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},a83d:function(t,e,n){var i=n("f34c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("4f06").default;r("2f400aaf",i,!0,{sourceMap:!1,shadowMode:!1})},ab99:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={props:{content:String,copyLink:{type:Boolean,default:uni.$u.props.parse.copyLink},domain:String,errorImg:{type:String,default:uni.$u.props.parse.errorImg},lazyLoad:{type:Boolean,default:uni.$u.props.parse.lazyLoad},loadingImg:{type:String,default:uni.$u.props.parse.loadingImg},pauseVideo:{type:Boolean,default:uni.$u.props.parse.pauseVideo},previewImg:{type:Boolean,default:uni.$u.props.parse.previewImg},scrollTable:Boolean,selectable:Boolean,setTitle:{type:Boolean,default:uni.$u.props.parse.setTitle},showImgMenu:{type:Boolean,default:uni.$u.props.parse.showImgMenu},tagStyle:Object,useAnchor:null}};e.default=i},b14e:function(t,e,n){"use strict";n.r(e);var i=n("9a87"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},b4f3:function(t,e,n){"use strict";var i=n("a83d"),r=n.n(i);r.a},b9a8:function(t,e,n){"use strict";var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.children=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.indexKey;return{inject:(0,s.default)({},t,{default:null}),watch:{el:{handler:function(t,e){JSON.stringify(t)!=JSON.stringify(e)&&this.bindRelation()},deep:!0,immediate:!0},src:{handler:function(t,e){t!=e&&this.bindRelation()},immediate:!0},text:{handler:function(t,e){t!=e&&this.bindRelation()},immediate:!0},css:{handler:function(t,e){t!=e&&(this.el.css=("object"==(0,a.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(o(t))))||{})},immediate:!0},replace:{handler:function(t,e){JSON.stringify(t)!=JSON.stringify(e)&&this.bindRelation()},deep:!0,immediate:!0}},created:function(){var e=this;this._uid||(this._uid=this._.uid),Object.defineProperty(this,"parent",{get:function(){return e[t]||[]}}),Object.defineProperty(this,"index",{get:function(){e.bindRelation();var t=e.parent;t=void 0===t?{}:t;var n=t.el;n=void 0===n?{}:n;var i=n.views,r=void 0===i?[]:i;return r.indexOf(e.el)}}),this.el.type=this.type,this.bindRelation()},beforeDestroy:function(){this.removeEl()},methods:{removeEl:function(){var t=this;this.parent&&(this.parent.el.views=this.parent.el.views.filter((function(e){return e._uid!==t._uid})))},bindRelation:function(){var t=this;if(this.el._uid||(this.el._uid=this._uid),["text","qrcode"].includes(this.type)&&(this.el.text=this.$slots&&this.$slots.default&&this.$slots.default[0].text||"".concat(this.text||"").replace(/\\n/g,"\n")),"image"==this.type&&(this.el.src=this.src),this.parent){var e=this.parent.el.views||[];-1!==e.indexOf(this.el)?this.parent.el.views=e.map((function(e){return e._uid==t._uid?t.el:e})):this.parent.el.views=[].concat((0,r.default)(e),[this.el])}}},mounted:function(){}}},e.parent=function(t){return{provide:function(){return(0,s.default)({},t,this)},data:function(){return{el:{css:{},views:[]}}},watch:{css:{handler:function(t){this.canvasId&&(this.el.css=("object"==(0,a.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(o(t))))||{},this.canvasWidth=this.el.css&&this.el.css.width||this.canvasWidth,this.canvasHeight=this.el.css&&this.el.css.height||this.canvasHeight)},immediate:!0}}}};var r=i(n("2909")),a=i(n("53ca")),s=i(n("ade3"));n("d81d"),n("4de4"),n("d3b7"),n("ac1f"),n("00b4"),n("fb6a"),n("c975"),n("5319"),n("e9c4"),n("7a82"),n("caad"),n("99af");var o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter((function(t){return t&&!/^[\n\s]+$/.test(t)})).map((function(t){var e=t.slice(0,t.indexOf(":")),n=t.slice(t.indexOf(":")+1);return(0,s.default)({},e.replace(/-([a-z])/g,(function(){return arguments[1].toUpperCase()})).replace(/\s+/g,""),n.replace(/^\s+/,"").replace(/\s+$/,"")||"")}))}},baa5:function(t,e,n){var i=n("23e7"),r=n("e58c");i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},c20c:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("14d9"),n("d3b7"),n("e25e"),n("ac1f"),n("5319"),n("99af");var r=i(n("ab99")),a=i(n("3e22")),s=[],o=n("9652"),c={name:"mp-html",data:function(){return{nodes:[]}},mixins:[r.default],components:{node:a.default},watch:{content:function(t){this.setContent(t)}},created:function(){this.plugins=[];for(var t=s.length;t--;)this.plugins.push(new s[t](this))},mounted:function(){this.content&&!this.nodes.length&&this.setContent(this.content)},beforeDestroy:function(){this._hook("onDetached"),clearInterval(this._timer)},methods:{in:function(t,e,n){t&&e&&n&&(this._in={page:t,selector:e,scrollTop:n})},navigateTo:function(t,e){var n=this;return new Promise((function(i,r){if(!n.useAnchor)return r("Anchor is disabled");e=e||parseInt(n.useAnchor)||0;var a=uni.createSelectorQuery().in(n._in?n._in.page:n).select((n._in?n._in.selector:"._root")+(t?"".concat(" ","#").concat(t):"")).boundingClientRect();n._in?a.select(n._in.selector).scrollOffset().select(n._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec((function(t){if(!t[0])return r("Label not found");var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+e;n._in?n._in.page[n._in.scrollTop]=a:uni.pageScrollTo({scrollTop:a,duration:300}),i()}))}))},getText:function(){var t="";return function e(n){for(var i=0;i<n.length;i++){var r=n[i];if("text"==r.type)t+=r.text.replace(/&amp;/g,"&");else if("br"==r.name)t+="\n";else{var a="p"==r.name||"div"==r.name||"tr"==r.name||"li"==r.name||"h"==r.name[0]&&r.name[1]>"0"&&r.name[1]<"7";a&&t&&"\n"!=t[t.length-1]&&(t+="\n"),r.children&&e(r.children),a&&"\n"!=t[t.length-1]?t+="\n":"td"!=r.name&&"th"!=r.name||(t+="\t")}}}(this.nodes),t},getRect:function(){var t=this;return new Promise((function(e,n){uni.createSelectorQuery().in(t).select("#_root").boundingClientRect().exec((function(t){return t[0]?e(t[0]):n("Root label not found")}))}))},setContent:function(t,e){var n=this;e&&this.imgList||(this.imgList=[]);var i,r=new o(this).parse(t);this.$set(this,"nodes",e?(this.nodes||[]).concat(r):r),this._videos=[],this.$nextTick((function(){n._hook("onLoad"),n.$emit("load")})),clearInterval(this._timer),this._timer=setInterval((function(){n.getRect().then((function(t){t.height==i&&(n.$emit("ready",t),clearInterval(n._timer)),i=t.height})).catch((function(){}))}),350)},_hook:function(t){for(var e=s.length;e--;)this.plugins[e][t]&&this.plugins[e][t]()}}};e.default=c},d048:function(t,e,n){"use strict";n.r(e);var i=n("c20c"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},d06d:function(t,e,n){"use strict";var i=n("5b58"),r=n.n(i);r.a},d5b1:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".lime-painter[data-v-0fba428e],\n.lime-painter__canvas[data-v-0fba428e]{\nwidth:100%;\n}",""]),t.exports=e},d788:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={tnNavBar:n("f71b").default,zPaging:n("c8c7").default,uIcon:n("94f3").default,uParse:n("dcc4").default,wikeLoadingPage:n("f6b0").default,uPopup:n("a2a6").default,wikePainter:n("7275").default},r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticStyle:{color:"#fff"}},[n("tn-nav-bar",{attrs:{backgroundColor:"#26B3A0",bottomShadow:!1}},[t._v("绘画记录")])],1),n("z-paging",{ref:"paging",attrs:{"refresher-complete-delay":"200"},on:{query:function(e){arguments[0]=e=t.$handleEvent(e),t.queryList.apply(void 0,arguments)}},model:{value:t.drawList,callback:function(e){t.drawList=e},expression:"drawList"}},[n("v-uni-view",{staticClass:"z_tabs",style:{marginTop:t.tobheight+"px"},attrs:{slot:"top"},slot:"top"}),n("v-uni-view",{staticClass:"u-flex flex-wrap"},[t._l(t.drawList,(function(e,i){return[n("v-uni-view",{key:i+"_0",staticClass:"draw_view"},[e.imgs_file.length>1?n("v-uni-view",{staticClass:"sheets"},[t._v(t._s(e.imgs_file.length)+"张")]):t._e(),1==e.done&&1==e.status?n("v-uni-view",{staticClass:"draw_image u-flex align-center"},[n("v-uni-image",{attrs:{src:e.imgs_file[e.steps]?e.imgs_file[e.steps]:e.origin_url,mode:"widthFix"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.preview(i)}}}),e.imgs_file.length>1?n("v-uni-view",{staticClass:"imgs_arrow u-flex align-center justify-between"},[n("v-uni-view",{staticClass:"arrow",on:{click:function(n){n.stopPropagation(),arguments[0]=n=t.$handleEvent(n),0!=e.steps&&e.steps--}}},[n("u-icon",{attrs:{name:"arrow-left",color:"#fff",size:"28"}})],1),n("v-uni-view",{staticClass:"arrow",on:{click:function(n){n.stopPropagation(),arguments[0]=n=t.$handleEvent(n),e.steps!=e.imgs_file.length-1&&e.steps++}}},[n("u-icon",{attrs:{name:"arrow-right",color:"#fff",size:"28"}})],1)],1):t._e()],1):n("v-uni-view",{staticClass:"draw_done u-flex align-center justify-center"},[1==e.done?[t._v(t._s(0==e.status?"图片正在审核中...":2==e.status?"图片审核不通过":"图片审核通过"))]:[t._v(t._s(0==e.done?"图片正在生成中...":2==e.done?"图片生成失败":"图片生成成功"))]],2),n("v-uni-view",{staticClass:"prompt"},[n("u-parse",{attrs:{content:e.prompt,selectable:!0}})],1),n("v-uni-view",{staticClass:"create_time"},[t._v("AI绘画:"+t._s("sd"==e.engine?"StableDiffusion绘图":"MidJourney绘图"))]),n("v-uni-view",{staticClass:"create_time"},[t._v("创建时间:"+t._s(e.create_time))]),1==e.done&&1==e.status?n("v-uni-view",{staticClass:"tn-flex justify-between operate"},[n("v-uni-view",{staticClass:"onekey",attrs:{"hover-class":"hoversubmit"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.tnproduct(e.id,e.engine)}}},[t._v("绘画详情")]),n("v-uni-view",{staticClass:"onekey",staticStyle:{background:"#FFC107"},attrs:{"hover-class":"hoversubmit"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.createPoster(i,e.steps)}}},[t._v("生成海报")])],1):t._e(),e.done>0&&e.status>0?n("v-uni-view",{staticClass:"circle",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.gallerydel(i)}}},[n("u-icon",{attrs:{name:"close-circle-fill",color:"#e83a30",size:"24"}})],1):t._e()],1)]}))],2)],1),n("wike-loading-page",{attrs:{isLoading:t.isLoading}}),n("u-popup",{attrs:{show:t.showPoster,mode:"bottom"},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.showPoster=!1}}},[n("v-uni-scroll-view",{style:{maxHeight:t.posterheight+"px"},attrs:{"scroll-y":"true"}},[n("wike-painter",{ref:"painter",attrs:{board:t.posterObj},on:{done:function(e){arguments[0]=e=t.$handleEvent(e),t.posterSuccess.apply(void 0,arguments)}}}),n("v-uni-view",{staticStyle:{height:"78px"}}),n("v-uni-view",{staticClass:"dygbhg"},[n("v-uni-view",{staticClass:"whole",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showPoster=!1}}},[t._v("取消")]),n("v-uni-view",{staticClass:"distinguish",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toSave.apply(void 0,arguments)}}},[t._v("保存/分享")])],1)],1)],1)],1)},a=[]},d8fb:function(t,e,n){"use strict";n.r(e);var i=n("d788"),r=n("a6c1");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("7b2f");var s=n("f0c5"),o=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"78c80054",null,!1,i["a"],void 0);e["default"]=o.exports},dcc4:function(t,e,n){"use strict";n.r(e);var i=n("9a3c"),r=n("d048");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("d06d");var s=n("f0c5"),o=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"55ff4e76",null,!1,i["a"],void 0);e["default"]=o.exports},ded3:function(t,e,n){n("b64b"),n("a4d3"),n("4de4"),n("d3b7"),n("e439"),n("14d9"),n("159b"),n("dbb4"),n("1d1c"),n("7a82");var i=n("9523");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t},t.exports.__esModule=!0,t.exports["default"]=t.exports},f148:function(t,e,n){var i=n("d5b1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("4f06").default;r("0c60db80",i,!0,{sourceMap:!1,shadowMode:!1})},f34c:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,"\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/* a 标签默认效果 */._a[data-v-143368c6]{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}\r\n/* a 标签点击态效果 */._hover[data-v-143368c6]{text-decoration:underline;opacity:.7}\r\n/* 图片默认效果 */._img[data-v-143368c6]{max-width:100%;-webkit-touch-callout:none}\r\n/* 内部样式 */._b[data-v-143368c6],\r\n._strong[data-v-143368c6]{font-weight:700}._code[data-v-143368c6]{font-family:monospace}._del[data-v-143368c6]{text-decoration:line-through}._em[data-v-143368c6],\r\n._i[data-v-143368c6]{font-style:italic}._h1[data-v-143368c6]{font-size:2em}._h2[data-v-143368c6]{font-size:1.5em}._h3[data-v-143368c6]{font-size:1.17em}._h5[data-v-143368c6]{font-size:.83em}._h6[data-v-143368c6]{font-size:.67em}._h1[data-v-143368c6],\r\n._h2[data-v-143368c6],\r\n._h3[data-v-143368c6],\r\n._h4[data-v-143368c6],\r\n._h5[data-v-143368c6],\r\n._h6[data-v-143368c6]{display:block;font-weight:700}._image[data-v-143368c6]{height:1px}._ins[data-v-143368c6]{text-decoration:underline}._li[data-v-143368c6]{display:list-item}._ol[data-v-143368c6]{list-style-type:decimal}._ol[data-v-143368c6],\r\n._ul[data-v-143368c6]{display:block;padding-left:40px;margin:1em 0}._q[data-v-143368c6]::before{content:'\"'}._q[data-v-143368c6]::after{content:'\"'}._sub[data-v-143368c6]{font-size:smaller;vertical-align:sub}._sup[data-v-143368c6]{font-size:smaller;vertical-align:super}._thead[data-v-143368c6],\r\n._tbody[data-v-143368c6],\r\n._tfoot[data-v-143368c6]{display:table-row-group}._tr[data-v-143368c6]{display:table-row}._td[data-v-143368c6],\r\n._th[data-v-143368c6]{display:table-cell;vertical-align:middle}._th[data-v-143368c6]{font-weight:700;text-align:center}._ul[data-v-143368c6]{list-style-type:disc}._ul ._ul[data-v-143368c6]{margin:0;list-style-type:circle}._ul ._ul ._ul[data-v-143368c6]{list-style-type:square}._abbr[data-v-143368c6],\r\n._b[data-v-143368c6],\r\n._code[data-v-143368c6],\r\n._del[data-v-143368c6],\r\n._em[data-v-143368c6],\r\n._i[data-v-143368c6],\r\n._ins[data-v-143368c6],\r\n._label[data-v-143368c6],\r\n._q[data-v-143368c6],\r\n._span[data-v-143368c6],\r\n._strong[data-v-143368c6],\r\n._sub[data-v-143368c6],\r\n._sup[data-v-143368c6]{display:inline}\r\n\r\n",""]),t.exports=e}}]);