@xysfe/actui
Version:
A fantastic mobile ui lib implement by Vue
1 lines • 33.7 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@xysfe/actui/es/assets/utils/helpers.js"),require("@xysfe/actui/es/assets/utils/post.js"),require("@xysfe/actui/es/assets/utils/assign.js")):"function"==typeof define&&define.amd?define(["@xysfe/actui/es/assets/utils/helpers.js","@xysfe/actui/es/assets/utils/post.js","@xysfe/actui/es/assets/utils/assign.js"],e):"object"==typeof exports?exports.FileUpload=e(require("@xysfe/actui/es/assets/utils/helpers.js"),require("@xysfe/actui/es/assets/utils/post.js"),require("@xysfe/actui/es/assets/utils/assign.js")):t.FileUpload=e(t["@xysfe/actui/es/assets/utils/helpers.js"],t["@xysfe/actui/es/assets/utils/post.js"],t["@xysfe/actui/es/assets/utils/assign.js"])}("undefined"!=typeof self?self:this,function(t,e,r){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="../es",e(e.s=1677)}({0:function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},1:function(t,e,r){var n=r(32)("wks"),o=r(24),i=r(0).Symbol,a="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=n},10:function(t,e,r){var n=r(4),o=r(41),i=r(39),a=Object.defineProperty;e.f=r(3)?Object.defineProperty:function(t,e,r){if(n(t),e=i(e,!0),n(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},100:function(t,e,r){"use strict";var n=r(9),o=r(2),i=r(0),a=r(64),c=r(67);n(n.P+n.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),r="function"==typeof t;return this.then(r?function(r){return c(e,t()).then(function(){return r})}:t,r?function(r){return c(e,t()).then(function(){throw r})}:t)}})},101:function(t,e,r){"use strict";var n=r(9),o=r(44),i=r(66);n(n.S,"Promise",{try:function(t){var e=o.f(this),r=i(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},106:function(t,r){t.exports=e},11:function(t,e){t.exports={}},111:function(t,e,r){t.exports={default:r(117),__esModule:!0}},117:function(t,e,r){var n=r(2),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},12:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},13:function(t,e,r){var n=r(34),o=r(15);t.exports=function(t){return n(o(t))}},14:function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},15:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},16:function(t,e,r){var n=r(19);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},1677:function(t,e,r){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.type=p?2:t.type,Object(l.a)(t).then(function(e){return 0===e.length?void(t.complete&&"function"==typeof t.complete&&t.complete(e)):(t.beforeUpload&&"function"==typeof t.beforeUpload&&t.beforeUpload(e),u.a.all(e.map(function(e){return a(t,e)})).then(function(e){var r=[];return e.map(function(t){t.data.url&&r.push(t.data)}),t.complete&&"function"==typeof t.complete&&t.complete(r),r}))})}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(l.a)(t)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.appId,r=void 0===e?"":e,n=t.sourceType,o=void 0===n?["album","camera"]:n,i=t.url,a=void 0===i?"":i,c=t.ext,p=void 0===c?{}:c,d=t.beforeUpload,v=t.complete;return Object(l.a)({appId:r,sourceType:o,count:1}).then(function(t){return new u.a(function(e,r){if(d&&"function"==typeof d){var n=d(t);if(n&&Object(s.isPromise)(n))return n.then(function(t){return e(t)}).catch(function(t){return r(t)})}e(t)}).then(function(t){return 0===t.length?u.a.resolve({ret:999998,errmsg:"用户取消"}):Object(f.b)({appId:r,url:a,ext:p},t[0]).then(function(t){return v&&"function"==typeof v&&v(t),t})}).catch(function(t){return u.a.resolve({ret:10001,errmsg:t.message})})})}function a(t,e){return Object(f.a)(t,e).then(function(e){return 29999===Number(e.ret)&&(p=!0),t.uploaded&&"function"==typeof t.uploaded&&t.uploaded(e),e})}Object.defineProperty(e,"__esModule",{value:!0});var c=r(71),u=r.n(c),s=r(38),f=(r.n(s),r(947)),l=r(1678),p=!1;e.default={upload:n,choose:o,ocr:i,uploadFile:f.a}},1678:function(t,e,r){"use strict";function n(t){return t=O()({},I,t),W&&(t.type=W),j.ua.isWx&&!1!==t.isLimitSourceType&&(t.sourceType=["album","camera"]),t.appId||(t.type=2),h(t)?i(t):o(t)}function o(t){return s(t)}function i(t){if(j.ua.isWx&&!M){var e=j.ua.isIOS&&(window.__wxjs_is_wkwebview||z),r=!j.ua.isIOS&&t.enableHighQuality&&"function"==typeof window.wx.getLocalImgData;return e||r?a(t):1!==Number(t.type)||L?s(t):c(t)}return k||C?u(t):s(t)}function a(t){return new w.a(function(e,r){window.wx.chooseImage({count:t.count,sizeType:["compressed"],sourceType:t.sourceType,isSaveToAlbum:t.isSaveToAlbum,success:function(n){var o=n.localIds.length,i=0,a=[];for(var c in n.localIds)!function(c){var u=n.localIds[c];window.wx.getLocalImgData({localId:u,success:function(r){var n=r.localData;n&&0!==n.indexOf("data:image")&&(n="data:image/jpeg;base64,"+n,n=n.replace(/\r|\n/g,""));var s=function(t){i++,a[c]={localId:u,base64:t},i===o&&(e(a.filter(function(t){return!!t})),a=null)};j.ua.isIOS?s(n):d(t,{},n).then(s).catch(function(t){console.log("图片压缩失败,使用原图:",t),s(n)})},fail:function(e){i++,Object(S.a)(e,t).catch(r),Object(S.b)("wxUploadImage[getLocalImgData] error "+x()(e))}})}(c)},fail:function(e){Object(S.a)(e,t).catch(r),Object(S.b)("wxChooseImage[chooseImage] error "+x()(e))}})})}function c(t){return new w.a(function(e,r){window.wx.chooseImage({count:t.count,sizeType:["compressed"],sourceType:t.sourceType,isSaveToAlbum:t.isSaveToAlbum,success:function(n){function o(n){var a=n.length-1,c=n.pop();if(!c)return void e(i);window.wx.uploadImage({localId:c,isShowProgressTips:E?1:0,success:function(t){i[a]={localId:c,serverId:t.serverId},o(n)},fail:function(e){Object(S.a)(e,t).catch(r),Object(S.b)("wxUploadImage[uploadImage] error "+x()(e)),o(n)}})}var i=[];j.ua.isAndroid?setTimeout(o(n.localIds),100):o(n.localIds)},fail:function(e){e.errMsg&&/permission\sdenied/.test(e.errMsg)&&/micromessenger\/7\.0\.14/i.test(navigator.userAgent)&&(W=2),Object(S.a)(e,t).catch(r),Object(S.b)("wxChooseImage[chooseImage] error "+x()(e))}})})}function u(t){return console.log("preview场景:",t.sourceType),new w.a(function(e,r){window.Crossapi&&window.Crossapi("/image/preview",{count:t.count,maxWidth:t.maxWidth,maxHeight:t.maxHeight,maxSize:t.maxSize,sourceType:t.sourceType},function(t){if(0!==t.code)return Object(S.b)("appChooseImage[/image/preview] error code:"+t.code+" errmsg:"+t.msg),r({ret:t.code,errmsg:t.msg});Object(j.isArray)(t.data)||(t.data=[t.data]),t.data=t.data.map(function(t){return{base64:t}}),e(t.data||[])})})}function s(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new w.a(function(e,r){var n=document.body.getAttribute(A),o=void 0;if(n){o=f(document.getElementById(n),t,e)}else n=Object(j.randomString)(24),o=document.createElement("input"),o.id=n,o.type="file",o.style.display="none",h(t)?!j.ua.isIOS&&j.ua.isWx||o.setAttribute("accept","image/*"):(j.ua.isAndroid&&!j.ua.isWx&&o.setAttribute("accept",t.accept),j.ua.isHarmonyOS&&!j.ua.isWx&&o.setAttribute("accept",t.accept)),!o.getAttribute("accept")&&t.accept&&o.setAttribute("accept",t.accept),t.count>1&&(j.ua.isAndroid&&j.ua.isWx||o.setAttribute("multiple","multiple")),t.sourceType&&1===t.sourceType.length&&"camera"===t.sourceType[0]&&o.setAttribute("capture","camera"),o.addEventListener("change",function(){l.call(this,t,e)},!1),document.body.appendChild(o),document.body.setAttribute(A,n);o.click()})}function f(t,e,r){var n=Object(j.randomString)(24),o=document.createElement("input");return o.id=n,o.type="file",o.style.display="none",h(e)?!j.ua.isIOS&&j.ua.isWx||o.setAttribute("accept","image/*"):(j.ua.isAndroid&&!j.ua.isWx&&o.setAttribute("accept",e.accept),j.ua.isHarmonyOS&&!j.ua.isWx&&o.setAttribute("accept",e.accept)),!o.getAttribute("accept")&&e.accept&&o.setAttribute("accept",e.accept),e.count>1&&(j.ua.isAndroid&&j.ua.isWx||o.setAttribute("multiple","multiple")),e.sourceType&&1===e.sourceType.length&&"camera"===e.sourceType[0]&&o.setAttribute("capture","camera"),o.addEventListener("change",function(){l.call(this,e,r)},!1),t&&t.parentNode?(t.removeEventListener("change",function(){l.call(this,e,r)}),t.parentNode.replaceChild(o,t)):document.body.appendChild(o),document.body.setAttribute(A,n),o}function l(t,e){var r=Array.prototype.slice.call(this.files);if(!r||0===r.length)return e([]);w.a.all(r.map(function(e){return p(t,e)})).then(e).catch(function(t){})}function p(t,e){return new w.a(function(r,n){if(h(t)||/^image\//.test(e.type)){var o=new FileReader;o.onload=function(o){var i=new Uint8Array(o.target.result),a=y()(i.slice(4,12)).map(function(t){return String.fromCharCode(t)}).join(""),c=a.includes("heic")||a.includes("heix"),u=new FileReader;u.onload=function(n){var o=n.target.result,i=/^data:application\/octet-stream;/i.test(o);c||i?(console.log(c?"HEIC/HEIX格式, 不支持压缩":"application/octet-stream格式, 不支持压缩"),r({name:e.name,type:t.fileType||e.type,base64:o,size:e.size})):(console.log("CompressedImg"),d(t,e,o).then(function(n){r({name:e.name,type:t.fileType||e.type,base64:n,size:e.size})}).catch(function(){r({name:e.name,type:t.fileType||e.type,base64:o,size:e.size})}))},u.onerror=function(){n(new Error("读取文件失败"))},u.readAsDataURL(e)},o.onerror=function(){n(new Error("读取文件头失败"))},o.readAsArrayBuffer(e.slice(0,12))}else r({name:e.name,type:t.fileType||e.type,file:e})})}function d(t,e,r){return new w.a(function(n,o){var i=new Image;i.onload=function(){n(v(t,i,t.fileType||e.type)),i=null},i.onabort=i.onerror=o,i.src=r})}function v(t,e,r){var n,o=document.createElement("canvas"),i=o.getContext("2d"),a=e.width,c=e.height,u=a/c,s=void 0,f=void 0;return u>=1&&a>t.maxWidth?(n=t.maxWidth/a,f=c*n,o.width=t.maxWidth,o.height=f,i.drawImage(e,0,0,t.maxWidth,f)):u<1&&c>t.maxHeight?(n=t.maxHeight/c,s=a*n,o.width=s,o.height=t.maxHeight,i.drawImage(e,0,0,s,t.maxHeight)):(o.width=a,o.height=c,i.drawImage(e,0,0,a,c)),o.toDataURL(r||"image/jpeg",t.compressSize||.6)}function h(t){return!t.accept||/^image\//.test(t.accept)}e.a=n;var m=r(642),y=r.n(m),g=r(111),x=r.n(g),b=r(71),w=r.n(b),j=r(38),_=(r.n(j),r(263)),O=r.n(_),S=r(875),I={maxWidth:1440,maxHeight:1440,maxSize:250,type:1,count:9,sourceType:["album","camera"],accept:"",appId:"",isSaveToAlbum:1},A="actui-upload-file-id",T=navigator.userAgent.match(/wxwork\/[^\s]*/i),P=navigator.userAgent.match(/(mucxiaoyusan|muckacabao)\/[^\s]*/i),M=j.ua.isWx&&/(windowswechat|macwechat)/i.test(navigator.userAgent),E=j.ua.isAndroid&&/MicroMessenger\/8\.0\.7/i.test(navigator.userAgent),L=j.ua.isWxWork,z=L&&T&&Object(S.c)("2.4.6",T[0].split("/")[1])>-1,k=j.ua.isXysApp&&P&&Object(S.c)("1.5.0",P[0].split("/")[1])>-1&&(!j.ua.isAndroid||0!==Object(S.c)("3.8.0",P[0].split("/")[1])),C=j.ua.isKcbApp&&P&&Object(S.c)("1.1.0",P[0].split("/")[1])>-1,W=0},17:function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},18:function(t,e){t.exports=!0},19:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},2:function(t,e){var r=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},20:function(t,e,r){var n=r(32)("keys"),o=r(24);t.exports=function(t){return n[t]||(n[t]=o(t))}},22:function(t,e,r){var n=r(6),o=r(0).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},23:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},24:function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},263:function(t,e){t.exports=r},27:function(t,e,r){var n=r(10).f,o=r(8),i=r(1)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},29:function(t,e,r){var n=r(42),o=r(33);t.exports=Object.keys||function(t){return n(t,o)}},3:function(t,e,r){t.exports=!r(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},31:function(t,e,r){var n=r(15);t.exports=function(t){return Object(n(t))}},32:function(t,e,r){var n=r(2),o=r(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(18)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},33:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},34:function(t,e,r){var n=r(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},35:function(t,e,r){var n=r(17),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},36:function(t,e,r){"use strict";var n=r(18),o=r(9),i=r(54),a=r(5),c=r(11),u=r(61),s=r(27),f=r(63),l=r(1)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,r,v,h,m,y){u(r,e,v);var g,x,b,w=function(t){if(!p&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},j=e+" Iterator",_="values"==h,O=!1,S=t.prototype,I=S[l]||S["@@iterator"]||h&&S[h],A=I||w(h),T=h?_?w("entries"):A:void 0,P="Array"==e?S.entries||I:I;if(P&&(b=f(P.call(new t)))!==Object.prototype&&b.next&&(s(b,j,!0),n||"function"==typeof b[l]||a(b,l,d)),_&&I&&"values"!==I.name&&(O=!0,A=function(){return I.call(this)}),n&&!y||!p&&!O&&S[l]||a(S,l,A),c[e]=A,c[j]=d,h)if(g={values:_?A:w("values"),keys:m?A:w("keys"),entries:T},y)for(x in g)x in S||i(S,x,g[x]);else o(o.P+o.F*(p||O),e,g);return g}},38:function(e,r){e.exports=t},39:function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4:function(t,e,r){var n=r(6);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},41:function(t,e,r){t.exports=!r(3)&&!r(12)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},42:function(t,e,r){var n=r(8),o=r(13),i=r(46)(!1),a=r(20)("IE_PROTO");t.exports=function(t,e){var r,c=o(t),u=0,s=[];for(r in c)r!=a&&n(c,r)&&s.push(r);for(;e.length>u;)n(c,r=e[u++])&&(~i(s,r)||s.push(r));return s}},43:function(t,e,r){var n=r(0).document;t.exports=n&&n.documentElement},44:function(t,e,r){"use strict";function n(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=o(e),this.reject=o(r)}var o=r(19);t.exports.f=function(t){return new n(t)}},45:function(t,e,r){var n=r(14),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,r,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),o))?r:i?n(e):"Object"==(c=n(e))&&"function"==typeof e.callee?"Arguments":c}},46:function(t,e,r){var n=r(13),o=r(35),i=r(47);t.exports=function(t){return function(e,r,a){var c,u=n(e),s=o(u.length),f=i(a,s);if(t&&r!=r){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}}},47:function(t,e,r){var n=r(17),o=Math.max,i=Math.min;t.exports=function(t,e){return t=n(t),t<0?o(t+e,0):i(t,e)}},48:function(t,e,r){"use strict";var n=r(60)(!0);r(36)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},5:function(t,e,r){var n=r(10),o=r(23);t.exports=r(3)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},50:function(t,e){e.f={}.propertyIsEnumerable},51:function(t,e,r){r(68);for(var n=r(0),o=r(5),i=r(11),a=r(1)("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<c.length;u++){var s=c[u],f=n[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},52:function(t,e,r){var n=r(4),o=r(62),i=r(33),a=r(20)("IE_PROTO"),c=function(){},u=function(){var t,e=r(22)("iframe"),n=i.length;for(e.style.display="none",r(43).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[i[n]];return u()};t.exports=Object.create||function(t,e){var r;return null!==t?(c.prototype=n(t),r=new c,c.prototype=null,r[a]=t):r=u(),void 0===e?r:o(r,e)}},54:function(t,e,r){t.exports=r(5)},56:function(t,e,r){var n=r(45),o=r(1)("iterator"),i=r(11);t.exports=r(2).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},57:function(t,e){e.f=Object.getOwnPropertySymbols},59:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},60:function(t,e,r){var n=r(17),o=r(15);t.exports=function(t){return function(e,r){var i,a,c=String(o(e)),u=n(r),s=c.length;return u<0||u>=s?t?"":void 0:(i=c.charCodeAt(u),i<55296||i>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?t?c.charAt(u):i:t?c.slice(u,u+2):a-56320+(i-55296<<10)+65536)}}},61:function(t,e,r){"use strict";var n=r(52),o=r(23),i=r(27),a={};r(5)(a,r(1)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(a,{next:o(1,r)}),i(t,e+" Iterator")}},62:function(t,e,r){var n=r(10),o=r(4),i=r(29);t.exports=r(3)?Object.defineProperties:function(t,e){o(t);for(var r,a=i(e),c=a.length,u=0;c>u;)n.f(t,r=a[u++],e[r]);return t}},63:function(t,e,r){var n=r(8),o=r(31),i=r(20)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},64:function(t,e,r){var n=r(4),o=r(19),i=r(1)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||void 0==(r=n(a)[i])?e:o(r)}},642:function(t,e,r){t.exports={default:r(643),__esModule:!0}},643:function(t,e,r){r(48),r(644),t.exports=r(2).Array.from},644:function(t,e,r){"use strict";var n=r(16),o=r(9),i=r(31),a=r(83),c=r(84),u=r(35),s=r(645),f=r(56);o(o.S+o.F*!r(87)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,o,l,p=i(t),d="function"==typeof this?this:Array,v=arguments.length,h=v>1?arguments[1]:void 0,m=void 0!==h,y=0,g=f(p);if(m&&(h=n(h,v>2?arguments[2]:void 0,2)),void 0==g||d==Array&&c(g))for(e=u(p.length),r=new d(e);e>y;y++)s(r,y,m?h(p[y],y):p[y]);else for(l=g.call(p),r=new d;!(o=l.next()).done;y++)s(r,y,m?a(l,h,[o.value,y],!0):o.value);return r.length=y,r}})},645:function(t,e,r){"use strict";var n=r(10),o=r(23);t.exports=function(t,e,r){e in t?n.f(t,e,o(0,r)):t[e]=r}},65:function(t,e,r){var n,o,i,a=r(16),c=r(97),u=r(43),s=r(22),f=r(0),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,m=0,y={},g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},x=function(t){g.call(t.data)};p&&d||(p=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++m]=function(){c("function"==typeof t?t:Function(t),e)},n(m),m},d=function(t){delete y[t]},"process"==r(14)(l)?n=function(t){l.nextTick(a(g,t,1))}:h&&h.now?n=function(t){h.now(a(g,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=x,n=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):n="onreadystatechange"in s("script")?function(t){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:d}},66:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},67:function(t,e,r){var n=r(4),o=r(6),i=r(44);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},68:function(t,e,r){"use strict";var n=r(69),o=r(59),i=r(11),a=r(13);t.exports=r(36)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,r):"values"==e?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},69:function(t,e){t.exports=function(){}},70:function(t,e,r){t.exports={default:r(79),__esModule:!0}},71:function(t,e,r){t.exports={default:r(95),__esModule:!0}},73:function(t,e){},79:function(t,e,r){r(80),t.exports=r(2).Object.assign},8:function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},80:function(t,e,r){var n=r(9);n(n.S+n.F,"Object",{assign:r(81)})},81:function(t,e,r){"use strict";var n=r(3),o=r(29),i=r(57),a=r(50),c=r(31),u=r(34),s=Object.assign;t.exports=!s||r(12)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n})?function(t,e){for(var r=c(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var d,v=u(arguments[f++]),h=l?o(v).concat(l(v)):o(v),m=h.length,y=0;m>y;)d=h[y++],n&&!p.call(v,d)||(r[d]=v[d]);return r}:s},82:function(t,e,r){var n=r(16),o=r(83),i=r(84),a=r(4),c=r(35),u=r(56),s={},f={},e=t.exports=function(t,e,r,l,p){var d,v,h,m,y=p?function(){return t}:u(t),g=n(r,l,e?2:1),x=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(d=c(t.length);d>x;x++)if((m=e?g(a(v=t[x])[0],v[1]):g(t[x]))===s||m===f)return m}else for(h=y.call(t);!(v=h.next()).done;)if((m=o(h,g,v.value,e))===s||m===f)return m};e.BREAK=s,e.RETURN=f},83:function(t,e,r){var n=r(4);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},84:function(t,e,r){var n=r(11),o=r(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},85:function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},86:function(t,e,r){var n=r(5);t.exports=function(t,e,r){for(var o in e)r&&t[o]?t[o]=e[o]:n(t,o,e[o]);return t}},87:function(t,e,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},t(i)}catch(t){}return r}},875:function(t,e,r){"use strict";function n(t){t="FileUpload前端错误[xxid:"+(a("xxid")||a("cps_xxid"))+"]:"+t;l()("/muc/util/reportErr",{errMsg:t}).catch(function(t){})}function o(t,e){var r=t&&t.errMsg,n=!1;if(r&&s.ua.isWx){var o="";if(/permission\sdenied/.test(r)){var i=e.sourceType;i.indexOf("album")>-1?o="请在设置-应用-微信-权限中开启存储权限":i.indexOf("camera")>-1&&(o="请在设置-应用-微信-权限中开启相机权限")}else/offline\sverifying/.test(r)&&(o="微信接口注册失败,请刷新页面重试",n=!0);return u.a.reject({ret:999999,errmsg:o,isWxInterfaceFail:n})}return u.a.resolve()}function i(t,e){if(t=t||"0.0.0",e=e||"0.0.0",t===e)return 0;for(var r=t.split("."),n=e.split("."),o=Math.max(r.length,n.length),i=0;i<o;i++){var a=~~n[i],c=~~r[i];if(a<c)return-1;if(a>c)return 1}return-1}function a(t){var e=new RegExp("(?:^|;+|\\s+)"+t+"=([^;]*)"),r=document.cookie.match(e);return r?r[1]:""}e.b=n,e.a=o,e.c=i;var c=r(71),u=r.n(c),s=r(38),f=(r.n(s),r(106)),l=r.n(f)},9:function(t,e,r){var n=r(0),o=r(2),i=r(16),a=r(5),c=r(8),u=function(t,e,r){var s,f,l,p=t&u.F,d=t&u.G,v=t&u.S,h=t&u.P,m=t&u.B,y=t&u.W,g=d?o:o[e]||(o[e]={}),x=g.prototype,b=d?n:v?n[e]:(n[e]||{}).prototype;d&&(r=e);for(s in r)(f=!p&&b&&void 0!==b[s])&&c(g,s)||(l=f?b[s]:r[s],g[s]=d&&"function"!=typeof b[s]?r[s]:m&&f?i(l,n):y&&b[s]==l?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((g.virtual||(g.virtual={}))[s]=l,t&u.R&&x&&!x[s]&&a(x,s,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},91:function(t,e,r){"use strict";var n=r(0),o=r(2),i=r(10),a=r(3),c=r(1)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];a&&e&&!e[c]&&i.f(e,c,{configurable:!0,get:function(){return this}})}},92:function(t,e,r){"use strict";e.__esModule=!0;var n=r(70),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}},947:function(t,e,r){"use strict";function n(t,e){return t=g()({},_,t),i(t,e)}function o(t,e){var r=t.appId,n=t.url,o=t.ext,i=void 0===o?{}:o;return n?w()(n,v()({rawData:e.base64,serverid:e.serverId,appid:r},i)).then(function(t){var r=t.data,n=void 0===r?{}:r;return n.data=p()({},n.data,{dataBase:e.base64,localId:e.localId}),n},function(t){return m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t)})}):m.a.resolve({ret:999999,errmsg:"uploadOcr url is required"})}function i(t,e){return e.base64?a(t,e):e.localId?c(t,e.localId,e.serverId):e.file?u(t,e.file):void 0}function a(t,e){var r=e.base64,n=e.size,o=e.name,i=void 0===o?"":o,a=t.maxSize&&1024*t.maxSize*1024||null;if(a&&n&&n>a)return m.a.resolve({ret:10001,errmsg:"上传的文件大小不能超过"+(t.maxSize||"20")+"MB",data:{}});var c="/platform/file/uploadPicture";t.extParam=t.extParam||{};var u=v()({},t.extParam,{imgdata:r,bizid:t.bizId,name:i});return t.requrestUrl&&(c=t.requrestUrl),w()(c,u,6e5).then(function(t){var e=t.data,n=void 0===e?{}:e,o={ret:n.ret,errmsg:n.errmsg,data:{base64:r,response:n.data}};return Object(j.isObject)(n.data)&&n.data.url&&(o.data.url=n.data.url,o.data.origUrl=n.data.url.replace(/\?.*$/,"")),0===n.ret&&Object(j.isString)(n.data)&&(o.data.url=n.data,o.data.origUrl=n.data.replace(/\?.*$/,"")),o},function(t){return Object(x.b)("uploadBase64 error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{base64:r}})})}function c(t,e,r){var n="/platform/file/uploadWxPicture";t.extParam=t.extParam||{};var o=v()({},t.extParam,{serverid:r,bizid:t.bizId,appid:t.appId});return t.requrestUrl&&(n=t.requrestUrl),w()(n,o,6e5).then(function(t){var n=t.data,o=void 0===n?{}:n,i={ret:o.ret,errmsg:o.errmsg,data:{localId:e,serverId:r,response:o.data}};return Object(j.isObject)(o.data)&&o.data.url&&(i.data.url=o.data.url,i.data.origUrl=o.data.url.replace(/\?.*$/,"")),0===o.ret&&Object(j.isString)(o.data)&&(i.data.url=o.data,i.data.origUrl=o.data.replace(/\?.*$/,"")),i},function(t){return Object(x.b)("uploadLocalId error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{localId:e,serverId:r}})})}function u(t,e){var r=t.maxSize&&1024*t.maxSize*1024||O;if(e.size&&e.size>r)return m.a.resolve({ret:10001,errmsg:"上传的文件大小不能超过"+(t.maxSize||"20")+"MB",data:{}});var n="/platform/file/uploadFile";t.url&&(n=t.url);var o=new window.FormData;o.append("file",e),o.append("bizid",t.bizId);var i=t.requestParams;if(Object(j.isObject)(i))for(var a in i)o.append(a,i[a]);return Object(b.upload)(n,o,6e5).then(function(t){var r=t.data,n=void 0===r?{}:r,o={ret:n.ret,errmsg:n.errmsg,data:{name:e.name,type:e.type,size:e.size}};return 0===n.ret&&(n.data.file_url&&(n.data.url=n.data.file_url),o.data.name=n.data.name,o.data.url=n.data.url,o.data.origUrl=n.data.url.replace(/\?.*$/,""),o.data._rawData=n.data),o},function(t){return Object(x.b)("uploadOtherFile error "+f()(t)),m.a.resolve({ret:999999,errmsg:Object(j.getErrmsg)(t),data:{}})})}e.a=n,e.b=o;var s=r(111),f=r.n(s),l=r(70),p=r.n(l),d=r(92),v=r.n(d),h=r(71),m=r.n(h),y=r(263),g=r.n(y),x=r(875),b=r(106),w=r.n(b),j=r(38),_=(r.n(j),{appId:"",bizId:""}),O=20971520},95:function(t,e,r){r(73),r(48),r(51),r(96),r(100),r(101),t.exports=r(2).Promise},96:function(t,e,r){"use strict";var n,o,i,a,c=r(18),u=r(0),s=r(16),f=r(45),l=r(9),p=r(6),d=r(19),v=r(85),h=r(82),m=r(64),y=r(65).set,g=r(98)(),x=r(44),b=r(66),w=r(99),j=r(67),_=u.TypeError,O=u.process,S=O&&O.versions,I=S&&S.v8||"",A=u.Promise,T="process"==f(O),P=function(){},M=o=x.f,E=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[r(1)("species")]=function(t){t(P,P)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==I.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),L=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},z=function(t,e){if(!t._n){t._n=!0;var r=t._c;g(function(){for(var n=t._v,o=1==t._s,i=0;r.length>i;)!function(e){var r,i,a,c=o?e.ok:e.fail,u=e.resolve,s=e.reject,f=e.domain;try{c?(o||(2==t._h&&W(t),t._h=1),!0===c?r=n:(f&&f.enter(),r=c(n),f&&(f.exit(),a=!0)),r===e.promise?s(_("Promise-chain cycle")):(i=L(r))?i.call(r,u,s):u(r)):s(n)}catch(t){f&&!a&&f.exit(),s(t)}}(r[i++]);t._c=[],t._n=!1,e&&!t._h&&k(t)})}},k=function(t){y.call(u,function(){var e,r,n,o=t._v,i=C(t);if(i&&(e=b(function(){T?O.emit("unhandledRejection",o,t):(r=u.onunhandledrejection)?r({promise:t,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=T||C(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},W=function(t){y.call(u,function(){var e;T?O.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),z(e,!0))},U=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw _("Promise can't be resolved itself");(e=L(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,s(U,n,1),s(F,n,1))}catch(t){F.call(n,t)}}):(r._v=t,r._s=1,z(r,!1))}catch(t){F.call({_w:r,_d:!1},t)}}};E||(A=function(t){v(this,A,"Promise","_h"),d(t),n.call(this);try{t(s(U,this,1),s(F,this,1))}catch(t){F.call(this,t)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=r(86)(A.prototype,{then:function(t,e){var r=M(m(this,A));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=T?O.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&z(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n;this.promise=t,this.resolve=s(U,t,1),this.reject=s(F,t,1)},x.f=M=function(t){return t===A||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!E,{Promise:A}),r(27)(A,"Promise"),r(91)("Promise"),a=r(2).Promise,l(l.S+l.F*!E,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(c||!E),"Promise",{resolve:function(t){return j(c&&this===a?A:this,t)}}),l(l.S+l.F*!(E&&r(87)(function(t){A.all(t).catch(P)})),"Promise",{all:function(t){var e=this,r=M(e),n=r.resolve,o=r.reject,i=b(function(){var r=[],i=0,a=1;h(t,!1,function(t){var c=i++,u=!1;r.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,r[c]=t,--a||n(r))},o)}),--a||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=M(e),n=r.reject,o=b(function(){h(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},97:function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},98:function(t,e,r){var n=r(0),o=r(65).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,c=n.Promise,u="process"==r(14)(a);t.exports=function(){var t,e,r,s=function(){var n,o;for(u&&(n=a.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){a.nextTick(s)};else if(!i||n.navigator&&n.navigator.standalone)if(c&&c.resolve){var f=c.resolve(void 0);r=function(){f.then(s)}}else r=function(){o.call(n,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}},99:function(t,e,r){var n=r(0),o=n.navigator;t.exports=o&&o.userAgent||""}})});