(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["package-packageorder-pages-signOrder-signOrder"],{"10e9":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("v-uni-view",{ref:"limeSignature",staticClass:"lime-signature",style:[t.canvasStyle,t.styles]},[t.useCanvas2d?n("v-uni-canvas",{staticClass:"lime-signature__canvas",attrs:{id:t.canvasId,type:"2d",disableScroll:t.disableScroll},on:{touchstart:function(e){arguments[0]=e=t.$handleEvent(e),t.touchStart.apply(void 0,arguments)},touchmove:function(e){arguments[0]=e=t.$handleEvent(e),t.touchMove.apply(void 0,arguments)},touchend:function(e){arguments[0]=e=t.$handleEvent(e),t.touchEnd.apply(void 0,arguments)}}}):n("v-uni-canvas",{staticClass:"lime-signature__canvas",attrs:{disableScroll:t.disableScroll,"canvas-id":t.canvasId,id:t.canvasId,width:t.canvasWidth,height:t.canvasHeight},on:{touchstart:function(e){arguments[0]=e=t.$handleEvent(e),t.touchStart.apply(void 0,arguments)},touchmove:function(e){arguments[0]=e=t.$handleEvent(e),t.touchMove.apply(void 0,arguments)},touchend:function(e){arguments[0]=e=t.$handleEvent(e),t.touchEnd.apply(void 0,arguments)},mousedown:function(e){arguments[0]=e=t.$handleEvent(e),t.touchStart.apply(void 0,arguments)},mousemove:function(e){arguments[0]=e=t.$handleEvent(e),t.touchMove.apply(void 0,arguments)},mouseup:function(e){arguments[0]=e=t.$handleEvent(e),t.touchEnd.apply(void 0,arguments)}}}),t.showOffscreen?n("v-uni-canvas",{staticClass:"offscreen",style:"width:"+t.offscreenSize[0]+"px;height:"+t.offscreenSize[1]+"px",attrs:{"canvas-id":"offscreen",id:"offscreen",width:t.offscreenSize[0],height:t.offscreenSize[1]}}):t._e(),t.showMask?n("v-uni-view",{staticClass:"mask",on:{touchstart:function(e){arguments[0]=e=t.$handleEvent(e),t.touchStart.apply(void 0,arguments)},touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e),t.touchMove.apply(void 0,arguments)},touchend:function(e){arguments[0]=e=t.$handleEvent(e),t.touchEnd.apply(void 0,arguments)}}}):t._e()],1):t._e()},a=[]},1851:function(t,e,n){"use strict";var i=n("8bdb"),a=n("84d6"),r=n("1cb5");i({target:"Array",proto:!0},{fill:a}),r("fill")},2634:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ e.default=function(){return t};var t={},n=Object.prototype,a=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(L){f=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var a=e&&e.prototype instanceof p?e:p,o=Object.create(a.prototype),s=new T(i||[]);return r(o,"_invoke",{value:_(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(L){return{type:"throw",arg:L}}}t.wrap=l;var h={};function p(){}function v(){}function g(){}var m={};f(m,s,(function(){return this}));var b=Object.getPrototypeOf,y=b&&b(b(E([])));y&&y!==n&&a.call(y,s)&&(m=y);var w=g.prototype=p.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){var n;r(this,"_invoke",{value:function(r,o){function s(){return new e((function(n,s){(function n(r,o,s,c){var u=d(t[r],t,o);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==(0,i.default)(l)&&a.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):e.resolve(l).then((function(t){f.value=t,s(f)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)})(r,o,n,s)}))}return n=n?n.then(s,s):s()}})}function _(t,e,n){var i="suspendedStart";return function(a,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===a)throw r;return P()}for(n.method=a,n.arg=r;;){var o=n.delegate;if(o){var s=C(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=d(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function C(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,C(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var a=d(i,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,h;var r=a.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function E(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--i){var r=this.tryEntries[i],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=a.call(r,"catchLoc"),c=a.call(r,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var a=i.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t},n("6a54"),n("01a2"),n("e39c"),n("bf0f"),n("844d"),n("18f7"),n("de6c"),n("3872e"),n("4e9b"),n("114e"),n("c240"),n("926e"),n("7a76"),n("c9b5"),n("aa9c"),n("2797"),n("8a8d"),n("dc69"),n("f7a5");var i=function(t){return t&&t.__esModule?t:{default:t}}(n("fcf3"))},"2ace":function(t,e,n){"use strict";n.r(e);var i=n("66c9"),a=n("b6eb");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("dff8");var o=n("828b"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"56df567b",null,!1,i["a"],void 0);e["default"]=s.exports},"2fdc":function(t,e,n){"use strict";function i(t,e,n,i,a,r,o){try{var s=t[r](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(i,a)}n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=this,n=arguments;return new Promise((function(a,r){var o=t.apply(e,n);function s(t){i(o,a,r,s,c,"next",t)}function c(t){i(o,a,r,s,c,"throw",t)}s(void 0)}))}},n("bf0f")},"31be":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("39d8")),r=i(n("fcf3"));n("5c47"),n("a1c1"),n("7a76"),n("c9b5"),n("9db6"),n("c223"),n("bf0f"),n("2797"),n("dc8a"),n("23f4"),n("7d2f"),n("9c4e"),n("ab80"),n("2c10");var o=n("e0a6"),s={data:function(){return{pageTitle:"签订协议",order:{},id:"",paramedicSignPath:"",customerSignPath:"",companySignPath:"",paramedicSignId:"",customerSignId:"",companySignId:"",paramedicSignImage:"",customerSignImage:"",companySignImage:"",agreementHtml:"",pendingAgreementHtml:"",penColor:"#000",penSize:3,openSmooth:!0,boundingBox:!0,isGenerating:!1,generateButtonText:"直接提交",currentSignatureType:"",signaturePopupTitle:"",signatureToastVisible:!1,signatureToastText:""}},onLoad:function(t){var e=this;e.id=t.id,o.getOrderInfo(t.id,(function(t){e.order=t.data,e.initCompanySign()}),(function(t){}))},methods:(0,a.default)({normalizeUrl:function(t){if(!t)return t;var e=String(t);return e=e.replace(/(:\/\/[^/]*?)\/+/,"$1/"),e=e.replace(/\/+storage\//,"/storage/"),e},initCompanySign:function(){this.companySignImage="https://tiantianxinye.365care.langye.net/h5/static/companySign.png",this.companySignId="STATIC_COMPANY_SIGN"},tohome:function(){uni.navigateTo({url:"../../../../pages/index/index"})},showSignatureToast:function(t){var e=this;this.signatureToastText=t||"",this.signatureToastVisible=!0,clearTimeout(this._signatureToastTimer),this._signatureToastTimer=setTimeout((function(){e.signatureToastVisible=!1}),1600)},bindCancel:function(t){uni.navigateBack({})},bindsubmitFun:function(t){var e=this;if(!e.paramedicSignId||!e.customerSignId)return o.alert("请完成所有签名"),!1;uni.showModal({title:"提示",content:"确认签订协议?",confirmText:"确认",confirmColor:"#000",cancelColor:"#eee",success:function(t){t.confirm&&e.submitAgreement()}})},handleDirectSubmit:function(){if(this.isGenerating)o.alert("正在提交协议,请稍候...");else{this.isGenerating=!0,this.generateButtonText="提交中...";var t="\n\n\n\t\n\t协议\n\n\n\t".concat(this.agreementHtml,"\n\n");this.pendingAgreementHtml=t,this.closeAgreementPopup(),this.submitAgreement()}},openSignature:function(t){var e=this;this.currentSignatureType=t;this.signaturePopupTitle={paramedic:"护工签名",customer:"客户签名",company:"公司签名"}[t]||"签名",this.$nextTick((function(){e.$refs.signaturePopup.open(),setTimeout((function(){e.$refs.popupSignatureRef&&e.$refs.popupSignatureRef.clear()}),50)}))},closeSignaturePopup:function(){this.$refs.signaturePopup&&this.$refs.signaturePopup.close()},clearPopupSignature:function(){this.$refs.popupSignatureRef&&this.$refs.popupSignatureRef.clear()},resetPopupSignature:function(){this.clearPopupSignature();var t=this.currentSignatureType;switch(t){case"paramedic":this.paramedicSignId="",this.paramedicSignImage="";break;case"customer":this.customerSignId="",this.customerSignImage="";break;case"company":this.companySignId="",this.companySignImage="";break}this.autoClearAgreement()},savePopupSignature:function(){var t=this,e=this.currentSignatureType;if(e&&this.$refs.popupSignatureRef){try{if("function"===typeof this.$refs.popupSignatureRef.isEmpty&&this.$refs.popupSignatureRef.isEmpty())return void this.showSignatureToast("请先签名后再保存")}catch(n){}this.$refs.popupSignatureRef.canvasToTempFilePath({quality:.9,success:function(n){t.rotateImageToLandscape(n.tempFilePath,(function(i){var a=i||n.tempFilePath;t.uploadSignature(a,e,(function(){t.closeSignaturePopup(),t.checkAndClearAgreement(e)}))}))},fail:function(){o.alert("签名保存失败")}})}},rotateImageToLandscape:function(t,e){console.log("使用原图,不进行旋转:",t),e(null)},clearSignature:function(t){var e=t+"SignatureRef";this.$refs[e]&&(this.$refs[e].clear(),this.setSignPath(t,""))},getSignatureImageStyle:function(t){return{width:"120px",height:"60px"}},saveSignature:function(t){var e=this,n=t+"SignatureRef";this.$refs[n]?(console.log("开始保存签名:",t),this.$refs[n].canvasToTempFilePath({quality:.8,success:function(n){console.log("签名保存成功:",t,n),e.setSignPath(t,n.tempFilePath),console.log("开始上传签名到接口:",t,n.tempFilePath),e.uploadSignature(n.tempFilePath,t,(function(n){console.log("签名上传完成:",t,n),e.setSignPath(t,"");var i={paramedic:"护工",customer:"客户",company:"公司"}[t]||t;o.alert(i+"签名上传成功"),e.checkAndClearAgreement(t)}))},fail:function(e){console.log("签名保存失败:",t,e),o.alert(t+"签名保存失败")}})):console.log("签名组件引用不存在:",n)},resignSignature:function(t){switch(console.log("重新签名:",t),t){case"paramedic":this.paramedicSignId="",this.paramedicSignImage="";break;case"customer":this.customerSignId="",this.customerSignImage="";break;case"company":this.companySignId="",this.companySignImage="";break}this.setSignPath(t,"");this.autoClearAgreement(),this.openSignature(t)},onSignatureSave:function(t){var e=t.currentTarget.dataset.type;console.log("签名保存事件:",e)},setSignPath:function(t,e){switch(t){case"paramedic":this.paramedicSignPath=e;break;case"customer":this.customerSignPath=e;break;case"company":this.companySignPath=e;break}},uploadSignature:function(t,e,n){var i=this,a=uni.getStorageSync("userInfo");if(a&&a.access_token){console.log("开始上传签名:",e,t);var s=function(t){uni.uploadFile({url:o.HOST+"manager/upload-image",filePath:t,name:"file",formData:{token:a.access_token,folder:"public"},success:function(t){if(console.log("签名上传响应:",t),console.log("响应状态码:",t.statusCode),console.log("响应数据类型:",(0,r.default)(t.data)),console.log("响应数据内容:",t.data),200==t.statusCode||"200"==t.statusCode)try{var a;if("string"===typeof t.data)a=JSON.parse(t.data);else{if("object"!==(0,r.default)(t.data))throw new Error("响应数据格式不支持");a=t.data}if(console.log("解析后的数据:",a),!a.id||!a.public_path)return console.log("响应数据缺少必要字段:",a),void o.alert("签名上传失败:响应数据格式不完整");switch(e){case"paramedic":i.paramedicSignId=a.id,i.paramedicSignImage=o.HOST+a.public_path;break;case"customer":i.customerSignId=a.id,i.customerSignImage=o.HOST+a.public_path;break;case"company":i.companySignId=a.id,i.companySignImage=o.HOST+a.public_path;break}n(a.id)}catch(s){console.log("解析上传响应失败:",s),console.log("原始响应数据:",t.data)}else console.log("签名上传失败,状态码:",t.statusCode),o.alert("签名上传失败:"+t.statusCode)},fail:function(t){console.log("签名上传失败:",t),o.alert("签名上传失败:网络错误")}})};"string"===typeof t&&t.startsWith("data:"),s(t)}else o.alert("用户未登录或token无效")},submitAgreement:function(){if(this.paramedicSignId&&this.customerSignId&&this.companySignId)if(this.pendingAgreementHtml||this.agreementHtml){var t=this.pendingAgreementHtml||"\n\n\n\t\n\t协议\n\n\n\t".concat(this.agreementHtml,"\n\n");this.isGenerating=!1,this.generateButtonText="直接提交",o.request({api:"manager/create-order-agreements",method:"POST",data:{order_id:this.id,paramedic_id:this.order.paramedic_id,paramedic_sign_id:this.paramedicSignId,customer_id:this.order.customer_id,customer_sign_id:this.customerSignId,company_sign_id:this.companySignId||"STATIC_COMPANY_SIGN",html:t},utilSuccess:function(t){o.alert("协议签订成功"),uni.navigateTo({url:"/pages/order/order"})},utilFail:function(t){o.alert(t)}})}else o.alert("请先预览协议");else o.alert("请完成所有签名")},previewAgreement:function(){this.paramedicSignId&&this.customerSignId?this.order.project&&this.order.project.content?(this.processAgreementContent(),this.$refs.agreementPopup.open()):o.alert("还未上传协议,请联系管理员补充协议"):o.alert("请先完成所有签名")},closeAgreementPopup:function(){this.$refs.agreementPopup.close()},processAgreementContent:function(){var t=this.order.project.content,e=function(t){return t?"vertical-align: middle; display: inline-block; width: 50px; height: 20px; margin: 0 5px;":""},n={paramedic_sign:this.paramedicSignImage?'护工签名'):"",customer_sign:this.customerSignImage?'客户签名'):"",patient:''.concat(this.order.patient.name||"",""),company_sign:'公司签名'),manage_sign:'公司签名'),paramedic_sign2:this.paramedicSignImage?'护工签名'):"",customer_sign2:this.customerSignImage?'客户签名'):"",manage_sign2:'公司签名'),paramedic_sign_id:this.paramedicSignId||"",customer_sign_id:this.customerSignId||"",company_sign_id:this.companySignId||"STATIC_COMPANY_SIGN",days:this.order.days||"",price:this.order.price||"",total:this.order.total||"",range_mobile:this.order.project&&this.order.project.range_mobile||"",complaint_mobile:this.order.project&&this.order.project.complaint_mobile||"",today_date:function(){var t=new Date;return t.getFullYear()+"年"+(t.getMonth()+1)+"月"+t.getDate()+"日"}()};Object.keys(n).forEach((function(e){var i=new RegExp("\\{([^}]*".concat(e,"[^}]*)\\}"),"g"),a=t.match(i);a&&a.length>0&&(t=t.replace(i,n[e]))})),t=t.replace(/text-wrap-mode:\s*nowrap;?/gi,""),t=t.replace(/text-wrap-mode:\s*nowrap/gi,""),this.agreementHtml=t}},"previewAgreement",(function(){this.paramedicSignId&&this.customerSignId?this.order.project&&this.order.project.content?(this.processAgreementContent(),this.$refs.agreementPopup.open()):o.alert("还未上传协议,请联系管理员补充协议"):o.alert("请先完成所有签名")}))};e.default=s},"3d71":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.uniContext=e.toDataURL=e.createImage=void 0,e.useCurrentPage=function(){var t=getCurrentPages();return t[t.length-1]};var a=i(n("9b1b")),r=i(n("80b1")),o=i(n("efe5"));n("c223"),n("bf0f"),n("e966");uni.getSystemInfoSync().uniPlatform;e.uniContext=function(t,e){var n=uni.createCanvasContext(t,e);return n.uniDrawImage||(n.uniDrawImage=n.drawImage,n.drawImage=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(i,r){var o=n.canvas,s=n.width,c=n.height,u=(n.destWidth,n.destHeight,n.x),f=void 0===u?0:u,l=n.y,d=void 0===l?0:l,h=n.preferToDataURL,p=uni.getSystemInfoSync(),v=p.pixelRatio,g=(0,a.default)((0,a.default)({},n),{},{canvasId:t,id:t,canvas:o,success:function(t){i(t.tempFilePath||t.filePath)},fail:function(t){r(t)}});if(o&&o.toDataURL&&h){uni.getSystemInfoSync().platform;if(f||d){var m=uni.createOffscreenCanvas({type:"2d"}),b=m.getContext("2d"),y=Math.floor(s*v),w=Math.floor(c*v);m.width=y,m.height=w;var x=o.createImage();x.onload=function(){b.drawImage(x,Math.floor(f*v),Math.floor(d*v),y,w,0,0,y,w);var t=m.toDataURL();i(t),g.success&&g.success({tempFilePath:t})},x.src=o.toDataURL()}else{var S=o.toDataURL();i(S),g.success&&g.success({tempFilePath:S})}}else o&&o.toTempFilePath?o.toTempFilePath(g):uni.canvasToTempFilePath(g,e)}))}},"43f7":function(t,e,n){var i=n("472b4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("7633d822",i,!0,{sourceMap:!1,shadowMode:!1})},"472b4":function(t,e,n){var i=n("c86c");e=i(!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/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-ffb44ef0] .nav{z-index:998!important}.content[data-v-ffb44ef0]{padding:%?20?%;padding-bottom:%?120?%}.pageTitle[data-v-ffb44ef0]{font-size:%?32?%;font-weight:700;margin:%?30?% 0 %?20?% 0;color:#333}.signatureBox[data-v-ffb44ef0]{background:#fff;border-radius:%?12?%;padding:%?20?%}.signatureItem[data-v-ffb44ef0]{margin-bottom:%?30?%}.signatureTitle[data-v-ffb44ef0]{font-size:%?28?%;color:#333;margin-bottom:%?15?%}.signatureImage[data-v-ffb44ef0]{width:100%;height:%?200?%;border:1px solid #ddd;border-radius:%?8?%;background-color:#f9f9f9}.signatureArea[data-v-ffb44ef0]{height:%?200?%;border:1px solid #ddd;border-radius:%?8?%;background-color:#fff;position:relative;display:flex;justify-content:center}.signatureStart[data-v-ffb44ef0]{height:100%;display:flex;align-items:center;justify-content:center;color:#0dc99e;font-size:%?28?%}.signatureActions[data-v-ffb44ef0]{margin-top:%?15?%;display:flex;justify-content:space-between}.btnClear[data-v-ffb44ef0], .btnSave[data-v-ffb44ef0], .btnResign[data-v-ffb44ef0]{padding:%?10?% %?20?%;border-radius:%?6?%;font-size:%?24?%}.btnClear[data-v-ffb44ef0]{color:#666;background:#f0f0f0}.btnSave[data-v-ffb44ef0]{color:#fff;background:#0dc99e}.btnResign[data-v-ffb44ef0]{color:#fff;background:#ff9500}.previewSection[data-v-ffb44ef0]{margin-top:%?30?%;padding:%?20?%;background:#fff;border-radius:%?12?%;display:flex;justify-content:center}.previewBtn[data-v-ffb44ef0]{background-color:#0dc99e;color:#fff;padding:10px 20px;border-radius:6px;border:none;font-size:16px;cursor:pointer;margin-right:10px}.previewBtn[data-v-ffb44ef0]:hover{background-color:#0bb08a}.agreementPreviewSection[data-v-ffb44ef0]{margin-top:20px;padding:20px;background-color:#f8f9fa;border-radius:8px;z-index:9999}.sectionTitle[data-v-ffb44ef0]{font-size:%?28?%;font-weight:700;color:#333;margin-bottom:%?15?%}.agreementImageContainer[data-v-ffb44ef0]{height:%?300?%;display:flex;justify-content:center;align-items:center;background-color:#f9f9f9;border:1px solid #ddd;border-radius:%?8?%}.agreementImage[data-v-ffb44ef0]{width:100%;height:100%;border-radius:%?8?%}.agreementActions[data-v-ffb44ef0]{margin-top:%?15?%;display:flex;justify-content:flex-end}.btnRegenerate[data-v-ffb44ef0]{padding:%?10?% %?20?%;border-radius:%?6?%;font-size:%?24?%;color:#fff;background:#ff9500}\n/* 弹窗样式 */.fullscreen-popup[data-v-ffb44ef0]{width:100vw!important;height:100vh!important;max-width:none!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important}\n/* 预览协议弹窗样式 */.fullscreen-popup[data-v-ffb44ef0]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center;\n /* 确保在移动设备上可以滚动 */-webkit-overflow-scrolling:touch;overflow:hidden}\n/* 全屏签名弹窗内部 */.signaturePopup[data-v-ffb44ef0]{width:100vw;height:90vh;background:#fff;display:flex;flex-direction:column;position:relative;z-index:9999}.signatureWorkspace[data-v-ffb44ef0]{display:flex;flex-direction:column;gap:%?20?%;position:relative;height:100%}\n/* 下方按钮区域:横向排布 */.signatureControlsRow[data-v-ffb44ef0]{display:flex;align-items:center;justify-content:center;gap:%?20?%;padding:%?20?% 0}.btnRow[data-v-ffb44ef0]{display:flex;align-items:center;justify-content:center;padding:%?20?% %?40?%;border-radius:%?999?%;text-align:center;font-size:%?28?%;min-width:%?120?%}.btnRowClear[data-v-ffb44ef0]{background:#f0f0f0;color:#333;border:%?2?% solid #c84f3d}.btnRowSave[data-v-ffb44ef0]{background:#0dc99e;color:#fff}.btnRowReset[data-v-ffb44ef0]{background:#ffefd9;color:#c84f3d;border:%?2?% solid #f3c7a5}.signatureCanvasWrap[data-v-ffb44ef0]{flex:1}.signatureCanvas[data-v-ffb44ef0]{width:100%;height:calc(100% - %?100?%)!important;background:#fff;border:1px solid #eee;border-radius:%?8?%}\n/* 弹窗内提示,层级高于画布 */.signatureInlineToast[data-v-ffb44ef0]{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background:rgba(0,0,0,.75);color:#fff;padding:%?16?% %?24?%;border-radius:%?10?%;font-size:%?26?%;z-index:10}.agreementPopup[data-v-ffb44ef0]{width:100vw;height:100vh;background:#fff;display:flex;flex-direction:column;position:relative;z-index:9999;\n /* 微信浏览器滚动优化 */-webkit-overflow-scrolling:touch;overflow:hidden;\n /* 确保在微信浏览器中正常显示 */-webkit-transform:translateZ(0);transform:translateZ(0);\n /* 防止微信浏览器的滚动穿透 */overscroll-behavior:contain}.popupHeader[data-v-ffb44ef0]{display:flex;justify-content:space-between;align-items:center;padding:%?20?%;border-bottom:1px solid #eee;background:#f8f8f8;flex-shrink:0;\n /* 确保头部固定 */position:-webkit-sticky;position:sticky;top:0;z-index:10}.popupTitle[data-v-ffb44ef0]{font-size:%?32?%;font-weight:700;color:#333}.popupClose[data-v-ffb44ef0]{font-size:%?40?%;color:#999;cursor:pointer;padding:%?10?% %?15?%;background:#f0f0f0;border-radius:50%;width:%?60?%;height:%?60?%;display:flex;align-items:center;justify-content:center;transition:all .3s ease}.popupClose[data-v-ffb44ef0]:hover{background:#e0e0e0;color:#666}.popupContent[data-v-ffb44ef0]{flex:1;height:calc(100vh - %?120?%);\n /* 减去头部和底部的高度 */overflow-y:auto;overflow-x:hidden;padding:%?20?%;\n /* 微信浏览器滚动优化 */-webkit-overflow-scrolling:touch;\n /* 允许触摸滚动 */touch-action:pan-y;\n /* 设置滚动条样式 */scrollbar-width:thin;scrollbar-color:#ccc transparent;\n /* 微信浏览器特殊处理 */position:relative;\n /* 确保内容可以滚动 */overscroll-behavior:contain}\n/* Webkit浏览器的滚动条样式 */.popupContent[data-v-ffb44ef0]::-webkit-scrollbar{width:6px}.popupContent[data-v-ffb44ef0]::-webkit-scrollbar-track{background:transparent}.popupContent[data-v-ffb44ef0]::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}.popupContent[data-v-ffb44ef0]::-webkit-scrollbar-thumb:hover{background:#999}.agreementContent[data-v-ffb44ef0]{font-size:%?28?%;line-height:1.6;color:#333;word-wrap:break-word;word-break:break-all;overflow-wrap:break-word;\n /* 确保在移动设备上内容可以正常显示和滚动 */-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}.agreementContent *[data-v-ffb44ef0]{max-width:100%!important;box-sizing:border-box!important;\n /* 确保所有元素都能正常显示 */word-wrap:break-word!important;overflow-wrap:break-word!important}.agreementContent img[data-v-ffb44ef0]{max-width:50px!important;height:20px!important;display:inline-block!important;margin:0 5px!important;vertical-align:middle!important}.agreementContent p[data-v-ffb44ef0], .agreementContent div[data-v-ffb44ef0]{margin:%?10?% 0!important;padding:0!important}.agreementContent span[data-v-ffb44ef0]{word-break:break-all!important}.noAgreement[data-v-ffb44ef0]{text-align:center;padding:%?40?%;color:#999;font-size:%?28?%}.popupFooter[data-v-ffb44ef0]{padding:%?20?%;border-top:1px solid #eee;display:flex;justify-content:center;flex-shrink:0;\n /* 确保底部固定 */position:-webkit-sticky;position:sticky;bottom:0;background:#fff;z-index:10}.btnGenerate[data-v-ffb44ef0]{padding:%?15?% %?30?%;border-radius:%?8?%;font-size:%?28?%;color:#fff;background:#0dc99e}.btnGenerate.disabled[data-v-ffb44ef0]{background-color:#ccc;color:#666;cursor:not-allowed}.bottom[data-v-ffb44ef0]{background:#fff;box-shadow:0 %?-2?% %?12?% 0 rgba(0,0,0,.16),inset 0 %?1?% 0 0 #e4e4e4;width:100%;height:%?100?%;position:fixed;bottom:0;left:0;display:flex;justify-content:space-between}.bottom .bottomLeft[data-v-ffb44ef0]{display:flex;align-items:center}.bottom .bottomRight[data-v-ffb44ef0]{display:flex;flex:1}.btn[data-v-ffb44ef0]{width:50%;line-height:%?100?%;text-align:center;line-height:%?100?%;font-family:SourceHanSansCN-Medium;font-size:%?32?%;letter-spacing:0}.btnCancel[data-v-ffb44ef0]{color:#666;background:#f0f0f0}.btnSubmit[data-v-ffb44ef0]{color:#fff;background:#0dc99e}\n/* 移动设备优化 */@media screen and (max-width:768px){.agreementPopup[data-v-ffb44ef0]{width:100vw;height:100vh;max-height:100vh}.popupContent[data-v-ffb44ef0]{padding:%?15?%;\n /* 移动设备上的滚动优化 */-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.agreementContent[data-v-ffb44ef0]{font-size:%?26?%;line-height:1.5}.popupHeader[data-v-ffb44ef0]{padding:%?15?%}.popupFooter[data-v-ffb44ef0]{padding:%?15?%}}\n/* 小屏幕设备优化 */@media screen and (max-width:480px){.agreementContent[data-v-ffb44ef0]{font-size:%?24?%;line-height:1.4}.popupContent[data-v-ffb44ef0]{padding:%?10?%}.popupHeader[data-v-ffb44ef0]{padding:%?10?%}.popupFooter[data-v-ffb44ef0]{padding:%?10?%}}\n/* 微信浏览器特殊优化 */@supports (-webkit-touch-callout:none){.popupContent[data-v-ffb44ef0]{\n /* 强制启用硬件加速 */-webkit-transform:translateZ(0);transform:translateZ(0);\n /* 微信浏览器滚动优化 */-webkit-overflow-scrolling:touch;\n /* 防止滚动卡顿 */will-change:scroll-position;\n /* 确保内容可以滚动 */overflow-y:auto;height:calc(100vh - %?120?%)}.agreementPopup[data-v-ffb44ef0]{\n /* 防止微信浏览器的滚动穿透 */position:fixed;top:0;left:0;right:0;bottom:0;\n /* 微信浏览器特殊处理 */-webkit-transform:translateZ(0);transform:translateZ(0)}\n\n /* 微信浏览器中的滚动条优化 */.popupContent[data-v-ffb44ef0]::-webkit-scrollbar{width:4px}.popupContent[data-v-ffb44ef0]::-webkit-scrollbar-track{background:transparent}.popupContent[data-v-ffb44ef0]::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);border-radius:2px}}',""]),t.exports=e},4838:function(t,e,n){"use strict";n.r(e);var i=n("59d2"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},5640:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"orderinfo",props:{info:{type:Object}},data:function(){return{}}};e.default=i},"59d2":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("98fa")),r=a.default;e.default=r},"5b13":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={topnav:n("d8f1").default,orderinfo:n("2ace").default,uniPopup:n("ba8a").default,lSignature:n("de69").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("topnav",{attrs:{title:t.pageTitle},on:{tohome:function(e){arguments[0]=e=t.$handleEvent(e),t.tohome.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"orderBox"},[n("orderinfo",{attrs:{info:t.order}})],1),n("v-uni-view",{staticClass:"pageTitle"},[t._v(" 协议签名 ")]),n("v-uni-view",{staticClass:"signatureBox"},[n("v-uni-view",{staticClass:"signatureItem"},[n("v-uni-view",{staticClass:"signatureTitle"},[t._v("护工签名")]),n("v-uni-view",{staticClass:"signatureArea"},[t.paramedicSignImage?t._e():n("v-uni-view",{staticClass:"signatureStart",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openSignature("paramedic")}}},[t._v(" 开始签名 ")]),t.paramedicSignImage?n("v-uni-image",{staticClass:"signatureImage",style:t.getSignatureImageStyle(t.paramedicSignImage),attrs:{src:t.paramedicSignImage,mode:"aspectFit"}}):t._e()],1),n("v-uni-view",{staticClass:"signatureActions"},[t.paramedicSignImage?t._e():n("v-uni-text",{staticClass:"btnSave",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openSignature("paramedic")}}},[t._v("开始签名")]),t.paramedicSignImage?n("v-uni-text",{staticClass:"btnResign",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.resignSignature("paramedic")}}},[t._v("重新签名")]):t._e()],1)],1),n("v-uni-view",{staticClass:"signatureItem"},[n("v-uni-view",{staticClass:"signatureTitle"},[t._v("客户签名")]),n("v-uni-view",{staticClass:"signatureArea"},[t.customerSignImage?t._e():n("v-uni-view",{staticClass:"signatureStart",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openSignature("customer")}}},[t._v(" 开始签名 ")]),t.customerSignImage?n("v-uni-image",{staticClass:"signatureImage",style:t.getSignatureImageStyle(t.customerSignImage),attrs:{src:t.customerSignImage,mode:"aspectFit"}}):t._e()],1),n("v-uni-view",{staticClass:"signatureActions"},[t.customerSignImage?t._e():n("v-uni-text",{staticClass:"btnSave",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openSignature("customer")}}},[t._v("开始签名")]),t.customerSignImage?n("v-uni-text",{staticClass:"btnResign",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.resignSignature("customer")}}},[t._v("重新签名")]):t._e()],1)],1)],1),n("v-uni-view",{staticClass:"previewSection"},[n("v-uni-view",{staticClass:"previewBtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.previewAgreement.apply(void 0,arguments)}}},[t._v(" 预览协议 ")])],1)],1),n("v-uni-view",{staticClass:"bottom"},[n("v-uni-view",{staticClass:"bottomLeft"}),n("v-uni-view",{staticClass:"bottomRight"},[n("v-uni-view",{staticClass:"btnCancel btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.bindCancel.apply(void 0,arguments)}}},[t._v("取消")]),n("v-uni-view",{staticClass:"btnSubmit btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.bindsubmitFun.apply(void 0,arguments)}}},[t._v("提交")])],1)],1),n("uni-popup",{ref:"agreementPopup",staticClass:"fullscreen-popup",attrs:{type:"center","mask-click":!0,"safe-area":!1}},[n("v-uni-view",{staticClass:"agreementPopup"},[n("v-uni-view",{staticClass:"popupHeader"},[n("v-uni-text",{staticClass:"popupTitle"},[t._v("协议预览")]),n("v-uni-text",{staticClass:"popupClose",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.closeAgreementPopup.apply(void 0,arguments)}}},[t._v("×")])],1),t.agreementHtml?n("v-uni-scroll-view",{staticClass:"popupContent",staticStyle:{"max-height":"100vh"},attrs:{"scroll-y":"true"}},[n("div",{staticClass:"agreementContent",domProps:{innerHTML:t._s(t.agreementHtml)}})]):n("v-uni-view",{staticClass:"popupContent"},[n("v-uni-view",{staticClass:"noAgreement"},[n("v-uni-text",[t._v("还未上传协议,请联系管理员补充协议")])],1)],1),t.agreementHtml?n("v-uni-view",{staticClass:"popupFooter"},[n("v-uni-view",{staticClass:"btnGenerate",class:{disabled:t.isGenerating},attrs:{disabled:t.isGenerating},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleDirectSubmit.apply(void 0,arguments)}}},[t._v(" "+t._s(t.generateButtonText)+" ")])],1):t._e()],1)],1),n("uni-popup",{ref:"signaturePopup",staticClass:"fullscreen-popup",attrs:{type:"center","mask-click":!1,"safe-area":!1}},[n("v-uni-view",{staticClass:"signaturePopup"},[n("v-uni-view",{staticClass:"popupHeader"},[n("v-uni-text",{staticClass:"popupTitle"},[t._v(t._s(t.signaturePopupTitle))]),n("v-uni-text",{staticClass:"popupClose",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.closeSignaturePopup.apply(void 0,arguments)}}},[t._v("×")])],1),n("v-uni-view",{staticClass:"popupContent"},[n("v-uni-view",{staticClass:"signatureWorkspace"},[t.signatureToastVisible?n("v-uni-view",{staticClass:"signatureInlineToast"},[t._v(t._s(t.signatureToastText))]):t._e(),n("v-uni-view",{staticClass:"signatureCanvasWrap"},[n("l-signature",{ref:"popupSignatureRef",staticClass:"signatureCanvas",attrs:{penColor:t.penColor,penSize:t.penSize,openSmooth:t.openSmooth,boundingBox:t.boundingBox,disableScroll:!0}})],1),n("v-uni-view",{staticClass:"signatureControlsRow"},[n("v-uni-view",{staticClass:"btnRow btnRowClear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clearPopupSignature.apply(void 0,arguments)}}},[t._v("清除")]),n("v-uni-view",{staticClass:"btnRow btnRowReset",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.resetPopupSignature.apply(void 0,arguments)}}},[t._v("重置")]),n("v-uni-view",{staticClass:"btnRow btnRowSave",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.savePopupSignature.apply(void 0,arguments)}}},[t._v("保存")])],1)],1)],1)],1)],1)],1)},r=[]},"66c9":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"orderBox"},[n("v-uni-view",{staticClass:"orderHeader"},[n("v-uni-text",{staticClass:"orderNo"},[t._v("订单编号:"+t._s(t.info.serial))]),n("v-uni-text",{staticClass:"orderStatus"},[t._v(t._s(t.info.status_name))])],1),n("v-uni-view",{staticClass:"orderBody"},[n("v-uni-view",{staticClass:"orderLine"},[n("v-uni-text",{staticClass:"iconfont iconLocation icon"},[t._v("")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(t.info.project.name))]),n("v-uni-text",{staticClass:"orderGe"},[t._v("|")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(t.info.bed.building_name)+"-"+t._s(t.info.bed.area_name)+"-"+t._s(t.info.bed.room_name)+"-"+t._s(t.info.bed.name+"床"))])],1),n("v-uni-view",{staticClass:"orderLine"},[n("v-uni-text",{staticClass:"iconfont iconLocation icon"},[t._v("")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(t.info.patient.name))]),n("v-uni-text",{staticClass:"orderGe"},[t._v("|")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(null==t.info.patient.sex?"男":t.info.patient.sex))]),n("v-uni-text",{staticClass:"orderGe"},[t._v("|")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(t.info.mobile))])],1),n("v-uni-view",{staticClass:"orderLine"},[n("v-uni-text",{staticClass:"iconfont iconLocation icon"},[t._v("")]),n("v-uni-text",{staticClass:"orderTxt"},[t._v(t._s(t.info.from_date)+" ~ "+t._s(t.info.to_date)+" 共预约"+t._s(t.info.days)+"天")])],1),n("v-uni-view",{staticClass:"orderLine",staticStyle:{"padding-left":"43rpx"}},[t._l(t.info.factorjson,(function(e,i){return[n("v-uni-view",{staticClass:"orderTag tagBox1"},[n("v-uni-text",{staticClass:"orderTagTxt tag1"},[t._v(t._s(e.factor_item_name))])],1)]})),null!=t.info.product_item?n("v-uni-view",{staticClass:"orderTag tagBox2"},[n("v-uni-text",{staticClass:"orderTagTxt tag2"},[t._v(t._s(t.info.product_item.name))])],1):t._e(),null!=t.info.paramedic_level?n("v-uni-view",{staticClass:"orderTag tagBox3"},[n("v-uni-text",{staticClass:"orderTagTxt tag3"},[t._v(t._s(t.info.paramedic_level.name))])],1):t._e()],2)],1),n("v-uni-view",{staticClass:"orderPrice"},[n("v-uni-view",{staticClass:"priceBox"},[n("v-uni-text",{staticClass:"priceTitle"},[t._v("合计:")]),n("v-uni-text",{staticClass:"priceInfo"},[t._v("¥"+t._s(t.info.total))])],1),n("v-uni-view",{staticClass:"priceBox"},[n("v-uni-text",{staticClass:"priceTitle"},[t._v("已扣:")]),n("v-uni-text",{staticClass:"priceInfo"},[t._v("¥"+t._s(t.info.paid_total))])],1),n("v-uni-view",{staticClass:"priceBox"},[n("v-uni-text",{staticClass:"priceTitle"},[t._v("余额:")]),n("v-uni-text",{staticClass:"priceInfo"},[t._v("¥"+t._s(t.info.customer.balance))])],1),t.info.paramedic?n("v-uni-view",{staticClass:"priceBox"},[n("v-uni-text",{staticClass:"priceTitle"},[t._v("护工:")]),n("v-uni-text",{staticClass:"priceInfo"},[t._v(t._s(t.info.paramedic?t.info.paramedic.name:""))])],1):t._e()],1)],1)],1)},a=[]},6898:function(t,e,n){var i=n("d371");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("46cd7765",i,!0,{sourceMap:!1,shadowMode:!1})},7143:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa");var i={styles:String,disableScroll:{type:Boolean,default:!0},type:{type:String,default:"2d"},penColor:{type:String,default:"black"},penSize:{type:Number,default:2},backgroundColor:String,backgroundImage:String,openSmooth:Boolean,minLineWidth:{type:Number,default:2},maxLineWidth:{type:Number,default:6},minSpeed:{type:Number,default:1.5},maxWidthDiffRate:{type:Number,default:20},maxHistoryLength:{type:Number,default:20},beforeDelay:{type:Number,default:0},landscape:{type:Boolean},boundingBox:{type:Boolean},disabled:{type:Boolean},preferToDataURL:Boolean};e.default=i},"71cf":function(t,e,n){"use strict";n.r(e);var i=n("31be"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"78cb":function(t,e,n){"use strict";n.r(e);var i=n("5b13"),a=n("71cf");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("9c13");var o=n("828b"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"ffb44ef0",null,!1,i["a"],void 0);e["default"]=s.exports},"78fe":function(t,e,n){var i=n("c86c");e=i(!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/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.lime-signature[data-v-f4eb2412],\n.lime-signature__canvas[data-v-f4eb2412]{position:relative;width:100%;height:100%}.mask[data-v-f4eb2412]{position:absolute;left:0;right:0;bottom:0;top:0}.offscreen[data-v-f4eb2412]{position:fixed;top:0;pointer-events:none;left:9999px}',""]),t.exports=e},8619:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=function(t){var e=/data:image\/(\w+);base64,(.*)/.exec(t)||[],n=(0,a.default)(e,3);n[1],n[2];return new Promise((function(t,e){}))},e.canIUseCanvas2d=function(){return!1},e.compareVersion=r,e.getRect=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="boundingClientRect",i=e.context,a=e.type,r=void 0===a?n:a;return new Promise((function(e,a){var o=uni.createSelectorQuery().in(i).select(t),s=function(t){t?e(t):a()};r==n?o[r](s).exec():o[r]({node:!0,size:!0,rect:!0},s).exec()}))},e.isTransparent=function(t){if("transparent"===t)return!0;if(t.startsWith("rgba")){var e=t.match(/\d+(\.\d+)?/g);if(null!==e){var n=parseFloat(e[3]);if(0===n)return!0}}return!1},e.requestAnimationFrame=void 0,e.sleep=function(t){return new Promise((function(e){return setTimeout(e,t)}))},e.wrapEvent=void 0;var a=i(n("5de6"));function r(t,e){t=t.split("."),e=e.split(".");var n=Math.max(t.length,e.length);while(t.lengthr)return 1;if(ae;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){return s="function"==typeof Symbol&&"symbol"==(0,a.default)(Symbol.iterator)?function(t){return(0,a.default)(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":(0,a.default)(t)},s(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function v(t,e){if(e&&("object"==(0,a.default)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=h(t);if(e){var a=h(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v(this,n)}}n("dc8a"),n("01a2"),n("8f71"),n("bf0f"),n("9a2c"),n("aa9c"),n("2797"),n("a644"),n("a03a"),n("6a54"),n("e39c"),n("844d"),n("18f7"),n("de6c"),n("7a76"),n("c9b5"),n("8a8d"),n("926e"),n("7996"),n("6a88"),n("dd2b"),n("e838"),n("64aa"),n("1851"),n("f7a5");var m=function(t){var e=s(t);return null!==t&&"object"===e||"function"===e},b={}.toString,y=function(t,e){return b.call(t)==="[object "+e+"]"},w=function(t){return y(t,"String")},x=function(t){return y(t,"Number")},S=function(t){return y(t,"Function")},_=function(){function t(){c(this,t),this.__events=void 0,this.__events={}}return f(t,[{key:"on",value:function(t,e){if(t&&e){var n=this.__events[t]||[];n.push(e),this.__events[t]=n}}},{key:"emit",value:function(t,e){var n=this;if(m(t)&&(t=(e=t)&&e.type),t){var i=this.__events[t];i&&i.length&&i.forEach((function(t){t.call(n,e)}))}}},{key:"off",value:function(t,e){var n=this.__events,i=n[t];if(i&&i.length)if(e)for(var a=0,r=i.length;r>a;a++)i[a]===e&&(i.splice(a,1),a--);else delete n[t]}},{key:"getEvents",value:function(){return this.__events}}]),t}(),C=function(t){d(n,_);var e=g(n);function n(t,i){var a;return c(this,n),(a=e.call(this)).context=void 0,a.canvas=void 0,a.attrs=void 0,a.isCanvasElement=void 0,a.context=t,a.canvas=i.canvas||t.canvas||{width:i.width||0,height:i.height||0},a.attrs=i||{},a.isCanvasElement=!0,a}return f(n,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}},{key:"getContext",value:function(){return this.context}},{key:"getBoundingClientRect",value:function(){var t=this.attrs||{},e=t.top,n=t.right,i=t.width,a=t.height,r=t.left,o=t.bottom;return{top:void 0===e?0:e,width:void 0===i?0:i,right:void 0===n?0:n,height:void 0===a?0:a,bottom:void 0===o?0:o,left:void 0===r?0:r}}},{key:"setAttribute",value:function(t,e){this.attrs[t]=e}},{key:"addEventListener",value:function(t,e){this.on(t,e)}},{key:"removeEventListener",value:function(t,e){this.off(t,e)}},{key:"dispatchEvent",value:function(t,e){this.emit(t,e)}}]),n}();function k(t,e){try{return t.currentStyle?t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}catch(t){return{width:300,height:150}[e]}}function I(t,e){var n=e.get("el");if(!n)return t;var i=n.getBoundingClientRect(),a=i.top,r=void 0===a?0:a,o=i.left,s=void 0===o?0:o,c=parseFloat(k(n,"padding-left"))||0,u=parseFloat(k(n,"padding-top"))||0;return{x:t.x-s-c,y:t.y-r-u}}function T(t,e){var n=e.get("landscape");if(!n)return t;if(S(n))return n(t,e);var i=e.get("height");return{x:t.y,y:i-t.x}}var E=function(t,e){var n=t.touches;if(!n||!n.length)return[T(I({x:t.clientX,y:t.clientY},e),e)];n.length||(n=t.changedTouches||[]);for(var i=[],a=0,r=n.length;r>a;a++){var o,s=n[a],c=s.x,u=s.y,f=s.clientX,l=s.clientY;o=x(c)||x(u)?{x:c,y:u}:I({x:f,y:l},e),i.push(T(o,e))}return i},P=function(t,e){var n=e.x-t.x,i=e.y-t.y;return Math.abs(n)>Math.abs(i)?n>0?"right":"left":i>0?"down":"up"},L=function(t,e){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)},M=function(){function t(e){var n=this,i=e.canvas,a=e.el;c(this,t),this.processEvent=void 0,this.canvas=void 0,this.startTime=0,this.endTime=0,this.startPoints=null,this.startDistance=0,this.center=null,this.pressTimeout=void 0,this.eventType=null,this.direction=null,this.lastMoveTime=0,this.prevMovePoints=null,this.prevMoveTime=0,this.lastMovePoints=null,this.pinch=!1,this._click=function(t){var e=E(t,n.canvas);t.points=e,n.emitEvent("click",t)},this._start=function(t){var e,i,a=E(t,n.canvas);a&&(t.points=a,n.emitEvent("touchstart",t),n.reset(),n.startTime=Date.now(),n.startPoints=a,a.length>1?(n.startDistance=L(a[0],a[1]),n.center={x:(e=a[0]).x+((i=a[1]).x-e.x)/2,y:e.y+(i.y-e.y)/2}):n.pressTimeout=setTimeout((function(){var e="press",i="none";t.direction=i,n.emitStart(e,t),n.emitEvent(e,t),n.eventType=e,n.direction=i}),250))},this._move=function(t){var e=E(t,n.canvas);if(e){t.points=e,n.emitEvent("touchmove",t);var i=n.startPoints;if(i)if(e.length>1){var a=n.startDistance,r=L(e[0],e[1]);t.zoom=r/a,t.center=n.center,n.emitStart("pinch",t),n.emitEvent("pinch",t)}else{var o=e[0].x-i[0].x,s=e[0].y-i[0].y,c=n.direction||P(i[0],e[0]);n.direction=c;var u=n.getEventType(e);t.direction=c,t.deltaX=o,t.deltaY=s,n.emitStart(u,t),n.emitEvent(u,t);var f=n.lastMoveTime,l=Date.now();l-f>0&&(n.prevMoveTime=f,n.prevMovePoints=n.lastMovePoints,n.lastMoveTime=l,n.lastMovePoints=e)}}},this._end=function(t){var e=E(t,n.canvas);t.points=e,n.emitEnd(t),n.emitEvent("touchend",t);var i=n.lastMoveTime;if(100>Date.now()-i){var a=i-(n.prevMoveTime||n.startTime);if(a>0){var r=n.prevMovePoints||n.startPoints,o=n.lastMovePoints;if(!r||!o)return;var s=L(r[0],o[0])/a;s>.3&&(t.velocity=s,t.direction=P(r[0],o[0]),n.emitEvent("swipe",t))}}n.reset();var c=t.touches;c&&c.length>0&&n._start(t)},this._cancel=function(t){n.emitEvent("touchcancel",t),n.reset()},this.canvas=i,this.delegateEvent(a),this.processEvent={}}return f(t,[{key:"delegateEvent",value:function(t){t.addEventListener("click",this._click),t.addEventListener("touchstart",this._start),t.addEventListener("touchmove",this._move),t.addEventListener("touchend",this._end),t.addEventListener("touchcancel",this._cancel)}},{key:"emitEvent",value:function(t,e){this.canvas.emit(t,e)}},{key:"getEventType",value:function(t){var e,n=this.eventType,i=this.startTime,a=this.startPoints;if(n)return n;var r=this.canvas.__events.pan;if(r&&r.length){var o=Date.now();if(!a)return;e=o-i>250&&10>L(a[0],t[0])?"press":"pan"}else e="press";return this.eventType=e,e}},{key:"enable",value:function(t){this.processEvent[t]=!0}},{key:"isProcess",value:function(t){return this.processEvent[t]}},{key:"emitStart",value:function(t,e){this.isProcess(t)||(this.enable(t),this.emitEvent("".concat(t,"start"),e))}},{key:"emitEnd",value:function(t){}},{key:"clearPressTimeout",value:function(){this.pressTimeout&&(clearTimeout(this.pressTimeout),this.pressTimeout=null)}},{key:"reset",value:function(){this.clearPressTimeout(),this.startTime=0,this.startPoints=null,this.startDistance=0,this.direction=null,this.eventType=null,this.pinch=!1,this.prevMoveTime=0,this.prevMovePoints=null,this.lastMoveTime=0,this.lastMovePoints=null}}]),t}(),R=function(t){d(n,_);var e=g(n);function n(t){var i;return c(this,n),(i=e.call(this))._attrs={},i._isWindow=void 0,i._attrs=Object.assign({},t),i._isWindow="undefined"!=typeof window,i._initPixelRatio(),i._initCanvas(),["createImage","toDataURL","requestAnimationFrame"].forEach((function(e){i._initAttrs(e,t.canvas||i.get("el"))})),i}return f(n,[{key:"get",value:function(t){return this._attrs[t]}},{key:"set",value:function(t,e){this._attrs[t]=e}},{key:"_initAttrs",value:function(t,e){var n=this;this.get(t)||this.set(t,(function(){return e[t]?e[t].apply(e,arguments):n._isWindow?window[t]?(i=window)[t].apply(i,arguments):"createImage"==t?new Image:null:void 0;var i}))}},{key:"_initCanvas",value:function(){var t,e,n=this.get("el"),i=this.get("context");if(!n&&!i)throw Error("请指定 id、el 或 context!");t=n?w(n)?(e=n)?document.getElementById(e):null:n:function(t,e){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new C(t,e):null}(i,this._attrs),i&&t&&!t.getContext&&(t.getContext=function(){return i});var a=this.get("width")||function(t){var e=k(t,"width");return"auto"===e&&(e=t.offsetWidth),parseFloat(e)}(t)||t.width,r=this.get("height")||function(t){var e=k(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t)||t.height;this.set("canvas",this),this.set("el",t),this.set("context",i||t.getContext("2d")),this.changeSize(a,r);var o=new M({canvas:this,el:t,parent:this.get("parent")});this.set("eventController",o)}},{key:"_initPixelRatio",value:function(){this.get("pixelRatio")||this.set("pixelRatio",window&&window.devicePixelRatio||1)}},{key:"changeSize",value:function(t,e){var n,i=this.get("pixelRatio"),a=this.get("el");a.style&&(a.style.width=t+"px",a.style.height=e+"px"),(n=a)&&"object"===s(n)&&(1===n.nodeType&&n.nodeName||n.isCanvasElement)&&(a.width=t*i,a.height=e*i,1!==i&&this.get("context").scale(i,i)),this.set("width",t),this.set("height",e)}},{key:"destroy",value:function(){if(!this.get("destroyed")){var t=this.get("el");t.width=0,t.height=0,this.clear(),this._attrs={},this.set("destroyed",!0)}}},{key:"clear",value:function(){}},{key:"isDestroyed",value:function(){return this.get("destroyed")}}]),n}(),O={penColor:"black",backgroundColor:"",openSmooth:!0,penSize:2,minLineWidth:2,maxLineWidth:6,minSpeed:1.5,maxWidthDiffRate:20,maxHistoryLength:20},D=null,j=function(){function t(e){var n=this;c(this,t),this.canAddHistory=!0,this.points=[],this.historyList=[],this.undoneList=[],this.canvas=void 0,this._isEmpty=!0,this.active=!1,this.getLineWidth=function(t){var e=n.get("options"),i=e.minSpeed,a=e.minLineWidth,r=n.getMaxLineWidth();return Math.min(Math.max(r-(r-a)*t/Math.max(Math.min(i,10),1),a),r)},this.drawTrapezoid=function(t,e,i,a){var r=n.get("context");r.beginPath(),r.moveTo(Number(t.x.toFixed(1)),Number(t.y.toFixed(1))),r.lineTo(Number(e.x.toFixed(1)),Number(e.y.toFixed(1))),r.lineTo(Number(i.x.toFixed(1)),Number(i.y.toFixed(1))),r.lineTo(Number(a.x.toFixed(1)),Number(a.y.toFixed(1))),r.fillStyle=n.get("options").penColor,r.fill(),r.draw&&r.draw(!0)},this.drawNoSmoothLine=function(t,e){e.lastX=t.x+.5*(e.x-t.x),e.lastY=t.y+.5*(e.y-t.y),"number"==typeof t.lastX&&n.drawCurveLine(t.lastX,t.lastY,t.x,t.y,e.lastX,e.lastY,n.getMaxLineWidth())},this.drawCurveLine=function(t,e,i,a,r,o,s){s=Number(s.toFixed(1));var c=n.get("context");c.lineWidth=s,c.beginPath(),c.moveTo(Number(t.toFixed(1)),Number(e.toFixed(1))),c.quadraticCurveTo(Number(i.toFixed(1)),Number(a.toFixed(1)),Number(r.toFixed(1)),Number(o.toFixed(1))),c.stroke(),c.draw&&c.draw(!0)},this.getRadianData=function(t,e,n,i){var a=n-t,r=i-e;if(0===a)return{val:0,pos:-1};if(0===r)return{val:0,pos:1};var o=Math.abs(Math.atan(r/a));return n>t&&e>i||t>n&&i>e?{val:o,pos:1}:{val:o,pos:-1}},this.getRadianPoints=function(t,e,n,i){if(0===t.val)return 1===t.pos?[{x:e,y:n+i},{x:e,y:n-i}]:[{y:n,x:e+i},{y:n,x:e-i}];var a=Math.sin(t.val)*i,r=Math.cos(t.val)*i;return 1===t.pos?[{x:e+a,y:n+r},{x:e-a,y:n-r}]:[{x:e+a,y:n-r},{x:e-a,y:n+r}]},this.drawSmoothLine=function(t,e){var i=e.x-t.x,a=e.y-t.y;if(Math.abs(i)+Math.abs(a)>2?(e.lastX1=t.x+.3*i,e.lastY1=t.y+.3*a,e.lastX2=t.x+.7*i,e.lastY2=t.y+.7*a):(e.lastX1=e.lastX2=t.x+.5*i,e.lastY1=e.lastY2=t.y+.5*a),e.perLineWidth=(t.lineWidth+e.lineWidth)/2,"number"==typeof t.lastX1){if(n.drawCurveLine(t.lastX2,t.lastY2,t.x,t.y,e.lastX1,e.lastY1,e.perLineWidth),t.isFirstPoint)return;if(t.lastX1===t.lastX2&&t.lastY1===t.lastY2)return;var r=n.getRadianData(t.lastX1,t.lastY1,t.lastX2,t.lastY2),o=n.getRadianPoints(r,t.lastX1,t.lastY1,t.perLineWidth/2),s=n.getRadianPoints(r,t.lastX2,t.lastY2,e.perLineWidth/2);n.drawTrapezoid(o[0],s[0],s[1],o[1])}else e.isFirstPoint=!0},this.addHistory=function(){var t=n.get("options").maxHistoryLength;if(t&&n.canAddHistory)if(n.canAddHistory=!1,n.get("createImage")){var e=null;e=n.get("createImage")();var i=n.get("toDataURL")&&n.get("toDataURL")();w(i)?e.src=i:i.then((function(t){e.src=t})),e.onload=function(){var i=D;D=e,n.historyList.push(i),n.historyList=n.historyList.slice(-t)}}else n.historyList.length++},this.drawByImage=function(t){var e=n.get("context"),i=n.get("width"),a=n.get("height");e.clearRect(0,0,i,a);try{t&&e.drawImage(t,0,0,i,a),e.draw&&e.draw(!0)}catch(t){n.historyList.length=0}},this.isEmpty=function(){return n.get("options").maxHistoryLength>0?0===n.historyList.length:n._isEmpty},this.clear=function(){if(!n.get("options").disabled){var t=n.get("context");t.clearRect(0,0,n.get("width"),n.get("height")),t.draw&&t.draw(),n._isEmpty=!0,D=null,n.historyList.length=0}},this.undo=function(){if(!n.get("options").disabled&&(0===n.get("options").maxHistoryLength&&n.clear(),n.get("createImage")&&n.historyList.length)){var t=n.historyList.pop();n.drawByImage(t),n.undoneList.push(D),D=t,n.historyList.length||n.undoneList.length||n.clear()}},this.redo=function(){if(n.undoneList.length&&!n.get("options").disabled){var t=n.undoneList.pop();n.historyList.push(D),n.drawByImage(t),D=t,n._isEmpty=!1}},this.canvas=e,this.canvas.set("pen",O),this.init()}return f(t,[{key:"getOption",value:function(){}},{key:"setOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=o({},t),n=e.maxLineWidth;if(n&&t.penSize&&n==O.maxLineWidth){var i=Math.max(n,t.penSize);e.maxLineWidth=i}this.canvas.set("pen",Object.assign({},O,e))}},{key:"get",value:function(t){return this.canvas.get("options"==t?"pen":t)}},{key:"init",value:function(){var t=this;this.get("context").lineCap="round",this.canvas.on("touchstart",(function(e){return t.onDrawStart(e)})),this.canvas.on("touchmove",(function(e){return t.onDrawMove(e)})),this.canvas.on("touchend",(function(e){return t.onDrawEnd(e)}))}},{key:"drawBackground",value:function(){var t=this.get("context"),e=this.get("width"),n=this.get("height"),i=this.get("options"),a=i.backgroundColor,r=i.backgroundImage;a&&(t.fillStyle=a,t.fillRect(0,0,e,n),t.draw&&t.draw(!0)),r&&this.drawByImage(r)}},{key:"getImageData",value:function(t){if(t){var e=this.get("width"),n=this.get("height"),i=this.get("el"),a="CANVAS"===i.nodeName,r=a?e:i.width,o=a?n:i.height;if(a){var s=document.createElement("canvas");s.width=e,s.height=n;var c=s.getContext("2d");c.drawImage(i,0,0,e,n);var u=c.getImageData(0,0,e,n).data;return t(u)}var f,l=this.get("context").getImageData(0,0,r,o);return m(f=l)&&S(f.then)&&S(f.catch)?(l.then((function(e){return t(e.data)})),null):t(l.data)}}},{key:"getMaskedImageData",value:function(t){if(t)return this.getImageData((function(e){for(var n=0;e.length>n;n+=4)0===e[n+3]?(e[n]=0,e[n+1]=0,e[n+2]=0):(e[n]=255,e[n+1]=255,e[n+2]=255);return t(e)}))}},{key:"getContentBoundingBox",value:function(t){var e=this.get("pixelRatio"),n=this.get("width"),i=this.get("height"),a=this.get("el"),r="CANVAS"===a.nodeName,o=r?n:a.width,s=r?i:a.height;return e=r?1:e,this.getImageData((function(n){for(var i=Math.floor(o),a=i,r=Math.floor(s),c=0,u=0,f=0;n.length>f;f+=4)if(n[f+3]>0){var l=f/4%i,d=Math.floor(f/4/i);a=Math.min(a,l),r=Math.min(r,d),c=Math.max(c,l),u=Math.max(u,d)}var h={width:(c-a+1)/e,height:(u-r+1)/e,startX:a/e,startY:r/e};return t&&t(h),h}))}},{key:"remove",value:function(){var t=this;this.canvas.off("touchstart",(function(e){return t.onDrawStart(e)})),this.canvas.off("touchmove",(function(e){return t.onDrawMove(e)})),this.canvas.off("touchend",(function(e){return t.onDrawEnd(e)}))}},{key:"disableScroll",value:function(t){t.preventDefault&&this.get("options").disableScroll&&t.preventDefault()}},{key:"onDrawStart",value:function(t){if(!this.get("options").disabled){this.disableScroll(t),this.undoneList.length=0;var e=t.points;if(this.active){this.canAddHistory=!0,this.get("context").strokeStyle=this.get("options").penColor;var n=e[0];this.initPoint(n.x,n.y)}}}},{key:"onDrawMove",value:function(t){if(!this.get("options").disabled&&(this.disableScroll(t),this.active)){var e=t.points[0];this.initPoint(e.x,e.y),this.onDraw()}}},{key:"onDrawEnd",value:function(t){this.active&&!this.get("options").disabled&&(this.addHistory(),this.canAddHistory=!0,this.points=[])}},{key:"onDraw",value:function(){var t=this,e=this.get("context");if(this.points.length>=2){e.lineWidth=this.get("options").penSize||2;var n=this.points.slice(-1)[0],i=this.points.slice(-2,-1)[0];(function(){t._isEmpty=!1,t.get("options").openSmooth?t.drawSmoothLine(i,n):t.drawNoSmoothLine(i,n)})()}}},{key:"getMaxLineWidth",value:function(){var t=this.get("options");return Math.min(t.penSize,t.maxLineWidth)}},{key:"initPoint",value:function(t,e){var n={x:t,y:e,t:Date.now()},i=this.points.slice(-1)[0];if(!i||i.t!==n.t&&(i.x!==t||i.y!==e)){if(this.get("options").openSmooth&&i){var a=this.points.slice(-2,-1)[0];if(n.distance=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2)),n.speed=n.distance/(n.t-i.t||.1),n.lineWidth=this.getLineWidth(n.speed),a&&a.lineWidth&&i.lineWidth){var r=(n.lineWidth-i.lineWidth)/i.lineWidth,o=this.get("options").maxWidthDiffRate/100;o=o>1?1:.01>o?.01:o,Math.abs(r)>o&&(n.lineWidth=i.lineWidth*(1+(r>0?o:-o)))}}this.points.push(n),this.points=this.points.slice(-3)}}}]),t}(),W=function(){function t(e){c(this,t),this.canvas=void 0,this._ee=void 0,this.pen=void 0;var n=new R(e);n.set("parent",this),this.canvas=n,this._ee=new _,this.pen=new j(n),this.init()}return f(t,[{key:"init",value:function(){this.pen.active=!0}},{key:"destroy",value:function(){this.canvas.destroy()}},{key:"clear",value:function(){this.pen.clear()}},{key:"undo",value:function(){this.pen.undo()}},{key:"redo",value:function(){this.pen.redo()}},{key:"save",value:function(){}},{key:"getContentBoundingBox",value:function(t){return this.pen.getContentBoundingBox(t)}},{key:"getMaskedImageData",value:function(t){return this.pen.getMaskedImageData(t)}},{key:"isEmpty",value:function(){return this.pen.isEmpty()}},{key:"on",value:function(t,e){this._ee.on(t,e)}},{key:"emit",value:function(t,e){this._ee.emit(t,e)}},{key:"off",value:function(t,e){this._ee.off(t,e)}}]),t}();e.Signature=W;var A=W;e.default=A},b6eb:function(t,e,n){"use strict";n.r(e);var i=n("5640"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},b755:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("9b1b")),r=i(n("5de6")),o=i(n("2634")),s=i(n("2fdc"));n("d4b5"),n("5c47"),n("0506"),n("fd3c");var c=n("8619"),u=n("b5db"),f=n("3d71"),l=i(n("7143")),d=(n("9b8e"),{props:l.default,data:function(){return{canvasWidth:null,canvasHeight:null,offscreenWidth:null,offscreenHeight:null,useCanvas2d:!0,show:!0,offscreenStyles:"",showMask:!1,showOffscreen:!1,isPC:!1,isCanvasEmpty:!0}},computed:{canvasId:function(){return"lime-signature".concat(this._uid)},offscreenId:function(){return this.canvasId+"offscreen"},offscreenSize:function(){var t=this.offscreenWidth,e=this.offscreenHeight;return this.landscape?[e,t]:[t,e]},canvasStyle:function(){var t=this.canvasWidth,e=this.canvasHeight,n=this.backgroundColor;return{width:t&&t+"px",height:e&&e+"px",background:n}},param:function(){var t=this.penColor,e=this.penSize,n=this.backgroundColor,i=this.backgroundImage,a=this.landscape,r=this.boundingBox,o=this.openSmooth,s=this.minLineWidth,c=this.maxLineWidth,u=this.minSpeed,f=this.maxWidthDiffRate,l=this.maxHistoryLength,d=this.disableScroll,h=this.disabled;return JSON.parse(JSON.stringify({penColor:t,penSize:e,backgroundColor:n,backgroundImage:i,landscape:a,boundingBox:r,openSmooth:o,minLineWidth:s,maxLineWidth:c,minSpeed:u,maxWidthDiffRate:f,maxHistoryLength:l,disableScroll:d,disabled:h}))}},created:function(){var t=uni.getSystemInfoSync(),e=t.platform;this.isPC=/windows|mac/.test(e),this.useCanvas2d="2d"==this.type&&(0,c.canIUseCanvas2d)()&&!this.isPC},mounted:function(){var t=this;return(0,s.default)((0,o.default)().mark((function e(){var n;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.beforeDelay){e.next=3;break}return e.next=3,(0,c.sleep)(t.beforeDelay);case 3:return e.next=5,t.getContext();case 5:n=e.sent,t.signature=new u.Signature(n),t.canvasEl=t.signature.canvas.get("el"),t.offscreenWidth=t.canvasWidth=t.signature.canvas.get("width"),t.offscreenHeight=t.canvasHeight=t.signature.canvas.get("height"),t.stopWatch=t.$watch("param",(function(e){t.signature.pen.setOption(e)}),{immediate:!0});case 11:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){this.stopWatch&&this.stopWatch(),this.signature.destroy(),this.show=!1,this.signature=null},methods:{checkAndEmitEmptyStatus:function(){var t=this;setTimeout((function(){var e,n,i=null===(e=null===(n=t.signature)||void 0===n?void 0:n.isEmpty())||void 0===e||e;i!=t.isCanvasEmpty&&(t.isCanvasEmpty=i,t.$emit("change",i))}),0)},redo:function(){this.signature&&this.signature.redo(),this.checkAndEmitEmptyStatus()},restore:function(){this.redo()},undo:function(){this.signature&&this.signature.undo(),this.checkAndEmitEmptyStatus()},clear:function(){this.signature&&this.signature.clear(),this.checkAndEmitEmptyStatus()},isEmpty:function(){return this.signature.isEmpty()},canvasToMaskPath:function(){var t=arguments,e=this;return(0,s.default)((0,o.default)().mark((function n(){var i,a,r,s,u,l,d,h,p,v;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=t.length>0&&void 0!==t[0]?t[0]:{},a=e.isEmpty(),e.showOffscreen=!0,r=e.signature.canvas.get("width"),s=e.signature.canvas.get("height"),u=uni.getSystemInfoSync(),l=u.pixelRatio,e.useCanvas2d?(e.offscreenWidth=r*l,e.offscreenHeight=s*l):(e.offscreenWidth=r,e.offscreenHeight=s),n.next=9,(0,c.sleep)(100);case 9:d=uni.createCanvasContext("offscreen",e),h=Math.max(e.offscreenWidth,e.offscreenHeight),p=function(t){return i.success&&i.success(t)},v=function(t){return i.fail&&i.fail(t)},e.signature.pen.getMaskedImageData((function(t){(function(t,e){uni.canvasPutImageData?uni.canvasPutImageData(t,e):d.putImageData&&d.putImageData(t)})({canvasId:"offscreen",x:0,y:0,width:r,height:s,data:t,fail:function(t){v(t)},success:function(t){(0,f.toDataURL)("offscreen",e,i).then((function(t){d.restore(),d.clearRect(0,0,h,h),e.offscreenWidth=r,e.offscreenHeight=s,e.showOffscreen=!1,p({tempFilePath:t,isEmpty:a})}))}},e)}));case 14:case"end":return n.stop()}}),n)})))()},canvasToTempFilePath:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.isEmpty(),i=this.useCanvas2d,a=function(t){return e.success&&e.success(t)},u=function(t){return e.fail&&e.fail(t)},l=this.signature.canvas.get("el"),d=l.canvas,h=this.backgroundColor,p=this.landscape,v=this.boundingBox,g=this.signature.canvas.get("width"),m=this.signature.canvas.get("height"),b=0,y=0,w="devtools"==uni.getSystemInfoSync().platform,x=this.preferToDataURL,S=1,_=function(){var u=(0,s.default)((0,o.default)().mark((function s(u){var l,b,y,_,C,k;return(0,o.default)().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(l=function(){var e=i&&!!uni.createOffscreenCanvas&&x;if(e&&!w){var n=uni.createOffscreenCanvas({type:"2d"});n.width=t.offscreenSize[0]*S,n.height=t.offscreenSize[1]*S;var a=n.getContext("2d");return[a,n]}var r=uni.createCanvasContext("offscreen",t);return[r]},!(v&&!t.isPC||p||h&&!(0,c.isTransparent)(h))){o.next=13;break}return t.showOffscreen=!0,o.next=5,(0,c.sleep)(100);case 5:b=l(),y=(0,r.default)(b,2),_=y[0],C=y[1],_.save(),_.setTransform(1,0,0,1,0,0),p&&(_.translate(0,g*S),_.rotate(-Math.PI/2)),h&&!(0,c.isTransparent)(h)&&(_.fillStyle=h,_.fillRect(0,0,g,m)),C?(k=d.createImage(),k.src=u,k.onload=function(){_.drawImage(k,0,0,g*S,m*S);var e=C.toDataURL();t.showOffscreen=!1,a({tempFilePath:e,isEmpty:n})}):(_.drawImage(u,0,0,g*S,m*S),_.draw(!1,(function(){(0,f.toDataURL)("offscreen",t,e).then((function(e){var i=Math.max(g,m);_.restore(),_.clearRect(0,0,i,i),t.showOffscreen=!1,a({tempFilePath:e,isEmpty:n})}))}))),o.next=14;break;case 13:a({tempFilePath:u,isEmpty:n});case 14:case"end":return o.stop()}}),s)})));return function(t){return u.apply(this,arguments)}}(),C=function(){var e=(0,s.default)((0,o.default)().mark((function e(){var n;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.offscreenWidth==g&&t.offscreenHeight==m){e.next=5;break}return t.offscreenWidth=g,t.offscreenHeight=m,e.next=5,(0,c.sleep)(100);case 5:n={x:b,y:y,width:g,height:m,canvas:d,preferToDataURL:x},(0,f.toDataURL)(t.canvasId,t,n).then(_).catch(u);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();v&&!this.isPC?this.signature.getContentBoundingBox(function(){var e=(0,s.default)((0,o.default)().mark((function e(n){return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.offscreenWidth=g=n.width,t.offscreenHeight=m=n.height,b=n.startX,y=n.startY,C();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):C()},getContext:function(){var t=this;return(0,c.getRect)("#".concat(this.canvasId),{context:this,type:this.useCanvas2d?"fields":"boundingClientRect"}).then((function(e){if(e){var n,i=e.width,a=e.height,r=e.node,o=e.left,s=e.top,u=e.right,l=uni.getSystemInfoSync(),d=l.pixelRatio;return r?(n=r.getContext("2d"),r.width=i*d,r.height=a*d):(d=1,n=(0,f.uniContext)(t.canvasId,t),r={getContext:function(t){return"2d"==t?n:null},createImage:f.createImage,toDataURL:function(){return(0,f.toDataURL)(t.canvasId,t)},requestAnimationFrame:c.requestAnimationFrame}),n.clearRect(0,0,i,a),{left:o,top:s,right:u,width:i,height:a,context:n,canvas:r,pixelRatio:d}}}))},getTouch:function(t){var e=this;return this.isPC&&this.canvasRect&&(t.touches=t.touches.map((function(t){return(0,a.default)((0,a.default)({},t),{},{x:t.clientX-e.canvasRect.left,y:t.clientY-e.canvasRect.top})}))),t},touchStart:function(t){var e=this;this.canvasEl&&(this.isStart=!0,this.isPC?(0,c.getRect)("#".concat(this.canvasId),{context:this}).then((function(n){e.canvasRect=n,e.canvasEl.dispatchEvent("touchstart",(0,c.wrapEvent)(e.getTouch(t)))})):this.canvasEl.dispatchEvent("touchstart",(0,c.wrapEvent)(t)))},touchMove:function(t){!this.canvasEl||!this.isStart&&this.canvasEl||this.canvasEl.dispatchEvent("touchmove",(0,c.wrapEvent)(this.getTouch(t)))},touchEnd:function(t){this.canvasEl&&(this.isStart=!1,this.canvasEl.dispatchEvent("touchend",(0,c.wrapEvent)(t)),this.checkAndEmitEmptyStatus())}}});e.default=d},d371:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,"uni-view[data-v-56df567b]{display:flex;flex-direction:column}.orderLine[data-v-56df567b]{flex-direction:row;margin-top:%?16?%;align-items:center}.orderTxt[data-v-56df567b]{font-family:SourceHanSansCN-Normal;font-size:%?28?%;color:#333;line-height:%?36?%}.iconback[data-v-56df567b]{width:%?40?%;height:%?40?%}.navTab[data-v-56df567b]{background:#fafafa;box-shadow:0 1px 0 0 #e6e6e6;flex-direction:row;justify-content:space-around;top:%?140?%;left:0;position:fixed;z-index:999;width:%?750?%}.tabItem[data-v-56df567b]{align-items:center;position:relative}.orderGe[data-v-56df567b]{color:#d8d8d8;margin-left:%?16?%;margin-right:%?16?%;font-size:%?28?%}.tabTxt[data-v-56df567b]{font-size:%?28?%;color:#666;text-align:left;height:%?70?%;line-height:%?70?%}.tabItemOn[data-v-56df567b]{color:#0dc99e}.tabItemOnLine[data-v-56df567b]{background:#0dc99e;height:%?4?%;width:%?100?%;position:absolute;bottom:%?-2?%;left:0}.orderBox[data-v-56df567b]{padding-top:%?16?%;padding-bottom:%?16?%;padding-left:%?30?%;padding-right:%?30?%;background:#fff;margin-top:%?20?%}.orderHeader[data-v-56df567b]{flex-direction:row;justify-content:space-between;padding-bottom:%?16?%;border-bottom:%?1?% solid #e4e4e4;align-items:center}.orderBody[data-v-56df567b]{border-bottom:%?1?% solid #e4e4e4;padding-bottom:%?16?%}.orderStatus[data-v-56df567b]{font-family:PingFangSC-Regular;font-size:%?28?%;color:#fd8c30;text-align:left;line-height:%?40?%}.orderNo[data-v-56df567b]{font-family:SourceHanSansCN-Normal;font-size:%?24?%;color:#999;line-height:%?24?%}.orderTag[data-v-56df567b]{background:rgba(13,201,158,.1);border-radius:2px;width:%?100?%;padding:%?4?% %?10?%;margin-right:%?10?%}.orderTagTxt[data-v-56df567b]{font-family:SourceHanSansCN-Normal;font-size:%?20?%;text-align:center}.tag1[data-v-56df567b]{color:#0dc99e}.tag2[data-v-56df567b]{color:#4a90e2}.tag3[data-v-56df567b]{color:#fd8c30}.tagBox2[data-v-56df567b]{background:rgba(60,145,245,.1)}.tagBox3[data-v-56df567b]{background:rgba(253,140,48,.1)}.orderPrice[data-v-56df567b]{flex-direction:row;margin-top:%?16?%;border-bottom:%?1?% solid #e4e4e4;padding-bottom:%?16?%}.priceBox[data-v-56df567b]{margin-right:%?30?%;flex-direction:row;align-items:center}.priceTitle[data-v-56df567b]{font-family:SourceHanSansCN-Normal;font-size:%?24?%;color:#999;line-height:%?28?%}.priceInfo[data-v-56df567b]{font-family:Roboto-Medium;font-size:%?24?%;color:#333;text-align:left;line-height:%?40?%}.orderFooter[data-v-56df567b]{margin-top:%?16?%;padding-bottom:%?16?%;flex-direction:row;justify-content:flex-end}.btn[data-v-56df567b]{border-radius:%?27?%;width:%?108?%;margin-left:%?20?%}.btnCancel[data-v-56df567b]{background:#fff;border:%?1?% solid #0dc99e;align-items:center}.btnTxt[data-v-56df567b]{font-family:SourceHanSansCN-Normal;font-size:%?24?%;text-align:center;height:%?54?%;line-height:%?54?%}.btnCancelTxt[data-v-56df567b]{color:#0dc99e}.btnConfirm[data-v-56df567b]{background:#0dc99e;border:%?1?% solid #0dc99e;align-items:center}.btnConfirmTxt[data-v-56df567b]{color:#fff}.icon[data-v-56df567b]{color:#52d5a6;margin-right:%?12?%;font-size:%?28?%}.navRight[data-v-56df567b]{flex-direction:row}",""]),t.exports=e},de69:function(t,e,n){"use strict";n.r(e);var i=n("10e9"),a=n("4838");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n("e32d");for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("8c63");var s=n("828b");a["default"].__module="sign";var c=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"f4eb2412",null,!1,i["a"],a["default"]);e["default"]=c.exports},dff8:function(t,e,n){"use strict";var i=n("6898"),a=n.n(i);a.a},e32d:function(t,e,n){"use strict";n.r(e);var i=n("b755"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a}}]);