shop-live/unpackage/cache/wgt/__UNI__0E46DAD/app-service.js

17 lines
280 KiB
JavaScript
Raw Normal View History

2023-10-31 20:41:54 +08:00
(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"0056":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={radioGroup:{value:"",disabled:!1,shape:"circle",activeColor:"#2979ff",inactiveColor:"#c8c9cc",name:"",size:18,placement:"row",label:"",labelColor:"#303133",labelSize:14,labelDisabled:!1,iconColor:"#ffffff",iconSize:12,borderBottom:!1,iconPlacement:"left"}}},"02a4":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={notify:{top:0,type:"primary",color:"#ffffff",bgColor:"",message:"",duration:3e3,fontSize:15,safeAreaInsetTop:!1}}},"04d1":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=null;var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==r&&clearTimeout(r),i){var n=!r;r=setTimeout((function(){r=null}),e),n&&"function"===typeof t&&t()}else r=setTimeout((function(){"function"===typeof t&&t()}),e)};e.default=n},"0502":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={code:{seconds:60,startText:"\u83b7\u53d6\u9a8c\u8bc1\u7801",changeText:"X\u79d2\u91cd\u65b0\u83b7\u53d6",endText:"\u91cd\u65b0\u83b7\u53d6",keepRunning:!1,uniqueKey:""}}},"054e":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return r}));var r={jyfParser:i("3fc5").default},n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._$s(1,"i",!t.auth_token)?i("div",{staticClass:t._$s(1,"sc","register absolute"),attrs:{_i:1}},[i("div",{staticClass:t._$s(2,"sc","login"),attrs:{_i:2}},[i("div",{staticClass:t._$s(3,"sc","shading"),attrs:{_i:3}},[i("div",{staticClass:t._$s(4,"sc","pictrue acea-row row-center-wrapper"),attrs:{_i:4}},[i("image",{attrs:{_i:5}})])]),t._$s(6,"i",1===t.formItem)?i("div",{staticClass:t._$s(6,"sc","whiteBg"),attrs:{_i:6}},[i("div",{staticClass:t._$s(7,"sc","title acea-row row-center-wrapper"),attrs:{_i:7}},t._l(t._$s(8,"f",{forItems:t.navList}),(function(e,r,n,o){return i("div",{key:t._$s(8,"f",{forIndex:n,key:r}),staticClass:t._$s("8-"+o,"sc","item"),class:t._$s("8-"+o,"c",t.current===r?"on":""),attrs:{_i:"8-"+o},on:{click:function(e){return t.navTap(r)}}},[t._v(t._$s("8-"+o,"t0-0",t._s(e)))])})),0),i("div",{staticClass:t._$s(9,"sc","list"),attrs:{hidden:t._$s(9,"a-hidden",1!==t.current),_i:9}},[i("form",{attrs:{_i:10},on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[i("div",{staticClass:t._$s(11,"sc","item"),attrs:{_i:11}},[i("div",{staticClass:t._$s(12,"sc","acea-row row-middle"),attrs:{_i:12}},[i("image",{attrs:{_i:13}}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.account,expression:"account"}],attrs:{_i:14},domProps:{value:t._$s(14,"v-model",t.account)},on:{input:function(e){e.target.composing||(t.account=e.target.value)}}})])]),i("div",{staticClass:t._$s(15,"sc","item"),attrs:{_i:15}},[i("div",{staticClass:t._$s(16,"sc","acea-row row-middle"),attrs:{_i:16}},[i("image",{attrs:{_i:17}}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{_i:18},domProps:{value:t._$s(18,"v-model",t.password)},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})])])]),i("div",{staticClass:t._$s(19,"sc","tip"),attrs:{_i:19}},[i("span",{staticClass:t._$s(20,"sc","font-color-red"),attrs:{_i:20},on:{click:function(e){t.formItem=2}}}),i("navigator",{staticClass:t._$s(21,"sc","forgetPwd"),attrs:{_i:21}})])]),i("div",{staticClass:t._$s(22,"sc","list"),attrs:{hidden:t._$s(22,"a-hidden",0!==t.current),_i:22}},[i("div",{staticClass:t._$s(23,"sc","item"),attrs:{_i:23}},[i("div",{staticClass:t._$s(24,"sc","acea-row row-middle"),attrs:{_i:24}},[i("image",{attrs:{_i:25}}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.account,expression:"account"}],attrs:{_i:26},domProps:{value:t._$s(26,"v-model",t.account)},on:{input:functi
2023-10-28 21:43:15 +08:00
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
2023-10-31 20:41:54 +08:00
function(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var i=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,i.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(l))}d.state.get=function(){return this._vm._data.$$state},d.state.set=function(t){0},f.prototype.commit=function(t,e,i){var r=this,n=y(t,e,i),o=n.type,a=n.payload,s=(n.options,{type:o,payload:a}),c=this._mutations[o];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},f.prototype.dispatch=function(t,e){var i=this,r=y(t,e),n=r.type,o=r.payload,a={type:n,payload:o},s=this._actions[n];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,i.state)}))}catch(u){0}var c=s.length>1?Promise.all(s.map((function(t){return t(o)}))):s[0](o);return new Promise((function(t,e){c.then((function(e){try{i._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,i.state)}))}catch(u){0}t(e)}),(function(t){try{i._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,i.state,t)}))}catch(u){0}e(t)}))}))}},f.prototype.subscribe=function(t,e){return h(t,this._subscribers,e)},f.prototype.subscribeAction=function(t,e){var i="function"===typeof t?{before:t}:t;return h(i,this._actionSubscribers,e)},f.prototype.watch=function(t,e,i){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,i)},f.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},f.prototype.registerModule=function(t,e,i){void 0===i&&(i={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),m(this,this.state,t,this._modules.get(t),i.preserveState),v(this,this.state)},f.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var i=g(e.state,t.slice(0,-1));l.delete(i,t[t.length-1])})),p(this)},f.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},f.prototype[[104,111,116,85,112,100,97,116,101].map((function(t){return String.fromCharCode(t)})).join("")]=function(t){this._modules.update(t),p(this,!0)},f.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(f.prototype,d);var _=C((function(t,e){var i={};return O(e).forEach((function(e){var r=e.key,n=e.val;i[r]=function(){var e=this.$store.state,i=this.$store.getters;if(t){var r=k(this.$store,"mapState",t);if(!r)return;e=r.context.state,i=r.context.getters}return"function"===typeof n?n.call(this,e,i):e[n]},i[r].vuex=!0})),i})),w=C((function(t,e){var i={};return O(e).forEach((function(e){var r=e.key,n=e.val;i[r]=function(){var e=[],i=arguments.length;while(i--)e[i]=arguments[i];var r=this.$store.commit;if(t){var o=k(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"===typeof n?n.apply(this,[r].concat(e)):r.apply(this.$store,[n].concat(e))}})),i})),A=C((function(t,e){var i={};return O(e).forEach((function(e){var r=e.key,n=e.val;n=t+n,i[r]=function(){if(!t||k(this.$store,"mapGetters",t))return this.$store.getters[n]},i[r].vuex=!0})),i})),x=C((function(t,e){var i={};return O(e).forEach((function(e){var r=e.key,n=e.val;i[r]=function(){var e=[],i=arguments.length;while(i--)e[i]=arguments[i];var r=this.$store.dispatch;if(t){var o=k(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"===typeof n?n.apply(this,[r].concat(e)):r.apply(this.$store,[n].concat(e))}})),i}));function O(t){return function(t){return Array.isArray(t)||a(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function C(t){return function(e,i){return"string"!==typeof e?(i=e,e=""):"/"!==e.ch
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=n=function(){return e},t.exports.__esModule=!0,t.exports["default"]=t.exports;var e={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,e,i){t[e]=i.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(T){f=function(t,e,i){return t[e]=i}}function d(t,e,i,r){var n=e&&e.prototype instanceof v?e:v,o=Object.create(n.prototype),s=new E(r||[]);return a(o,"_invoke",{value:O(t,i,s)}),o}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(T){return{type:"throw",arg:T}}}e.wrap=d;var p={};function v(){}function m(){}function g(){}var y={};f(y,c,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(P([])));_&&_!==i&&o.call(_,c)&&(y=_);var w=g.prototype=v.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var i;a(this,"_invoke",{value:function(n,a){function s(){return new e((function(i,s){(function i(n,a,s,c){var u=h(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,c)}))}c(u.arg)})(n,a,i,s)}))}return i=i?i.then(s,s):s()}})}function O(t,e,i){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return j()}for(i.method=n,i.arg=o;;){var a=i.delegate;if(a){var s=C(a,i);if(s){if(s===p)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===r)throw r="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r="executing";var c=h(t,e,i);if("normal"===c.type){if(r=i.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r="completed",i.method="throw",i.arg=c.arg)}}}function C(t,e){var i=e.method,r=t.iterator[i];if(void 0===r)return e.delegate=null,"throw"===i&&t.iterator["return"]&&(e.method="return",e.arg=void 0,C(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),p;var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function P(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(o.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:j}}function j(){return{value:void 0,done:!0}}return m.prototype=g,a(w,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,f(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},A(x.prototype),f(x.prototype,u,(f
2023-10-28 21:43:15 +08:00
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2023-10-31 20:41:54 +08:00
e.read=function(t,e,i,r,n){var o,a,s=8*n-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=i?n-1:0,d=i?-1:1,h=t[e+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,i,r,n,o){var a,s,c,u=8*o-n-1,l=(1<<u)-1,f=l>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),e+=a+f>=1?d/c:d*Math.pow(2,1-f),e*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*c-1)*Math.pow(2,n),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;t[i+h]=255&s,h+=p,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[i+h]=255&a,h+=p,a/=256,u-=8);t[i+h-p]|=128*v}},"91a1":function(t,e,i){"use strict";var r=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(i("9523")),o=r(i("3c9e")),a=r(i("dfe1")),s=r(i("87a9")),c=i("7c63");function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){(0,n.default)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f=function(t,e){var i={};return t.forEach((function(t){(0,c.isUndefined)(e[t])||(i[t]=e[t])})),i};e.default=function(t){return new Promise((function(e,i){var r,n=(0,o.default)((0,a.default)(t.baseURL,t.url),t.params),u={url:n,header:t.header,complete:function(r){t.fullPath=n,r.config=t;try{"string"===typeof r.data&&(r.data=JSON.parse(r.data))}catch(o){}(0,s.default)(e,i,r)}};if("UPLOAD"===t.method){delete u.header["content-type"],delete u.header["Content-Type"];var d={filePath:t.filePath,name:t.name};r=uni.uploadFile(l(l(l({},u),d),f(["files","timeout","formData"],t)))}else if("DOWNLOAD"===t.method)(0,c.isUndefined)(t.timeout)||(u.timeout=t.timeout),r=uni.downloadFile(u);else{r=uni.request(l(l({},u),f(["data","method","timeout","dataType","responseType","sslVerify","firstIpv4"],t)))}t.getTask&&t.getTask(r,t)}))}},"91f1":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={noNetwork:{tips:"\u54ce\u5440\uff0c\u7f51\u7edc\u4fe1\u53f7\u4e22\u5931",zIndex:"",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8C
2023-10-28 21:43:15 +08:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
2023-10-31 20:41:54 +08:00
var r=i("1fb5"),n=i("9152"),o=i("e3db");function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=c.prototype):(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,i){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(t,e,i);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,i)}function u(t,e,i,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,r){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r);c.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=c.prototype):t=d(t,e);return t}(t,e,i,r):"string"===typeof e?function(t,e,i){"string"===typeof i&&""!==i||(i="utf8");if(!c.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,i);t=s(t,r);var n=t.write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(c.isBuffer(e)){var i=0|h(e.length);return t=s(t,i),0===t.length?t:(e.copy(t,0,0,i),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||function(t){return t!==t}(e.length)?s(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|h(e.length);t=s(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return R(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,e>>>=0,i<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return P(this,e,i);case"utf8":case"utf-8":return k(this,e,i);case"ascii":return S(this,e,i);case"latin1":case"binary":return E(this,e,i);case"base64":return C(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function g(t,e,i,r,n){if(0===t.length)return-1;if("string"===typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"===typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"===typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){var o,a=1,s=t.length,c=e.length;if