bundle-pages-bargain_progress-bargain_progress~bundle-pages-invite_poster-invite_poster.2675c16a.js 80 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["bundle-pages-bargain_progress-bargain_progress~bundle-pages-invite_poster-invite_poster"],{"0932":function(t,e,i){var n=i("ce1c");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("967d").default;r("38ee5d4d",n,!0,{sourceMap:!1,shadowMode:!1})},1164:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("2634")),o=n(i("2fdc"));i("c223"),i("dc8a"),i("d4b5"),i("bf0f"),i("5c47"),i("7a76"),i("c9b5"),i("a1c1");var a=i("cf2e"),s=n(i("bfc24")),c=i("36d0"),u=n(i("7006")),h={name:"lime-painter",mixins:[s.default,(0,a.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,i=void 0===e?0:e,n=(0,c.toPx)(i||this.width);return n||Math.max(n,(0,c.toPx)(this.canvasWidth))},boardHeight:function(){var t=this.elements&&this.elements.css||this.elements||this,e=t.height,i=void 0===e?0:e,n=(0,c.toPx)(i||this.height);return n||Math.max(n,(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,o.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 i=this;return(0,o.default)((0,r.default)().mark((function n(){return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t&&t.views&&(i.firstRender?i.firstRender:t.views.length)&&Object.keys(t).length&&JSON.stringify(t)!=JSON.stringify(e)){n.next=2;break}return n.abrupt("return");case 2:i.firstRender=1,clearTimeout(i.rendertimer),i.rendertimer=setTimeout((function(){i.render(t)}),i.beforeDelay);case 5:case"end":return n.stop()}}),n)})))()},setFilePath:function(t,e){var i=this;return(0,o.default)((0,r.default)().mark((function n(){var o,a,s,u;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=t,a=e||i,s=a.pathType,u=void 0===s?i.pathType:s,"base64"!=u||(0,c.isBase64)(t)){n.next=8;break}return n.next=5,(0,c.pathToBase64)(t);case 5:o=n.sent,n.next=12;break;case 8:if("url"!=u||!(0,c.isBase64)(t)){n.next=12;break}return n.next=11,(0,c.base64ToPath)(t);case 11:o=n.sent;case 12:return e&&e.isEmit&&i.$emit("success",o),n.abrupt("return",o);case 14:case"end":return n.stop()}}),n)})))()},getSize:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o,a,s;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.css||t,o=n.width,a=t.css||t,s=a.height,e.size){i.next=12;break}if(!o&&!s){i.next=10;break}return e.canvasWidth=o||e.canvasWidth,e.canvasHeight=s||e.canvasHeight,i.next=8,(0,c.sleep)(30);case 8:i.next=12;break;case 10:return i.next=12,e.getParentWeith();case 12:case"end":return i.stop()}}),i)})))()},canvasToTempFilePathSync:function(t){var e=this;this.stopWatch=this.$watch("done",(function(i){i&&(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(i){var n=i[0]||{},r=n.width,o=n.height;t.parentWidth=Math.ceil(r||0),t.canvasWidth=t.parentWidth||300,t.canvasHeight=o||t.canvasHeight||150,e(i[0])}))}))},render:function(){var t=arguments,e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o,a,s,h,d,f,l,p,v,g,b,x,m;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.length>0&&void 0!==t[0]?t[0]:{},Object.keys(n).length){i.next=3;break}return i.abrupt("return",console.error("空对象"));case 3:return e.progress=0,e.done=!1,i.next=7,e.getSize(n);case 7:return i.next=9,e.getContext();case 9:if(o=i.sent,a=e.use2dCanvas,s=e.boardWidth,h=e.boardHeight,d=e.canvas,f=e.afterDelay,!a||d){i.next=13;break}return i.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 13:return e.boundary={top:0,left:0,width:s,height:h},e.painter=null,e.painter||(l=n.css||n,p=l.width,v=n.css||n,v.height,!p&&e.parentWidth&&Object.assign(n,{width:e.parentWidth}),g={context:o,canvas:d,width:s,height:h,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 u.default(g)),i.next=18,e.painter.source(JSON.parse(JSON.stringify(n)));case 18:return b=i.sent,x=b.width,m=b.height,e.boundary.height=e.canvasHeight=m,e.boundary.width=e.canvasWidth=x,i.next=25,(0,c.sleep)(e.sleep);case 25:return e.painter.setContext(e.ctx),i.next=28,e.painter.render();case 28:return i.next=30,new Promise((function(t){return e.$nextTick(t)}));case 30:if(a){i.next=33;break}return i.next=33,e.canvasDraw();case 33:if(!f||!a){i.next=36;break}return i.next=36,(0,c.sleep)(f);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)))})),i.abrupt("return",Promise.resolve({ctx:o,draw:e.painter,node:e.node}));case 40:case"end":return i.stop()}}),i)})))()},canvasDraw:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(i,n){return t.ctx.draw(e,(function(){return setTimeout((function(){return i()}),t.afterDelay)}))}))},getContext:function(){var t=this;return(0,o.default)((0,r.default)().mark((function e(){var i,n,o;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(i=t.type,n=t.use2dCanvas,t.dpr,t.boardWidth,t.boardHeight,o=function(){return new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).boundingClientRect().exec((function(i){if(i){var n=uni.createCanvasContext(t.canvasId,t);t.inited||(t.inited=!0,t.use2dCanvas=!1,t.canvas=i),t.ctx=n,e(t.ctx)}}))}))},n){e.next=10;break}return e.abrupt("return",o());case 10:return e.abrupt("return",new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).node().exec((function(n){var r=n[0].node;r||(t.use2dCanvas=!1,e(t.getContext()));var o=r.getContext(i);t.inited||(t.inited=!0,t.use2dCanvas=!0,t.canvas=r),t.ctx=o,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 i=(0,o.default)((0,r.default)().mark((function i(n,a){var s,c,u,h,d,f,l,p,v,g,b,x,m,y,w,S,k;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(s=t.use2dCanvas,c=t.canvasId,u=t.dpr,h=t.fileType,d=t.quality,f=function(){var e=(0,o.default)((0,r.default)().mark((function e(i){var o;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(i.tempFilePath||i);case 3:o=e.sent,n(Object.assign(i,{tempFilePath:o})),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)}}(),l=t.boundary||t,p=l.top,v=void 0===p?0:p,g=l.left,b=void 0===g?0:g,x=l.width,m=l.height,y=x*u,w=m*u,S=Object.assign({x:b,y:v,width:x,height:m,destWidth:y,destHeight:w,canvasId:c,fileType:h,quality:d,success:f,fail:a},e),!s){i.next=22;break}return i.prev=7,e.pathType||t.pathType||(e.pathType="url"),i.next=11,t.setFilePath(t.canvas.toDataURL("image/".concat(e.fileType||h).replace(/pg/,"peg"),e.quality||d),e);case 11:k=i.sent,e.success&&e.success({tempFilePath:k}),n({tempFilePath:k}),i.next=20;break;case 16:i.prev=16,i.t0=i["catch"](7),e.fail&&e.fail(i.t0),a(i.t0);case 20:i.next=23;break;case 22:uni.canvasToTempFilePath(S,t);case 23:case"end":return i.stop()}}),i,null,[[7,16]])})));return function(t,e){return i.apply(this,arguments)}}())}}};e.default=h},1373:function(t,e,i){"use strict";i.r(e);var n=i("bfe24"),r=i("c682");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"17c7b324",null,!1,n["a"],void 0);e["default"]=s.exports},"15ab":function(t,e,i){"use strict";var n=i("7658"),r=i("57e7");n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},1851:function(t,e,i){"use strict";var n=i("8bdb"),r=i("84d6"),o=i("1cb5");n({target:"Array",proto:!0},{fill:r}),o("fill")},"18b2":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{ref:"limepainter",staticClass:"lime-painter"},[t.canvasId&&t.size?i("v-uni-view",{style:t.styles},[t.use2dCanvas?i("v-uni-canvas",{staticClass:"lime-painter__canvas",style:t.size,attrs:{id:t.canvasId,type:"2d"}}):i("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=[]},"1ea2":function(t,e,i){"use strict";var n=i("af9e"),r=i("1c06"),o=i("ada5"),a=i("5d6e"),s=Object.isExtensible,c=n((function(){s(1)}));t.exports=c||a?function(t){return!!r(t)&&((!a||"ArrayBuffer"!==o(t))&&(!s||s(t)))}:s},"20f3":function(t,e,i){"use strict";var n=i("8bdb"),r=i("5145");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},2387:function(t,e,i){"use strict";i.r(e);var n=i("2d2d"),r=i("575b");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"2d45f130",null,!1,n["a"],void 0);e["default"]=s.exports},"2ad3":function(t,e,i){"use strict";i.r(e);var n=i("66a6c"),r=i("b518");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"bef69f9a",null,!1,n["a"],void 0);e["default"]=s.exports},"2d2d":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-text",{staticStyle:{opacity:"0",height:"0"}},[this._t("default")],2)},r=[]},"36d0":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=function(t){var e=/^data:image\/(\w+);base64,/.exec(t)||[],i=(0,s.default)(e,2);i[1];return new Promise((function(e,i){for(var n=t.split(",")[0].split(":")[1].split(";")[0],r=atob(t.split(",")[1]),o=new ArrayBuffer(r.length),a=new Uint8Array(o),s=0;s<r.length;s++)a[s]=r.charCodeAt(s);e(URL.createObjectURL(new Blob([a],{type:n})))}))},e.compareVersion=function(t,e){t=t.split("."),e=e.split(".");var i=Math.max(t.length,e.length);while(t.length<i)t.push("0");while(e.length<i)e.push("0");for(var n=0;n<i;n++){var r=parseInt(t[n],10),o=parseInt(e[n],10);if(r>o)return 1;if(r<o)return-1}return 0},e.downloadFile=function(t){return t?new Promise((function(e,i){if(u[t])return i();u[t]=1,uni.downloadFile({url:t,success:function(t){e(t)},fail:function(t){i(t)}})})):Promise.reject({err:"no url"})},e.getImageInfo=function(t,e){var i=this;return new Promise(function(){var n=(0,a.default)((0,r.default)().mark((function n(a,s){var h;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(h=t,!u[t]||!u[t].errMsg){n.next=5;break}a(u[t]),n.next=17;break;case 5:if(n.prev=5,!e){n.next=10;break}return n.next=9,d(t);case 9:h=n.sent;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n["catch"](5),s((0,o.default)((0,o.default)({},n.t0),{},{src:h}));case 15:console.log(h),uni.getImageInfo({src:h,success:function(e){if(e.path=e.path.replace(/^\./,window.location.origin),i&&i.canvas&&i.canvas.createImage){var n=i.canvas.createImage();n.src=e.path,n.onload=function(){e.path=n,u[t]=e,a(u[t])},n.onerror=function(e){s({err:e,path:t})}}else c?a(e):(u[t]=e,a(u[t]))},fail:function(e){console.error({err:e,path:t}),s({err:e,path:t})}});case 17:case"end":return n.stop()}}),n,null,[[5,12]])})));return function(t,e){return n.apply(this,arguments)}}())},e.isBase64=void 0,e.isNumber=h,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,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"===typeof e)return e;if(h(e))return 1*e;if("string"===typeof e){var r=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g,o=r.exec(e);if(!e||!o)return 0;var a=o[3];e=parseFloat(e);var s=0;return"rpx"===a?s=uni.upx2px(e):"px"===a?s=1*e:"%"===a?s=e*t(i)/100:"em"===a&&(s=e*t(i||14)),n?1*s.toFixed(2):Math.round(s)}return 0};var r=n(i("2634")),o=n(i("9b1b")),a=n(i("2fdc")),s=n(i("5de6"));i("5c47"),i("0506"),i("bf0f"),i("4626"),i("e838"),i("aa9c"),i("e966"),i("80e3"),i("4db2"),i("5ef2"),i("c976"),i("4d8f"),i("7b97"),i("668a"),i("c5b7"),i("8ff5"),i("2378"),i("641a"),i("64e0"),i("cce3"),i("efba"),i("d009"),i("bd7d"),i("7edd"),i("d798"),i("f547"),i("5e54"),i("b60a"),i("8c18"),i("12973"),i("f991"),i("198e"),i("8557"),i("63b1"),i("1954"),i("1cf1"),i("a1c1"),i("c9b5"),i("15d1"),i("d5c6"),i("5a56"),i("f074"),i("18f7"),i("de6c"),i("dc89"),i("2425");e.networkReg=/^(http|\/\/)/;e.isBase64=function(t){return/^data:image\/(\w+);base64/.test(t)};var c=["devtools"].includes(uni.getSystemInfoSync().platform),u={};function h(t){return/^-?\d+(\.\d+)?$/.test(t)}function d(t){return/^data:/.test(t)?t:new Promise((function(e,i){var n=new Image;n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(n,0,0);var i=t.toDataURL("image/png");e(i),t.height=t.width=0},n.src=t+"?v="+Math.random(),n.onerror=function(t){i(t)}}))}},5075:function(t,e,i){"use strict";var n=i("ae5c"),r=i("71e9"),o=i("e7e3"),a=i("52df"),s=i("81a7"),c=i("1fc1"),u=i("1297"),h=i("d67c"),d=i("5112"),f=i("7e91"),l=TypeError,p=function(t,e){this.stopped=t,this.result=e},v=p.prototype;t.exports=function(t,e,i){var g,b,x,m,y,w,S,k=i&&i.that,z=!(!i||!i.AS_ENTRIES),O=!(!i||!i.IS_RECORD),P=!(!i||!i.IS_ITERATOR),I=!(!i||!i.INTERRUPTED),M=n(e,k),B=function(t){return g&&f(g,"normal",t),new p(!0,t)},R=function(t){return z?(o(t),I?M(t[0],t[1],B):M(t[0],t[1])):I?M(t,B):M(t)};if(O)g=t.iterator;else if(P)g=t;else{if(b=d(t),!b)throw new l(a(t)+" is not iterable");if(s(b)){for(x=0,m=c(t);m>x;x++)if(y=R(t[x]),y&&u(v,y))return y;return new p(!1)}g=h(t,b)}w=O?t.next:g.next;while(!(S=r(w,g)).done){try{y=R(S.value)}catch(W){f(g,"throw",W)}if("object"==typeof y&&y&&u(v,y))return y}return new p(!1)}},"575b":function(t,e,i){"use strict";i.r(e);var n=i("f512"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},"57e7":function(t,e,i){"use strict";var n=i("e37c"),r=i("e4ca"),o=i("a74c"),a=i("ae5c"),s=i("b720"),c=i("1eb8"),u=i("5075"),h=i("0cc2"),d=i("97ed"),f=i("437f"),l=i("ab4a"),p=i("d0b1").fastKey,v=i("235c"),g=v.set,b=v.getterFor;t.exports={getConstructor:function(t,e,i,h){var d=t((function(t,r){s(t,f),g(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),l||(t.size=0),c(r)||u(r,t[h],{that:t,AS_ENTRIES:i})})),f=d.prototype,v=b(e),x=function(t,e,i){var n,r,o=v(t),a=m(t,e);return a?a.value=i:(o.last=a={index:r=p(e,!0),key:e,value:i,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),l?o.size++:t.size++,"F"!==r&&(o.index[r]=a)),t},m=function(t,e){var i,n=v(t),r=p(e);if("F"!==r)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===e)return i};return o(f,{clear:function(){var t=v(this),e=t.first;while(e)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),e=e.next;t.first=t.last=void 0,t.index=n(null),l?t.size=0:this.size=0},delete:function(t){var e=v(this),i=m(this,t);if(i){var n=i.next,r=i.previous;delete e.index[i.index],i.removed=!0,r&&(r.next=n),n&&(n.previous=r),e.first===i&&(e.first=n),e.last===i&&(e.last=r),l?e.size--:this.size--}return!!i},forEach:function(t){var e,i=v(this),n=a(t,arguments.length>1?arguments[1]:void 0);while(e=e?e.next:i.first){n(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!m(this,t)}}),o(f,i?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return x(this,0===t?0:t,e)}}:{add:function(t){return x(this,t=0===t?0:t,t)}}),l&&r(f,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(t,e,i){var n=e+" Iterator",r=b(e),o=b(n);h(t,e,(function(t,e){g(this,{type:n,target:t,state:r(t),kind:e,last:void 0})}),(function(){var t=o(this),e=t.kind,i=t.last;while(i&&i.removed)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?d("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=void 0,d(void 0,!0))}),i?"entries":"values",!i,!0),f(e)}}},"5d6e":function(t,e,i){"use strict";var n=i("af9e");t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},"5f4a":function(t,e,i){"use strict";i.r(e);var n=i("18b2"),r=i("da63");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("c97f4");var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"56095063",null,!1,n["a"],void 0);e["default"]=s.exports},"66a6c":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div")},r=[]},7006:function(t,e,i){"use strict";var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Painter=void 0;var r=n(i("fcf3"));i("bf0f"),i("01a2"),i("e39c"),i("844d"),i("18f7"),i("de6c"),i("7a76"),i("c9b5"),i("aa9c"),i("5c47"),i("0506"),i("e838"),i("9db6"),i("2c10"),i("5ef2"),i("0c26"),i("20f3"),i("6a54"),i("8a8d"),i("f7a5"),i("08eb"),i("4626"),i("5ac7"),i("4100"),i("2797"),i("473f"),i("dc8a"),i("fd3c"),i("aa77"),i("a1c1"),i("c223"),i("c1a3"),i("1851"),i("8f71"),i("d4b5"),i("22b6");var o=function(){return o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function a(t,e,i,n){return new(i||(i=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))}function s(t,e){var i,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!((r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}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"},u=["contentSize","clientSize","borderSize","offsetSize"],h="view",d="text",f="image",l="qrcode",p="block",v={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"},g={upx2px:function(t){return window.innerWidth/750*t},getSystemInfoSync:function(){return{screenWidth:window.innerWidth}},getImageInfo:function(t){var e=t.src,i=t.success,n=t.fail,r=new Image;r.onload=function(){i({width:r.naturalWidth,height:r.naturalHeight,path:r.src,src:e})},r.onerror=n,r.src=e}},b="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,x=b==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,g):"undefined"!=typeof window?g:uni;if(!x.upx2px){var m=((x.getSystemInfoSync&&uni.getSystemInfoSync()).screenWidth||375)/750;x.upx2px=function(t){return m*t}}function y(t){return/^-?\d+(\.\d+)?$/.test(t)}function w(t,e,i){if("number"==typeof t)return t;if(y(t))return 1*t;if("string"==typeof t){var n=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g.exec(t);if(!t||!n)return 0;var r=n[3];t=parseFloat(t);var o=0;return"rpx"===r?o=x.upx2px(t):"px"===r?o=1*t:"%"===r&&e?o=t*w(e)/100:"em"===r&&e&&(o=t*w(e||14)),1*o.toFixed(2)}return 0}function S(t){return/%$/.test(t)}function k(t){for(var e=[],i=[],n=0,r=t.substring(0,t.length-1).split("%,");n<r.length;n++){var o=r[n];e.push(o.substring(0,o.lastIndexOf(" ")).trim()),i.push(o.substring(o.lastIndexOf(" "),o.length)/100)}return{colors:e,percents:i}}function z(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},O.apply(this,arguments)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function M(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 B(t){return"number"==typeof t}function R(t){return"auto"===t||null===t}function W(t){return/%$/.test(t)}var T,j=0,F=function(){function t(){z(this,"elements",[]),z(this,"afterElements",[]),z(this,"beforeElements",[]),z(this,"ids",[]),z(this,"width",0),z(this,"height",0),z(this,"top",0),z(this,"left",0),z(this,"pre",null),z(this,"offsetX",0),z(this,"offsetY",0),j++,this.id=j}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 i 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 n=this.elements[i],r=this.elements[i-1],o=this.getOffsetY(n);n.style.top=this.top+o,n.style.left=r?r.offsetSize.left+r.offsetSize.width:this.left,n.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}(),_=((T={})["row"]={width:"width",contentWidth:"width",x:"x",y:"y",contentX:"left",height:"height",contentHeight:"height",marginLeft:"marginLeft"},T["column"]={width:"height",contentWidth:"height",x:"y",y:"x",contentX:"top",height:"width",contentHeight:"width",marginLeft:"marginTop"},T),C=function(t){var e,i;function n(){var e;return z(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}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,P(e,i);var r=n.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=_[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),B(t.style.flex)?this.flexTotal+=t.style.flex:B(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(i){var n=i.style.width||0;B(i.style.flex)&&(n=i.style.flex/t.flexTotal*(e-t.exactValue)),i.computedStyle[t.key.width]=n,delete i.line,delete i.lines,delete i.lineMaxWidth,i.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,i){return e+i.offsetSize[t.key.width]}),0),i=this.outerWidth==1/0?0:this.outerWidth-Math.max(this[this.key.width],e),n=this.container.style.justifyContent;"center"===n?i/=2:"flex-start"===n?i=0:["space-between","space-around"].includes(n)&&(function(e,i){void 0===i&&(i=0),i/=t.elements.length+(e?-1:1),t.elements.forEach((function(n,r){var o;e&&!r||(n.style.margin?n.style.margin[t.key.marginLeft]+=i:n.style.margin=((o={})[t.key.marginLeft]=i,o))})),i=0}("space-between"==n,i),i=0),this.offsetX=i||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 i=this.container.contentSize[this.key.contentHeight]-t;this.container.lines[0].offsetY=i}},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},n}(F),L=f,E=d,A=h,H=l,$="inline-block",D="flex",N="absolute",U="fixed",Y=0,X={left:null,top:null,width:null,height:null},J=function(){function t(t,e,i,n){var r=this;z(this,"id",Y++),z(this,"style",{left:null,top:null,width:null,height:null}),z(this,"computedStyle",{}),z(this,"originStyle",{}),z(this,"children",{}),z(this,"layoutBox",O({},X)),z(this,"contentSize",O({},X)),z(this,"clientSize",O({},X)),z(this,"borderSize",O({},X)),z(this,"offsetSize",O({},X)),this.ctx=n,this.root=i,e&&(this.parent=e),this.name=t.name||t.type,this.attributes=this.getAttributes(t);var o=this.getComputedStyle(t,e&&e.computedStyle);this.isAbsolute=o.position==N,this.isFixed=o.position==U,this.originStyle=o,Object.keys(o).forEach((function(t){Object.defineProperty(r.style,t,{configurable:!0,enumerable:!0,get:function(){return o[t]},set:function(e){o[t]=e}})}));var a={contentSize:O({},this.contentSize),clientSize:O({},this.clientSize),borderSize:O({},this.borderSize),offsetSize:O({},this.offsetSize)};Object.keys(a).forEach((function(t){Object.keys(r[t]).forEach((function(e){Object.defineProperty(r[t],e,{configurable:!0,enumerable:!0,get:function(){return a[t][e]},set:function(i){a[t][e]=i}})}))})),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 i=e?e.lines:this.parent&&this.parent.lines;return i&&i.find((function(e){return e.ids.includes(t)}))||{width:0,height:0}},e.getComputedStyle=function(t,e){var i=["color","fontSize","lineHeight","verticalAlign","fontWeight","textAlign"],n=t.css,o=void 0===n?{}:n,a=t.type,s=void 0===a?A:a,c=O({},v);if([E,L,H].includes(s)&&!o.display&&(c.display=$),e)for(var u=0;u<i.length;u++){var h=i[u];(o[h]||e[h])&&(o[h]=o[h]||e[h])}for(var d=function(){var t=l[f],e=o[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 i=[];return e.replace(/((\d+(rpx|px)?\s+?){3})(.+)/,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];i=e[1].match(/\d+(rpx|px)?/g).map((function(t){return w(t)})).concat(e[4])})),/^text/.test(t)?c.textShadow=i:c.boxShadow=i,"continue"}if(/^border/i.test(t)&&!/radius$/i.test(t)){var n,a=t.match(/^border([BTRLa-z]+)?/)[0],u=t.match(/[W|S|C][a-z]+/),h=e.replace(/([\(,])\s+|\s+([\),])/g,"$1$2").split(" ").map((function(t){return/^\d/.test(t)?w(t,""):t}));return c[a]=((n={})[a+"Width"]=y(h[0])?h[0]:0,n[a+"Style"]=h[1]||"solid",n[a+"Color"]=h[2]||"black",n),1==h.length&&u&&(c[a][a+u[0]]=h[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],v=[0,0,0,0].map((function(t,e){return d?["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"][e]:[p+"Top",p+"Right",p+"Bottom",p+"Left"][e]})),g="margin";if("padding"===t||t===g||/^(border)?radius$/i.test(t)){var b,x=(""+e).split(" ").map((function(e){return/^\d+(rpx|px)?$/.test(e)?w(e):t!=g&&/auto/.test(e)?0:e}),[])||[0],m=d?"borderRadius":t,S=x[0],k=x[1],z=x[2],O=x[3];c[m]=((b={})[v[0]]=R(S)?0:S,b[v[1]]=y(k)||R(k)?k:S,b[v[2]]=R(y(z)?z:S)?0:y(z)?z:S,b[v[3]]=y(O)?O:k||S,b)}else{var P;"object"==(0,r.default)(c[p])||(c[p]=((P={})[v[0]]=c[p]||0,P[v[1]]=c[p]||0,P[v[2]]=c[p]||0,P[v[3]]=c[p]||0,P)),c[p][t]=p==g&&R(e)||W(e)?e:w(e)}return"continue"}if(/^transform$/i.test(t))return c[t]={},e.replace(/([a-zA-Z]+)\(([0-9,-\.%rpxdeg\s]+)\)/g,(function(e,i,n){var r=n.split(",").map((function(t){return t.replace(/(^\s*)|(\s*$)/g,"")})),a=function(t,e){return t.includes("deg")?1*t:e&&!W(e)?w(t,e):t};i.includes("matrix")?c[t][i]=r.map((function(t){return 1*t})):i.includes("rotate")?c[t][i]=1*n.match(/^-?\d+(\.\d+)?/)[0]:/[X, Y]/.test(i)?c[t][i]=/[X]/.test(i)?a(r[0],o.width):a(r[0],o.height):(c[t][i+"X"]=a(r[0],o.width),c[t][i+"Y"]=a(r[1]||r[0],o.height))})),"continue";/^font$/i.test(t)&&console.warn("font 不支持简写"),/^left|top$/i.test(t)&&![N,U].includes(o.position)?c[t]=0:c[t]=/^[\d\.]+(px|rpx)?$/.test(e)?w(e):/em$/.test(e)&&s==E?w(e,o.fontSize):e},f=0,l=Object.keys(o);f<l.length;f++)d();return c},e.setPosition=function(t,e){var i={left:"width",top:"height",right:"width",bottom:"height"};Object.keys(i).forEach((function(n){var r="right"==n?"left":"top";["right","bottom"].includes(n)&&void 0!==t.style[n]&&"number"!=typeof t.originStyle[r]?t.style[r]=e[i[n]]-t.offsetSize[i[n]]-w(t.style[n],e[i[n]]):t.style[n]=w(t.style[n],e[i[n]])}))},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,i){void 0===i&&(i=u[3]);var n=e||{},r=n.margin,o=(r=void 0===r?{}:r).marginLeft,a=void 0===o?0:o,s=r.marginTop,c=void 0===s?0:s,h=r.marginRight,d=void 0===h?0:h,f=r.marginBottom,l=void 0===f?0:f,p=n.padding,v=(p=void 0===p?{}:p).paddingLeft,g=void 0===v?0:v,b=p.paddingTop,x=void 0===b?0:b,m=p.paddingRight,y=void 0===m?0:m,w=p.paddingBottom,S=void 0===w?0:w,k=n.border,z=(k=void 0===k?{}:k).borderWidth,O=void 0===z?0:z,P=n.borderTop,I=(P=void 0===P?{}:P).borderTopWidth,M=void 0===I?O:I,B=n.borderBottom,R=(B=void 0===B?{}:B).borderBottomWidth,W=void 0===R?O:R,T=n.borderRight,j=(T=void 0===T?{}:T).borderRightWidth,F=void 0===j?O:j,_=n.borderLeft,C=(_=void 0===_?{}:_).borderLeftWidth,L=void 0===C?O:C,E=a<0&&d<0?Math.abs(a+d):0,A=c<0&&l<0?Math.abs(c+l):0,H=a>=0&&d<0,$=c>=0&&l<0;return i==u[0]&&(this[i].left=t.left+a+g+L+(H?2*-d:0),this[i].top=t.top+c+x+M+($?2*-l:0),this[i].width=t.width+(this[i].widthAdd?0:E),this[i].height=t.height+(this[i].heightAdd?0:A),this[i].widthAdd=E,this[i].heightAdd=A),i==u[1]&&(this[i].left=t.left+a+L+(H<0?-d:0),this[i].top=t.top+c+M+($?-l:0),this[i].width=t.width+g+y,this[i].height=t.height+x+S),i==u[2]&&(this[i].left=t.left+a+L/2+(H<0?-d:0),this[i].top=t.top+c+M/2+($?-l:0),this[i].width=t.width+g+y+L/2+F/2,this[i].height=t.height+x+S+W/2+M/2),i==u[3]&&(this[i].left=t.left+(H<0?-d:0),this[i].top=t.top+($?-l:0),this[i].width=t.width+g+y+L+F+a+d,this[i].height=t.height+x+S+W+M+l+c),this[i]},e.layoutBoxUpdate=function(t,e,i,n){var r=this;if(void 0===i&&(i=-1),"border-box"==e.boxSizing){var o=e||{},a=o.border,s=(a=void 0===a?{}:a).borderWidth,c=void 0===s?0:s,h=o.borderTop,d=(h=void 0===h?{}:h).borderTopWidth,f=void 0===d?c:d,l=o.borderBottom,p=(l=void 0===l?{}:l).borderBottomWidth,v=void 0===p?c:p,g=o.borderRight,b=(g=void 0===g?{}:g).borderRightWidth,x=void 0===b?c:b,m=o.borderLeft,y=(m=void 0===m?{}:m).borderLeftWidth,w=void 0===y?c:y,S=o.padding,k=(S=void 0===S?{}:S).paddingTop,z=void 0===k?0:k,O=S.paddingRight,P=void 0===O?0:O,I=S.paddingBottom,M=void 0===I?0:I,B=S.paddingLeft,R=void 0===B?0:B;i||(t.width-=R+P+x+w),1!==i||n||(t.height-=z+M+f+v)}this.layoutBox&&(u.forEach((function(i){return r.layoutBox[i]=r.getOffsetSize(t,e,i)})),this.layoutBox=Object.assign({},this.layoutBox,this.layoutBox.borderSize))},e.getBoxPosition2=function(){var t=this.computedStyle,e=this.fixedLine,i=this.lines,n=t.left,r=void 0===n?0:n,o=t.top,a=void 0===o?0:o,s=t.padding||{},c=s.paddingBottom,u=void 0===c?0:c,h=s.paddingRight,d=void 0===h?0:h,f=O({},this.contentSize,{left:r,top:a}),l=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 v,g=M(this.root.fixedLine.elements);!(v=g()).done;){var b=v.value;b.setPosition(b,this.root.offsetSize),b.getBoxPosition2()}}if(e)for(var x,m=M(e.elements);!(x=m()).done;){var y=x.value;y.setPosition(y,f),y.style.left+=r+p+d,y.style.top+=a+l+u,y.getBoxPosition2()}if(i)for(var w,S=M(i);!(w=S()).done;)w.value.layout(f.top+l,f.left+p);return this.layoutBoxUpdate(f,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==D},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!==D)||void 0)},e.isInline=function(t){return void 0===t&&(t=this),t&&t.style.display==$},e.contrastSize=function(t,e,i){var n=t;return i&&(n=Math.min(n,i)),e&&(n=Math.max(n,e)),n},e.measureText=function(t,e){var i=this.ctx.measureText(t),n=i.width,r=i.actualBoundingBoxAscent,o=i.actualBoundingBoxDescent;return{ascent:r,descent:o,width:n,fontHeight:r+o||.7*e+1}},e.getBoxWidthHeight=function(){var t=this,e=this.name,i=this.computedStyle,n=this.attributes,r=this.parent,o=void 0===r?{}:r,a=this.ctx,s=this.getChildren(),c=i.left,u=void 0===c?0:c,h=i.top,d=void 0===h?0:h,f=i.bottom,l=i.right,p=i.width,v=void 0===p?0:p,g=i.minWidth,b=i.maxWidth,x=i.minHeight,m=i.maxHeight,y=i.height,S=void 0===y?0:y,k=i.fontSize,z=void 0===k?14:k,O=i.fontWeight,P=i.fontFamily,I=i.fontStyle,M=i.position,B=i.lineClamp,R=i.lineHeight,T=i.padding,j=void 0===T?{}:T,_=i.margin,H=void 0===_?{}:_,$=i.border,D=($=void 0===$?{}:$).borderWidth,U=void 0===D?0:D,Y=i.borderRight,X=(Y=void 0===Y?{}:Y).borderRightWidth,J=void 0===X?U:X,q=i.borderLeft,V=(q=void 0===q?{}:q).borderLeftWidth,G=void 0===V?U:V,Q=o.contentSize&&o.contentSize.width,K=o.contentSize&&o.contentSize.height;if(W(v)&&Q&&(v=w(v,Q)),W(v)&&!Q&&(v=null),W(S)&&K&&(S=w(S,K)),W(S)&&!K&&(S=null),W(g)&&Q&&(g=w(g,Q)),W(b)&&Q&&(b=w(b,Q)),W(x)&&K&&(x=w(x,K)),W(m)&&K&&(m=w(m,K)),i.padding&&Q)for(var Z in i.padding)Object.hasOwnProperty.call(i.padding,Z)&&(i.padding[Z]=w(i.padding[Z],Q));var tt=j.paddingRight,et=void 0===tt?0:tt,it=j.paddingLeft,nt=void 0===it?0:it;if(i.margin&&[i.margin.marginLeft,i.margin.marginRight].includes("auto"))if(v){var rt=Q&&Q-v-et-nt-G-J||0;i.margin.marginLeft==i.margin.marginRight?i.margin.marginLeft=i.margin.marginRight=rt/2:"auto"==i.margin.marginLeft?i.margin.marginLeft=rt:i.margin.marginRight=rt}else i.margin.marginLeft=i.margin.marginRight=0;var ot=H.marginRight,at=void 0===ot?0:ot,st=H.marginLeft,ct={width:v,height:S,left:0,top:0},ut=nt+et+G+J+(void 0===st?0:st)+at;if(e==E&&!this.attributes.widths){var ht=n.text||"";a.save(),a.setFonts({fontFamily:P,fontSize:z,fontWeight:O,fontStyle:I});var dt=new Map;ht.split("\n").map((function(e){var i=e.split("").map((function(e){var i=dt.get(e);if(i)return i;var n=t.measureText(e,z).width;return dt.set(e,n),n})),n=t.measureText(e,z),r=n.fontHeight,o=n.ascent,a=n.descent;t.attributes.fontHeight=r,t.attributes.ascent=o,t.attributes.descent=a,t.attributes.widths||(t.attributes.widths=[]),t.attributes.widths.push({widths:i,total:i.reduce((function(t,e){return t+e}),0)})})),a.restore()}if(e==L&&null==v){var ft=n.width,lt=n.height;ct.width=this.contrastSize(Math.round(ft*S/lt)||0,g,b),this.layoutBoxUpdate(ct,i,0)}if(e==E&&null==v){var pt=this.attributes.widths,vt=Math.max.apply(Math,pt.map((function(t){return t.total})));o&&Q>0&&(vt>Q||this.isBlock(this))&&!this.isAbsolute&&!this.isFixed&&(vt=Q-ut),ct.width=this.contrastSize(vt,g,b),this.layoutBoxUpdate(ct,i,0)}if(e==E&&(o.style.flex||!this.attributes.lines)){var gt=this.attributes.widths.length;this.attributes.widths.forEach((function(t){return t.widths.reduce((function(t,e,i){return t+e>ct.width?(gt++,e):t+e}),0)})),gt=B&&gt>B?B:gt,this.attributes.lines=gt}if(e==L&&null==S){var bt=n.width,xt=n.height;ct.height=this.contrastSize(w(ct.width*xt/bt)||0,x,m),this.layoutBoxUpdate(ct,i,1)}e==E&&null==S&&(R=w(R,z),ct.height=this.contrastSize(w(this.attributes.lines*R),x,m),this.layoutBoxUpdate(ct,i,1,!0)),o&&o.children&&Q&&([A,E].includes(e)&&this.isFlex()||e==A&&this.isBlock(this)&&this.isInFlow())&&(ct.width=this.contrastSize(Q-ut,g,b),this.layoutBoxUpdate(ct,i)),v&&!W(v)&&(ct.width=this.contrastSize(v,g,b),this.layoutBoxUpdate(ct,i,0)),S&&!W(S)&&(ct.height=this.contrastSize(ct.height,x,m),this.layoutBoxUpdate(ct,i,1));var mt=0;if(s.length){var yt=null;s.forEach((function(e,n){e.getBoxWidthHeight();var r=s[n+1];if(r&&r.isInFlow()&&(e.next=r),e.isInFlow()&&!e.inFlexBox()){var o=t.getBoxState(yt,e);t.line&&t.line.canIEnter(e)&&!o?t.line.add(e):(new F).bind(e),yt=e}else e.inFlexBox()?t.line&&(t.line.canIEnter(e)||"nowrap"==i.flexWrap)?t.line.add(e):(new C).bind(e):e.isFixed?t.root.fixedLine?t.root.fixedLine.fixedAdd(e):(new F).fixedBind(e):t.fixedLine?t.fixedLine.fixedAdd(e):(new F).fixedBind(e,1)})),this.lines&&(mt=this.lines.reduce((function(t,e){return t+e.height}),0))}var wt=0,St=0;if(!v&&(this.isAbsolute||this.isFixed)&&Q){var kt=M==N?Q:this.root.width,zt=kt-(W(u)?w(u,kt):u)-(W(l)?w(l,kt):l);wt=i.left?zt:this.lineMaxWidth}if(!S&&(null!=d?d:this.isAbsolute||this.isFixed&&K)){var Ot=M==N?K:this.root.height,Pt=Ot-(W(d)?w(d,Ot):d)-(W(f)?w(f,Ot):f);St=i.top?Pt:0}if(v&&!W(v)||ct.width||(ct.width=wt||this.contrastSize((this.isBlock(this)&&!this.isInFlow()?Q||o.lineMaxWidth:this.lineMaxWidth)||this.lineMaxWidth,g,b),this.layoutBoxUpdate(ct,i,0)),S||!mt&&!St||(ct.height=St||this.contrastSize(mt,x,m),this.layoutBoxUpdate(ct,i)),i.borderRadius&&this.borderSize&&this.borderSize.width)for(var Z in i.borderRadius)Object.hasOwnProperty.call(i.borderRadius,Z)&&(i.borderRadius[Z]=w(i.borderRadius[Z],this.borderSize.width));return this.layoutBox},e.layout=function(){return this.getBoxWidthHeight(),this.root.offsetSize=this.offsetSize,this.getBoxPosition2(),this.offsetSize},t}(),q=function(){var t,e,i,n,r,o,a=[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],s=[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],u=[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],h=[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],f=[],l=[],p=[],v=[],g=[],b=2;function x(t,e){var i;t>e&&(i=t,t=e,e=i),i=e,i*=e,i+=e,i>>=1,v[i+=t]=1}function m(t,i){var n;for(p[t+e*i]=1,n=-2;n<2;n++)p[t+n+e*(i-2)]=1,p[t-2+e*(i+n+1)]=1,p[t+2+e*(i+n)]=1,p[t+n+1+e*(i+2)]=1;for(n=0;n<2;n++)x(t-1,i+n),x(t+1,i-n),x(t-n,i-1),x(t+n,i+1)}function y(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t}var w=[];function S(t,e,i,n){var r,o,a;for(r=0;r<n;r++)f[i+r]=0;for(r=0;r<e;r++){if(255!=(a=h[f[t+r]^f[i]]))for(o=1;o<n;o++)f[i+o-1]=f[i+o]^d[y(a+w[n-o])];else for(o=i;o<i+n;o++)f[o]=f[o+1];f[i+n-1]=255==a?0:d[y(a+w[0])]}}function k(t,e){var i;return t>e&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,v[i+=t]}function z(t){var i,n,r,o;switch(t){case 0:for(n=0;n<e;n++)for(i=0;i<e;i++)i+n&1||k(i,n)||(p[i+n*e]^=1);break;case 1:for(n=0;n<e;n++)for(i=0;i<e;i++)1&n||k(i,n)||(p[i+n*e]^=1);break;case 2:for(n=0;n<e;n++)for(r=0,i=0;i<e;i++,r++)3==r&&(r=0),r||k(i,n)||(p[i+n*e]^=1);break;case 3:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=o,i=0;i<e;i++,r++)3==r&&(r=0),r||k(i,n)||(p[i+n*e]^=1);break;case 4:for(n=0;n<e;n++)for(r=0,o=n>>1&1,i=0;i<e;i++,r++)3==r&&(r=0,o=!o),o||k(i,n)||(p[i+n*e]^=1);break;case 5:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+!(!r|!o)||k(i,n)||(p[i+n*e]^=1);break;case 6:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+(r&&r==o)&1||k(i,n)||(p[i+n*e]^=1);break;case 7:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(r&&r==o)+(i+n&1)&1||k(i,n)||(p[i+n*e]^=1)}}function O(t){var e,i=0;for(e=0;e<=t;e++)g[e]>=5&&(i+=3+g[e]-5);for(e=3;e<t-1;e+=2)g[e-2]==g[e+2]&&g[e+2]==g[e-1]&&g[e-1]==g[e+1]&&3*g[e-1]==g[e]&&(0==g[e-3]||e+3>t||3*g[e-3]>=4*g[e]||3*g[e+3]>=4*g[e])&&(i+=40);return i}function P(){var t,i,n,r,o,a=0,s=0;for(i=0;i<e-1;i++)for(t=0;t<e-1;t++)(p[t+e*i]&&p[t+1+e*i]&&p[t+e*(i+1)]&&p[t+1+e*(i+1)]||!(p[t+e*i]||p[t+1+e*i]||p[t+e*(i+1)]||p[t+1+e*(i+1)]))&&(a+=3);for(i=0;i<e;i++){for(g[0]=0,n=r=t=0;t<e;t++)(o=p[t+e*i])==r?g[n]++:g[++n]=1,s+=(r=o)?1:-1;a+=O(n)}s<0&&(s=-s);var c=s,u=0;for(c+=c<<2,c<<=1;c>e*e;)c-=e*e,u++;for(a+=10*u,t=0;t<e;t++){for(g[0]=0,n=r=i=0;i<e;i++)(o=p[t+e*i])==r?g[n]++:g[++n]=1,r=o;a+=O(n)}return a}var I=null;return{api:{get ecclevel(){return b},set ecclevel(t){b=t},get size(){return _size},set size(t){_size=t},get canvas(){return I},set canvas(t){I=t},getFrame:function(g){return function(g){var O,I,M,B,R,W,T,j;B=g.length,t=0;do{if(t++,M=4*(b-1)+16*(t-1),i=u[M++],n=u[M++],r=u[M++],o=u[M],B<=(M=r*(i+n)+n-3+(t<=9)))break}while(t<40);for(e=17+4*t,R=r+(r+o)*(i+n)+n,B=0;B<R;B++)l[B]=0;for(f=g.slice(0),B=0;B<e*e;B++)p[B]=0;for(B=0;B<(e*(e+1)+1)/2;B++)v[B]=0;for(B=0;B<3;B++){for(M=0,I=0,1==B&&(M=e-7),2==B&&(I=e-7),p[I+3+e*(M+3)]=1,O=0;O<6;O++)p[I+O+e*M]=1,p[I+e*(M+O+1)]=1,p[I+6+e*(M+O)]=1,p[I+O+1+e*(M+6)]=1;for(O=1;O<5;O++)x(I+O,M+1),x(I+1,M+O+1),x(I+5,M+O),x(I+O+1,M+5);for(O=2;O<4;O++)p[I+O+e*(M+2)]=1,p[I+2+e*(M+O+1)]=1,p[I+4+e*(M+O)]=1,p[I+O+1+e*(M+4)]=1}if(t>1)for(B=a[t],I=e-7;;){for(O=e-7;O>B-3&&(m(O,I),!(O<B));)O-=B;if(I<=B+9)break;m(6,I-=B),m(I,6)}for(p[8+e*(e-8)]=1,I=0;I<7;I++)x(7,I),x(e-8,I),x(7,I+e-7);for(O=0;O<8;O++)x(O,7),x(O+e-8,7),x(O,e-8);for(O=0;O<9;O++)x(O,8);for(O=0;O<8;O++)x(O+e-8,8),x(8,O);for(I=0;I<7;I++)x(8,I+e-7);for(O=0;O<e-14;O++)1&O?(x(8+O,6),x(6,8+O)):(p[8+O+6*e]=1,p[6+e*(8+O)]=1);if(t>6)for(B=s[t-7],M=17,O=0;O<6;O++)for(I=0;I<3;I++,M--)1&(M>11?t>>M-12:B>>M)?(p[5-O+e*(2-I+e-11)]=1,p[2-I+e-11+e*(5-O)]=1):(x(5-O,2-I+e-11),x(2-I+e-11,5-O));for(I=0;I<e;I++)for(O=0;O<=I;O++)p[O+e*I]&&x(O,I);for(R=f.length,W=0;W<R;W++)l[W]=f.charCodeAt(W);if(f=l.slice(0),R>=(O=r*(i+n)+n)-2&&(R=O-2,t>9&&R--),W=R,t>9){for(f[W+2]=0,f[W+3]=0;W--;)B=f[W],f[W+3]|=255&B<<4,f[W+2]=B>>4;f[2]|=255&R<<4,f[1]=R>>4,f[0]=64|R>>12}else{for(f[W+1]=0,f[W+2]=0;W--;)B=f[W],f[W+2]|=255&B<<4,f[W+1]=B>>4;f[1]|=255&R<<4,f[0]=64|R>>4}for(W=R+3-(t<10);W<O;)f[W++]=236,f[W++]=17;for(w[0]=1,W=0;W<o;W++){for(w[W+1]=1,T=W;T>0;T--)w[T]=w[T]?w[T-1]^d[y(h[w[T]]+W)]:w[T-1];w[0]=d[y(h[w[0]]+W)]}for(W=0;W<=o;W++)w[W]=h[w[W]];for(M=O,I=0,W=0;W<i;W++)S(I,r,M,o),I+=r,M+=o;for(W=0;W<n;W++)S(I,r+1,M,o),I+=r+1,M+=o;for(I=0,W=0;W<r;W++){for(T=0;T<i;T++)l[I++]=f[W+T*r];for(T=0;T<n;T++)l[I++]=f[i*r+W+T*(r+1)]}for(T=0;T<n;T++)l[I++]=f[i*r+W+T*(r+1)];for(W=0;W<o;W++)for(T=0;T<i+n;T++)l[I++]=f[O+W+T*o];for(f=l,O=I=e-1,M=R=1,j=(r+o)*(i+n)+n,W=0;W<j;W++)for(B=f[W],T=0;T<8;T++,B<<=1){128&B&&(p[O+e*I]=1);do{R?O--:(O++,M?0!=I?I--:(M=!M,6==(O-=2)&&(O--,I=9)):I!=e-1?I++:(M=!M,6==(O-=2)&&(O--,I-=8))),R=!R}while(k(O,I))}for(f=p.slice(0),B=0,I=3e4,M=0;M<8&&(z(M),(O=P())<I&&(I=O,B=M),7!=B);M++)p=f.slice(0);for(B!=M&&z(B),I=c[B+(b-1<<3)],M=0;M<8;M++,I>>=1)1&I&&(p[e-1-M+8*e]=1,M<6?p[8+e*M]=1:p[8+e*(M+1)]=1);for(M=0;M<7;M++,I>>=1)1&I&&(p[8+e*(e-7+M)]=1,M?p[6-M+8*e]=1:p[7+8*e]=1);return p}(g)},utf16to8:function(t){var e,i,n,r;for(e="",n=t.length,i=0;i<n;i++)(r=t.charCodeAt(i))>=1&&r<=127?e+=t.charAt(i):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,i,n,r,o){i.drawView(n,r);var a=i.ctx,s=n.contentSize,c=s.width,u=s.height,h=s.left,d=s.top;r.borderRadius,r.backgroundColor;var f=r.color,l=void 0===f?"#000000":f;if(r.border,n.contentSize.left,n.borderSize.left,n.contentSize.top,n.borderSize.top,b=o||b,a){a.save(),i.setOpacity(r),i.setTransform(n,r);var p=Math.min(c,u);t=this.utf16to8(t);var v=this.getFrame(t),g=p/e;a.setFillStyle(l);for(var x=0;x<e;x++)for(var m=0;m<e;m++)v[m*e+x]&&a.fillRect(h+g*x,d+g*m,g,g);a.restore(),i.setBorder(n,r)}else console.warn("No canvas provided to draw QR code in!")}}}}(),V=d,G=l,Q=h,K="middle",Z=function(){function t(t){var e,i=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(i,n){if(window){var r=new Image;e&&r.setAttribute("crossOrigin","Anonymous"),r.src=t,r.onload=function(){i({width:r.naturalWidth||r.width,height:r.naturalHeight||r.height,path:r,src:this.src})},r.onerror=function(t){n(t)}}else n({fail:"getImageInfo fail",src:t})}))},this.options=t,Object.assign(this,t),this.ctx=((e=t.context).setFonts=function(t){var i=t.fontFamily,n=void 0===i?"sans-serif":i,r=t.fontSize,o=void 0===r?14:r,a=t.fontWeight,s=void 0===a?"normal":a,u=t.fontStyle,h=void 0===u?"normal":u;b==c.MP_TOUTIAO&&(s="bold"==s?"bold":"",h="italic"==h?"italic":""),e.font="".concat(h," ").concat(s," ").concat(Math.round(o),"px ").concat(n)},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,i,n,r){e.shadowOffsetX=t,e.shadowOffsetY=i,e.shadowBlur=n,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 n=0;Object.defineProperty(this,"progress",{configurable:!0,set:function(t){n=t,i.lifecycle("onProgress",t/i.count)},get:function(){return n||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==b)&&(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,i,n,r,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this.ctx;if(/polygon/.test(r)){var c=r.match(/-?\d+(rpx|px|%)?\s+-?\d+(rpx|px|%)?/g)||[];s.beginPath(),c.map((function(r){var o=r.split(" "),a=o[0],s=o[1];return[w(a,i)+t,w(s,n)+e]})).forEach((function(t,e){0==e?s.moveTo(t[0],t[1]):s.lineTo(t[0],t[1])})),s.closePath(),a&&s.stroke(),o&&s.fill()}},t.prototype.roundRect=function(t,e,i,n,r,o,a){if(void 0===o&&(o=!1),void 0===a&&(a=!1),!(r<0)){var s=this.ctx;if(s.beginPath(),r){var c=r||{},u=c.borderTopLeftRadius,h=void 0===u?r||0:u,d=c.borderTopRightRadius,f=void 0===d?r||0:d,l=c.borderBottomRightRadius,p=void 0===l?r||0:l,v=c.borderBottomLeftRadius,g=void 0===v?r||0:v;s.arc(t+i-p,e+n-p,p,0,.5*Math.PI),s.lineTo(t+g,e+n),s.arc(t+g,e+n-g,g,.5*Math.PI,Math.PI),s.lineTo(t,e+h),s.arc(t+h,e+h,h,Math.PI,1.5*Math.PI),s.lineTo(t+i-f,e),s.arc(t+i-f,e+f,f,1.5*Math.PI,2*Math.PI),s.lineTo(t+i,e+n-p)}else s.rect(t,e,i,n);s.closePath(),a&&s.stroke(),o&&s.fill()}},t.prototype.setTransform=function(t,e){var i=e.transform,n=e.transformOrigin,r=this.ctx,o=i||{},a=o.scaleX,s=void 0===a?1:a,c=o.scaleY,u=void 0===c?1:c,h=o.translateX,d=void 0===h?0:h,f=o.translateY,l=void 0===f?0:f,p=o.rotate,v=void 0===p?0:p,g=o.skewX,b=void 0===g?0:g,x=o.skewY,m=void 0===x?0:x,S=t.left,k=t.top,z=t.width,O=t.height;d=w(d,z)||0,l=w(l,O)||0;var P={top:w("0%",1),center:w("50%",1),bottom:w("100%",1)},I={left:w("0%",1),center:w("50%",1),right:w("100%",1)};if(n=n.split(" ").filter((function(t,e){return e<2})).reduce((function(t,e){if(/\d+/.test(e)){var i=w(e,1)/(/px|rpx$/.test(e)?y(t.x)?O:z:1);return y(t.x)?Object.assign(t,{y:i}):Object.assign(t,{x:i})}return y(I[e])&&!y(t.x)?Object.assign(t,{x:I[e]}):Object.assign(t,{y:P[e]||.5})}),{}),(d||l)&&r.translate(d,l),(s||u)&&r.scale(s,u),v){var M=S+z*n.x,B=k+O*n.y;r.translate(M,B),r.rotate(v*Math.PI/180),r.translate(-M,-B)}(b||m)&&r.transform(1,Math.tan(m*Math.PI/180),Math.tan(b*Math.PI/180),1,0,0)},t.prototype.setBackground=function(t,e,i,n,r){var o=this.ctx;t&&"transparent"!=t?function(t){return!(!t||!t.startsWith("linear")&&!t.startsWith("radial"))}(t)?function(t,e,i,n,r,o){t.startsWith("linear")?function(t,e,i,n,r,o){for(var a=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=t.match(/([-]?\d{1,3})deg/),a=o&&o[1]?parseFloat(o[1]):0;if(a>=360&&(a-=360),a<0&&(a+=360),0===(a=Math.round(a)))return{x0:Math.round(e/2)+n,y0:i+r,x1:Math.round(e/2)+n,y1:r};if(180===a)return{x0:Math.round(e/2)+n,y0:r,x1:Math.round(e/2)+n,y1:i+r};if(90===a)return{x0:n,y0:Math.round(i/2)+r,x1:e+n,y1:Math.round(i/2)+r};if(270===a)return{x0:e+n,y0:Math.round(i/2)+r,x1:n,y1:Math.round(i/2)+r};var s=Math.round(180*Math.asin(e/Math.sqrt(Math.pow(e,2)+Math.pow(i,2)))/Math.PI);if(a===s)return{x0:n,y0:i+r,x1:e+n,y1:r};if(a===180-s)return{x0:n,y0:r,x1:e+n,y1:i+r};if(a===180+s)return{x0:e+n,y0:r,x1:n,y1:i+r};if(a===360-s)return{x0:e+n,y0:i+r,x1:n,y1:r};var c,u=0,h=0,d=0,f=0;if(a<s||a>180-s&&a<180||a>180&&a<180+s||a>360-s){var l=a*Math.PI/180,p=a<s||a>360-s?i/2:-i/2,v=Math.tan(l)*p,g=a<s||a>180-s&&a<180?e/2-v:-e/2-v;u=-(d=v+(c=Math.pow(Math.sin(l),2)*g)),h=-(f=p+c/Math.tan(l))}(a>s&&a<90||a>90&&a<90+s||a>180+s&&a<270||a>270&&a<360-s)&&(l=(90-a)*Math.PI/180,v=a>s&&a<90||a>90&&a<90+s?e/2:-e/2,p=Math.tan(l)*v,g=a>s&&a<90||a>270&&a<360-s?i/2-p:-i/2-p,u=-(d=v+(c=Math.pow(Math.sin(l),2)*g)/Math.tan(l)),h=-(f=p+c));return u=Math.round(u+e/2)+n,h=Math.round(i/2-h)+r,d=Math.round(d+e/2)+n,f=Math.round(i/2-f)+r,{x0:u,y0:h,x1:d,y1:f}}(r,t,e,i,n),s=a.x0,c=a.y0,u=a.x1,h=a.y1,d=o.createLinearGradient(s,c,u,h),f=r.match(/linear-gradient\((.+)\)/)[1],l=k(f.substring(f.indexOf(",")+1)),p=0;p<l.colors.length;p++)d.addColorStop(l.percents[p],l.colors[p]);o.setFillStyle(d)}(e,i,n,r,t,o):t.startsWith("radial")&&function(t,e,i,n,r,o){for(var a=k(r.match(/radial-gradient\((.+)\)/)[1]),s=Math.round(t/2)+i,c=Math.round(e/2)+n,u=o.createRadialGradient(s,c,0,s,c,Math.max(t,e)/2),h=0;h<a.colors.length;h++)u.addColorStop(a.percents[h],a.colors[h]);o.setFillStyle(u)}(e,i,n,r,t,o)}(t,e,i,n,r,o):o.setFillStyle(t):[c.MP_TOUTIAO,c.MP_BAIDU].includes(b)?o.setFillStyle("rgba(0,0,0,0)"):o.setFillStyle("transparent")},t.prototype.setShadow=function(t){var e=t.boxShadow,i=void 0===e?[]:e,n=this.ctx;if(i.length){var r=i[0],o=i[1],a=i[2],s=i[3];n.setShadow(r,o,a,s)}},t.prototype.setBorder=function(t,e){var i=this.ctx,n=t.width,r=t.height,o=t.left,a=t.top,s=e.border,c=e.borderBottom,u=e.borderTop,h=e.borderRight,d=e.borderLeft,f=e.borderRadius,l=e.lineCap,p=s||{},v=p.borderWidth,g=void 0===v?0:v,x=p.borderStyle,m=p.borderColor,y=c||{},w=y.borderBottomWidth,S=void 0===w?g:w,k=y.borderBottomStyle,z=void 0===k?x:k,O=y.borderBottomColor,P=void 0===O?m:O,I=u||{},M=I.borderTopWidth,B=void 0===M?g:M,R=I.borderTopStyle,W=void 0===R?x:R,T=I.borderTopColor,j=void 0===T?m:T,F=h||{},_=F.borderRightWidth,C=void 0===_?g:_,L=F.borderRightStyle,E=void 0===L?x:L,A=F.borderRightColor,H=void 0===A?m:A,$=d||{},D=$.borderLeftWidth,N=void 0===D?g:D,U=$.borderLeftStyle,Y=void 0===U?x:U,X=$.borderLeftColor,J=void 0===X?m:X,q=f||{},V=q.borderTopLeftRadius,G=void 0===V?f||0:V,Q=q.borderTopRightRadius,K=void 0===Q?f||0:Q,Z=q.borderBottomRightRadius,tt=void 0===Z?f||0:Z,et=q.borderBottomLeftRadius,it=void 0===et?f||0:et;if(c||d||u||h||s){var nt=function(t,e,n){"dashed"==e?/mp/.test(b)?i.setLineDash([Math.ceil(4*t/3),Math.ceil(4*t/3)]):i.setLineDash([Math.ceil(6*t),Math.ceil(6*t)]):"dotted"==e&&i.setLineDash([t,t]),i.setStrokeStyle(n)},rt=function(t,e,n,r,o,a,s,c,u,h,d,f,p,v,g){i.save(),i.setLineCap(g?"square":l),i.setLineWidth(f),nt(f,p,v),i.beginPath(),i.arc(t,e,s,Math.PI*u,Math.PI*h),i.lineTo(n,r),i.arc(o,a,c,Math.PI*h,Math.PI*d),i.stroke(),i.restore()};if(i.save(),s&&!c&&!d&&!u&&!h)return i.setLineWidth(g),nt(g,x,m),this.roundRect(o,a,n,r,f,!1,!!m),void i.restore();S&&rt(o+n-tt,a+r-tt,o+it,a+r,o+it,a+r-it,tt,it,.25,.5,.75,S,z,P,N&&C),N&&rt(o+it,a+r-it,o,a+G,o+G,a+G,it,G,.75,1,1.25,N,Y,J,B&&S),B&&rt(o+G,a+G,o+n-K,a,o+n-K,a+K,G,K,1.25,1.5,1.75,B,W,j,N&&C),C&&rt(o+n-K,a+K,o+n,a+r-tt,o+n-tt,a+r-tt,K,tt,1.75,2,.25,C,E,H,B&&S)}},t.prototype.setOpacity=function(t){var e=t.opacity,i=void 0===e?1:e;this.ctx.setGlobalAlpha(i)},t.prototype.drawPattern=function(t,e,i){return a(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,new Promise((function(r,o){n.drawView(e,i,!0,!1,!0);var a=n,s=a.ctx;a.canvas;var c=e.width,u=e.height,h=e.left,d=e.top,f=i||{},l=f.borderRadius,p=void 0===l?0:l,v=f.backgroundImage,g=f.backgroundRepeat,b=void 0===g?"repeat":g;v&&function(t){var o=s.createPattern(t.src,b);s.setFillStyle(o),n.roundRect(h,d,c,u,p,!0,!1),n.setBorder(e,i),r()}(t)}))]}))}))},t.prototype.drawView=function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!0);var o=this.ctx,a=t.width,s=t.height,c=t.left,u=t.top,h=e||{},d=h.borderRadius,f=void 0===d?0:d,l=h.backgroundColor,p=void 0===l?"transparent":l,v=h.overflow;e.opacity&&this.setOpacity(e),this.setTransform(t,e),r&&(o.save(),this.setShadow(e)),i&&this.setBackground(p,a,s,c,u),e.clipPath?this.clipPath(c,u,a,s,e.clipPath,i,!1):this.roundRect(c,u,a,s,f,i,!1),r&&o.restore(),n&&this.setBorder(t,e),"hidden"==v&&o.clip()},t.prototype.drawImage=function(t,e,i,n){return void 0===e&&(e={}),void 0===i&&(i={}),void 0===n&&(n=!0),a(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){switch(o.label){case 0:return[4,new Promise((function(o,u){return a(r,void 0,void 0,(function(){var r,a,u,h,d,f,l,p,v,g,x,m,y,k,z,O,P,I,M,B,R,W=this;return s(this,(function(s){return r=this.ctx,a=i.borderRadius,u=void 0===a?0:a,h=i.backgroundColor,d=void 0===h?"transparent":h,f=i.objectFit,l=void 0===f?"fill":f,p=i.backgroundSize,v=void 0===p?"fill":p,g=i.objectPosition,x=i.backgroundPosition,m=i.boxShadow,i.backgroundImage&&(l=v,g=x),m&&this.drawView(e,Object.assign(i,{backgroundColor:d||m&&(d||"#ffffff")}),!0,!1,!0),y=e.width,k=e.height,z=e.left,O=e.top,r.save(),P=e.contentSize.left-e.borderSize.left,I=e.contentSize.top-e.borderSize.top,n||(this.setOpacity(i),this.setTransform(e,i),this.setBackground(d,y,k,z,O),this.roundRect(z,O,y,k,u,!!(u||!m&&d),!1)),z+=P,O+=I,r.clip(),M=function(t){if("fill"!==l){var i=function(t,e,i){var n=t.objectFit,r=t.objectPosition,o=e.width/e.height,a=i.width/i.height,s=1;"contain"==n&&o>=a||"cover"==n&&o<a?s=e.height/i.height:("contain"==n&&o<a||"cover"==n&&o>=a)&&(s=e.width/i.width);var c=i.width*s,u=i.height*s,h=r||[],d=h[0],f=h[1],l=/^\d+px|rpx$/.test(d)?w(d,e.width):(e.width-c)*(S(d)?w(d,1):{left:0,center:.5,right:1}[d||"center"]),p=/^\d+px|rpx$/.test(f)?w(f,e.height):(e.height-u)*(S(f)?w(f,1):{top:0,center:.5,bottom:1}[f||"center"]),v=function(t,e){return[(t-l)/s,(e-p)/s]},g=v(0,0),b=g[0],x=g[1],m=v(e.width,e.height),y=m[0],k=m[1];return{sx:Math.max(b,0),sy:Math.max(x,0),sw:Math.min(y-b,i.width),sh:Math.min(k-x,i.height),dx:Math.max(l,0),dy:Math.max(p,0),dw:Math.min(c,e.width),dh:Math.min(u,e.height)}}({objectFit:l,objectPosition:g},e.contentSize,t),n=i.sx,o=i.sy,a=i.sh,s=i.sw,u=i.dx,h=i.dy,d=i.dh,f=i.dw;b==c.MP_BAIDU?r.drawImage(t.src,u+z,h+O,f,d,n,o,s,a):r.drawImage(t.src,n,o,s,a,u+z,h+O,f,d)}else r.drawImage(t.src,z,O,y,k)},B=function(){r.restore(),W.drawView(e,i,!1,!0,!1),o(1)},R=function(t){M(t),B()},R(t),[2]}))}))}))];case 1:return o.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,i,n){var r=this.ctx,o=e.borderSize,a=e.contentSize,s=e.left,c=e.top,u=a.width,h=a.height,d=a.left-o.left,f=a.top-o.top,l=i.color,p=void 0===l?"#000000":l,v=i.lineHeight,g=void 0===v?"1.4em":v,b=i.fontSize,x=void 0===b?14:b,m=i.fontWeight,y=i.fontFamily,S=i.fontStyle,k=i.textAlign,z=void 0===k?"left":k,O=i.verticalAlign,P=void 0===O?K:O,I=i.backgroundColor,M=i.lineClamp,B=i.backgroundClip,R=i.textShadow,W=i.textDecoration;if(this.drawView(e,i,B!=V),g=w(g,x),t){r.save(),this.setShadow({boxShadow:R}),s+=d,c+=f;var T=n.fontHeight,j=n.descent+n.ascent;switch(r.setFonts({fontFamily:y,fontSize:x,fontWeight:m,fontStyle:S}),r.setTextBaseline(j?K:P),r.setTextAlign(z),B?this.setBackground(I,u,h,s,c):r.setFillStyle(p),z){case"left":break;case"center":s+=.5*u;break;case"right":s+=u}var F=n.lines*g,_=Math.ceil((h-F)/2);switch(_<0&&(_=0),P){case"top":break;case K:c+=_;break;case"bottom":c+=2*_}var C=(g-T)/2,L=function(t){var e=r.measureText(t),i=e.actualBoundingBoxDescent,n=void 0===i?0:i,o=e.actualBoundingBoxAscent;return"top"==P?{fix:j?void 0===o?0:o:0,lineY:j?2*C:C}:P==K?{fix:j?g/2+n/4:g/2,lineY:(g-T)/2}:"bottom"==P?{fix:j?g-n:g+C,lineY:0}:{fix:0,height:0,lineY:0}},E=function(t,e,i){var o=t;switch(z){case"left":o+=i;break;case"center":o=(t-=i/2)+i;break;case"right":o=t,t-=i}if(W){r.setLineWidth(x/13),r.beginPath();var a=.1*n.fontHeight;/\bunderline\b/.test(W)&&(r.moveTo(t,e+a),r.lineTo(o,e+a)),/\boverline\b/.test(W)&&(j||(e-=C),r.moveTo(t,e-n.fontHeight-a),r.lineTo(o,e-n.fontHeight-a)),/\bline-through\b/.test(W)&&(r.moveTo(t,e-.5*n.fontHeight),r.lineTo(o,e-.5*n.fontHeight)),r.closePath(),r.setStrokeStyle(p),r.stroke()}};if(!n.widths||1==n.widths.length&&n.widths[0].total<=a.width){var A=L(t),H=A.fix,$=A.lineY;return r.fillText(t,s,c+H),E(s,(c+=g)-$,n&&n.widths&&n.widths[0].total||n.text),r.restore(),void this.setBorder(e,i)}for(var D=t.split(""),N=c,U=s,Y="",X=0,J=0;J<=D.length;J++){var q=D[J]||"",G="\n"===q,Q=""==q,Z=Y+(q=G?"":q),tt=r.measureText(Z).width;if(X>=M)break;if(U=s,tt>a.width||G||Q){if(X++,Y=Q&&tt<=a.width?Z:Y,X===M&&tt>u){for(;r.measureText("".concat(Y,"...")).width>a.width&&!(Y.length<=1);)Y=Y.substring(0,Y.length-1);Y+="..."}var et=L(Y);if(H=et.fix,$=et.lineY,r.fillText(Y,U,c+H),E(U,(c+=g)-$,tt),Y=q,c>N+h)break}else Y=Z}r.restore()}},t.prototype.source=function(t){return a(this,void 0,void 0,(function(){var e,i,n,r=this;return s(this,(function(o){switch(o.label){case 0:if(this.node=null,e=+new Date,"{}"==JSON.stringify(t))return[2];if(!t.type)for(i in t.type=Q,t.css=t.css||{},t)["views","children","type","css"].includes(i)||(t.css[i]=t[i],delete t[i]);return t.css&&!t.css.width&&(t.css||(t.css={})),[4,this.create(t)];case 1:return(n=o.sent())?(this.size=n.layout()||{},this.node=n,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 a(this,void 0,void 0,(function(){var i,n,r,a,c,u,h,d,f,l,p,v,g,b,x,m,y;return s(this,(function(s){switch(s.label){case 0:if(i="image"==t.type,n=[V,G].includes(t.type),r=t.css||{},a=r.backgroundImage,c=r.display,i&&!t.src&&!t.url||n&&!t.text)return[2];if("none"==c)return[2];if(n&&(t.text=String(t.text)),!(i||t.type==Q&&a))return[3,4];u=i?t.src:"",h=/url\((.+)\)/.exec(a),a&&h&&h[1]&&(u=h[1]||""),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.getImageInfo(u)];case 2:return d=s.sent(),f=d.width,l=d.height,!(p=d.path)&&i?[2]:(p&&(t.attributes=Object.assign(t.attributes||{},{width:f,height:l,path:p,src:p,naturalSrc:u})),[3,4]);case 3:return v=s.sent(),t.type!=Q?[2]:(this.lifecycle("onEffectFail",o(o({},v),{src:u})),[3,4]);case 4:if(this.count+=1,g=new J(t,e,this.root,this.ctx),!(b=t.views||t.children))return[3,8];x=0,s.label=5;case 5:return x<b.length?(m=b[x],[4,this.create(m,g)]):[3,8];case 6:(y=s.sent())&&g.add(y),s.label=7;case 7:return x++,[3,5];case 8:return[2,g]}}))}))},t.prototype.drawNode=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,(function(){var i,n,r,o,a,c,u,h,d,f,l,p,v,g,b,x,m,y,w,S;return s(this,(function(s){switch(s.label){case 0:return i=t.layoutBox,n=t.computedStyle,r=t.attributes,o=t.name,a=t.children,c=t.fixedLine,u=t.attributes,h=u.src,d=u.text,["fixed"].includes(n.position)&&!e?[2]:(this.ctx.save(),o!==Q?[3,7]:h?n.backgroundRepeat?[4,this.drawPattern(r,i,n)]:[3,2]:[3,5]);case 1:return s.sent(),[3,4];case 2:return[4,this.drawImage(r,i,n,!1)];case 3:s.sent(),s.label=4;case 4:return[3,6];case 5:this.drawView(i,n),s.label=6;case 6:return[3,10];case 7:return"image"===o&&h?[4,this.drawImage(r,i,n,!1)]:[3,9];case 8:return s.sent(),[3,10];case 9:o===V?this.drawText(d,i,n,r):o===G&&q.api&&q.api.draw(d,this,i,n),s.label=10;case 10:if(this.progress+=1,l=(f=c||{}).beforeElements,p=f.afterElements,!l)return[3,14];v=0,g=l,s.label=11;case 11:return v<g.length?(S=g[v],[4,this.drawNode(S)]):[3,14];case 12:s.sent(),s.label=13;case 13:return v++,[3,11];case 14:if(!a)return[3,18];b=Object.values?Object.values(a):Object.keys(a).map((function(t){return a[t]})),x=0,m=b,s.label=15;case 15:return x<m.length?"absolute"===(S=m[x]).computedStyle.position?[3,17]:[4,this.drawNode(S)]:[3,18];case 16:s.sent(),s.label=17;case 17:return x++,[3,15];case 18:if(!p)return[3,22];y=0,w=p,s.label=19;case 19:return y<w.length?(S=w[y],[4,this.drawNode(S)]):[3,22];case 20:s.sent(),s.label=21;case 21:return y++,[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(i,n){return a(e,void 0,void 0,(function(){var e,r,o,a,c,u,h,d,f,l;return s(this,(function(s){switch(s.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:s.sent(),s.label=2;case 2:if(s.trys.push([2,14,,15]),!this.node)return[3,12];if(r=this.root.fixedLine||{},o=r.beforeElements,a=r.afterElements,!o)return[3,6];c=0,u=o,s.label=3;case 3:return c<u.length?(f=u[c],[4,this.drawNode(f,!0)]):[3,6];case 4:s.sent(),s.label=5;case 5:return c++,[3,3];case 6:return[4,this.drawNode(this.node)];case 7:if(s.sent(),!a)return[3,11];h=0,d=a,s.label=8;case 8:return h<d.length?(f=d[h],[4,this.drawNode(f,!0)]):[3,11];case 9:s.sent(),s.label=10;case 10:return h++,[3,8];case 11:return i(this.node),[3,13];case 12:this.lifecycle("onEffectFail","node is empty"),s.label=13;case 13:return[3,15];case 14:return l=s.sent(),this.lifecycle("onEffectFail",l),n(l),[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||{},i=e.fileType,n=void 0===i?"png":i,r=e.quality,o=void 0===r?1:r;return this.canvas.toDataURL("image/".concat(n),o)}catch(t){return this.lifecycle("onEffectFail","image cross domain"),t}},t}();e.default=e.Painter=Z,c.WEB==b&&(window.Painter=Z)},7658:function(t,e,i){"use strict";var n=i("8bdb"),r=i("85c1"),o=i("bb80"),a=i("8466"),s=i("81a9"),c=i("d0b1"),u=i("5075"),h=i("b720"),d=i("474f"),f=i("1eb8"),l=i("1c06"),p=i("af9e"),v=i("29ba"),g=i("181d"),b=i("dcda");t.exports=function(t,e,i){var x=-1!==t.indexOf("Map"),m=-1!==t.indexOf("Weak"),y=x?"set":"add",w=r[t],S=w&&w.prototype,k=w,z={},O=function(t){var e=o(S[t]);s(S,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(m&&!l(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return m&&!l(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(m&&!l(t))&&e(this,0===t?0:t)}:function(t,i){return e(this,0===t?0:t,i),this})},P=a(t,!d(w)||!(m||S.forEach&&!p((function(){(new w).entries().next()}))));if(P)k=i.getConstructor(e,t,x,y),c.enable();else if(a(t,!0)){var I=new k,M=I[y](m?{}:-0,1)!==I,B=p((function(){I.has(1)})),R=v((function(t){new w(t)})),W=!m&&p((function(){var t=new w,e=5;while(e--)t[y](e,e);return!t.has(-0)}));R||(k=e((function(t,e){h(t,S);var i=b(new w,t,k);return f(e)||u(e,i[y],{that:i,AS_ENTRIES:x}),i})),k.prototype=S,S.constructor=k),(B||W)&&(O("delete"),O("has"),x&&O("get")),(W||M)&&O(y),m&&S.clear&&delete S.clear}return z[t]=k,n({global:!0,constructor:!0,forced:k!==w},z),g(k,t),m||i.setStrong(k,t,x),k}},"7c5e":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("cf2e"),r={name:"lime-painter-image",mixins:[(0,n.children)("painter")],props:{css:[String,Object],src:String},data:function(){return{type:"image",el:{css:{},src:null}}}};e.default=r},8307:function(t,e,i){"use strict";i.r(e);var n=i("ffbd"),r=i("f08c");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"3b398926",null,!1,n["a"],void 0);e["default"]=s.exports},b518:function(t,e,i){"use strict";i.r(e);var n=i("7c5e"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},bfc24:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n={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=n},bfe24:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",[this._t("default")],2)},r=[]},c1a3:function(t,e,i){"use strict";i("15ab")},c238:function(t,e,i){"use strict";var n=i("af9e");t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},c682:function(t,e,i){"use strict";i.r(e);var n=i("ddf8"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},c97f4:function(t,e,i){"use strict";var n=i("0932"),r=i.n(n);r.a},ce1c:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,".lime-painter[data-v-56095063],\n.lime-painter__canvas[data-v-56095063]{\nwidth:100%;\n}",""]),t.exports=e},cf2e:function(t,e,i){"use strict";var n=i("f5bd").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,a.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,o.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(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 i=t.el;i=void 0===i?{}:i;var n=i.views,r=void 0===n?[]:n;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,a.default)({},t,this)},data:function(){return{el:{css:{},views:[]}}},watch:{css:{handler:function(t){this.canvasId&&(this.el.css=("object"==(0,o.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(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=n(i("b7c7")),o=n(i("fcf3")),a=n(i("39d8"));i("fd3c"),i("8f71"),i("bf0f"),i("5c47"),i("0506"),i("f7a5"),i("5ef2"),i("a1c1"),i("d4b5"),i("6a54"),i("4626"),i("c223");var s=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(":")),i=t.slice(t.indexOf(":")+1);return(0,a.default)({},e.replace(/-([a-z])/g,(function(){return arguments[1].toUpperCase()})).replace(/\s+/g,""),i.replace(/^\s+/,"").replace(/\s+$/,"")||"")}))}},d0b1:function(t,e,i){"use strict";var n=i("8bdb"),r=i("bb80"),o=i("11bf"),a=i("1c06"),s=i("338c"),c=i("d6b1").f,u=i("80bb"),h=i("8449"),d=i("1ea2"),f=i("d7b4"),l=i("c238"),p=!1,v=f("meta"),g=0,b=function(t){c(t,v,{value:{objectID:"O"+g++,weakData:{}}})},x=t.exports={enable:function(){x.enable=function(){},p=!0;var t=u.f,e=r([].splice),i={};i[v]=1,t(i).length&&(u.f=function(i){for(var n=t(i),r=0,o=n.length;r<o;r++)if(n[r]===v){e(n,r,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,v)){if(!d(t))return"F";if(!e)return"E";b(t)}return t[v].objectID},getWeakData:function(t,e){if(!s(t,v)){if(!d(t))return!0;if(!e)return!1;b(t)}return t[v].weakData},onFreeze:function(t){return l&&p&&d(t)&&!s(t,v)&&b(t),t}};o[v]=!0},da63:function(t,e,i){"use strict";i.r(e);var n=i("1164"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},ddf8:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("cf2e"),r={name:"lime-painter-view",mixins:[(0,n.children)("painter"),(0,n.parent)("painter")],props:{css:[String,Object]},data:function(){return{type:"view",el:{css:{},views:[]}}},mounted:function(){}};e.default=r},f08c:function(t,e,i){"use strict";i.r(e);var n=i("f66a"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},f512:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n=i("cf2e"),r={name:"lime-painter-text",mixins:[(0,n.children)("painter")],props:{css:[String,Object],text:[String,Number],replace:Object},data:function(){return{type:"text",el:{css:{},text:null}}}};e.default=r},f66a:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("cf2e"),r={name:"lime-painter-qrcode",mixins:[(0,n.children)("painter")],props:{css:[String,Object],text:String},data:function(){return{type:"qrcode",el:{css:{},text:null}}}};e.default=r},ffbd:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div")},r=[]}}]);