(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["bundle-pages-bargain_process-bargain_process~bundle-pages-invite_fans-invite_fans"],{"026c":function(t,e,i){"use strict";i.r(e);var n=i("d77f"),r=i("1005");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("f213");var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"bf7076f2",null,!1,n["a"],void 0);e["default"]=s.exports},1005:function(t,e,i){"use strict";i.r(e);var n=i("8a7c"),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},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")},"1caa":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("a1e9"),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},"1d5b6":function(t,e,i){"use strict";i.r(e);var n=i("e7c5"),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},"1ef2":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"}},[this._t("default")],2)},r=[]},"20f3":function(t,e,i){"use strict";var n=i("8bdb"),r=i("5145");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},"22c4":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{}},props:{type:{type:String,default:"fixed"},backgroundColor:{type:String,default:"#fff"}},methods:{}};e.default=n},4085:function(t,e,i){"use strict";var n=i("8bdb"),r=i("85c1");n({global:!0,forced:r.globalThis!==r},{globalThis:r})},"4b53":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 t.canvasId&&t.size?i("v-uni-view",{staticClass:"lime-painter",style:t.size+t.customStyle},[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}}),t._t("default")],2):t._e()},r=[]},"4e84":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */.loading[data-v-061dd044]{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999;display:flex;justify-content:center;align-items:center}.loading.flex[data-v-061dd044]{position:static;flex:1;width:100%}.loading .loading-img[data-v-061dd044]{width:%?100?%;height:%?100?%}',""]),t.exports=e},"50f8":function(t,e,i){"use strict";var n=i("511c"),r=i.n(n);r.a},"511c":function(t,e,i){var n=i("4e84");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("967d").default;r("0f330302",n,!0,{sourceMap:!1,shadowMode:!1})},"54c5":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("a1e9"),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:[]}}}};e.default=r},"58b4":function(t,e,i){"use strict";i.r(e);var n=i("54c5"),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},"5d46":function(t,e,i){"use strict";i.r(e);var n=i("9a85"),r=i("58b4");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,"1328a9e4",null,!1,n["a"],void 0);e["default"]=s.exports},"6b8a":function(t,e,i){"use strict";i.r(e);var n=i("f215"),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},"7a03":function(t,e,i){var n=i("daa7");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("967d").default;r("34b66d02",n,!0,{sourceMap:!1,shadowMode:!1})},8507: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")},r=[]},"8a7c":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n={name:"u-loading",props:{mode:{type:String,default:"circle"},color:{type:String,default:"#c7c7c7"},size:{type:[String,Number],default:"34"},show:{type:Boolean,default:!0}},computed:{cricleStyle:function(){var t={};return t.width=this.size+"rpx",t.height=this.size+"rpx","circle"==this.mode&&(t.borderColor="#e4e4e4 #e4e4e4 #e4e4e4 ".concat(this.color?this.color:"#c7c7c7")),t}}};e.default=n},9130: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")},r=[]},9949:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */.u-loading-circle[data-v-bf7076f2]{display:inline-flex;vertical-align:middle;width:%?28?%;height:%?28?%;background:0 0;border-radius:50%;border:2px solid;border-color:#e5e5e5 #e5e5e5 #e5e5e5 #8f8d8e;-webkit-animation:u-circle-data-v-bf7076f2 1s linear infinite;animation:u-circle-data-v-bf7076f2 1s linear infinite}.u-loading-flower[data-v-bf7076f2]{width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:u-flower-data-v-bf7076f2 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}@-webkit-keyframes u-flower-data-v-bf7076f2{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes u-flower-data-v-bf7076f2{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes u-circle-data-v-bf7076f2{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}',""]),t.exports=e},"9a85":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=[]},a1e9: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;Object.defineProperty(this,"parent",{get:function(){return e[t]}}),Object.defineProperty(this,"index",{get:function(){var t,i;return e.bindRelation(),null===(t=e.parent)||void 0===t||null===(i=t.el.views)||void 0===i?void 0:i.indexOf(e.el)}}),this.el.type=this.type},beforeDestroy:function(){var t=this;this.parent&&(this.parent.el.views=this.parent.el.views.filter((function(e){return e._uid!==t._uid})))},methods:{bindRelation:function(){var t,e,i,n,o=this;(this.el._uid||(this.el._uid=this._uid),["text","qrcode"].includes(this.type))&&(this.el.text=(null===(t=this.$slots)||void 0===t||null===(e=t.default)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.text)||(null===(n=this.text)||void 0===n?void 0:n.replace(/\\n/g,"\n")));if("text"==this.type&&this.replace&&(this.el.replace=this.replace),"image"==this.type&&(this.el.src=this.src),this.parent){var a=this.parent.el.views||[];-1!==a.indexOf(this.el)?this.parent.el.views=a.map((function(t){return t._uid==o._uid?o.el:t})):this.parent.el.views=[].concat((0,r.default)(a),[this.el])}}},mounted:function(){this.bindRelation()}}},e.parent=function(t){return{provide:function(){return(0,a.default)({},t,this)},data:function(){return{el:{css:{},views:[]}}},watch:{css:{handler:function(t){var e,i;this.canvasId&&(this.el.css="object"==(0,o.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(t)))||{},this.canvasWidth=(null===(e=this.el.css)||void 0===e?void 0:e.width)||this.canvasWidth,this.canvasHeight=(null===(i=this.el.css)||void 0===i?void 0:i.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("a1c1"),i("d4b5"),i("6a54"),i("5ef2"),i("4626"),i("c223");i("ad07");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,i,n=t.split(":");return(0,a.default)({},n[0].replace(/-([a-z])/g,(function(){return arguments[1].toUpperCase()})).replace(/\s+/g,""),(null===n||void 0===n||null===(e=n[1])||void 0===e||null===(i=e.replace(/^\s+/,""))||void 0===i?void 0:i.replace(/\s+$/,""))||"")}))}},a335:function(t,e,i){"use strict";i.r(e);var n=i("df11"),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},a84a:function(t,e,i){"use strict";i.r(e);var n=i("4b53"),r=i("1d5b6");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("dc88");var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"64f1d435",null,!1,n["a"],void 0);e["default"]=s.exports},ad07:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=f,e.compareVersion=function(t,e){t=t.split("."),e=e.split(".");var i=Math.max(t.length,e.length);while(t.lengtho)return 1;if(r1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(){var i=(0,o.default)((0,r.default)().mark((function i(n,o){var a;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(/^\.|^\/(?=[^\/])/,!s.test(t)||!e){i.next=5;break}return i.next=4,h(t);case 4:t=i.sent;case 5:if(!d(t)){i.next=15;break}if(!c&&u[t]){i.next=14;break}return a=t,i.next=10,f(t);case 10:t=i.sent,u[a]=t,i.next=15;break;case 14:t=u[t];case 15:u[t]&&u[t].errMsg?n(u[t]):uni.getImageInfo({src:t,success:function(e){e.path=e.path.replace(/^\./,window.location.origin),e.naturalSrc=t,c?n(e):(u[t]=e,n(u[t]))},fail:function(e){n({path:t}),console.error("getImageInfo:fail ".concat(t," failed ").concat(JSON.stringify(e)))}});case 16:case"end":return i.stop()}}),i)})));return function(t,e){return i.apply(this,arguments)}}())},e.isBase64=void 0,e.isNumber=l,e.pathToBase64=h,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(l(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("2fdc")),a=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"),i("d4b5"),i("7a76"),i("c223");var s=/^(http|\/\/)/,d=function(t){return/^data:image\/(\w+);base64/.test(t)};e.isBase64=d;var c=["devtools"].includes(uni.getSystemInfoSync().platform),u={};function l(t){return/^-?\d+(\.\d+)?$/.test(t)}function f(t){var e=/data:image\/(\w+);base64,(.*)/.exec(t)||[],i=(0,a.default)(e,3);i[1],i[2];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;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]0;break}}return r}("Android"===plus.os.name?"1.9.9.80627":"1.9.9.80472",plus.runtime.innerVersion))return void plus.io.resolveLocalFileSystemURL("_doc",(function(i){i.getDirectory("uniapp_temp",{create:!0,exclusive:!1},(function(i){i.getFile(l,{create:!0,exclusive:!1},(function(i){i.createWriter((function(i){var n;i.onwrite=function(){t(f)},i.onerror=e,i.seek(0),i.writeAsBinary((n=a.split(","))[n.length-1])}),e)}),e)}),e)}),e);var h=new plus.nativeObj.Bitmap(l);h.loadBase64Data(a,(function(){h.save(f,{},(function(){h.clear(),t(f)}),(function(t){h.clear(),e(t)}))}),(function(t){h.clear(),e(t)}))}})))];case 2:return e=r.sent(),[3,4];case 3:return n=r.sent(),console.log(n),[3,4];case 4:return d.getImageInfo({src:e,success:function(t){return i(t)},fail:function(t){return o(t)}}),[2]}var a}))}))}))}function h(t){for(var e=[],i=[],n=0,r=t.substring(0,t.length-1).split("%,");nd.left+d.width+u;if(this.getBoxState(f,b)||M)b.style.left+=o,(null==(S=f)?void 0:S.offsetSize.height)>=(null==(I=h)?void 0:I.offsetSize.height)?b.style.top+=f.offsetSize.top+f.offsetSize.height||0:b.style.top+=(null==(z=h)?void 0:z.offsetSize.top)+(null==(P=h)?void 0:P.offsetSize.height)||0,b.getBoxPosition(),f=b,h=b,v=!0;else b.style.left+=f.offsetSize.left+f.offsetSize.width,b.style.top+=v?f.offsetSize.top:s,b.getBoxPosition(),f=b}}this.layoutBoxUpdate(d,e)}else this.layoutBoxUpdate(d,e);return this.layoutBox},e.setMaxLineHeight=function(t,e,i){for(var n=t;n>=0&&!e[n].contentSize.maxLineHeight;)e[n].contentSize.maxLineHeight=i,n--},e.getBoxState=function(t,e){return"view"==e.name&&"inline-block"!==e.style.display||"view"==(null==t?void 0:t.name)&&"inline-block"!==(null==t?void 0:t.style.display)||"block"==e.style.display||"block"==(null==t?void 0:t.style.display)},e.getBoxHieght=function(){var t,e=this,i=this.name,n=this.computedStyle,r=this.attributes,o=this.parent,a=this.getChildren(),s=n.top,d=n.bottom,c=n.height,u=void 0===c?0:c,f=n.fontSize,h=void 0===f?14:f,v=n.position,g=n.lineHeight,b=void 0===g?"1.4em":g;n.lineClamp;var m=p({},this.contentSize);if("image"==i&&null==u){var w=r.width,x=r.height;r.mode,m.height=Math.round(m.width*x/w)||0,this.layoutBoxUpdate(m,n,"height")}else if(u)if(a.length){var y=null,S=0;a.forEach((function(t,i){var n,r,o=i==a.length-1;t.getBoxHieght();var s=(null==(n=y)?void 0:n.offsetSize.left)+(null==(r=y)?void 0:r.offsetSize.width)+t.offsetSize.width>m.left+m.width,d=e.getBoxState(y,t);if(s||d){if(s){for(var c=i-1;c>=0&&!a[c].contentSize.maxLineHeight;)S=0&&!a[u].contentSize.maxLineHeight;)Sm.width;if(s||o){var d,c,u=0;return s||M&&("view"!==(null==(d=M)?void 0:d.name)||"inline-block"==(null==(c=M)?void 0:c.style.display))?(r&&(e.setMaxLineHeight(n-1,a,P),P+=i.offsetSize.height),u=t+P,P=i.offsetSize.height,k=i.offsetSize.width,M=i,u):(k=0,P=0,t+i.offsetSize.height)}return k+=i.offsetSize.width,P=Math.max(P,i.offsetSize.height)||0,r?(e.setMaxLineHeight(n,a,P),t+P):(M=i,t)}),0),I&&(m.height=I),this.layoutBoxUpdate(m,n)}else I&&(m.height=I),this.layoutBoxUpdate(m,n,"height")}if(n.borderRadius&&null!=(t=this.borderSize)&&t.width)for(var B in n.borderRadius)Object.hasOwnProperty.call(n.borderRadius,B)&&(n.borderRadius[B]=l(n.borderRadius[B],this.borderSize.width));return this.layoutBox},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);return{width:i.width,fontHeight:(i.actualBoundingBoxAscent||.7*e)+1}},e.getBoxWidth=function(){var t,e=this,i=this.name,n=this.computedStyle,r=this.attributes,o=this.parent,a=void 0===o?{}:o,s=this.ctx,d=this.getChildren(),c=n.left,u=void 0===c?0:c;n.top;var f=n.right,h=n.width,v=void 0===h?0:h,p=n.minWidth,g=n.maxWidth,b=n.height,m=void 0===b?0:b,w=n.fontSize,x=void 0===w?14:w,y=n.fontWeight,S=n.fontFamily,I=n.textStyle,z=n.position,P=n.display,M=n.lineClamp,k=n.padding,B=void 0===k?{}:k,j=n.margin,R=void 0===j?{}:j,O=n.border,T=(O=void 0===O?{}:O).borderWidth,C=void 0===T?0:T,W=n.borderRight,H=(W=void 0===W?{}:W).borderRightWidth,N=void 0===H?C:H,L=n.borderLeft,D=(L=void 0===L?{}:L).borderLeftWidth,A=void 0===D?C:D;if(/%$/.test(v)&&a.contentSize.width&&(v=l(v,a.contentSize.width,!0)),/%$/.test(m)&&a.contentSize.height&&(m=l(m,a.contentSize.height)),/%$/.test(p)&&a.contentSize.width&&(p=l(p,a.contentSize.width,!0)),/%$/.test(g)&&a.contentSize.width&&(g=l(g,a.contentSize.width,!0)),n.padding&&null!=(t=a.contentSize)&&t.width)for(var _ in n.padding)Object.hasOwnProperty.call(n.padding,_)&&(n.padding[_]=l(n.padding[_],a.contentSize.width));var F=B.paddingRight,U=void 0===F?0:F,$=B.paddingLeft,J=void 0===$?0:$;if(n.margin&&[n.margin.marginLeft,n.margin.marginRight].includes("auto"))if(v){var E=a.contentSize.width-v-U-J-A-N||0;n.margin.marginLeft==n.margin.marginRight?n.margin.marginLeft=n.margin.marginRight=E/2:"auto"==n.margin.marginLeft?n.margin.marginLeft=E:n.margin.marginRight=E}else n.margin.marginLeft=n.margin.marginRight=0;var Z=R.marginRight,G=void 0===Z?0:Z,Q=R.marginLeft,Y={width:v,height:m,left:0,top:0},V=J+U+A+N+(void 0===Q?0:Q)+G;if("text"==i&&!this.attributes.widths){var q=r.text||"";s.save(),s.setFonts({fontFamily:S,fontSize:x,fontWeight:y,textStyle:I}),q.split("\n").map((function(t){var i=t.split("").map((function(t){return e.measureText(t,x).width}));e.attributes.fontHeight=e.measureText(t,x).fontHeight,e.attributes.widths||(e.attributes.widths=[]),e.attributes.widths.push({widths:i,total:i.reduce((function(t,e){return t+e}),0)})})),s.restore()}if("image"==i&&null==v){var X=r.width,K=r.height;Y.width=this.contrastSize(Math.round(X*m/K)||0,p,g),this.layoutBoxUpdate(Y,n,"width")}else if(v)d.length?(this.layoutBoxUpdate(Y,n,"width"),d.forEach((function(t){t.getBoxWidth()}))):this.layoutBoxUpdate(Y,n,"width");else{var tt=0;if((this.isAbsolute||this.isFixed)&&a.contentSize.width){var et="absolute"==z?a.contentSize.width:this.root.width;tt=et-(/%$/.test(u)?l(u,et):u)-(/%$/.test(f)?l(f,et):f)}if("text"==i){var it=this.attributes.widths,nt=Math.max.apply(Math,it.map((function(t){return t.total})));a&&a.contentSize.width>0&&(nt>a.contentSize.width||"block"==P)&&!this.isAbsolute&&!this.isFixed&&(nt=a.contentSize.width-V),Y.width=tt||this.contrastSize(nt,p,g),this.layoutBoxUpdate(Y,n,"width")}else if("view"!=i||!a||"inline-block"===P||this.isAbsolute||this.isFixed)if(d.length){for(var rt=0,ot=null,at=0;d.length>at;){var st=d[at],dt=at==d.length-1,ct=this.getBoxState(ot,st);if(!st.isFixed&&!st.isAbsolute)if(!ot||ct){var ut=st.getBoxWidth();rt=Math.max(rt,ut.width)||0,ot=st}else if(ot.offsetSize.left+ot.offsetSize.width+st.offsetSize.widthY.width?(ft++,e):t+e}),0)})),ft=M&&ft>M?M:ft,this.attributes.lines=ft}return this.layoutBox},e.layout=function(){return this.getBoxWidth(),this.getBoxHieght(),this.getBoxPosition(),this.offsetSize},t}(),w=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],d=[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],c=[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],u=[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],l=[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=[],h=[],v=[],p=[],g=[],b=2;function m(t,e){var i;t>e&&(i=t,t=e,e=i),i=e,i*=e,i+=e,i>>=1,p[i+=t]=1}function w(t,i){var n;for(v[t+e*i]=1,n=-2;n<2;n++)v[t+n+e*(i-2)]=1,v[t-2+e*(i+n+1)]=1,v[t+2+e*(i+n)]=1,v[t+n+1+e*(i+2)]=1;for(n=0;n<2;n++)m(t-1,i+n),m(t+1,i-n),m(t-n,i-1),m(t+n,i+1)}function x(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t}var y=[];function S(t,e,i,n){var r,o,a;for(r=0;re&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,p[i+=t]}function z(t){var i,n,r,o;switch(t){case 0:for(n=0;n>1&1,i=0;i=5&&(i+=3+g[e]-5);for(e=3;et||3*g[e-3]>=4*g[e]||3*g[e+3]>=4*g[e])&&(i+=40);return i}function M(){var t,i,n,r,o,a=0,s=0;for(i=0;ie*e;)d-=e*e,c++;for(a+=10*c,t=0;t1)for(j=a[t],k=e-7;;){for(P=e-7;P>j-3&&(w(P,k),!(P6)for(j=s[t-7],B=17,P=0;P<6;P++)for(k=0;k<3;k++,B--)1&(B>11?t>>B-12:j>>B)?(v[5-P+e*(2-k+e-11)]=1,v[2-k+e-11+e*(5-P)]=1):(m(5-P,2-k+e-11),m(2-k+e-11,5-P));for(k=0;k=(P=r*(i+n)+n)-2&&(R=P-2,t>9&&R--),O=R,t>9){for(f[O+2]=0,f[O+3]=0;O--;)j=f[O],f[O+3]|=255&j<<4,f[O+2]=j>>4;f[2]|=255&R<<4,f[1]=R>>4,f[0]=64|R>>12}else{for(f[O+1]=0,f[O+2]=0;O--;)j=f[O],f[O+2]|=255&j<<4,f[O+1]=j>>4;f[1]|=255&R<<4,f[0]=64|R>>4}for(O=R+3-(t<10);O0;T--)y[T]=y[T]?y[T-1]^l[x(u[y[T]]+O)]:y[T-1];y[0]=l[x(u[y[0]]+O)]}for(O=0;O<=o;O++)y[O]=u[y[O]];for(B=P,k=0,O=0;O>=1)1&k&&(v[e-1-B+8*e]=1,B<6?v[8+e*B]=1:v[8+e*(B+1)]=1);for(B=0;B<7;B++,k>>=1)1&k&&(v[8+e*(e-7+B)]=1,B?v[6-B+8*e]=1:v[7+8*e]=1);return v}(g)},utf16to8:function(t){var e,i,n,r;for(e="",n=t.length,i=0;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,d=s.width,c=s.height;r.borderRadius,r.backgroundColor;var u=r.color,l=void 0===u?"#000000":u;r.border;var f=n.contentSize.left-n.borderSize.left,h=n.contentSize.top-n.borderSize.top;if(b=o||b,a){a.save(),i.setOpacity(r);var v=i.setTransform(n,r),p=v.x,g=v.y;p+=f,g+=h;var m=Math.min(d,c);t=this.utf16to8(t);var w=this.getFrame(t),x=m/e;a.setFillStyle(l);for(var y=0;y0?1:-1)*r.x+(z+p)/c,y:k*(h>0?1:-1)*r.y+(P+b)/h};return a.translate(R.x,R.y),w&&a.rotate(w*Math.PI/180),(y||I)&&a.transform(1,Math.tan(I*Math.PI/180),Math.tan(y*Math.PI/180),1,0,0),{x:-M*r.x,y:-k*r.y,w:M,h:k}},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 d,c=0,u=0,l=0,f=0;if(a180-s&&a<180||a>180&&a<180+s||a>360-s){var h=a*Math.PI/180,v=a360-s?i/2:-i/2,p=Math.tan(h)*v,g=a180-s&&a<180?e/2-p:-e/2-p;c=-(l=p+(d=Math.pow(Math.sin(h),2)*g)),u=-(f=v+d/Math.tan(h))}(a>s&&a<90||a>90&&a<90+s||a>180+s&&a<270||a>270&&a<360-s)&&(h=(90-a)*Math.PI/180,p=a>s&&a<90||a>90&&a<90+s?e/2:-e/2,v=Math.tan(h)*p,g=a>s&&a<90||a>270&&a<360-s?i/2-v:-i/2-v,c=-(l=p+(d=Math.pow(Math.sin(h),2)*g)/Math.tan(h)),u=-(f=v+d));return c=Math.round(c+e/2)+n,u=Math.round(i/2-u)+r,l=Math.round(l+e/2)+n,f=Math.round(i/2-f)+r,{x0:c,y0:u,x1:l,y1:f}}(r,t,e,i,n),s=a.x0,d=a.y0,c=a.x1,u=a.y1,l=o.createLinearGradient(s,d,c,u),f=r.match(/linear-gradient\((.+)\)/)[1],v=h(f.substring(f.indexOf(",")+1)),p=0;p=a||"cover"==n&&o=a)&&(s=e.width/i.width);var d=i.width*s,c=i.height*s,u=/^\d+px|rpx$/.test(null==r?void 0:r[0])?l(null==r?void 0:r[0],e.width):(e.width-d)*(/%$/.test(null==r?void 0:r[0])?l(null==r?void 0:r[0],1,!0):{left:0,center:.5,right:1}[(null==r?void 0:r[0])||"center"]),f=/^\d+px|rpx$/.test(null==r?void 0:r[1])?l(null==r?void 0:r[1],e.height):(e.height-c)*(/%$/.test(null==r?void 0:r[1])?l(null==r?void 0:r[1],1,!0):{top:0,center:.5,bottom:1}[(null==r?void 0:r[1])||"center"]),h=function(t,e){return[(t-u)/s,(e-f)/s]},v=h(0,0),p=v[0],g=v[1],b=h(e.width,e.height),m=b[0],w=b[1];return{sx:Math.max(p,0),sy:Math.max(g,0),sw:Math.min(m-p,i.width),sh:Math.min(w-g,i.height),dx:Math.max(u,0),dy:Math.max(f,0),dw:Math.min(d,e.width),dh:Math.min(c,e.height)}}({objectFit:m,objectPosition:w},e.contentSize,t),n=i.sx,r=i.sy,o=i.sh,a=i.sw,s=i.dx,c=i.dy,u=i.dh,f=i.dw;"mp-baidu"==N.platform?d.drawImage(t.src,s+S,c+I,f,u,n,r,a,o):d.drawImage(t.src,n,r,a,o,s+S,c+I,f,u)}else d.drawImage(t.src,S,I,x,y)},R=function(){d.restore(),N.drawView(e,i,!1,!0,!1),setTimeout(s,c)},O=function(t){if(u.createImage||"web"==N.platform){var e=null;(e=u.createImage?u.createImage():new Image).onload=function(){t.src=e,j(t),R()},e.onerror=function(){return n(N,void 0,void 0,(function(){return r(this,(function(e){return console.log("createImage fail: "+JSON.stringify(t)),s(!0),[2]}))}))},e.src=t.path}else j(t),R()},"string"!=typeof t?[3,2]:[4,f(t)];case 1:return T=L.sent(),C=T.path,W=T.width,H=T.height,O({path:C,src:C,width:W,height:H}),[3,3];case 2:O(t),L.label=3;case 3:return[2]}}))}))}))];case 1:return s.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,i,n){this.drawView(e,i);var r=this.ctx,o=e.borderSize,a=e.contentSize,s=a.width,d=a.height,c=a.left-o.left,u=a.top-o.top,f=i.color,h=void 0===f?"#000000":f,v=i.lineHeight,p=void 0===v?"1.4em":v,g=i.fontSize,b=void 0===g?14:g,m=i.fontWeight,w=i.fontFamily,x=i.textStyle,y=i.textAlign,S=void 0===y?"left":y,I=i.verticalAlign,z=void 0===I?"middle":I;i.backgroundColor;var P=i.lineClamp,M=i.textDecoration;if(p=l(p,b),t){r.save(),this.setOpacity(i);var k=this.setTransform(e,i),B=k.x,j=k.y;switch(B+=c,j+=u,r.setFonts({fontFamily:w,fontSize:b,fontWeight:m,textStyle:x}),r.setTextBaseline("middle"),r.setTextAlign(S),r.setFillStyle(h),j+=b/2,S){case"left":break;case"center":B+=.5*s;break;case"right":B+=s}var R=n.lines*p,O=Math.ceil((d-R)/2);switch(O<0&&(O=0),z){case"top":break;case"middle":j+=O;break;case"bottom":j+=2*O}var T=(p-n.fontHeight)/2,C=function(t,e,i){var o=t;switch(S){case"left":t=t,o+=i;break;case"center":o=(t-=i/2)+i;break;case"right":o=t,t-=i}M&&(r.setLineWidth(b/13),r.beginPath(),e-=T,/\bunderline\b/.test(M)&&(r.moveTo(t,e-.5*n.fontHeight),r.lineTo(o,e-.5*n.fontHeight)),/\boverline\b/.test(M)&&(r.moveTo(t,e-1.5*n.fontHeight),r.lineTo(o,e-1.5*n.fontHeight)),/\bline-through\b/.test(M)&&(r.moveTo(t,e-n.fontHeight),r.lineTo(o,e-n.fontHeight)),r.closePath(),r.setStrokeStyle(h),r.stroke())};if(1==n.widths.lenght&&n.widths[0].total<=a.width)return r.fillText(t,B,j+T),C(B,j+=p,n.widths[0].total),r.restore(),void this.setBorder(e,i);for(var W=t.split(""),H=j,N=B,L="",D=0,A=0;A<=W.length;A++){var _=W[A]||"",F="\n"===_,U=""==_,$=L+(_=F?"":_),J=r.measureText($).width;if(D>=P)break;if(N=B,(J=J)>a.width||F||U){if(D++,L=U&&J<=a.width?$:L,D===P&&J>s){for(;r.measureText(L+"...").width>a.width&&!(L.length<=1);)L=L.substring(0,L.length-1);L+="..."}if(r.fillText(L,N,j+T),C(N,j+=p,J),L=_,j+p>H+d)break}else L=$}r.restore()}},t.prototype.source=function(t){var e;return n(this,void 0,void 0,(function(){var i,n;return r(this,(function(r){switch(r.label){case 0:if("{}"==JSON.stringify(t))return[2];if(!t.type)for(i in t.type="view",t.css=t.css||{},t)["views","children","type","css"].includes(i)||(t.css[i]=t[i],delete t[i]);return(null===(e=null==t?void 0:t.css)||void 0===e?void 0:e.width)||(t.css?t.css.width=this.root.width:t.css={width:this.root.width}),[4,this.create(t)];case 1:return n=r.sent(),this.size=n.layout(),this.node=n,[2,this.size]}}))}))},t.prototype.create=function(t,e){var i,o,a,s;return n(this,void 0,void 0,(function(){var n,d,c,u,l,h,v,p,g,b,w,x;return r(this,(function(r){switch(r.label){case 0:if("image"==t.type&&!t.src&&!t.url||"qrcode"==t.type&&!t.text)return[2];if("none"==(null===(i=null==t?void 0:t.css)||void 0===i?void 0:i.display))return console.error("element display none"),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),"image"==t.type||"view"==t.type&&(null===(o=t.css)||void 0===o?void 0:o.backgroundImage)?(n=null,d=/url\((.+)\)/,t.css.backgroundImage&&(null===(a=d.exec(t.css.backgroundImage))||void 0===a?void 0:a[1])&&(n=null===(s=d.exec(t.css.backgroundImage))||void 0===s?void 0:s[1]),[4,f(t.src||n)]):[3,3];case 2:c=r.sent(),u=c.width,l=c.height,h=c.path,["mp-weixin","mp-baidu","mp-qq","mp-toutiao"].includes(this.platform)&&(h=/^\.|^\/(?=[^\/])/.test(t.src||n)?"/"+h:h),t.attributes=Object.assign(t.attributes||{},{width:u,height:l,path:h,src:h,naturalSrc:t.src||n}),r.label=3;case 3:return[3,5];case 4:return v=r.sent(),console.log(v),[2];case 5:if(this.count+=1,p=new m(t,e,this.root,this.ctx),!(g=t.views||t.children))return[3,9];b=0,r.label=6;case 6:return b0&&void 0!==t[0]?t[0]:{},u=t.length>1&&void 0!==t[1]&&t[1],!e.isDrawIng){i.next=4;break}return i.abrupt("return",e.update(c,u));case 4:return e.isDrawIng=!0,"{}"!=JSON.stringify(c),i.next=8,e.getContext();case 8:if(l=i.sent,f=e.use2dCanvas,h=e.boardWidth,v=e.boardHeight,p=e.canvas,g=e.afterDelay,!f||p){i.next=12;break}return i.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 12:return e.boundary={top:0,left:0,width:h,height:v},e.painter||(e.painter=new d.Painter({context:l,canvas:p,width:h,height:v,pixelRatio:e.dpr},e)),e.painter.listen("progressChange",(function(t){e.$emit("progress",t)})),i.next=17,e.painter.source(c);case 17:return b=i.sent,m=b.width,w=b.height,e.canvasHeight=(0,a.toPx)(null===(n=e.el.css)||void 0===n?void 0:n.height)||w,e.canvasWidth=(0,a.toPx)(null===(s=e.el.css)||void 0===s?void 0:s.width)||m,e.boundary.height=e.canvasHeight,e.boundary.width=e.canvasWidth,i.next=26,(0,a.sleep)(e.sleep);case 26:return i.next=28,e.painter.render();case 28:return i.next=30,new Promise((function(t){return e.$nextTick(t)}));case 30:if(f||u){i.next=33;break}return i.next=33,e.canvasDraw();case 33:if(!g||!f){i.next=36;break}return i.next=36,(0,a.sleep)(g);case 36:return e.$emit("done"),e.isCanvasToTempFilePath&&!u&&e.isDrawIng&&e.canvasToTempFilePath().then(function(){var t=(0,o.default)((0,r.default)().mark((function t(i){return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("success",i.tempFilePath);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$emit("fail",new Error(JSON.stringify(t)))})),e.isDrawIng=!1,i.abrupt("return",Promise.resolve({ctx:l,draw:e.painter,node:e.node}));case 40:case"end":return i.stop()}}),i)})))()},custom:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o,a;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,e.render({},!0);case 2:return n=i.sent,o=n.ctx,a=n.draw,o.save(),i.next=8,t(o,a);case 8:return o.restore(),i.abrupt("return",Promise.resolve(!0));case 10:case"end":return i.stop()}}),i)})))()},single:function(){var t=arguments,e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:{},i.next=3,e.render(n,!0);case 3:return o=i.sent,i.abrupt("return",Promise.resolve(o));case 5: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.ctx||!t.inited){e.next=2;break}return e.abrupt("return",Promise.resolve(t.ctx));case 2:return t.getParentWeith(),i=t.type,t.use2dCanvas,n=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 r=uni.createCanvasContext(t.canvasId,t);t.inited||(t.inited=!0,t.use2dCanvas=!1,t.canvas=i),t.isPC&&r.scale(1/n,1/n),t.ctx=r,e(t.ctx)}}))}))},e.abrupt("return",o());case 8: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 9:case"end":return e.stop()}}),e)})))()},canvasToTempFilePath:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.use2dCanvas,n=this.canvasId,a=this.dpr,s=this.fileType,d=this.quality;return new Promise((function(c,u){var l=t.boundary||t,f=l.top,h=void 0===f?0:f,v=l.left,p=void 0===v?0:v,g=l.width,b=l.height,m=g*a,w=b*a,x=function(){var e=(0,o.default)((0,r.default)().mark((function e(i){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.setFilePath(i.tempFilePath);case 2:n=e.sent,c(Object.assign(i,{tempFilePath:n}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=Object.assign({x:p,y:h,width:g,height:b,destWidth:m,destHeight:w,canvasId:n,fileType:s,quality:d,success:x,fail:u},e);i&&(delete y.canvasId,y.canvas=t.canvas),uni.canvasToTempFilePath(y,t)}))}}};e.default=c},eba2:function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uLoading:i("026c").default},r=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{class:"loading "+("flex"==this.type?"flex":""),style:{backgroundColor:this.backgroundColor}},[e("u-loading",{attrs:{mode:"flower",size:60}})],1)},o=[]},eee5c:function(t,e,i){var n=i("9949");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("967d").default;r("194621ca",n,!0,{sourceMap:!1,shadowMode:!1})},f213:function(t,e,i){"use strict";var n=i("eee5c"),r=i.n(n);r.a},f215:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n=i("a1e9"),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},fea4:function(t,e,i){"use strict";i.r(e);var n=i("1ef2"),r=i("6b8a");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,"5f2f7706",null,!1,n["a"],void 0);e["default"]=s.exports},fff5:function(t,e,i){"use strict";i.r(e);var n=i("22c4"),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}}]);