miniprogram-paint-poster
Version:
一个可以在小程序随意生成海报的小程序代码库
1 lines • 19.9 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n,r=e();for(n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,function(){return r={},o.m=n=[function(t,e,n){t.exports=n(6)},function(t,e){function c(t,e,n,r,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(s){return function(){var t=this,i=arguments;return new Promise(function(e,n){var r=s.apply(t,i);function o(t){c(r,e,n,o,a,"next",t)}function a(t){c(r,e,n,o,a,"throw",t)}o(void 0)})}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.r(e);var r=n(2),o=n.n(r),r=n(1),s=n.n(r),r=n(3),c=n.n(r),r=n(4),u=n.n(r),r=n(0),l=n.n(r);function a(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e.default=function(){function n(t){c()(this,n);var e={x:0,y:0,width:750,height:1334,quality:1,canvasId:"posterCanvasId",debug:!1,globalEnv:window.wx};this.params=Object.assign(e,t),this.GLOBAL_ENV=this.params.globalEnv,this.canvasContext=this.GLOBAL_ENV.createCanvasContext(this.params.canvasId),this.posterImgSrc=""}var t,e,r,o,a,i;return u()(n,[{key:"setCanvasBackground",value:function(t){var e,n;t&&(e=t,t=(n=this.params).width,n=n.height,this.params.debug&&console.log("canvas的背景色为:",e),this.canvasContext.save(),this.canvasContext.setFillStyle(e),this.canvasContext.fillRect(0,0,t,n),this.canvasContext.restore(),this.canvasContext.draw(!0))}},{key:"paintImg",value:(i=s()(l.a.mark(function t(e){var n,r,o,a,i,s,c=this;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.src,r=e.x,o=e.y,a=e.width,i=e.height,t.next=3,this._downloadFile(n);case 3:return s=t.sent,this.params.debug&&console.log("开始绘制图片",s),t.abrupt("return",new Promise(function(t,e){try{c.canvasContext.drawImage(s,r,o,a,i),c.params.debug&&console.log("开始绘制图片完成"),t()}catch(t){e(t)}c.canvasContext.draw(!0)}));case 6:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"drawPaddingCircleImg",value:(a=s()(l.a.mark(function t(e){var n,r,o,a,i;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.src,n=e.x,r=e.y,o=e.width,a=e.height,e.backgroundColor,i=e.padding,i=Object.assign({},e,{x:n-i,y:r-i,width:o+2*i,height:a+2*i}),t.next=4,this.paintCircleShape(i);case 4:return t.next=6,this.paintCircleImage(e);case 6:case"end":return t.stop()}},t,this)})),function(t){return a.apply(this,arguments)})},{key:"paintCircleImage",value:(o=s()(l.a.mark(function t(e){var n,r,o,a,i,s,c,u;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=e.src,n=e.x,r=e.y,o=e.width,a=e.height,t.next=3,this._downloadFile(u);case 3:i=t.sent,s=n+o/2,c=r+a/2,u=a/2,this.canvasContext.save(),this.canvasContext.beginPath(),this.canvasContext.arc(s,c,u,0,2*Math.PI),this.canvasContext.clip(),this.canvasContext.drawImage(i,n,r,o,a),this.canvasContext.restore(),this.canvasContext.draw(!0);case 14:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"paintRadiusImage",value:(r=s()(l.a.mark(function t(e){var n,r,o,a,i,s,c;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.params.debug&&console.log("开始圆角矩形图片",e),n=e.x,r=e.y,o=e.width,a=e.height,i=e.r,c=e.src,s=i,t.next=5,this._downloadFile(c);case 5:c=t.sent,o<2*i&&(s=o/2),a<2*i&&(s=a/2),this.canvasContext.save(),this.canvasContext.beginPath(),this.canvasContext.moveTo(n+s,r),this.canvasContext.arcTo(n+o,r,n+o,r+a,s),this.canvasContext.arcTo(n+o,r+a,n,r+a,s),this.canvasContext.arcTo(n,r+a,n,r,s),this.canvasContext.arcTo(n,r,n+o,r,s),this.canvasContext.clip(),this.canvasContext.drawImage(c,n,r,o,a),this.canvasContext.restore(),this.canvasContext.draw(!0);case 19:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"paintCircleShape",value:function(t){this.params.debug&&console.log("开始绘制圆形o",t);var e=t.x,n=t.y,r=t.width,o=t.height,a=t.backgroundColor,i=e+r/2,s=n+o/2,t=o/2;this.canvasContext.save(),this.canvasContext.beginPath(),this.canvasContext.arc(i,s,t,0,2*Math.PI),this.canvasContext.clip(),this.canvasContext.setFillStyle(a),this.canvasContext.fillRect(e,n,r,o),this.canvasContext.restore()}},{key:"paintRectShape",value:function(t){this.params.debug&&console.log("开始绘制矩形",t);var e=t.x,n=t.y,r=t.width,o=t.height,t=t.backgroundColor;this.canvasContext.save(),this.canvasContext.setFillStyle(t),this.canvasContext.fillRect(e,n,r,o),this.canvasContext.restore()}},{key:"paintOneLineText",value:function(t){this.params.debug&&console.log("开始绘制单行文字",t);var e=t.x,n=t.y,r=t.fontSize,o=t.color,a=t.MaxTextNum,i=t.txt,t=t.font||"";this.canvasContext.save(),this.canvasContext.setTextAlign("left"),this.canvasContext.setFontSize(r),this.canvasContext.setFillStyle(o),this.canvasContext.font=t||'normal "Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif';t=this.canvasContext.measureText(i).width;this.params.debug&&console.log("单行文字的宽度--"+i,t),this.params.debug&&console.log("文字的位数--"+i,i.length),i&&a&&a<i.length&&(i=i.substr(0,a)+"..."),this.canvasContext.fillText(i,e,n),this.canvasContext.restore(),this.canvasContext.draw(!0)}},{key:"paintCircularText",value:function(t){this.params.debug&&console.log("开始绘制环形文字",t);var e=t.txt,n=t.fontSize,r=t.color,o=t.circularH,a=t.circularW,i=t.circularColor,s=t.circularY,c=t.circularX,u=this.canvasContext.measureText(e).width;this.params.debug&&console.log("环形文字的宽度--"+e,u),this.params.debug&&console.log("环形的宽度",a);t=o/2,u=a/2;this.canvasContext.setFillStyle(i),this.canvasContext.arc(c,s+t,t,0,2*Math.PI),this.canvasContext.arc(c+a,s+t,t,0,2*Math.PI),this.canvasContext.rect(c,s,a,o),this.canvasContext.fill(),this.canvasContext.setFillStyle(r),this.canvasContext.setFontSize(n),this.canvasContext.setTextAlign("center"),this.canvasContext.fillText(e,c+u,s+t+n/4+2),this.canvasContext.draw(!0)}},{key:"paintMultiLine",value:function(t){this.params.debug&&console.log("开始多行文本",t);var e=t.txt,n=(t.x,t.y),r=(t.fontSize,t.color,t.lineDistance),o=void 0===r?36:r,a=t.oneLineTextNum;if(e){var i=e,e=e.length;if(a>i.length)return console.error("多行文本字数 < 设置的允许单行文字的字数",t),void this.paintOneLineText(t);for(var s=[],c=Math.ceil(e/a),u=0;u<c;u++){var l=i.slice(u*a,(u+1)*a);s.push(l)}this.params.debug&&console.log("多行文本的分割结果",s);for(var h=0;h<s.length;h++){var f=s[h],p=n+h*o,f=v(v({},t),{},{y:p,txt:f});this.paintOneLineText(f)}}}},{key:"paintBorderCircularText",value:function(t){this.params.debug&&console.log("开始绘制环形文字",t);var e=t.txt,n=(t.x,t.y,t.fontSize),r=t.color,o=t.borderColor,a=t.circularH,i=t.circularW,s=(t.circularColor,t.circularX),c=t.circularY,u=this.canvasContext.measureText(e).width;this.params.debug&&console.log("环形文字的宽度--"+e,u),this.params.debug&&console.log("环形的宽度",i);t=a/2,u=i/2;this.canvasContext.setStrokeStyle(o||"red"),this.canvasContext.arc(s,c+t,t,.5*Math.PI,1.5*Math.PI),this.canvasContext.arc(s+i,c+t,t,1.5*Math.PI,.5*Math.PI),this.canvasContext.moveTo(s,c),this.canvasContext.lineTo(s+i,c),this.canvasContext.moveTo(s,c+a),this.canvasContext.lineTo(s+i,c+a),this.canvasContext.stroke(),this.canvasContext.setFillStyle(r),this.canvasContext.setFontSize(n),this.canvasContext.setTextAlign("center"),this.params.debug&&console.log("环形文字的坐标--x:".concat(s+u,",y:").concat(c+t+n/4+2)),this.canvasContext.fillText(e,s+u,c+t+n/4+2),this.canvasContext.draw(!0)}},{key:"previewPoster",value:(e=s()(l.a.mark(function t(){var n=this;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._canvasToTempFilePath();case 2:return console.log("预览海报,海报临时地址:",this.posterImgSrc),t.abrupt("return",new Promise(function(t,e){n.posterImgSrc?n.GLOBAL_ENV.previewImage({current:n.posterImgSrc,urls:[n.posterImgSrc]}).then(function(){t()}).catch(function(t){e(t)}):(console.log("海报图地址获取失败,海报临时地址:",n.posterImgSrc),e("海报图地址获取失败,海报临时地址:"))}));case 4:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"savePosterToPhoto",value:(t=s()(l.a.mark(function t(){var n,r,o=this;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,t.next=3,this._canvasToTempFilePath();case 3:return r=this.posterImgSrc,this.params.debug&&(console.time("canvas图片保存"),console.log("开始保存图片到相册",r)),t.abrupt("return",new Promise(function(t,e){o.GLOBAL_ENV.saveImageToPhotosAlbum({filePath:r,success:function(){n.GLOBAL_ENV.hideToast(),t("图片保存到相册"),console.log("成功保存图片到相册",r),n.params.debug&&console.timeEnd("canvas图片保存")},fail:function(t){console.log(333,t),n.GLOBAL_ENV.hideLoading(),console.log(444,t),n.getAuth(),e(t)}})}));case 6:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"getAuth",value:function(){var e=this,n=this;this.GLOBAL_ENV.hideLoading(),this.params.debug&&console.log("拒绝保存"),this.GLOBAL_ENV.showModal({content:"需要您授权保存相册",confirmColor:"#E23A4E",showCancel:!1,success:function(t){e.GLOBAL_ENV.openSetting({success:function(t){console.log("settingdata",t),t.authSetting["scope.writePhotosAlbum"]?n.GLOBAL_ENV.showToast({title:"获取权限成功,再次点击图片即可保存",icon:"none",duration:3e3}):n.GLOBAL_ENV.showToast({title:"获取权限失败,将无法保存到相册",icon:"none",duration:3e3})},fail:function(t){console.log("failData",t)},complete:function(t){console.log("finishData",t)}})}})}},{key:"_downloadFile",value:function(o){var a=this;return this.params.debug&&(console.log("开始下载网络图片",o),console.time("网络图片下载时间",o)),-1==o.indexOf("http")?Promise.resolve(o):new Promise(function(){var n=s()(l.a.mark(function t(e,n){var r;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.GLOBAL_ENV.downloadFile({url:o});case 3:r=t.sent,a.params.debug&&(console.log("网络图片下载成功",r.tempFilePath),console.timeEnd("网络图片下载时间",o)),e(r.tempFilePath),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),a.params.debug&&console.log("网络图片下载失败"),n(t.t0);case 12:case"end":return t.stop()}},t,null,[[0,8]])}));return function(t,e){return n.apply(this,arguments)}}())}},{key:"_canvasToTempFilePath",value:function(){var o=this;return this.posterImgSrc?(console.log("canvas临时文件已存在",this.posterImgSrc),Promise.resolve(this.posterImgSrc)):new Promise(function(n,r){setTimeout(s()(l.a.mark(function t(){var e;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o.params.debug&&(console.log("开始截取canvas目前的图像"),console.time("canvas截取图片")),t.next=4,o.GLOBAL_ENV.canvasToTempFilePath({x:0,y:0,quality:o.params.quality,canvasId:o.params.canvasId});case 4:e=t.sent,o.params.debug&&(console.log("截取canvas目前的图像成功",e.tempFilePath),console.timeEnd("canvas截取图片")),o.posterImgSrc=e.tempFilePath,n(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}},t,null,[[0,10]])})),300)})}}]),n}()},function(e,t,n){e=function(i){"use strict";var c,t=Object.prototype,u=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o,a,i,s,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),r=new P(r||[]);return e._invoke=(o=t,a=n,i=r,s=h,function(t,e){if(s===p)throw new Error("Generator is already running");if(s===v){if("throw"===t)throw e;return S()}for(i.method=t,i.arg=e;;){var n=i.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===c){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=c,t(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}r=l(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;var r=r.arg;if(!r)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d;{if(!r.done)return r;n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c)}n.delegate=null;return d}(n,i);if(r){if(r===d)continue;return r}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===h)throw s=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=p;r=l(o,a,i);if("normal"===r.type){if(s=i.done?v:f,r.arg!==d)return{value:r.arg,done:i.done}}else"throw"===r.type&&(s=v,i.method="throw",i.arg=r.arg)}}),e}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}i.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function g(){}function x(){}function y(){}var m={};m[r]=function(){return this};e=Object.getPrototypeOf,e=e&&e(e(_([])));e&&e!==t&&u.call(e,r)&&(m=e);var w=y.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function C(i,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,o){t=l(i[t],i,n);if("throw"!==t.type){var a=t.arg,n=a.value;return n&&"object"==typeof n&&u.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,o)})}o(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function L(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function _(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,t=function t(){for(;++n<e.length;)if(u.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return t.next=t}}return{next:S}}function S(){return{value:c,done:!0}}return((x.prototype=w.constructor=y).constructor=x).displayName=a(y,o,"GeneratorFunction"),i.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,a(t,o,"GeneratorFunction")),t.prototype=Object.create(w),t},i.awrap=function(t){return{__await:t}},b(C.prototype),C.prototype[n]=function(){return this},i.AsyncIterator=C,i.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var a=new C(s(t,e,n,r),o);return i.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},b(w),a(w,o,"Generator"),w[r]=function(){return this},w.toString=function(){return"[object Generator]"},i.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=_,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var a=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,o=n.completion;return"throw"===o.type&&(r=o.arg,O(n)),r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),d}},i}(e.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}],o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=5).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,r});